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

# Create a token

> Creates a new token for the project.



## OpenAPI

````yaml post /v1/project/tokens
openapi: 3.1.0
info:
  version: 1.0.1
  title: Poix API
servers:
  - url: https://api.poix.io
    description: Production server
security: []
paths:
  /v1/project/tokens:
    post:
      tags:
        - Tokens
      summary: Create a token
      description: Creates a new token for the project.
      operationId: createProjectToken
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                label:
                  type: string
                  minLength: 1
                  maxLength: 128
                  description: The label for the token.
                settings:
                  type: object
                  properties:
                    rateLimit:
                      type: object
                      properties:
                        limit:
                          type: number
                          description: The rate limit value.
                        window:
                          type: number
                          description: The rate limit window value.
                      required:
                        - limit
                        - window
                      description: The rate limit settings for the token.
                  description: The settings for the token.
              additionalProperties: false
            example:
              label: Dev token
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    format: uuid
                    description: The unique ID of the token.
                  token:
                    type: string
                    description: The token value.
                required:
                  - id
                  - token
              example:
                id: 0659684b-7658-451d-bb1e-3c400e0b0950
                token: poix-OzhCUl37R4yswp2EOKBGE6bjZ6EIWHjxJ6H3JOERkmIAmeibAbQ
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                  error:
                    type: object
                    properties:
                      issues:
                        type: array
                        items:
                          type: object
                          properties:
                            code:
                              type: string
                            message:
                              type: string
                            keys:
                              type: array
                              items:
                                type: string
                            path:
                              type: array
                              items:
                                type: string
                          required:
                            - code
                            - message
                            - keys
                            - path
                      name:
                        type: string
                        enum:
                          - ZodError
                    required:
                      - issues
                      - name
                required:
                  - success
                  - error
              example:
                success: false
                error:
                  issues:
                    - code: unrecognized_keys
                      keys:
                        - validations
                      path: []
                      message: 'Unrecognized key(s) in object: ''validations'''
                  name: ZodError
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      message:
                        type: string
                    required:
                      - message
                required:
                  - error
              example:
                error:
                  message: API key is invalid.
      security:
        - Bearer: []
components:
  securitySchemes:
    Bearer:
      type: http
      scheme: bearer
      bearerFormat: JWT

````