***

title: update
slug: /reference/typescript/rest/compat/tokens/update
description: Update an API token.
max-toc-depth: 3
---------------------

For a complete index of all SignalWire documentation pages, fetch https://signalwire.com/docs/llms.txt

Update an API token. Uses PATCH.

<EndpointSchemaSnippet endpoint="PATCH /Accounts/{AccountSid}/tokens/{token_id}" />

## **Response Example**

<EndpointResponseSnippet endpoint="PATCH /Accounts/{AccountSid}/tokens/{token_id}" />

## **Example**

```typescript {9}
import { RestClient } from "@signalwire/sdk";

const client = new RestClient({
  project: "your-project-id",
  token: "your-api-token",
  host: "your-space.signalwire.com",
});

await client.compat.tokens.update("token-id", { name: "updated-token" });
```