> ## 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.

# Register assistant

> Registers a new assistant user, of type `OWNER`, and generates a security code for the companion mobile app connection. Returns an access token for the assistant.



## OpenAPI

````yaml api-reference/openapi.json post /register-assistant
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:
  /register-assistant:
    post:
      tags:
        - Authentication & Users
      summary: Register a new Assistant (OWNER) user
      description: >-
        Registers a new assistant user, of type `OWNER`, and generates a
        security code for the companion mobile app connection. Returns an access
        token for the assistant.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AssistantRegistrationRequest'
      responses:
        '200':
          description: >-
            Assistant registered successfully with security code and access
            token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AssistantRegistrationSuccess'
        '400':
          description: Invalid input or missing fields.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Database or server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    AssistantRegistrationRequest:
      type: object
      required:
        - phone
        - full_name
      properties:
        phone:
          type: string
          example: '+34612345678'
        full_name:
          type: string
          example: Cati Owner
    AssistantRegistrationSuccess:
      allOf:
        - $ref: '#/components/schemas/SuccessResponse'
        - type: object
          properties:
            code:
              type: string
              description: Security code for mobile app connection.
              example: AbC1dE2fG3
            access_token:
              type: string
              description: JWT Access Token for the registered assistant.
              example: eyJ...
            user_id:
              type: integer
              description: The user ID of the newly registered assistant.
              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

````