For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Log inSign up
Support
cXMLREST API
cXMLREST API
  • Core
    • Overview
    • Authorization
    • Error codes
    • Paging
    • REST client SDKs
  • Compatibility REST API
      • POSTGenerate a new API Token
      • DELDelete an API Token
      • PATCHUpdate an API Token
LogoLogoSignalWire Docs
Log inSign up
Support
Compatibility REST APITokens

Generate a new API Token

|View as Markdown|Open in Claude|
POST
https://your_space.signalwire.com/api/laml/2010-04-01/Accounts/:AccountSid/tokens
POST
/api/laml/2010-04-01/Accounts/:AccountSid/tokens
$curl -X POST https://your_space.signalwire.com/api/laml/2010-04-01/Accounts/AccountSid/tokens \
> -H "Content-Type: application/x-www-form-urlencoded" \
> -u "<project_id>:<api_token>" \
> -d "name=John%20Doe's%20Token" \
> -d "permissions=calling" \
> -d "permissions=fax" \
> -d "permissions=messaging"
1{
2 "id": "ea14556a-984f-11ee-b9d1-0242ac120002",
3 "name": "John Doe's Token",
4 "permissions": [
5 "calling",
6 "fax",
7 "messaging"
8 ],
9 "token": "PT037258e533e87ac63174ee136ed0798dc85d4f4f9e6d7191"
10}
Generate an API Token for a project to be used to authenticate requests within the project. #### Permissions The API token used to authenticate must have the following scope(s) enabled to make a successful request: _Management_. [Learn more about API scopes](/docs/platform/your-signalwire-api-space).
Was this page helpful?
Previous

Delete an API Token

Next
Built with

Generate an API Token for a project to be used to authenticate requests within the project.

Permissions

The API token used to authenticate must have the following scope(s) enabled to make a successful request: Management.

Learn more about API scopes.

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) ```

Path parameters

AccountSidstringRequiredformat: "uuid"
The unique identifier for the project you want to use to authenticate this request.

Request

This endpoint expects an object.
namestringRequired>=1 character
The name representing the project API token.
permissionslist of stringsRequired

The permissions you would like to enable for this project API token. Valid permissions are: calling, chat, datasphere, fax, management, messaging, numbers, pubsub, storage, tasking, and video.

subproject_idstringOptionalformat: "uuid"
The unique identifier of the subproject you would like to create a token for. Must belong to the parent project.

Response

The request has succeeded.
idstringformat: "uuid"
The unique identifier of the created API Token.
namestring>=1 character
The name of the created API Token.
permissionslist of strings
The permissions enabled for this token.
tokenstring
The API token that can be used along with the project ID for basic authentication.

Errors

400
Bad Request Error
401
Unauthorized Error
422
Unprocessable Entity Error

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)