curl --request DELETE \
--url https://omni-api.sendblue.com/admin/subaccounts/{subaccount_id} \
--header 'Authorization: Bearer <token>'const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
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}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text){
"error": {
"code": "invalid_request",
"message": "Unknown field",
"details": {
"field": "colour"
}
}
}Permanently close a direct child account.
The active parent closes its child and revokes the child’s credentials.
The child spends from the parent’s wallet. Closure transfers no funds.
The parent can still read the closed account and its posted transactions.
Repeating the request returns 204. Closure cannot be reversed.
Active numbers, device lines, pending orders, active campaigns, outstanding
renewal exposure, open wallet holds or unsettled work return 409 conflict
with a blocker in error.details.reason. A foreign or root ID returns 404.
A request body or query parameter returns 400. For example, a 409
for an open reservation includes {"reason":"wallet_holds"} in error.details.
Required permission: subaccounts:manage. Accepted credentials: a signed-in administrator, the account token.
curl --request DELETE \
--url https://omni-api.sendblue.com/admin/subaccounts/{subaccount_id} \
--header 'Authorization: Bearer <token>'const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
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}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text){
"error": {
"code": "invalid_request",
"message": "Unknown field",
"details": {
"field": "colour"
}
}
}Authorizations
Response
The child is permanently closed. The response has no body.