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

# Edit contact (mobile)

> Allows a mobile app user to edit an existing contact for a specific assistant. Requires the mobile user to be connected to the assistant and the contact to belong to that assistant. The mobile app user's token is passed in the body.



## OpenAPI

````yaml api-reference/openapi.json post /edit-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:
  /edit-contact-mobile:
    post:
      tags:
        - Contacts
      summary: Edit an existing contact (from mobile app)
      description: >-
        Allows a mobile app user to edit an existing contact for a specific
        assistant. Requires the mobile user to be connected to the assistant and
        the contact to belong to that assistant. The mobile app user's token is
        passed in the body.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EditContactRequest'
      responses:
        '200':
          description: Contact updated successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuccessResponse'
        '400':
          description: Invalid input.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Invalid or expired token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: >-
            User not connected to the assistant or contact does not belong to
            the assistant.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Database or server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    EditContactRequest:
      type: object
      required:
        - token
        - assistant_id
        - contact_id
        - name
        - phone
        - image
      properties:
        token:
          type: string
          description: JWT Access Token of the mobile app user.
          example: eyJ...
        assistant_id:
          type: integer
          description: ID of the assistant the contact belongs to.
          example: 101
        contact_id:
          type: integer
          description: ID of the contact to update.
          example: 1
        name:
          type: string
          example: Updated Contact Name
        phone:
          type: string
          example: '+34600112233'
        image:
          type: string
          nullable: true
          example: http://example.com/updated_contact_image.jpg
    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

````