Tokens

Update an API Token

Changed on

Changes the name or enabled permission categories of an existing project API token. For the SignalWire REST API's project route, use Update API token.

The response contains the token's id, name, and permissions only. The token secret is returned once, by Generate a new API Token, and cannot be retrieved afterwards. To get a new value for the same token, use Regenerate API token.

Updating a token does not rotate or reissue its secret. The existing secret keeps working after the update.

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.

patch/Accounts/{AccountSid}/tokens/{token_id}

Request

  • Base URL
    https://YOUR_SPACE.signalwire.com/api/laml/2010-04-01
  • URL
    https://YOUR_SPACE.signalwire.com/api/laml/2010-04-01/Accounts/{AccountSid}/tokens/{token_id}
  • Auth
    HTTP basic

Path parameters

AccountSidstring uuid required

Universal Unique Identifier.

The unique identifier for the project you want to use to authenticate this request.

token_idstring uuid required

Universal Unique Identifier.

The unique identifier of the project API token.

Request body

namestring

The name representing the project API token.

permissionsstring[]

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

Example request

{
  "name": "John Doe's Token",
  "permissions": [
    "calling",
    "fax",
    "messaging"
  ]
}

Response

The request has succeeded.

idstring uuid required

Universal Unique Identifier.

namestring required

The name of the API Token.

permissionsstring[] required

The permissions enabled for this token.

Example response

{
  "name": "John Doe's Token",
  "permissions": [
    "calling",
    "fax",
    "messaging"
  ]
}

Changes

    • breaking

      removed the required property from the response with the status

    • breaking

      the response's property type changed from string to no type, and format from uuid to no format for status

    • info

      added to the response property allOf list for the response status