Create credentials (digest auth) API for a Trunk
1. Create credentials (SIP digest)
Creates a username/password pair for SIP Digest authentication on the trunk. Configure the same values on your Voice AI platform’s SIP trunk settings.
HTTP Request
Request Headers
Header | Value |
|---|---|
Content-Type | application/json |
Request Parameters
The following parameters are sent as JSON in the body of the request:
Parameter Name | Mandatory/Optional | Value |
|---|---|---|
user_name | Mandatory | String; SIP digest username. Example: voice_ai_user |
password | Mandatory | String; SIP digest password. Use a strong secret. |
friendly_name | Optional | String; Label to identify where the creds are used (max 32 chars). Example: elevenlabs-prod, livekit-staging |
Example Request
HTTP Response
On success, the HTTP response status code will be 200 OK.
Example Response
Response Parameters
Parameter Name | Type & Value |
|---|---|
request_id | String; Unique identifier for this API request |
method | String; HTTP method used (POST) |
http_code | Integer; HTTP status code (200 for success) |
id | String; Unique identifier for this credential entry. Example: 1234 |
trunk_sid | String; The trunk these credentials are associated with |
user_name | String; The SIP digest username you set |
friendly_name | String or null; Optional label |
date_created | String; ISO 8601 timestamp when credentials were created |
date_updated | String; ISO 8601 timestamp when credentials were last updated |
2. List credentials (verify)
Lists credentials configured for the trunk.
HTTP Request
Example Request
HTTP Response
On success, the HTTP response status code will be 200 OK.
Example Response
Response Parameters
Parameter Name | Type & Value |
|---|---|
request_id | String; Unique identifier for this API request |
method | String; HTTP method used (GET) |
http_code | Integer; HTTP status code (200 for success) |
metadata.total | Integer; Total credential records available |
metadata.page_size | Integer; Page size applied |
metadata.page | Integer; Page number (if present) |
metadata.first_page_uri | String; URI for first page |
metadata.prev_page_uri | String or null; URI for previous page |
metadata.next_page_uri | String or null; URI for next page |
response | Array; List of credential objects |
response[].data.id | String; Unique identifier for the credential entry |
response[].data.trunk_sid | String; The trunk these credentials are associated with |
response[].data.user_name | String; SIP digest username |
response[].data.friendly_name | String or null; Optional label |
response[].data.date_created | String; ISO 8601 timestamp when created |
response[].data.date_updated | String; ISO 8601 timestamp when updated |
3. Delete credentials (rotate / revoke)
Deletes a credential entry when rotating credentials or removing access for a provider environment.
HTTP Request
Important: credential id is passed as query param id (not /credentials/<CREDENTIAL_ID>).
Example Request
HTTP Response
On success, the HTTP response status code will be 200 OK.
Example Response
Response Parameters
Parameter Name | Type & Value |
|---|---|
request_id | String; Unique identifier for this API request |
method | String; HTTP method used (DELETE) |
http_code | Integer; HTTP status code (200 for success) |
id | String; Deleted credential identifier |
trunk_sid | String; Trunk SID this credential belonged to |
user_name | String; SIP digest username that was deleted |
friendly_name | String or null; Optional label |
date_created | String; ISO 8601 timestamp when credential was originally created |
date_updated | String; ISO 8601 timestamp when credential was last updated |