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

# Download an inbound file

> Download the file a user sent on WhatsApp or RCS, as bytes.



## OpenAPI

````yaml get /v2/notify/inbound/{message_id}/media
openapi: 3.1.0
info:
  title: Prelude API
  version: 2.0.0
  description: The Prelude API allows you to send messages to your users.
  contact:
    email: support@prelude.so
servers:
  - url: https://api.prelude.dev
    description: Production server
security:
  - apiToken: []
tags:
  - name: Notify
    description: Send transactional and marketing messages with compliance enforcement.
  - name: Transactional
    description: Send transactional messages (deprecated - use Notify API instead).
  - name: Verify
    description: Verify phone numbers.
  - name: Watch
    description: Evaluate email addresses and phone numbers for trustworthiness.
  - name: Lookup
    description: >-
      Retrieve detailed information about a phone number including carrier data,
      line type, and portability status.
paths:
  /v2/notify/inbound/{message_id}/media:
    get:
      tags:
        - Notify
      summary: Download an inbound file
      description: >-
        Download the file a user sent on WhatsApp or RCS, named by the
        `message_id` of its `inbound.message.received` event. The answer is the
        file itself, up to 4 MB. Send the `Accept` header
        `application/octet-stream`. WhatsApp keeps the file 7 days after it was
        received; on RCS, the time depends on the provider. See [WhatsApp 2-Way
        Messaging](/notify/v2/documentation/whatsapp) and [RCS 2-Way
        Messaging](/notify/v2/documentation/rcs).
      operationId: getNotifyInboundMedia
      parameters:
        - name: message_id
          in: path
          required: true
          description: The inbound message identifier (prefixed with `im_`).
          schema:
            type: string
          example: im_01k8aq2zggeyssvt53zgvpx63a
        - name: Accept
          in: header
          required: true
          description: >-
            Must be `application/octet-stream`, or the file is not returned as
            bytes.
          schema:
            type: string
            enum:
              - application/octet-stream
      responses:
        '200':
          description: >-
            The file. `Content-Type` is its MIME type, and `Content-Disposition`
            gives its file name when the user sent one.
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
        '400':
          description: KO
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '406':
          description: The `Accept` header is not `application/octet-stream`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Error:
      type: object
      properties:
        code:
          type: string
          description: The error code.
          examples:
            - invalid_phone_number
        message:
          type: string
          examples:
            - >-
              The provided phone number is invalid. Provide a valid E.164 phone
              number.
          description: A human-readable message describing the error.
        type:
          type: string
          examples:
            - bad_request
          description: The error type.
        request_id:
          type: string
          examples:
            - 3d19215e-2991-4a05-a41a-527314e6ff6a
          description: >-
            A string that identifies this specific request. Report it back to us
            to help us diagnose your issues.
        param:
          type: string
          examples:
            - phone_number
          description: The parameter the error refers to, when it applies to a single one.
      required:
        - code
        - message
        - type
  securitySchemes:
    apiToken:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.