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

# Authenticate

> Exchange email and password for a JWT access token



## OpenAPI

````yaml /openapi.json post /api/auth/token
openapi: 3.0.0
info:
  title: Authentication API
  description: API for user authentication and token generation
  version: 1.0.0
servers:
  - url: https://api.retailreadyai.com
    description: Production server
  - url: https://stg.retailreadyai.com
    description: Staging server
security: []
paths:
  /api/auth/token:
    post:
      tags:
        - Authentication
      summary: Authenticate
      description: Exchange email and password for a JWT access token
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                email:
                  type: string
                  description: User's email
                password:
                  type: string
                  description: User's password
                  format: password
              required:
                - email
                - password
            example:
              email: john@doe.com
              password: JohnDoe123!
      responses:
        '200':
          description: Successfully generated access token
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Success message
                    example: API token issued successfully
                  data:
                    type: object
                    properties:
                      access_token:
                        type: string
                        description: JWT access token
                      token_type:
                        type: string
                        description: Type of token
                      expires_in:
                        type: integer
                        description: Token expiration time in seconds
              example:
                message: API token issued successfully
                data:
                  access_token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
                  token_type: Bearer
                  expires_in: 86400
        '400':
          description: Bad request - missing or invalid parameters
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                  error:
                    type: object
                    description: Error Object
                    properties:
                      code:
                        type: string
                        description: Error code
              example:
                message: Missing parameters
                error:
                  code: INVALID_REQUEST
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Invalid credentials
                  error:
                    type: object
                    description: Error Object
                    properties:
                      code:
                        type: string
                        description: Error code
              example:
                message: Invalid credentials
                error:
                  code: INVALID_CREDENTIALS
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                  error:
                    type: object
                    description: Error Object
                    properties:
                      code:
                        type: string
                        description: Error code
              example:
                message: Internal server error
                error:
                  code: INTERNAL_SERVER_ERROR

````