Skip to content

Disable or enable a sub-account

PATCH
/v1/Accounts/{auth_id}/Tenants/{tenant_auth_id}/Status
curl --request PATCH \
--url https://api.siprtc.io/v1/Accounts/example/Tenants/example/Status \
--header 'Authorization: Basic <credentials>' \
--header 'Content-Type: application/json' \
--data '{ "is_disabled": true }'

Disables (is_disabled: true, status inactive) or re-enables (false, status active) a sub-account directly under the authenticated account. Any account type may call it, and the lookup is always among the authenticated account’s own sub-accounts, whatever {auth_id} says.

A disabled sub-account’s portal sign-in is disabled, and its API credentials stop authenticating, as do those of its own sub-accounts. The API gateway caches credentials, so this can take up to 10 minutes to apply to API calls. Send the sub-account’s Auth ID, not its email address.

auth_id
required
string

Your Auth ID (the authenticated account).

tenant_auth_id
required
string

Auth ID of the sub-account.

The new state.

Media type application/json
object
is_disabled
required

True disables the sub-account (status inactive), false enables it (status active). Required.

boolean

Example

true

The sub-account’s new state.

Media type application/json
object
auth_id

The sub-account’s Auth ID as given in the path.

string
is_disabled

The new state.

boolean
message

Always “tenant status updated successfully”.

string
status

Always “success”.

string

Example

{
"auth_id": "AC000000000000000002",
"is_disabled": true,
"message": "tenant status updated successfully",
"status": "success"
}

The body is not JSON, is_disabled is missing, or the change 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 authenticated 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"
}

The change could not be queued for the sign-in.

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"
}