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

# Create a token

> Create a new token for your account



## OpenAPI

````yaml post /api/v2/tokens
openapi: 3.0.0
info:
  version: 2.0.0
  title: Vida API
  description: Vida API Documentation
servers:
  - url: https://api.vida.dev
    description: Vida Production
    variables:
      baseUrl:
        default: api.vida.dev
        description: Production API Root
security: []
paths:
  /api/v2/tokens:
    post:
      tags:
        - Authorization
      summary: Create a token
      description: Create a new token for your account
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - type
                - description
              properties:
                type:
                  description: Permission for token. Only admin currently supported
                  type: string
                  default: admin
                description:
                  description: Friendly description for token
                  type: string
                  example: Main app
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: Token created successfully
                  token:
                    type: object
                    properties:
                      token:
                        description: Token
                        type: string
                        example: 9fe4f9....
                      description:
                        description: Friendly description of token
                        type: string
                        example: Main app
                      type:
                        description: Token type
                        type: string
                        example: admin
                      timestamp:
                        description: Timestamp when created
                        type: string
                        example: '167882907'
                      userId:
                        description: User Id that owns token
                        type: number
                        example: 3
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
      security:
        - apiKeyAuth: []
components:
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: query
      name: token
      description: Vida API Token

````