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

# Export Submissions (CSV)

> Export submissions as CSV. Large exports are processed asynchronously. Requires `forms-read`.

# Export Submissions (CSV)

Export submissions for a form as a CSV file. Large exports are processed asynchronously in the background, while smaller exports are processed immediately.

## Authentication & Scope

Requires `forms-read` ability.

## Request

```http theme={null}
POST /open/forms/{id}/submissions/export HTTP/1.1
Host: api.opnform.com
Content-Type: application/json
Authorization: Bearer <token>
```

### Path Parameters

| Parameter | Type | Description |
| - | - | - |
| id | number | Numeric ID of the form. |

### Body Parameters

| Field | Type | Required | Description |
| - | - | - | - |
| columns | object | Yes | Keys are field IDs, system columns, or attribution columns such as `meta.attribution.utm_source`; values indicate whether to include them. |

Example payload exporting two fields and the created\_at timestamp:

```json theme={null}
{
    "columns": {
        "field_name": true,
        "field_email": true,
        "meta.attribution.utm_source": true,
        "created_at": true
    }
}
```

## Response

The API automatically determines whether to process the export synchronously or asynchronously based on the form size.

### Synchronous Export (Small Forms)

`200 OK` – Returns a CSV file download immediately. The response's `Content-Type` will be `text/csv` and include the `Content-Disposition` header.

### Asynchronous Export (Large Forms)

`200 OK` – Returns a job status object for background processing:

```json theme={null}
{
    "message": "Export started. Large export will be processed in the background.",
    "job_id": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
    "is_async": true
}
```

> [!NOTE]
>
> Use the `job_id` to check export progress using the [Export Status
> endpoint](https://docs.opnform.com/api-reference/submissions/export-status.md).

### Error Responses

`403 Forbidden` – The token lacks `forms-read` or you don't have access.

The `columns` map may include `ip_address`. IP metadata is emitted only when
IP tracking is enabled on the form and available in its workspace plan. Field
columns are matched by their exact saved IDs, including removed fields.

If a form field also uses `ip_address` as its ID, its answer is exported in
its own named column alongside any permitted IP metadata.


## OpenAPI

````yaml post /open/forms/{id}/submissions/export
openapi: 3.0.1
info:
  title: OpnForm API
  description: API for interacting with OpnForm, primarily used for Zapier integration
  version: 1.0.0
servers:
  - url: https://api.opnform.com
security:
  - bearerAuth: []
tags:
  - name: Workspaces
    description: Create and manage workspaces.
  - name: Workspace Users
    description: Manage users within a workspace.
  - name: Forms
    description: Manage and retrieve forms.
  - name: Submissions
    description: Access and manage form submissions.
  - name: Integrations
    description: Manage form integrations (webhooks) via API.
  - name: Zapier
    description: Legacy endpoints for the Zapier integration.
paths:
  /open/forms/{id}/submissions/export:
    post:
      tags:
        - Submissions
      summary: Export Submissions (CSV)
      description: >-
        Export submissions as CSV. Large exports are processed asynchronously.
        Requires `forms-read`.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: number
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - columns
              properties:
                columns:
                  type: object
                  additionalProperties:
                    type: boolean
                  description: >-
                    Object mapping field IDs, system columns, or namespaced
                    attribution columns (for example
                    meta.attribution.utm_source) to booleans.
      responses:
        '200':
          description: Synchronous export (CSV file) or asynchronous export (job status)
          content:
            application/json:
              schema:
                oneOf:
                  - type: string
                    format: binary
                    description: CSV file download for small forms
                  - type: object
                    description: Job status for large forms
                    properties:
                      message:
                        type: string
                        example: >-
                          Export started. Large export will be processed in the
                          background.
                      job_id:
                        type: string
                        example: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d
                      is_async:
                        type: boolean
                        example: true
        '403':
          description: Forbidden
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Personal Access Token
      x-bearer-scopemap:
        workspaces-read: Read access to workspaces
        workspaces-write: Write access to workspaces
        workspace-users-read: Read access to workspace users
        workspace-users-write: Write access to workspace users
        forms-read: Read access to forms
        forms-write: Write access to forms
        manage-integrations: Manage form integrations (webhooks)

````

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