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

# Download a pending attachment

> Fetches a WhatsApp media file that was left pending and answers with the attachment once it is stored. Only attachments still pending can be downloaded this way.



## OpenAPI

````yaml /openapi/application.json post /api/v1/accounts/{account_id}/conversations/{conversation_id}/messages/{message_id}/download_attachment
openapi: 3.1.0
info:
  title: WiseApp API — Aplicação
  description: >-
    Referência completa da API do WiseApp: plataforma (provisionamento),
    aplicação (conta), cliente (canais públicos) e MCP.
  version: 1.1.0
servers:
  - url: https://chat.wiseapp360.com
    description: Sua instalação WiseApp
security: []
paths:
  /api/v1/accounts/{account_id}/conversations/{conversation_id}/messages/{message_id}/download_attachment:
    parameters:
      - $ref: '#/components/parameters/account_id'
        schema:
          type: string
        example: sample
      - $ref: '#/components/parameters/conversation_id'
        schema:
          type: string
        example: sample
      - name: message_id
        in: path
        required: true
        schema:
          type: integer
        example: 1
    post:
      tags:
        - Messages
      summary: Download a pending attachment
      description: >-
        Fetches a WhatsApp media file that was left pending and answers with the
        attachment once it is stored. Only attachments still pending can be
        downloaded this way.
      operationId: download-pending-message-attachment
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - attachment_id
              properties:
                attachment_id:
                  type: integer
                  example: 1
            example:
              attachment_id: 1
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  attachment:
                    type: object
                    additionalProperties: true
              example:
                attachment:
                  source: api
                  segment: enterprise
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
              example:
                error: Unauthorized
        '404':
          description: The message or the attachment was not found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
              example:
                error: Resource not found
        '422':
          description: The attachment is not pending, or the download failed.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  attributes:
                    type: array
                    items:
                      type: string
              example:
                message: Validation failed
                attributes:
                  - name cannot be blank
      security:
        - userApiKey: []
components:
  parameters:
    account_id:
      in: path
      name: account_id
      schema:
        type: integer
      required: true
      description: The numeric ID of the account
    conversation_id:
      in: path
      name: conversation_id
      schema:
        type: integer
      required: true
      description: The numeric ID of the conversation
  securitySchemes:
    userApiKey:
      type: apiKey
      in: header
      name: api_access_token
      description: >-
        Token de acesso do usuário (Perfil → Token de acesso). Dá acesso
        conforme o papel do usuário e age em nome dele.

````

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