Create alias address

View as MarkdownOpen in Claude
Creates an alias address that forwards to an existing resource in your project. `name` and `resource_id` are required; `display_name` defaults to `name`, `channels` to all three, `codecs` to none, and `context` to `public`. The handler resource can't be changed later: to point an alias at a different resource, delete it and create a new one. #### 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_-]+$"<=256 characters

URL-safe name for the alias — lowercase letters and numbers, with underscores or dashes in place of spaces. Dashes can’t start or end the name or appear twice in a row. Must be unique within its context and is used to build the alias’s address.

resource_idstringRequiredformat: "uuid"

ID of the resource that handles calls and messages to this alias. Must reference a resource in your project. Cannot be changed after creation: to point an alias at a different resource, delete it and create a new one.

display_namestringOptional

Human-friendly label for the alias. Defaults to name.

channelslist of enumsOptionalDefaults to ["audio","messaging","video"]
Channels to enable on the alias. At least one is required. Defaults to all three.
codecslist of enumsOptionalDefaults to []
Codecs to enable for calls to the alias. Defaults to none.
contextenumOptionalDefaults to public

Access context to create the alias in. Defaults to public.

Response

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

The object type. Always alias.

resource_idstringformat: "uuid"
ID of the resource that handles calls and messages to this alias.
namestring

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

display_namestring

Human-friendly label for the alias. Defaults to name.

display_typeenum
Display type derived from the handler resource. Returned for reference only and cannot be set.
channelslist of enums
Channels enabled on this alias.
codecslist of enums
Codecs enabled for calls to this alias. Empty when none are set.
contextenum
Access context the alias lives in.
uristring

The resource address this alias resolves to, in the form /<context>/<name>.

created_atdatetime
Date and time when the alias address was created.
updated_atdatetime
Date and time when the alias address was last updated.

Errors

400
Bad Request Error
401
Unauthorized Error
422
Unprocessable Entity Error
500
Internal Server Error