Create SIP address

View as MarkdownOpen in Claude
Creates a SIP address, along with its username, encryption, codec, cipher, and IP authentication settings. #### Permissions The API token used to authenticate must have the following scope(s) enabled to make a successful request: _Calling_, _Fax_, _Messaging_, or _Video_. [Learn more about API scopes](/docs/platform/your-signalwire-api-space).

Authentication

AuthorizationBasic
SignalWire Basic Authentication using Project ID and API Token. The client sends HTTP requests with the Authorization header containing the word Basic followed by a space and a base64-encoded string of project_id:token. The project ID will be used as the username and the API token as the password. Example: ``` Authorization: Basic base64(project_id:token) ```

Request

This endpoint expects an object.
namestringRequiredformat: "^[a-z0-9]+(-[a-z0-9]+)*$"<=50 characters

URL-safe name for the SIP address — lowercase letters, numbers, and hyphens only (no spaces or other special characters). Must be unique within the project and is used to build the address’s SIP URI.

calling_handler_resource_idstringRequiredformat: "uuid"
ID of the resource that handles inbound calls to this address. Must reference a resource in the caller's project.
userstringOptionalformat: "^\S+$"Defaults to *

SIP username used to reach this address (no spaces). Defaults to *, which accepts any username. Together with the address’s Domain, must be unique across your SignalWire account.

context_idstringOptionalformat: "uuid"
ID of the Domain this address should be grouped under. Must exist in your project. Defaults to your project's default Domain.
ip_auth_enabledbooleanOptionalDefaults to false
Whether to enforce IP authentication for this address.
ip_authlist of stringsOptionalDefaults to []

Whitelisted IP/CIDR entries. Required (at least one) when ip_auth_enabled is true. Maximum 256 entries.

codecslist of enumsOptionalDefaults to ["PCMU","PCMA"]

Non-empty subset of enabled codecs.

cipherslist of enumsOptionalDefaults to ["AEAD_AES_256_GCM_8","AES_256_CM_HMAC_SHA1_80","AES_CM_128_HMAC_SHA1_80","AES_256_CM_HMAC_SHA1_32","AES_CM_128_HMAC_SHA1_32"]

Non-empty subset of enabled SRTP ciphers.

encryptionenumOptionalDefaults to optional
SRTP encryption requirement for calls to this address.
passwordstringOptional

Write-only SIP registration password. Never returned in any response.

Response

The request has succeeded and a new resource has been created as a result.
idstringformat: "uuid"
Unique identifier for the SIP address.
typeenum

The object type. Always sip_address.

resource_idstringformat: "uuid"
ID of the resource this address belongs to.
namestring

URL-safe name for the SIP address. Used to build its SIP URI.

display_namestring

Human-friendly label for the SIP address. Defaults to name.

contextstring

The Domain this address is grouped under — for example, public for your project’s default Domain.

uristring
Full SIP URI for this address.
userstring

SIP username used to reach this address. * accepts any username.

encryptionenum
SRTP encryption requirement for calls to this address.
codecslist of enums
Enabled codecs for calls to this address.
cipherslist of enums
Enabled SRTP ciphers for calls to this address.
ip_auth_enabledboolean
Whether IP authentication is enforced for this address.
ip_authlist of strings

Whitelisted IP/CIDR entries used when ip_auth_enabled is true.

calling_handler_resource_idstringformat: "uuid"
ID of the resource that handles inbound calls to this address.
created_atdatetime
Date and time when the SIP address was created.
updated_atdatetime
Date and time when the SIP address was last updated.

Errors

401
Unauthorized Error
422
Unprocessable Entity Error
500
Internal Server Error