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

# Export jobs as CSV

> Download a CSV of moderation jobs in a date range, including prompt and category metadata.

<Note>
  Requires the `job:read` scope. Requests without this scope receive a `403 FORBIDDEN` response. See
  [authentication](/authentication#scopes).
</Note>

The response streams as `text/csv; charset=utf-8` with a UTF-8 BOM so spreadsheet apps decode prompts correctly.

## Date range

Both `from` and `to` are required ISO 8601 date-time strings. Jobs are filtered by `created_at` (`from` inclusive, `to` exclusive). The maximum window is 366 days; longer ranges return `400 INVALID_REQUEST`.

## CSV columns

| Column                      | Description                                                        |
| --------------------------- | ------------------------------------------------------------------ |
| `job_id`                    | UUID of the job                                                    |
| `type`                      | `pre` or `post`                                                    |
| `status`                    | `queued`, `processing`, `completed`, or `failed`                   |
| `is_prohibited`             | `true` if rejected, `false` if passed, or empty if not yet decided |
| `created_at`                | ISO 8601 timestamp the job was submitted                           |
| `completed_at`              | ISO 8601 timestamp the job finished, or empty                      |
| `prompt`                    | Original prompt submitted with the job                             |
| `reason`                    | Why a prompt was rejected by the prohibition check                 |
| `category_ai_adult_general` | `true`, `false`, or empty if no moderation log exists              |
| `category_underage`         | `true`, `false`, or empty if no moderation log exists              |
| `category_nsfw`             | `true`, `false`, or empty if no moderation log exists              |

Empty category cells distinguish jobs that have not yet been evaluated from jobs that were evaluated and found clean (`false`).

## Example

```bash theme={null}
curl -G "https://api.example.com/api/v1/jobs/export" \
  -H "Authorization: Bearer $API_KEY" \
  --data-urlencode "from=2026-04-01T00:00:00Z" \
  --data-urlencode "to=2026-05-01T00:00:00Z" \
  --output jobs-april.csv
```

`to` is exclusive, so use the start of the day after your last desired date (e.g. `2026-05-01T00:00:00Z` to include all of April).


## OpenAPI

````yaml api-reference/openapi.json GET /api/v1/jobs/export
openapi: 3.1.0
info:
  title: Omnifence API
  description: >-
    Content moderation API. Clients submit images or videos which pass through a
    classification pipeline and receive a pass/reject decision.
  version: 1.0.0
  contact:
    email: support@omnifence.ai
servers:
  - url: http://localhost:3051
    description: Local development
security:
  - bearerAuth: []
tags:
  - name: System
    description: Health and diagnostics
  - name: Moderation
    description: Submit moderation jobs
  - name: Jobs
    description: Query job status and progress
  - name: Usage
    description: Billing and usage data
  - name: Webhooks
    description: Webhook registration
  - name: Account
    description: Authenticated client account settings
  - name: Billing
    description: Customer-facing billing balance and ledger
  - name: Admin
    description: Platform administration (requires admin:config scope)
paths:
  /api/v1/jobs/export:
    get:
      tags:
        - Jobs
      summary: Export jobs as CSV
      description: >-
        Download a CSV of moderation jobs created in the given window. Columns
        include job_id, type, status, is_prohibited, created_at, completed_at,
        prompt, reason, and one column per moderation category. The response is
        streamed.
      operationId: exportJobs
      parameters:
        - schema:
            type: string
            format: date-time
          in: query
          name: from
          required: true
          description: Inclusive lower bound on job created_at (ISO 8601).
        - schema:
            type: string
            format: date-time
          in: query
          name: to
          required: true
          description: >-
            Exclusive upper bound on job created_at (ISO 8601). Use the start of
            the day after your last desired date to include the full final day.
      responses:
        '200':
          description: CSV stream of jobs.
          headers:
            Content-Disposition:
              schema:
                type: string
              description: attachment; filename="jobs-<from>-to-<to>.csv"
          content:
            text/csv:
              schema:
                type: string
                format: binary
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API key from the Omnifence dashboard

````