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

# Receive media (mobile)

> Retrieves a paginated list of images and audio messages sent to or from the authenticated mobile app user, sorted by recency. The user's token is passed in the body.



## OpenAPI

````yaml api-reference/openapi.json post /receive-media-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:
  /receive-media-mobile:
    post:
      tags:
        - Media
      summary: Receive images and audio messages (for mobile app)
      description: >-
        Retrieves a paginated list of images and audio messages sent to or from
        the authenticated mobile app user, sorted by recency. The user's token
        is passed in the body.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ReceiveMediaMobileRequest'
      responses:
        '200':
          description: List of received media (images and audio).
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/MediaItem'
        '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:
    ReceiveMediaMobileRequest:
      type: object
      required:
        - token
      properties:
        token:
          type: string
          description: JWT Access Token of the mobile app user.
          example: eyJ...
        limit:
          type: integer
          description: Number of media items to retrieve per page.
          example: 10
        page:
          type: integer
          description: Page number for pagination (starts at 1).
          example: 1
    MediaItem:
      type: object
      properties:
        media_id:
          type: integer
          example: 1
        sender_id:
          type: integer
          example: 201
        receiver_id:
          type: integer
          nullable: true
          example: 101
        media_path:
          type: string
          example: http://example.com/media/image1.jpg
        sent_at:
          type: string
          format: date-time
          description: Local time (Europe/Madrid).
          example: '2024-06-21 15:30:00'
        sender_name:
          type: string
          example: Mobile User One
        sender_image:
          type: string
          nullable: true
          example: http://example.com/mobile_user_image.jpg
        type:
          type: string
          enum:
            - audio
            - image
          example: image
    ErrorResponse:
      type: object
      properties:
        status:
          type: string
          example: error
        message:
          type: string
          example: Database connection failed

````