***

title: create
slug: /reference/python/rest/compat/tokens/create
description: Create a new API token.
max-toc-depth: 3
---------------------

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

Create a new API token.

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

## **Response Example**

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

## **Example**

```python {9}
from signalwire.rest import RestClient

client = RestClient(
    project="your-project-id",
    token="your-api-token",
    host="your-space.signalwire.com",
)

token = client.compat.tokens.create(name="my-token", permissions=["voice", "messaging"])
```