# Create a token

Create a Bearer Token to authenticate requests and manage permissions for different operations. The token value will be displayed only once at creation time. Securely store it immediately.

Endpoint: POST /v1/REST/tokens
Version: 1.0.0
Security: basicAuth, bearerAuth

## Request fields (application/json):

  - `Name` (string, required)
    Required. A unique identifier for the token.

  - `Permissions` (array)
    List of permissions assigned to the token (e.g. read_template, create_template, update_template, delete_template, read_image, create_image, etc.).

  - `ExpiresInDays` (integer)
    Number of days until the token expires. Default: 365 days.

  - `ExpiresAt` (string)
    Date at which the token expires (RFC3339).

## Response 201 fields (application/json):

  - `Count` (integer)
    Number of items in this response

  - `Data` (array)

  - `Data.ID` (integer)
    The ID of the token.

  - `Data.Name` (string)
    A unique identifier for the token.

  - `Data.Permissions` (array)
    List of permissions assigned to the token.

  - `Data.AccessToken` (string,null)
    The token value to use for authentication. Only displayed once at creation time.

  - `Data.ExpiresAt` (string)
    Date at which the token expires (RFC3339).

  - `Data.CreatedAt` (string)
    Date on which the token was created (RFC3339).

  - `Data.UpdatedAt` (string)
    Date on which the token was last updated (RFC3339).

  - `Total` (integer)
    Total number of items available


## Response 400 fields

## Response 401 fields

## Response 403 fields

## Response 429 fields

## Response 500 fields
