Change account role (own or competitor)
PATCH
/accounts/{platform}/{username}
const url = 'https://api.warmup.social/accounts/instagram/example';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"role":"own"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://api.warmup.social/accounts/instagram/example \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "role": "own" }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”platform
required
string
The account’s network.
username
required
string
Username or Facebook id in lower case, as in the account list.
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
role
required
string
Responses
Section titled “Responses”Role updated.
Media typeapplication/json
object
platform
required
string
username
required
string
role
required
string
Example
{ "platform": "instagram", "role": "own"}Invalid request.
Media typeapplication/json
object
statusCode
required
integer
message
required
One of:
string
Array<string>
object
key
additional properties
any
error
string
key
additional properties
any
Example
{ "statusCode": 400, "message": "Invalid request", "error": "Bad Request"}The Bearer token is missing or invalid.
Media typeapplication/json
object
statusCode
required
integer
message
required
One of:
string
Array<string>
object
key
additional properties
any
error
string
key
additional properties
any
Example
{ "statusCode": 400, "message": "Invalid request", "error": "Bad Request"}The requested resource was not found.
Media typeapplication/json
object
statusCode
required
integer
message
required
One of:
string
Array<string>
object
key
additional properties
any
error
string
key
additional properties
any
Example
{ "statusCode": 400, "message": "Invalid request", "error": "Bad Request"}