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

# Sign In

> Authenticate and obtain an access token (JWT) for API requests. The access token must be included in the Authorization header as 'Bearer <token>' for all subsequent API calls.



## OpenAPI

````yaml /api-reference/auth-api.json post /external/api/v1/sign-in
openapi: 3.1.0
info:
  title: Cloudidr Authentication API
  description: API for authentication and access token management.
  version: 1.0.0
servers:
  - url: https://public-api.cloudidr.com
    description: Production server
security: []
paths:
  /external/api/v1/sign-in:
    post:
      summary: Sign In
      description: >-
        Authenticate and obtain an access token (JWT) for API requests. The
        access token must be included in the Authorization header as 'Bearer
        <token>' for all subsequent API calls.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - username
                - password
              properties:
                username:
                  type: string
                  description: User's email or username
                password:
                  type: string
                  description: User's password
            example:
              username: user@example.com
              password: your_password
      responses:
        '200':
          description: Successfully authenticated - Returns access token
          content:
            application/json:
              schema:
                type: object
                properties:
                  access_token:
                    type: string
                    description: JWT access token to be used in Authorization header
                  token_type:
                    type: string
                    description: Token type (always 'Bearer')
                  expires_in:
                    type: integer
                    description: Token expiration time in seconds
              example:
                access_token: >-
                  eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
                token_type: Bearer
                expires_in: 3600
        '400':
          description: Bad Request - Missing or invalid credentials
          content:
            application/json:
              example:
                error:
                  code: '400'
                  message: Bad Request
                  details:
                    timestamp: '2025-03-04T17:01:01'
                    description: Username and password are required
        '401':
          description: Unauthorized - Invalid credentials
          content:
            application/json:
              example:
                error:
                  code: '401'
                  message: Unauthorized
                  details:
                    timestamp: '2025-03-04T17:01:01'
                    description: Invalid username or password
        '500':
          description: Internal Server Error - Unexpected error occurred
          content:
            application/json:
              example:
                error:
                  code: '500'
                  message: Internal Server Error
                  details:
                    timestamp: '2025-03-04T17:17:08'
                    description: Unexpected error. Our team is working on it
      security: []

````