Sample - Twilio API
POST/2010-04-01/Accounts/{AccountSid}/SIP/CredentialLists/{CredentialListSid}/Credentials.json

Create a SIP credential

Creates a new SIP credential in a specified credential list. Supply Username and Password in the form-encoded request, and use the returned credential identifier to reference the resource later.

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.

2 parameters · 2 body fields
AccountSidstringrequired
The unique identifier of the Account responsible for this credential. Must be a 34-character identifier matching `^AC[0-9a-fA-F]{32}$`.
CredentialListSidstringrequired
The unique identifier of the credential list that will contain the credential. Must be a 34-character identifier matching `^CL[0-9a-fA-F]{32}$`.

Form-encoded SIP credential details containing the authentication username and password.

Usernamestringrequired
The username that will be passed when authenticating SIP requests. The username should be sent in response to Twilio's challenge of the initial INVITE. It can be up to 32 characters long.
Passwordstringrequired
The password that the username will use when authenticating SIP requests. The password must be a minimum of 12 characters, contain at least 1 digit, and have mixed case. (eg `IWasAtSignal2018`)

1 status code
201Returns the created credential, including its `sid`, associated Account and credential list identifiers, username, creation and update timestamps, and resource URI.
sidstringoptional
A 34 character string that uniquely identifies this resource.
account_sidstringoptional
The unique id of the Account that is responsible for this resource.
credential_list_sidstringoptional
The unique id that identifies the credential list that includes this credential.
usernamestringoptional
The username for this credential.
date_createdstringoptional
The date that this resource was created, given as GMT in [RFC 2822](https://www.php.net/manual/en/class.datetime.php#datetime.constants.rfc2822) format.
date_updatedstringoptional
The date that this resource was last updated, given as GMT in [RFC 2822](https://www.php.net/manual/en/class.datetime.php#datetime.constants.rfc2822) format.
uristringoptional
The URI for this resource, relative to `https://api.twilio.com`

Error handling

AccountSid must be a 34-character account identifier matching the AC format, and CredentialListSid must be a 34-character identifier matching the CL format. Username and Password are required; Password must be at least 12 characters, contain at least one digit, and use mixed case.