Create maintenance request
curl --request POST \
--url https://phonefarm.withmithras.com/maintenance/requests \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"request_id": "<string>",
"account_id": "<string>",
"inputs": {
"steps": [
{
"action": "edit_profile",
"params": {}
}
],
"metadata": {}
},
"callback": {
"url": "<string>",
"metadata": {}
},
"requested_by": {
"system": "<string>",
"user": "<string>",
"metadata": {}
},
"platform": "tiktok"
}
'import requests
url = "https://phonefarm.withmithras.com/maintenance/requests"
payload = {
"request_id": "<string>",
"account_id": "<string>",
"inputs": {
"steps": [
{
"action": "edit_profile",
"params": {}
}
],
"metadata": {}
},
"callback": {
"url": "<string>",
"metadata": {}
},
"requested_by": {
"system": "<string>",
"user": "<string>",
"metadata": {}
},
"platform": "tiktok"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
request_id: '<string>',
account_id: '<string>',
inputs: {steps: [{action: 'edit_profile', params: {}}], metadata: {}},
callback: {url: '<string>', metadata: {}},
requested_by: {system: '<string>', user: '<string>', metadata: {}},
platform: 'tiktok'
})
};
fetch('https://phonefarm.withmithras.com/maintenance/requests', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://phonefarm.withmithras.com/maintenance/requests",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'request_id' => '<string>',
'account_id' => '<string>',
'inputs' => [
'steps' => [
[
'action' => 'edit_profile',
'params' => [
]
]
],
'metadata' => [
]
],
'callback' => [
'url' => '<string>',
'metadata' => [
]
],
'requested_by' => [
'system' => '<string>',
'user' => '<string>',
'metadata' => [
]
],
'platform' => 'tiktok'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://phonefarm.withmithras.com/maintenance/requests"
payload := strings.NewReader("{\n \"request_id\": \"<string>\",\n \"account_id\": \"<string>\",\n \"inputs\": {\n \"steps\": [\n {\n \"action\": \"edit_profile\",\n \"params\": {}\n }\n ],\n \"metadata\": {}\n },\n \"callback\": {\n \"url\": \"<string>\",\n \"metadata\": {}\n },\n \"requested_by\": {\n \"system\": \"<string>\",\n \"user\": \"<string>\",\n \"metadata\": {}\n },\n \"platform\": \"tiktok\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://phonefarm.withmithras.com/maintenance/requests")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"request_id\": \"<string>\",\n \"account_id\": \"<string>\",\n \"inputs\": {\n \"steps\": [\n {\n \"action\": \"edit_profile\",\n \"params\": {}\n }\n ],\n \"metadata\": {}\n },\n \"callback\": {\n \"url\": \"<string>\",\n \"metadata\": {}\n },\n \"requested_by\": {\n \"system\": \"<string>\",\n \"user\": \"<string>\",\n \"metadata\": {}\n },\n \"platform\": \"tiktok\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://phonefarm.withmithras.com/maintenance/requests")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"request_id\": \"<string>\",\n \"account_id\": \"<string>\",\n \"inputs\": {\n \"steps\": [\n {\n \"action\": \"edit_profile\",\n \"params\": {}\n }\n ],\n \"metadata\": {}\n },\n \"callback\": {\n \"url\": \"<string>\",\n \"metadata\": {}\n },\n \"requested_by\": {\n \"system\": \"<string>\",\n \"user\": \"<string>\",\n \"metadata\": {}\n },\n \"platform\": \"tiktok\"\n}"
response = http.request(request)
puts response.read_body{
"status": "<string>",
"process_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"request_id": "<string>",
"process_type": "<string>",
"duplicate": true
}{
"status": "<string>",
"process_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"request_id": "<string>",
"process_type": "<string>"
}{
"error": "<string>",
"details": {}
}{
"error": "<string>",
"details": {}
}{
"error": "<string>",
"details": {}
}{
"error": "<string>",
"details": {}
}Processes
Create maintenance request
Create an account-first maintenance process. Omit platform for TikTok; set platform to instagram for Instagram profile maintenance.
POST
/
maintenance
/
requests
Create maintenance request
curl --request POST \
--url https://phonefarm.withmithras.com/maintenance/requests \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"request_id": "<string>",
"account_id": "<string>",
"inputs": {
"steps": [
{
"action": "edit_profile",
"params": {}
}
],
"metadata": {}
},
"callback": {
"url": "<string>",
"metadata": {}
},
"requested_by": {
"system": "<string>",
"user": "<string>",
"metadata": {}
},
"platform": "tiktok"
}
'import requests
url = "https://phonefarm.withmithras.com/maintenance/requests"
payload = {
"request_id": "<string>",
"account_id": "<string>",
"inputs": {
"steps": [
{
"action": "edit_profile",
"params": {}
}
],
"metadata": {}
},
"callback": {
"url": "<string>",
"metadata": {}
},
"requested_by": {
"system": "<string>",
"user": "<string>",
"metadata": {}
},
"platform": "tiktok"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
request_id: '<string>',
account_id: '<string>',
inputs: {steps: [{action: 'edit_profile', params: {}}], metadata: {}},
callback: {url: '<string>', metadata: {}},
requested_by: {system: '<string>', user: '<string>', metadata: {}},
platform: 'tiktok'
})
};
fetch('https://phonefarm.withmithras.com/maintenance/requests', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://phonefarm.withmithras.com/maintenance/requests",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'request_id' => '<string>',
'account_id' => '<string>',
'inputs' => [
'steps' => [
[
'action' => 'edit_profile',
'params' => [
]
]
],
'metadata' => [
]
],
'callback' => [
'url' => '<string>',
'metadata' => [
]
],
'requested_by' => [
'system' => '<string>',
'user' => '<string>',
'metadata' => [
]
],
'platform' => 'tiktok'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://phonefarm.withmithras.com/maintenance/requests"
payload := strings.NewReader("{\n \"request_id\": \"<string>\",\n \"account_id\": \"<string>\",\n \"inputs\": {\n \"steps\": [\n {\n \"action\": \"edit_profile\",\n \"params\": {}\n }\n ],\n \"metadata\": {}\n },\n \"callback\": {\n \"url\": \"<string>\",\n \"metadata\": {}\n },\n \"requested_by\": {\n \"system\": \"<string>\",\n \"user\": \"<string>\",\n \"metadata\": {}\n },\n \"platform\": \"tiktok\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://phonefarm.withmithras.com/maintenance/requests")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"request_id\": \"<string>\",\n \"account_id\": \"<string>\",\n \"inputs\": {\n \"steps\": [\n {\n \"action\": \"edit_profile\",\n \"params\": {}\n }\n ],\n \"metadata\": {}\n },\n \"callback\": {\n \"url\": \"<string>\",\n \"metadata\": {}\n },\n \"requested_by\": {\n \"system\": \"<string>\",\n \"user\": \"<string>\",\n \"metadata\": {}\n },\n \"platform\": \"tiktok\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://phonefarm.withmithras.com/maintenance/requests")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"request_id\": \"<string>\",\n \"account_id\": \"<string>\",\n \"inputs\": {\n \"steps\": [\n {\n \"action\": \"edit_profile\",\n \"params\": {}\n }\n ],\n \"metadata\": {}\n },\n \"callback\": {\n \"url\": \"<string>\",\n \"metadata\": {}\n },\n \"requested_by\": {\n \"system\": \"<string>\",\n \"user\": \"<string>\",\n \"metadata\": {}\n },\n \"platform\": \"tiktok\"\n}"
response = http.request(request)
puts response.read_body{
"status": "<string>",
"process_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"request_id": "<string>",
"process_type": "<string>",
"duplicate": true
}{
"status": "<string>",
"process_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"request_id": "<string>",
"process_type": "<string>"
}{
"error": "<string>",
"details": {}
}{
"error": "<string>",
"details": {}
}{
"error": "<string>",
"details": {}
}{
"error": "<string>",
"details": {}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Minimum string length:
1Minimum string length:
1Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Available options:
tiktok, instagram Response
Duplicate request; existing process returned.
Allowed value:
"accepted"Available options:
tiktok, instagram Available options:
queued, executing, retrying, completed, failed_terminal, cancelled ⌘I