Rename, suspend or reactivate a subaccount.
curl --request PATCH \
--url https://omni-api.sendblue.com/admin/subaccounts/{subaccount_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"status": "suspended"
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({status: 'suspended'})
};
fetch('https://omni-api.sendblue.com/admin/subaccounts/{subaccount_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://omni-api.sendblue.com/admin/subaccounts/{subaccount_id}"
payload = { "status": "suspended" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"id": "<string>",
"name": "<string>",
"status": "active",
"parent_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"error": {
"code": "invalid_request",
"message": "Unknown field",
"details": {
"field": "colour"
}
}
}Rename, suspend or reactivate a subaccount.
A suspended subaccount cannot authenticate or start new work.
Required permission: subaccounts:manage. Accepted credentials: a signed-in administrator, the account token.
PATCH
/
admin
/
subaccounts
/
{subaccount_id}
Rename, suspend or reactivate a subaccount.
curl --request PATCH \
--url https://omni-api.sendblue.com/admin/subaccounts/{subaccount_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"status": "suspended"
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({status: 'suspended'})
};
fetch('https://omni-api.sendblue.com/admin/subaccounts/{subaccount_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://omni-api.sendblue.com/admin/subaccounts/{subaccount_id}"
payload = { "status": "suspended" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"id": "<string>",
"name": "<string>",
"status": "active",
"parent_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"error": {
"code": "invalid_request",
"message": "Unknown field",
"details": {
"field": "colour"
}
}
}Authorizations
personbearerlegacyKeyId & legacyKeySecret
Body
application/json