Tokens

Update an API Token

Update an API Token's name or permissions.

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

Path parameters

AccountSidstring uuid required

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

token_idstring uuid required

The unique identifier of the project API token that you want to update.

Request body

namestring

The name representing the project API token.

permissionsstring[]

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

Example request

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

Response

OK

idstring

The ID of the created API Token.

namestring

The name of the created API Token.

permissionsstring[]

The permissions enabled for this token.

tokenstring

The API token that can be used along with the project ID for basic authentication

Example response

{
  "id": "ea14556a-984f-11ee-b9d1-0242ac120002",
  "name": "John Doe's Token",
  "permissions": [
    "calling",
    "fax",
    "messaging"
  ],
  "token": "PT037258e533e87ac63174ee136ed0798dc85d4f4f9e6d7191"
}

Changes