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

# Get Multiple Attachments

> Download multiple attachments as a single PDF file.

Download multiple attachments as a single PDF file.

## Query Parameters

<ParamField query="ids" type="string" required>
  Comma-separated list of attachment UUIDs
</ParamField>

<ParamField query="filename" type="string">
  Custom filename for the downloaded PDF (without extension)
</ParamField>

## Response

Returns a PDF file containing all requested attachments merged together.

**Content-Type:** `application/pdf`

## Response Codes

| Code  | Description                                    |
| ----- | ---------------------------------------------- |
| `200` | Success - PDF generated                        |
| `400` | Bad Request - Missing or invalid ids parameter |
| `401` | Unauthorized - Invalid access token            |
| `404` | Not Found - One or more attachments not found  |
| `429` | Too Many Requests - Rate limit exceeded        |
| `500` | Server Error - Internal error                  |

<Note>
  This endpoint automatically merges multiple attachments into a single PDF document, which is useful for batch downloads or generating combined reports.
</Note>


## OpenAPI

````yaml GET /attachments
openapi: 3.0.0
info:
  title: Penbox API
  version: '1.0'
  description: >-
    The Penbox API provides programmatic access to Penbox's form management,
    case management, and document processing capabilities. Authenticate using
    Bearer tokens created at https://app.penbox.io/workspace/settings/api
servers:
  - url: https://connect.penbox.io/v1
    description: Production
  - url: https://connect.aiboov.com/v1
    description: Staging
security:
  - BearerAuth: []
paths:
  /attachments:
    get:
      summary: Get Multiple Attachments
      description: Download multiple attachments as a single PDF file.
      operationId: get-attachments-multiple
      parameters:
        - name: ids
          in: query
          required: true
          description: Comma-separated list of attachment UUIDs
          schema:
            type: string
        - name: filename
          in: query
          description: Custom filename for the downloaded PDF (without extension)
          schema:
            type: string
      responses:
        '200':
          description: PDF file containing all requested attachments
          content:
            application/pdf:
              schema:
                type: string
                format: binary
components:
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: token
      description: >-
        API token (starts with pnbx_). Create at
        https://app.penbox.io/workspace/settings/api. Include as: Authorization:
        Bearer {token}

````