> This page is for Referencia de la API.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://signalcore.ai/docs/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://signalcore.ai/docs/_mcp/server.

# Create

POST https://signalcore.ai/v1/tokens
Content-Type: application/json

For an hour, the person may start and read their own conversations with these agents of
the organization the key acts on, and use their live sockets. A token rests on its key:
revoking the key ends it.

Reference: https://signalcore.ai/docs/referencia/tokens-de-persona/create

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Body (application/json)

This endpoint expects an object.

- `agents` (list of string, required)
- `external_id` (string, required)
- `name` (string, required)
- `email` (string, optional, nullable)

## Response

### 201

Successful Response

- `token` (string, required)
- `expires_at` (datetime, required)

## Errors

### 422 Tokens Create Request Unprocessable Entity Error

Validation Error

- `detail` (list of ValidationError, optional)

## Types

### ValidationError

- `loc` (list of ValidationErrorLocItem, required)
- `msg` (string, required)
- `type` (string, required)
- `input` (any, optional)
- `ctx` (map from string to any, optional)

### ValidationErrorLocItem

## Examples

**Request**

```json
{
  "agents": [
    "agt_01M4XYHF1AN7PC3HQSX1B6G135"
  ],
  "external_id": "user_42",
  "name": "Lucía Pérez",
  "email": "lucia@example.com"
}
```

**Response**

```json
{
  "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJ1c2VyXzQyIn0.c2lnbmF0dXJh",
  "expires_at": "2026-10-17T10:30:00Z"
}
```

**SDK Code**

```python Un token para Lucía
import requests

url = "https://signalcore.ai/v1/tokens"

payload = {
    "agents": ["agt_01M4XYHF1AN7PC3HQSX1B6G135"],
    "external_id": "user_42",
    "name": "Lucía Pérez",
    "email": "lucia@example.com"
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```