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

# Check Export Status

> Check the status of an asynchronous export job. Requires `forms-read`.

# Check Export Status

Check the status and progress of an asynchronous CSV export job.

## Authentication & Scope

Requires `forms-read` ability.

## Request

```http theme={null}
GET /open/forms/{id}/submissions/export/status/{job_id} HTTP/1.1
Host: api.opnform.com
Authorization: Bearer <token>
```

### Path Parameters

| Parameter | Type | Description |
| - | - | - |
| id | number | Numeric ID of the form. |
| job\_id | string | Export job identifier. |

## Response

### Processing Status

```json theme={null}
{
    "status": "processing",
    "progress": 65,
    "processed_submissions": 650,
    "total_submissions": 1000,
    "file_url": null,
    "error_message": null,
    "expires_at": null,
    "created_at": "2024-06-12T09:15:23.000Z",
    "updated_at": "2024-06-12T09:16:10.000Z",
    "job_id": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"
}
```

### Completed Status

```json theme={null}
{
    "status": "completed",
    "progress": 100,
    "processed_submissions": 1000,
    "total_submissions": 1000,
    "file_url": "https://storage.example.com/exports/form-123-submissions-2024-06-12-09-15-23.csv",
    "error_message": null,
    "expires_at": "2024-06-13T09:15:23.000Z",
    "created_at": "2024-06-12T09:15:23.000Z",
    "updated_at": "2024-06-12T09:16:30.000Z",
    "job_id": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"
}
```

### Failed Status

```json theme={null}
{
    "status": "failed",
    "progress": 0,
    "processed_submissions": null,
    "total_submissions": null,
    "file_url": null,
    "error_message": "Database connection timeout",
    "expires_at": null,
    "created_at": "2024-06-12T09:15:23.000Z",
    "updated_at": "2024-06-12T09:15:45.000Z",
    "job_id": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"
}
```

## Response Fields

| Field | Type | Description |
| - | - | - |
| `status` | string | Job status: `queued`, `processing`, `completed`, or `failed` |
| `progress` | number | Completion percentage (0-100) |
| `job_id` | string | Export job identifier |
| `processed_submissions` | number | Number of submissions processed so far |
| `total_submissions` | number | Total number of submissions to process |
| `file_url` | string | Download URL for completed exports |
| `expires_at` | string | File expiration timestamp (workspace policy, 24 hours by default) |
| `error_message` | string | Error description for failed exports |
| `created_at` | string | Job creation timestamp |
| `updated_at` | string | Last update timestamp |

> [!NOTE]
>
> Every field is always present. Fields that do not apply to the current job
> state are `null`.

> [!WARNING]
>
> The download URL is a bearer link. It remains valid until `expires_at`,
> according to the workspace file-link policy (24 hours by default).

## Error Responses

`404 Not Found` – Export job not found, has expired, or belongs to another form.

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

## Usage Example

After initiating an export that returns `is_async: true`, poll this endpoint to track progress:

**1. Start export**

Call the export endpoint and receive a `job_id`.

**2. Poll status**

Use the `job_id` to check export progress every few seconds.

> [!TIP]
>
> Avoid polling too frequently. Check every 2-5 seconds for optimal
> performance.

**3. Download file**

When status is `completed`, use the `file_url` to download your CSV file.

> [!WARNING]
>
> Download the file before the `expires_at` timestamp. The workspace policy is 24 hours by default.


## OpenAPI

````yaml get /open/forms/{id}/submissions/export/status/{job_id}
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/status/{job_id}:
    get:
      tags:
        - Submissions
      summary: Check Export Status
      description: Check the status of an asynchronous export job. Requires `forms-read`.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: number
        - name: job_id
          in: path
          required: true
          schema:
            type: string
          description: Export job identifier
      responses:
        '200':
          description: Export job status
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExportJobStatus'
        '403':
          description: Forbidden
        '404':
          description: Export job not found, has expired, or belongs to another form
      security:
        - bearerAuth: []
components:
  schemas:
    ExportJobStatus:
      type: object
      properties:
        status:
          type: string
          enum:
            - queued
            - processing
            - completed
            - failed
          description: Current status of the export job
        progress:
          type: number
          minimum: 0
          maximum: 100
          description: Completion percentage (0-100)
        job_id:
          type: string
          description: Export job identifier
        processed_submissions:
          type: number
          description: Number of submissions processed so far
          nullable: true
        total_submissions:
          type: number
          description: Total number of submissions to process
          nullable: true
        file_url:
          type: string
          format: uri
          description: Download URL for completed exports
          nullable: true
        expires_at:
          type: string
          format: date-time
          description: File expiration timestamp (workspace policy, 24 hours by default)
          nullable: true
        error_message:
          type: string
          description: Error description for failed exports
          nullable: true
        created_at:
          type: string
          format: date-time
          description: Job creation timestamp
        updated_at:
          type: string
          format: date-time
          description: Last update timestamp
  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.