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

# Create end user token

> Creates a token meant to be used for the end user.

## Body parameters

**emails** `string[]`

**external\_id** `string`

**from** `string`

**mailbox\_id** `string`

**tags** `string[]`

## Response body

> [tab] 200
>
> **expires\_at** `integer`
>
> **token** `string`

> [tab] default
>
> unexpected error
>
> **errors** `APIError[]`
>
> Will contain both "v1" (deprecated, or soon to be) errors and "v2" errors. When possible, prefer errors that are not deprecated.
>
> **properties**
>
> **code** `string`
>
> **deprecated** `boolean`
>
> **message** `string`
>
> **will\_be\_deprecated** `boolean`

```json JSON
{
  "emails": [
    "string"
  ],
  "external_id": "string",
  "from": "string",
  "mailbox_id": "string",
  "tags": [
    "string"
  ]
}
```

```javascript JavaScript

  const response = await fetch(
    "POST /api/v1/chat/token",
    {
      method: "post",
      headers: {
        "Content-Type": "application/json",
        "Authorization": `Bearer {token}`
      },
      body: JSON.stringify({
  "emails": [
    "string"
  ],
  "external_id": "string",
  "from": "string",
  "mailbox_id": "string",
  "tags": [
    "string"
  ]
})
    }
  );
            
          
```

```json 200
{
  "expires_at": "integer",
  "token": "string"
}
```

```json default
{
  "errors": [
    {
      "code": "string",
      "deprecated": "boolean",
      "message": "string",
      "will_be_deprecated": "boolean"
    }
  ]
}
```



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