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

# Add Device Token

> Add device token



## OpenAPI

````yaml post /devices/add-token
openapi: 3.1.0
info:
  title: Monyfix API
  description: Monyfix
  version: 1.0.0
servers: []
security: []
paths:
  /devices/add-token:
    post:
      tags:
        - devices
      summary: Add Device Token
      description: Add device token
      operationId: add_device_token_devices_add_token_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeviceAddRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeviceAddResponse'
        '400':
          description: Token already exist
          content:
            application/json:
              example:
                detail: Token already exists
        '401':
          description: >-
            No `Authorization` access token header, token is invalid or user
            removed
          content:
            application/json:
              examples:
                not authenticated:
                  summary: No authorization token header
                  value:
                    detail: Not authenticated
                invalid token:
                  summary: >-
                    Token validation failed, decode failed, it may be expired or
                    malformed
                  value:
                    detail: 'Token invalid: {detailed error msg}'
                removed user:
                  summary: User removed
                  value:
                    detail: User removed
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    DeviceAddRequest:
      properties:
        token:
          type: string
          title: Token
        device_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Device Type
        app_version:
          anyOf:
            - type: string
            - type: 'null'
          title: App Version
        os_version:
          anyOf:
            - type: string
            - type: 'null'
          title: Os Version
      type: object
      required:
        - token
      title: DeviceAddRequest
    DeviceAddResponse:
      properties:
        message:
          type: string
          title: Message
      type: object
      required:
        - message
      title: DeviceAddResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````