Skip to content

Promote the secondary API secret

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

Completes a rotation: the secondary secret becomes the primary and the old primary stops working at once, for your own paths and for calls you make on your sub-accounts’ paths. Afterwards there is no secondary secret, and primary.rotated_at and primary.rotated_by record the change.

Only the account itself may call this: {auth_id} must be the Auth ID you authenticate with (a parent cannot manage a sub-account’s credentials, 403), and agent, supervisor and member accounts have no API credentials to manage (403). Replies carry Cache-Control: no-store.

auth_id
required
string

Your Auth ID.

The credentials after the promotion.

Media type application/json
object
data

The account’s Auth ID and its secrets as hints.

object
auth_id

The account’s Auth ID: the Basic-auth user name.

string
primary

The primary secret, the one in use.

object
hint

Eight bullets and the secret’s last four characters.

string
rotated_at

When a secondary secret was last promoted to primary (RFC 3339), or null if never.

string
rotated_by

Auth ID (or sign-in id) that promoted it, or null if never.

string
secondary

The secondary secret, or null when there is none.

object
created_at

When the secondary secret was created (RFC 3339).

string
created_by

Auth ID (or sign-in id) that created it.

string
hint

Eight bullets and the secret’s last four characters.

string
status

Always “success”.

string

Example

{
"data": {
"auth_id": "AC000000000000000001",
"primary": {
"hint": "••••••••0000",
"rotated_at": "2026-11-20T10:00:00Z",
"rotated_by": "AC000000000000000001"
},
"secondary": {
"created_at": "2026-11-26T09:30:00Z",
"created_by": "AC000000000000000001",
"hint": "••••••••1111"
}
},
"status": "success"
}

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

{auth_id} is not the authenticated account, or the account has no API credentials to manage.

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 account was not found.

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

There is no secondary secret to promote.

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 secret could not be promoted.

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