> ## Documentation Index
> Fetch the complete documentation index at: https://docs.smartsend.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Authentication

> Authenticate with the Smart Send REST API using bearer tokens.

The Smart Send API uses bearer tokens for authentication. Every request must include a valid API token in the `Authorization` header.

## Creating an API token

To create an API token, start by logging into the [Smart Send platform](https://app.smartsend.io) .

**1. Navigate to API Tokens**

Go to **[API Tokens](https://app.smartsend.io/api-tokens)**.

**2. Create token**

In the **Create API Token** section, fill in a name. The name is only used for your internal classification and is not visible outside your team.

![Create API Token form with token name field](https://mintcdn.com/smartsend/oG0vUhSrEWp3SfSv/images/api-tokens/sanctum-create.png?fit=max\&auto=format\&n=oG0vUhSrEWp3SfSv\&q=85\&s=d1c7df8960fd6ceabf8d67ecf6120e4e)

**3. Generate token**

Click the **Create** button. A modal opens displaying the newly generated API token.

![Modal displaying the newly generated API token](https://mintcdn.com/smartsend/oG0vUhSrEWp3SfSv/images/api-tokens/sanctum-created.png?fit=max\&auto=format\&n=oG0vUhSrEWp3SfSv\&q=85\&s=294eb5f668ff58b38c85a9c55df5d331)

> [!WARNING]
>
> The API token is only shown once. Copy it and store it somewhere safe immediately. If you lose it, you will need to delete it and create a new one.

## Using your API token

Include your API token in the `Authorization` header of every request, prefixed with `Bearer`:

```bash theme={null}
curl https://app.smartsend.io/api/v2/agents/dk \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json"
```

> [!NOTE]
>
> Treat API tokens like passwords. Never commit them to version control, embed them in client-side code, or share them in support tickets. Use environment variables or a secrets manager to keep them safe.

## Revoking an API token

If a token is no longer needed or may have been exposed, revoke it immediately.

**1. Navigate to API Tokens**

Go to **[API Tokens](https://app.smartsend.io/api-tokens)**.

**2. Find the token**

In the **Manage API Tokens** section, find the token you want to delete.

![List of API tokens with delete option](https://mintcdn.com/smartsend/oG0vUhSrEWp3SfSv/images/api-tokens/sanctum-token-list.png?fit=max\&auto=format\&n=oG0vUhSrEWp3SfSv\&q=85\&s=c05daa558a0939d3a5495d1cdbd5593d)

**3. Delete the token**

Click the **Delete** button next to the token and confirm the action.

![Confirmation dialog for deleting an API token](https://mintcdn.com/smartsend/oG0vUhSrEWp3SfSv/images/api-tokens/sanctum-delete-confirmation.png?fit=max\&auto=format\&n=oG0vUhSrEWp3SfSv\&q=85\&s=27925081cb98111a0a4f2062691f7b6a)

> [!WARNING]
>
> Deleting an API token is irreversible and immediately breaks any integration that is still using it.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.