Skip to navigation

Generate a new API Token

View as MarkdownOpen in Claude

Creates a project API token for server-side REST authentication within the project. It remains usable until you delete it or remove required permissions. Client applications should receive a service-specific Chat, PubSub, Room, or Subscriber Token instead.

For the SignalWire REST API’s project route, use Create API token.

Save the token secret now
The response is the only place the token secret is returned. No later request, including Update an API Token, can read it back. If you lose it, delete the token and create a new one.

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 API Token.
namestring>=1 character
The name of the API Token.
permissionslist of strings
The permissions enabled for this token.
tokenstring

The API token secret, used as the password in HTTP Basic auth alongside the project ID. Returned only in this response and cannot be retrieved again; store it securely.

Errors

400
Bad Request Error
401
Unauthorized Error
422
Unprocessable Entity Error