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

# Create contact (mobile)

> Allows a mobile app user to create a new contact for a specific assistant, or globally for all connected assistants. The mobile app user's token is passed in the body.



## OpenAPI

````yaml api-reference/openapi.json post /create-contact-mobile
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:
  /create-contact-mobile:
    post:
      tags:
        - Contacts
      summary: Create a new contact (from mobile app)
      description: >-
        Allows a mobile app user to create a new contact for a specific
        assistant, or globally for all connected assistants. The mobile app
        user's token is passed in the body.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ContactRequest'
      responses:
        '200':
          description: >-
            Contact(s) added successfully. Or error if assistant not connected
            or contact already exists.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuccessResponse'
        '401':
          description: Invalid or expired token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Database or server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    ContactRequest:
      type: object
      required:
        - token
        - assistant_id
        - name
        - phone
        - image
        - global
      properties:
        token:
          type: string
          description: JWT Access Token of the mobile app user.
          example: eyJ...
        assistant_id:
          type: integer
          description: ID of the assistant user this contact belongs to.
          example: 101
        name:
          type: string
          example: Emergency Contact
        phone:
          type: string
          example: '+34600112233'
        image:
          type: string
          nullable: true
          example: http://example.com/contact_image.jpg
        global:
          type: boolean
          description: >-
            If true, adds the contact to all assistants connected to the mobile
            user.
          example: false
    SuccessResponse:
      type: object
      properties:
        status:
          type: string
          example: success
        message:
          type: string
          example: Operation completed successfully
    ErrorResponse:
      type: object
      properties:
        status:
          type: string
          example: error
        message:
          type: string
          example: Database connection failed

````