Create an auth credential
const url = 'https://api.siprtc.io/v1/Accounts/example/SipTrunk/AuthCredentials';const options = { method: 'POST', headers: {Authorization: 'Basic <credentials>', 'Content-Type': 'application/json'}, body: '{"customer_auth_id":"AC000000000000000001","friendly_name":"Main PBX","list_id":["6f1c2b9e-0d4a-4c8e-9b7a-2f5d3e1a0b01"],"password":"S3cretPassw0rd!","username":"pbx-main"}'};
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/SipTrunk/AuthCredentials \ --header 'Authorization: Basic <credentials>' \ --header 'Content-Type: application/json' \ --data '{ "customer_auth_id": "AC000000000000000001", "friendly_name": "Main PBX", "list_id": [ "6f1c2b9e-0d4a-4c8e-9b7a-2f5d3e1a0b01" ], "password": "S3cretPassw0rd!", "username": "pbx-main" }'Creates a username/password credential that a carrier or PBX uses to authenticate calls on a SIP trunk. friendly_name must be unique on the account and an account can have at most 5 auth credentials. list_id puts the credential in those credential lists; IDs that do not exist are dropped. The response includes the password. Vendor accounts can act for a direct child account with customer_auth_id.
Authorizations
Section titled “ Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ”Auth ID of your account.
Request Bodyrequired
Section titled “ Request Bodyrequired ”The credential to create.
object
Vendor accounts only: create the credential for this direct child account.
Example
AC000000000000000001Label of the credential, unique among the account’s credentials.
Example
Main PBXIDs of credential lists to put the credential in. Unknown IDs are ignored.
Example
[ "6f1c2b9e-0d4a-4c8e-9b7a-2f5d3e1a0b01"]SIP digest password.
Example
S3cretPassw0rd!SIP digest username.
Example
pbx-mainResponses
Section titled “ Responses ”The new auth credential.
object
Auth ID of the account that owns the credential.
When the record was created (RFC 3339).
Auth ID of the account that created the record.
Label of the credential.
Auth credential ID (UUID).
JSON-encoded array of the credential list IDs it belongs to, as stored.
The credential lists it belongs to, resolved to ID and name. Filled by GET only.
object
Credential list ID.
Credential list name.
Auth ID of the account that last changed the record.
SIP digest password, returned in clear text.
Status of the credential.
When the record was last changed (RFC 3339).
SIP digest username.
Example
{ "auth_id": "AC000000000000000000", "created_at": "2026-01-15T10:30:00Z", "created_by": "AC000000000000000000", "friendly_name": "Main PBX", "id": "2d3e4f50-6172-4839-a4b5-c6d7e8f90a01", "list_id": "[\"6f1c2b9e-0d4a-4c8e-9b7a-2f5d3e1a0b01\"]", "list_ids": [ { "id": "6f1c2b9e-0d4a-4c8e-9b7a-2f5d3e1a0b01", "name": "PBX credentials" } ], "modified_by": "AC000000000000000000", "password": "S3cretPassw0rd!", "status": "active", "updated_at": "2026-01-16T08:00:00Z", "username": "pbx-main"}A required field is missing, the limit is reached, friendly_name is taken, the credential could not be stored, or the gateway did not supply your company (message “company id is empty”).
object
Human-readable explanation of the outcome.
Outcome of the request: “success” or “failed”.
Example
{ "message": "Invalid auth ID", "status": "success"}Missing or wrong Basic-auth credentials (returned by the API gateway).
Example generated
exampleCustomer_auth_id is not a direct child account of a vendor you belong to, or its parent is not a vendor.
object
Human-readable explanation of the outcome.
Outcome of the request: “success” or “failed”.
Example
{ "message": "Invalid auth ID", "status": "success"}The customer account could not be looked up.
object
Underlying error reported by the account lookup.
Human-readable explanation of the failure.
Always “failed”.
Example
{ "error": "account not found", "message": "Error fetching account details", "status": "failed"}