Create a secondary API secret
const url = 'https://api.siprtc.io/v1/Accounts/example/ApiCredentials/Secondary';const options = {method: 'POST', headers: {Authorization: 'Basic <credentials>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.siprtc.io/v1/Accounts/example/ApiCredentials/Secondary \ --header 'Authorization: Basic <credentials>'First step of a rotation without downtime: creates a second secret that authenticates alongside the primary from now on, and returns it in full. This reply is the only one that carries it without revealApiSecret. Move your applications to the new secret, then make it the primary with promoteSecondaryApiSecret, or discard it with deleteSecondaryApiSecret.
An account has at most one secondary secret (409 while one exists). The secret is also accepted where you call a sub-account’s paths with your own credentials. The change applies at once.
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.
Authorizations
Section titled “ Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ”Your Auth ID.
Responses
Section titled “ Responses ”The credentials, with the new secondary secret in full.
object
The credentials, with the new secondary secret in full.
object
The account’s Auth ID: the Basic-auth user name.
The primary secret, the one in use.
object
Eight bullets and the secret’s last four characters.
When a secondary secret was last promoted to primary (RFC 3339), or null if never.
Auth ID (or sign-in id) that promoted it, or null if never.
The secondary secret, or null when there is none.
object
When the secondary secret was created (RFC 3339).
Auth ID (or sign-in id) that created it.
Eight bullets and the secret’s last four characters.
The new secondary secret in full. Store it now; later reads show only its hint.
Always “success”.
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" }, "secret": "EXAMPLESECRET000000000000000000000000000" }, "status": "success"}Authentication failed: wrong or missing credentials, a disabled account, or an {auth_id} that is neither you nor your direct sub-account.
Example generated
example{auth_id} is not the authenticated account, or the account has no API credentials to manage.
object
The underlying error text. Only some 400 responses of the tenant list carry it.
What went wrong, in English.
Always “failed”.
Example
{ "error": "sql: connection is already closed", "message": "Account Details not found", "status": "failed"}The account was not found.
object
The underlying error text. Only some 400 responses of the tenant list carry it.
What went wrong, in English.
Always “failed”.
Example
{ "error": "sql: connection is already closed", "message": "Account Details not found", "status": "failed"}A secondary secret already exists: promote or delete it first.
object
The underlying error text. Only some 400 responses of the tenant list carry it.
What went wrong, in English.
Always “failed”.
Example
{ "error": "sql: connection is already closed", "message": "Account Details not found", "status": "failed"}The secret could not be created.
object
The underlying error text. Only some 400 responses of the tenant list carry it.
What went wrong, in English.
Always “failed”.
Example
{ "error": "sql: connection is already closed", "message": "Account Details not found", "status": "failed"}