update

View as MarkdownOpen in Claude

tokens.update

Update an existing API token. Uses PATCH.

Path parameters

token_idstringRequiredformat: "uuid"
The unique identifier of the token to update.

Request

namestringOptional
The name representing the API token.
permissionslist of enumsOptional
The permissions you would like to enable for this token. Valid permissions are calling, chat, datasphere, fax, management, messaging, numbers, pubsub, storage, tasking, and video

Response

idstringRequiredformat: "uuid"
The ID of the API Token.
namestringRequired
The name of the API Token.
permissionslist of enumsRequired
The permissions enabled for this token.

Response Example

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

Example

import { RestClient } from "@signalwire/sdk";
const client = new RestClient({
project: "your-project-id",
token: "your-api-token",
host: "your-space.signalwire.com"
});
await client.project.tokens.update("token-id", { name: "renamed-token" });