Update an API Token
PATCH/Accounts/:AccountSid/tokens/:token_id
Update an API Token's name or permissions.
Request
Path Parameters
AccountSid uuidrequired
The unique identifier for the project you want to use to authenticate this request.
token_id uuidrequired
The unique identifier of the project API token that you want to update.
- application/json
Body
required
name string
The name representing the project API token.
Example:
John Doe's Token
permissions string[]
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:
["calling","fax","messaging"]
Responses
- 200
- 422
OK
- application/json
- Schema
- Example (from schema)
Schema
id string
The ID of the created API Token.
Example:
ea14556a-984f-11ee-b9d1-0242ac120002
name string
The name of the created API Token.
Example:
John Doe's Token
permissions string[]
The permissions enabled for this token.
Example:
["calling","fax","messaging"]
token string
The API token that can be used along with the project ID for basic authentication
Example:
PT037258e533e87ac63174ee136ed0798dc85d4f4f9e6d7191
{
"id": "ea14556a-984f-11ee-b9d1-0242ac120002",
"name": "John Doe's Token",
"permissions": [
"calling",
"fax",
"messaging"
],
"token": "PT037258e533e87ac63174ee136ed0798dc85d4f4f9e6d7191"
}
Unprocessable Entity. You may have specified invalid parameters.
- application/json
- Schema
- Example (from schema)
Schema
type stringrequired
code stringrequired
message stringrequired
attribute string
url urirequired
{
"code": 10003,
"message": "Permissions contains invalid selections (valid permissions are: calling, chat, fax, management, messaging, numbers, pubsub, storage, tasking, and video)",
"status": 400,
"more_info": "https://developer.signalwire.com/cxml/overview/error-codes"
}