> Markdown version of https://tuna.am/en/docs/api/temporal-token-add/. Documentation index: [llms.txt](https://tuna.am/en/llms.txt), full text in one file: [llms-full.txt](https://tuna.am/en/llms-full.txt). Any page is available as Markdown: append `.md` to its URL without the trailing slash.

# Create a user token

post`/v1/temporal_tokens`

> **Deprecated**
>
> It may be replaced or removed in future versions of the API.

## Request

### Authorization

* **Authorization**stringheaderrequired

  Key in the format `Bearer <API-key>`. Create a key on the [API keys](https://my.tuna.am/api_keys) page.

### Request body

application/json

* **allow_http**boolean

  Allows creating HTTP tunnels

  **allow_tcp**boolean

  Allows creating TCP tunnels

  **description**stringrequired

  Description

  **Example:&#x20;**`CI deploy token`

  **domains**string\[]

  Reserved domains: if bindings are set, a tunnel can only be started on them and on the endpoints from endpoints

  **Example:&#x20;**`["demo-app.tuna.am"]`

  **duration**string

  Lifetime

  **Example:&#x20;**`24h`

  **endpoints**string\[]

  Aliases of reserved endpoints: if bindings are set, a tunnel can only be started on them and on the domains from domains

  **Example:&#x20;**`["postgres"]`

  **limit_by_active_tunnels**integer\<int64>

  Limit on the number of active tunnels

  **Example:&#x20;**`10`

  **limit_by_created_tunnels**integer\<int64>

  Limit on the total number of created tunnels

  **Example:&#x20;**`100`

### Response

200application/json

* **allow_http**boolean

  Allows creating HTTP tunnels

  **allow_tcp**boolean

  Allows creating TCP tunnels

  **created_at**string\<date-time>

  Creation date

  **description**string

  Description

  **Example:&#x20;**`CI deploy token`

  **domains**string\[]

  Reserved domains that tunnels are allowed on

  **Example:&#x20;**`["demo-app.tuna.am"]`

  **endpoints**string\[]

  Aliases of reserved endpoints that tunnels are allowed on

  **Example:&#x20;**`["postgres"]`

  **expired_at**string\<date-time>

  Expiration date

  **id**integer\<int64>

  Token ID

  **Example:&#x20;**`42`

  **last_used_at**string\<date-time>

  Last used date

  **limit_by_active_tunnels**integer\<int64>

  Limit on the number of active tunnels

  **Example:&#x20;**`10`

  **limit_by_created_tunnels**integer\<int64>

  Limit on the total number of created tunnels

  **Example:&#x20;**`100`

  **provisioned_by**string

  What created or modified the object: terraform means the Terraform provider, empty means another client

  **service_name**string

  Name of the service the token was issued for by `tuna service install`

  **Example:&#x20;**`my-service`

  **token**string

  Token

  **Example:&#x20;**`2dBvKpR7Wm2vXtL8Hc6sFjY3bQe`
