---
title: "Create a new batch job"
method: POST
path: "/v1/batch-jobs"
tags: ["Batch Processing"]
---

# Create a new batch job

`POST /v1/batch-jobs`

## Request

- Base URL: `https://gateway.app.clavata.ai:8443`
- URL: `https://gateway.app.clavata.ai:8443/v1/batch-jobs`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/clavata/apis/clavata-public-api-v1/docs/v1/batch-jobs/post.ts> (a function with typed inputs; its response is checked against the schema)

Creates a new batch job that can process multiple content items in bulk. Returns a presigned URL for uploading the input file. The job will automatically start processing once the input file is uploaded. Policy-first endpoint: batch jobs are created from a `policy_id`.

## Request body

- V1CreateBatchJobRequest
  - `name` string
  - `policyId` string
  - `webhookUrl` string: The webhook URL to call when the batch job is complete. Optional.

## Response `200`

A successful response.

- V1CreateBatchJobResponse
  - `batchJobId` string
  - `name` string
  - `error` V1BatchJobError
    - `errorCode` 'BATCH_JOB_ERROR_UNSPECIFIED' | 'BATCH_JOB_ERROR_INVALID_INPUT_FILE' | 'BATCH_JOB_ERROR_INVALID_POLICY' | 'BATCH_JOB_ERROR_INVALID_POLICY_VERSION' | 'BATCH_JOB_ERROR_INVALID_PRIORITY'
    - `errorMessage` string
  - `inputFileUploadUrl` string

## Other responses

- `400`: Bad Request
- `429`: Too Many Requests
- `499`: Precheck Failures (Canceled)
- `default`: An unexpected error response.

---

[API](https://skmtc.dev/clavata/apis/clavata-public-api-v1.md) - [All operations](https://skmtc.dev/clavata/apis/clavata-public-api-v1/llms.txt) - [OpenAPI document](https://skmtc.dev/clavata/apis/clavata-public-api-v1/revisions/d7a854b0070f?raw)
