Update an API Token
PATCH/tokens/:token_id
Update an API Token's name or permissions.
Permissions
You can modify the functions allowed by this API Token by selecting which types of requests this API Token is allowed to make. Valid options are: calling, chat, fax, management, messaging, numbers, pubsub, storage, tasking, and video
Request
Path Parameters
The unique identifier of the token that you want to update.
- application/json
Body
required
The name representing the API token.
John Doe's Token
The permissions you would like to enable for this token. Valid permissions are calling, chat, fax, management, messaging, numbers, pubsub, storage, tasking, and video
["calling","fax","messaging"]
Responses
- 200
- 422
OK
- application/json
- Schema
- Example (from schema)
Schema
The ID of the created API Token.
ea14556a-984f-11ee-b9d1-0242ac120002
The name of the created API Token.
John Doe's Token
The permissions enabled for this token.
["calling","fax","messaging"]
The API token that can be used along with the project ID for basic authentication
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": "validation_error",
"code": "invalid_auth_token_permissions",
"message": "Permissions contains invalid selections (valid permissions are: calling, chat, fax, management, messaging, numbers, pubsub, storage, tasking, and video)",
"attribute": "permissions",
"url": "https://developer.signalwire.com/rest/overview/error-codes/#invalid_auth_token_permissions"
}