Skip to content

Delete a sub-account

DELETE
/v1/Accounts/{auth_id}/Tenants/{tenant_auth_id}
curl --request DELETE \
--url https://api.siprtc.io/v1/Accounts/example/Tenants/example \
--header 'Authorization: Basic <credentials>'

Deletes a sub-account directly under {auth_id} at once: the account is marked deleted (status deleted) and drops out of lists and lookups, and its portal sign-in, and its contact-centre workspace or worker, are removed asynchronously. There is no undo and no grace period; scheduleTenantDeletion deletes after a delay instead.

Unlike the other Tenants operations, this one acts on the account in the path, which must be a vendor, ent, reseller or superuser account (400 otherwise); use your own Auth ID. To be sure the sub-account’s API credentials stop working, disable it with updateTenantStatus first. Send the sub-account’s Auth ID, not its email address. No request body is read.

auth_id
required
string

Your Auth ID (the authenticated account).

tenant_auth_id
required
string

Auth ID of the sub-account.

Deleted successfully

Media type application/json
object
message

What was done.

string
status

Always “success”.

string

Example

{
"message": "tenant updated successfully",
"status": "success"
}

The path account is not a vendor, ent, reseller or superuser account, or the deletion could not be saved.

Media type application/json
object
error

The underlying error text. Only some 400 responses of the tenant list carry it.

string
message

What went wrong, in English.

string
status

Always “failed”.

string

Example

{
"error": "sql: connection is already closed",
"message": "Account Details not found",
"status": "failed"
}

Authentication failed: wrong or missing credentials, a disabled account, or an {auth_id} that is neither you nor your direct sub-account.

Media type application/json
string

Example generated

example

No such sub-account under the path account.

Media type application/json
object
error

The underlying error text. Only some 400 responses of the tenant list carry it.

string
message

What went wrong, in English.

string
status

Always “failed”.

string

Example

{
"error": "sql: connection is already closed",
"message": "Account Details not found",
"status": "failed"
}