# Batches

## Create Batch

**post** `/api/v2/batches`

Create a batch over a source directory and start processing asynchronously.

To be notified as the batch progresses, pass `webhook_configurations` with
inline endpoints and/or `webhook_configuration_ids` referencing saved
configurations. Batches emit `batch.pending` on create, `batch.running`
once processing starts, and a terminal `batch.success` or `batch.error`.

`batch.success` means the batch finished mapping every source file to a
job — individual files may still have failed, so read `results` (with
`expand=results`) for per-file outcomes.

Delivery order across events is not guaranteed; key on the `status` field
in the payload rather than arrival order.

### Query Parameters

- `organization_id: optional string`

- `project_id: optional string`

### Cookie Parameters

- `session: optional string`

### Body Parameters

- `config: object { job }`

  Batch configuration snapshot to apply to this source directory.

  - `job: object { configuration_id, type }`

    Job to create for each file in the source directory.

    - `configuration_id: string`

      Product configuration ID or built-in preset ID matching the job type.

    - `type: "parse_v2" or "extract_v2"`

      Product job type to run for each source directory file.

      - `"parse_v2"`

      - `"extract_v2"`

- `source_directory_id: string`

  Directory whose files should be processed.

- `webhook_configuration_ids: optional array of string`

  IDs of saved webhook configurations to notify for this job.

- `webhook_configurations: optional array of object { webhook_events, webhook_headers, webhook_output_format, 2 more }`

  Outbound webhook endpoints to notify on job status changes

  - `webhook_events: optional array of "batch.cancelled" or "batch.error" or "batch.pending" or 30 more`

    Events to subscribe to (e.g. 'parse.success', 'extract.error'). If null, all events are delivered.

    - `"batch.cancelled"`

    - `"batch.error"`

    - `"batch.pending"`

    - `"batch.running"`

    - `"batch.success"`

    - `"classify.cancelled"`

    - `"classify.error"`

    - `"classify.partial_success"`

    - `"classify.pending"`

    - `"classify.running"`

    - `"classify.success"`

    - `"extract.cancelled"`

    - `"extract.error"`

    - `"extract.partial_success"`

    - `"extract.pending"`

    - `"extract.success"`

    - `"parse.cancelled"`

    - `"parse.error"`

    - `"parse.partial_success"`

    - `"parse.pending"`

    - `"parse.running"`

    - `"parse.success"`

    - `"sheets.cancelled"`

    - `"sheets.error"`

    - `"sheets.partial_success"`

    - `"sheets.pending"`

    - `"sheets.success"`

    - `"split.cancelled"`

    - `"split.error"`

    - `"split.pending"`

    - `"split.processing"`

    - `"split.success"`

    - `"unmapped_event"`

  - `webhook_headers: optional map[string]`

    Custom HTTP headers sent with each webhook request (e.g. auth tokens)

  - `webhook_output_format: optional string`

    Response format sent to the webhook: 'string' (default) or 'json'

  - `webhook_signing_secret: optional string`

    Shared signing secret used to sign webhook deliveries. When set, each request includes an HMAC-SHA256 signature of the request body in the 'LC-Signature' header (value 'sha256=<hex>'). Recompute the HMAC over the raw request body with this secret to verify the delivery is authentic.

  - `webhook_url: optional string`

    URL to receive webhook POST notifications

### Returns

- `id: string`

  Unique identifier

- `config: object { job }`

  Batch configuration snapshot.

  - `job: object { configuration_id, type }`

    Job to create for each file in the source directory.

    - `configuration_id: string`

      Product configuration ID or built-in preset ID matching the job type.

    - `type: "parse_v2" or "extract_v2"`

      Product job type to run for each source directory file.

      - `"parse_v2"`

      - `"extract_v2"`

- `project_id: string`

  Project this batch belongs to.

- `source_directory_id: string`

  Directory being processed.

- `status: "CANCELLED" or "COMPLETED" or "FAILED" or 3 more`

  Current batch status.

  - `"CANCELLED"`

  - `"COMPLETED"`

  - `"FAILED"`

  - `"PENDING"`

  - `"RUNNING"`

  - `"THROTTLED"`

- `created_at: optional string`

  Creation datetime

- `results: optional array of object { source_directory_file_id, error_message, job_reference }`

  Expanded per-file result mappings. Null unless requested with expand=results, or while the batch is still running.

  - `source_directory_file_id: string`

    Source directory file processed by this batch.

  - `error_message: optional string`

    Batch-level mapping error if the system could not create or associate a job for this source file.

  - `job_reference: optional object { id, type }`

    Reference to a job produced by a batch.

    Example:
    {
    "type": "parse_v2",
    "id": "pjb-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"
    }

    - `id: string`

      Job ID, such as a parse job ID.

    - `type: "parse_v2" or "extract_v2"`

      Type of job produced for the file.

      - `"parse_v2"`

      - `"extract_v2"`

- `updated_at: optional string`

  Update datetime

### Example

```http
curl https://api.cloud.llamaindex.ai/api/v2/batches \
    -H 'Content-Type: application/json' \
    -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY" \
    -d '{
          "config": {
            "job": {
              "configuration_id": "cfg-PARSE_AGENTIC",
              "type": "parse_v2"
            }
          },
          "source_directory_id": "dir-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"
        }'
```

#### Response

```json
{
  "id": "id",
  "config": {
    "job": {
      "configuration_id": "cfg-PARSE_AGENTIC",
      "type": "parse_v2"
    }
  },
  "project_id": "project_id",
  "source_directory_id": "source_directory_id",
  "status": "CANCELLED",
  "created_at": "2019-12-27T18:11:19.117Z",
  "results": [
    {
      "source_directory_file_id": "dfl-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
      "error_message": "error_message",
      "job_reference": {
        "id": "pjb-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
        "type": "parse_v2"
      }
    }
  ],
  "updated_at": "2019-12-27T18:11:19.117Z"
}
```

## List Batches

**get** `/api/v2/batches`

List batches for the current project.

### Query Parameters

- `created_at_on_or_after: optional string`

- `created_at_on_or_before: optional string`

- `organization_id: optional string`

- `page_size: optional number`

- `page_token: optional string`

- `project_id: optional string`

- `source_directory_id: optional string`

- `status: optional "CANCELLED" or "COMPLETED" or "FAILED" or 3 more`

  - `"CANCELLED"`

  - `"COMPLETED"`

  - `"FAILED"`

  - `"PENDING"`

  - `"RUNNING"`

  - `"THROTTLED"`

### Cookie Parameters

- `session: optional string`

### Returns

- `items: array of object { id, config, project_id, 5 more }`

  The list of items.

  - `id: string`

    Unique identifier

  - `config: object { job }`

    Batch configuration snapshot.

    - `job: object { configuration_id, type }`

      Job to create for each file in the source directory.

      - `configuration_id: string`

        Product configuration ID or built-in preset ID matching the job type.

      - `type: "parse_v2" or "extract_v2"`

        Product job type to run for each source directory file.

        - `"parse_v2"`

        - `"extract_v2"`

  - `project_id: string`

    Project this batch belongs to.

  - `source_directory_id: string`

    Directory being processed.

  - `status: "CANCELLED" or "COMPLETED" or "FAILED" or 3 more`

    Current batch status.

    - `"CANCELLED"`

    - `"COMPLETED"`

    - `"FAILED"`

    - `"PENDING"`

    - `"RUNNING"`

    - `"THROTTLED"`

  - `created_at: optional string`

    Creation datetime

  - `results: optional array of object { source_directory_file_id, error_message, job_reference }`

    Expanded per-file result mappings. Null unless requested with expand=results, or while the batch is still running.

    - `source_directory_file_id: string`

      Source directory file processed by this batch.

    - `error_message: optional string`

      Batch-level mapping error if the system could not create or associate a job for this source file.

    - `job_reference: optional object { id, type }`

      Reference to a job produced by a batch.

      Example:
      {
      "type": "parse_v2",
      "id": "pjb-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"
      }

      - `id: string`

        Job ID, such as a parse job ID.

      - `type: "parse_v2" or "extract_v2"`

        Type of job produced for the file.

        - `"parse_v2"`

        - `"extract_v2"`

  - `updated_at: optional string`

    Update datetime

- `next_page_token: optional string`

  A token, which can be sent as page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.

- `total_size: optional number`

  The total number of items available. This is only populated when specifically requested. The value may be an estimate and can be used for display purposes only.

### Example

```http
curl https://api.cloud.llamaindex.ai/api/v2/batches \
    -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"
```

#### Response

```json
{
  "items": [
    {
      "id": "id",
      "config": {
        "job": {
          "configuration_id": "cfg-PARSE_AGENTIC",
          "type": "parse_v2"
        }
      },
      "project_id": "project_id",
      "source_directory_id": "source_directory_id",
      "status": "CANCELLED",
      "created_at": "2019-12-27T18:11:19.117Z",
      "results": [
        {
          "source_directory_file_id": "dfl-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
          "error_message": "error_message",
          "job_reference": {
            "id": "pjb-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
            "type": "parse_v2"
          }
        }
      ],
      "updated_at": "2019-12-27T18:11:19.117Z"
    }
  ],
  "next_page_token": "next_page_token",
  "total_size": 0
}
```

## Get Batch

**get** `/api/v2/batches/{batch_id}`

Get a batch by ID.

### Path Parameters

- `batch_id: string`

### Query Parameters

- `expand: optional array of string`

  Fields to expand. Supported value: results.

- `organization_id: optional string`

- `project_id: optional string`

### Cookie Parameters

- `session: optional string`

### Returns

- `id: string`

  Unique identifier

- `config: object { job }`

  Batch configuration snapshot.

  - `job: object { configuration_id, type }`

    Job to create for each file in the source directory.

    - `configuration_id: string`

      Product configuration ID or built-in preset ID matching the job type.

    - `type: "parse_v2" or "extract_v2"`

      Product job type to run for each source directory file.

      - `"parse_v2"`

      - `"extract_v2"`

- `project_id: string`

  Project this batch belongs to.

- `source_directory_id: string`

  Directory being processed.

- `status: "CANCELLED" or "COMPLETED" or "FAILED" or 3 more`

  Current batch status.

  - `"CANCELLED"`

  - `"COMPLETED"`

  - `"FAILED"`

  - `"PENDING"`

  - `"RUNNING"`

  - `"THROTTLED"`

- `created_at: optional string`

  Creation datetime

- `results: optional array of object { source_directory_file_id, error_message, job_reference }`

  Expanded per-file result mappings. Null unless requested with expand=results, or while the batch is still running.

  - `source_directory_file_id: string`

    Source directory file processed by this batch.

  - `error_message: optional string`

    Batch-level mapping error if the system could not create or associate a job for this source file.

  - `job_reference: optional object { id, type }`

    Reference to a job produced by a batch.

    Example:
    {
    "type": "parse_v2",
    "id": "pjb-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"
    }

    - `id: string`

      Job ID, such as a parse job ID.

    - `type: "parse_v2" or "extract_v2"`

      Type of job produced for the file.

      - `"parse_v2"`

      - `"extract_v2"`

- `updated_at: optional string`

  Update datetime

### Example

```http
curl https://api.cloud.llamaindex.ai/api/v2/batches/$BATCH_ID \
    -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"
```

#### Response

```json
{
  "id": "id",
  "config": {
    "job": {
      "configuration_id": "cfg-PARSE_AGENTIC",
      "type": "parse_v2"
    }
  },
  "project_id": "project_id",
  "source_directory_id": "source_directory_id",
  "status": "CANCELLED",
  "created_at": "2019-12-27T18:11:19.117Z",
  "results": [
    {
      "source_directory_file_id": "dfl-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
      "error_message": "error_message",
      "job_reference": {
        "id": "pjb-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
        "type": "parse_v2"
      }
    }
  ],
  "updated_at": "2019-12-27T18:11:19.117Z"
}
```

## Cancel Batch

**post** `/api/v2/batches/{batch_id}/cancel`

Cancel a running batch.

Returns immediately; the batch reaches `CANCELLED` once processing stops.
Files that already finished keep their results. A batch in a terminal
status cannot be cancelled.

### Path Parameters

- `batch_id: string`

### Query Parameters

- `organization_id: optional string`

- `project_id: optional string`

### Cookie Parameters

- `session: optional string`

### Returns

- `id: string`

  Unique identifier

- `config: object { job }`

  Batch configuration snapshot.

  - `job: object { configuration_id, type }`

    Job to create for each file in the source directory.

    - `configuration_id: string`

      Product configuration ID or built-in preset ID matching the job type.

    - `type: "parse_v2" or "extract_v2"`

      Product job type to run for each source directory file.

      - `"parse_v2"`

      - `"extract_v2"`

- `project_id: string`

  Project this batch belongs to.

- `source_directory_id: string`

  Directory being processed.

- `status: "CANCELLED" or "COMPLETED" or "FAILED" or 3 more`

  Current batch status.

  - `"CANCELLED"`

  - `"COMPLETED"`

  - `"FAILED"`

  - `"PENDING"`

  - `"RUNNING"`

  - `"THROTTLED"`

- `created_at: optional string`

  Creation datetime

- `results: optional array of object { source_directory_file_id, error_message, job_reference }`

  Expanded per-file result mappings. Null unless requested with expand=results, or while the batch is still running.

  - `source_directory_file_id: string`

    Source directory file processed by this batch.

  - `error_message: optional string`

    Batch-level mapping error if the system could not create or associate a job for this source file.

  - `job_reference: optional object { id, type }`

    Reference to a job produced by a batch.

    Example:
    {
    "type": "parse_v2",
    "id": "pjb-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"
    }

    - `id: string`

      Job ID, such as a parse job ID.

    - `type: "parse_v2" or "extract_v2"`

      Type of job produced for the file.

      - `"parse_v2"`

      - `"extract_v2"`

- `updated_at: optional string`

  Update datetime

### Example

```http
curl https://api.cloud.llamaindex.ai/api/v2/batches/$BATCH_ID/cancel \
    -X POST \
    -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"
```

#### Response

```json
{
  "id": "id",
  "config": {
    "job": {
      "configuration_id": "cfg-PARSE_AGENTIC",
      "type": "parse_v2"
    }
  },
  "project_id": "project_id",
  "source_directory_id": "source_directory_id",
  "status": "CANCELLED",
  "created_at": "2019-12-27T18:11:19.117Z",
  "results": [
    {
      "source_directory_file_id": "dfl-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
      "error_message": "error_message",
      "job_reference": {
        "id": "pjb-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
        "type": "parse_v2"
      }
    }
  ],
  "updated_at": "2019-12-27T18:11:19.117Z"
}
```

## Domain Types

### Batch Create Response

- `BatchCreateResponse object { id, config, project_id, 5 more }`

  A top-level batch.

  Example:
  {
  "id": "bat-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
  "project_id": "prj-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
  "source_directory_id": "dir-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
  "config": {
  "job": {
  "type": "parse_v2",
  "configuration_id": "cfg-PARSE_AGENTIC"
  }
  },
  "status": "COMPLETED",
  "results": [
  {
  "source_directory_file_id": "dfl-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
  "job_reference": {
  "type": "parse_v2",
  "id": "pjb-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"
  },
  "error_message": null
  }
  ]
  }

  Batch-level `FAILED` means the orchestration failed and cannot provide a
  reliable per-file result set. `results` is only populated when explicitly
  requested with `expand=results` and may be `null` while a batch is still
  running.

  - `id: string`

    Unique identifier

  - `config: object { job }`

    Batch configuration snapshot.

    - `job: object { configuration_id, type }`

      Job to create for each file in the source directory.

      - `configuration_id: string`

        Product configuration ID or built-in preset ID matching the job type.

      - `type: "parse_v2" or "extract_v2"`

        Product job type to run for each source directory file.

        - `"parse_v2"`

        - `"extract_v2"`

  - `project_id: string`

    Project this batch belongs to.

  - `source_directory_id: string`

    Directory being processed.

  - `status: "CANCELLED" or "COMPLETED" or "FAILED" or 3 more`

    Current batch status.

    - `"CANCELLED"`

    - `"COMPLETED"`

    - `"FAILED"`

    - `"PENDING"`

    - `"RUNNING"`

    - `"THROTTLED"`

  - `created_at: optional string`

    Creation datetime

  - `results: optional array of object { source_directory_file_id, error_message, job_reference }`

    Expanded per-file result mappings. Null unless requested with expand=results, or while the batch is still running.

    - `source_directory_file_id: string`

      Source directory file processed by this batch.

    - `error_message: optional string`

      Batch-level mapping error if the system could not create or associate a job for this source file.

    - `job_reference: optional object { id, type }`

      Reference to a job produced by a batch.

      Example:
      {
      "type": "parse_v2",
      "id": "pjb-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"
      }

      - `id: string`

        Job ID, such as a parse job ID.

      - `type: "parse_v2" or "extract_v2"`

        Type of job produced for the file.

        - `"parse_v2"`

        - `"extract_v2"`

  - `updated_at: optional string`

    Update datetime

### Batch List Response

- `BatchListResponse object { id, config, project_id, 5 more }`

  A top-level batch.

  Example:
  {
  "id": "bat-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
  "project_id": "prj-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
  "source_directory_id": "dir-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
  "config": {
  "job": {
  "type": "parse_v2",
  "configuration_id": "cfg-PARSE_AGENTIC"
  }
  },
  "status": "COMPLETED",
  "results": [
  {
  "source_directory_file_id": "dfl-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
  "job_reference": {
  "type": "parse_v2",
  "id": "pjb-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"
  },
  "error_message": null
  }
  ]
  }

  Batch-level `FAILED` means the orchestration failed and cannot provide a
  reliable per-file result set. `results` is only populated when explicitly
  requested with `expand=results` and may be `null` while a batch is still
  running.

  - `id: string`

    Unique identifier

  - `config: object { job }`

    Batch configuration snapshot.

    - `job: object { configuration_id, type }`

      Job to create for each file in the source directory.

      - `configuration_id: string`

        Product configuration ID or built-in preset ID matching the job type.

      - `type: "parse_v2" or "extract_v2"`

        Product job type to run for each source directory file.

        - `"parse_v2"`

        - `"extract_v2"`

  - `project_id: string`

    Project this batch belongs to.

  - `source_directory_id: string`

    Directory being processed.

  - `status: "CANCELLED" or "COMPLETED" or "FAILED" or 3 more`

    Current batch status.

    - `"CANCELLED"`

    - `"COMPLETED"`

    - `"FAILED"`

    - `"PENDING"`

    - `"RUNNING"`

    - `"THROTTLED"`

  - `created_at: optional string`

    Creation datetime

  - `results: optional array of object { source_directory_file_id, error_message, job_reference }`

    Expanded per-file result mappings. Null unless requested with expand=results, or while the batch is still running.

    - `source_directory_file_id: string`

      Source directory file processed by this batch.

    - `error_message: optional string`

      Batch-level mapping error if the system could not create or associate a job for this source file.

    - `job_reference: optional object { id, type }`

      Reference to a job produced by a batch.

      Example:
      {
      "type": "parse_v2",
      "id": "pjb-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"
      }

      - `id: string`

        Job ID, such as a parse job ID.

      - `type: "parse_v2" or "extract_v2"`

        Type of job produced for the file.

        - `"parse_v2"`

        - `"extract_v2"`

  - `updated_at: optional string`

    Update datetime

### Batch Get Response

- `BatchGetResponse object { id, config, project_id, 5 more }`

  A top-level batch.

  Example:
  {
  "id": "bat-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
  "project_id": "prj-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
  "source_directory_id": "dir-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
  "config": {
  "job": {
  "type": "parse_v2",
  "configuration_id": "cfg-PARSE_AGENTIC"
  }
  },
  "status": "COMPLETED",
  "results": [
  {
  "source_directory_file_id": "dfl-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
  "job_reference": {
  "type": "parse_v2",
  "id": "pjb-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"
  },
  "error_message": null
  }
  ]
  }

  Batch-level `FAILED` means the orchestration failed and cannot provide a
  reliable per-file result set. `results` is only populated when explicitly
  requested with `expand=results` and may be `null` while a batch is still
  running.

  - `id: string`

    Unique identifier

  - `config: object { job }`

    Batch configuration snapshot.

    - `job: object { configuration_id, type }`

      Job to create for each file in the source directory.

      - `configuration_id: string`

        Product configuration ID or built-in preset ID matching the job type.

      - `type: "parse_v2" or "extract_v2"`

        Product job type to run for each source directory file.

        - `"parse_v2"`

        - `"extract_v2"`

  - `project_id: string`

    Project this batch belongs to.

  - `source_directory_id: string`

    Directory being processed.

  - `status: "CANCELLED" or "COMPLETED" or "FAILED" or 3 more`

    Current batch status.

    - `"CANCELLED"`

    - `"COMPLETED"`

    - `"FAILED"`

    - `"PENDING"`

    - `"RUNNING"`

    - `"THROTTLED"`

  - `created_at: optional string`

    Creation datetime

  - `results: optional array of object { source_directory_file_id, error_message, job_reference }`

    Expanded per-file result mappings. Null unless requested with expand=results, or while the batch is still running.

    - `source_directory_file_id: string`

      Source directory file processed by this batch.

    - `error_message: optional string`

      Batch-level mapping error if the system could not create or associate a job for this source file.

    - `job_reference: optional object { id, type }`

      Reference to a job produced by a batch.

      Example:
      {
      "type": "parse_v2",
      "id": "pjb-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"
      }

      - `id: string`

        Job ID, such as a parse job ID.

      - `type: "parse_v2" or "extract_v2"`

        Type of job produced for the file.

        - `"parse_v2"`

        - `"extract_v2"`

  - `updated_at: optional string`

    Update datetime

### Batch Cancel Response

- `BatchCancelResponse object { id, config, project_id, 5 more }`

  A top-level batch.

  Example:
  {
  "id": "bat-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
  "project_id": "prj-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
  "source_directory_id": "dir-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
  "config": {
  "job": {
  "type": "parse_v2",
  "configuration_id": "cfg-PARSE_AGENTIC"
  }
  },
  "status": "COMPLETED",
  "results": [
  {
  "source_directory_file_id": "dfl-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
  "job_reference": {
  "type": "parse_v2",
  "id": "pjb-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"
  },
  "error_message": null
  }
  ]
  }

  Batch-level `FAILED` means the orchestration failed and cannot provide a
  reliable per-file result set. `results` is only populated when explicitly
  requested with `expand=results` and may be `null` while a batch is still
  running.

  - `id: string`

    Unique identifier

  - `config: object { job }`

    Batch configuration snapshot.

    - `job: object { configuration_id, type }`

      Job to create for each file in the source directory.

      - `configuration_id: string`

        Product configuration ID or built-in preset ID matching the job type.

      - `type: "parse_v2" or "extract_v2"`

        Product job type to run for each source directory file.

        - `"parse_v2"`

        - `"extract_v2"`

  - `project_id: string`

    Project this batch belongs to.

  - `source_directory_id: string`

    Directory being processed.

  - `status: "CANCELLED" or "COMPLETED" or "FAILED" or 3 more`

    Current batch status.

    - `"CANCELLED"`

    - `"COMPLETED"`

    - `"FAILED"`

    - `"PENDING"`

    - `"RUNNING"`

    - `"THROTTLED"`

  - `created_at: optional string`

    Creation datetime

  - `results: optional array of object { source_directory_file_id, error_message, job_reference }`

    Expanded per-file result mappings. Null unless requested with expand=results, or while the batch is still running.

    - `source_directory_file_id: string`

      Source directory file processed by this batch.

    - `error_message: optional string`

      Batch-level mapping error if the system could not create or associate a job for this source file.

    - `job_reference: optional object { id, type }`

      Reference to a job produced by a batch.

      Example:
      {
      "type": "parse_v2",
      "id": "pjb-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"
      }

      - `id: string`

        Job ID, such as a parse job ID.

      - `type: "parse_v2" or "extract_v2"`

        Type of job produced for the file.

        - `"parse_v2"`

        - `"extract_v2"`

  - `updated_at: optional string`

    Update datetime
