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

# Get user id

> Retrieves the user ID from the provided JWT access token. The user's token is passed in the body.



## OpenAPI

````yaml api-reference/openapi.json post /get-user-id
openapi: 3.0.0
info:
  title: Cati Main Server API
  version: 1.0.0
  description: >-
    API for managing Cati assistant users, app users, contacts, media,
    notifications and preferences.
servers:
  - url: /
security: []
paths:
  /get-user-id:
    post:
      tags:
        - Authentication & Users
      summary: Get user ID from token
      description: >-
        Retrieves the user ID from the provided JWT access token. The user's
        token is passed in the body.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GetUserIdRequest'
      responses:
        '200':
          description: User ID retrieved successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetUserIdResponse'
        '400':
          description: Invalid token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    GetUserIdRequest:
      type: object
      required:
        - token
      properties:
        token:
          type: string
          description: JWT Access Token of the user.
          example: eyJ...
    GetUserIdResponse:
      allOf:
        - $ref: '#/components/schemas/SuccessResponse'
        - type: object
          properties:
            user_id:
              type: integer
              description: The ID of the authenticated user.
              example: 101
    ErrorResponse:
      type: object
      properties:
        status:
          type: string
          example: error
        message:
          type: string
          example: Database connection failed
    SuccessResponse:
      type: object
      properties:
        status:
          type: string
          example: success
        message:
          type: string
          example: Operation completed successfully

````