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

# Get or create an API token



## OpenAPI

````yaml /swagger.yaml post /tokens/current
openapi: 3.0.1
info:
  title: Fohlio REST API
  description: This is the documentation for the Fohlio REST API.
  version: 1.0.0
servers:
  - url: /openapi
  - url: https://app.fohlio.com/be/openapi
security: []
paths:
  /tokens/current:
    post:
      tags:
        - Token
      summary: Get or create an API token
      operationId: tokens#post
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/requestBodyTokenCreate'
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/token'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      security:
        - apiKey: []
components:
  schemas:
    requestBodyTokenCreate:
      type: object
      properties:
        email:
          type: string
        password:
          type: string
      required:
        - email
        - password
    token:
      type: object
      properties:
        value:
          type: string
    error:
      type: object
      properties:
        error:
          type: string
  securitySchemes:
    apiKey:
      type: apiKey
      name: authorization
      in: header

````