---
title: "Submit Bulk Apply Job"
method: POST
path: "/api/v1/contracts/apply-jobs"
tags: ["contracts"]
---

# Submit Bulk Apply Job

`POST /api/v1/contracts/apply-jobs`

## Request

- Base URL: `http://localhost:8000`
- URL: `http://localhost:8000/api/v1/contracts/apply-jobs`
- Auth: none declared

Create a bulk-apply job. Returns `{"job_id": "<uuid>"}`.

The job runs `orchestrator.apply()` per asset inside a single
process so resource usage scales with batch size; callers chunk
large batches (>~500 assets) into separate jobs.

## Headers

- `Authorization` string

## Request body

- BulkApplyJobRequest: Request body for POST /contracts/apply-jobs. `asset_public_ids` is required (non-empty); the job applies the same contract to each. `yaml_body` is the raw ODCS document; parsing happens in the job so a retry re-validates on every run. `prune`/`include`/`exclude` mirror the single-asset apply endpoint's query params.
  - `asset_public_ids` string[], required
  - `yaml_body` string, required
  - `prune` boolean
  - `include` string[], nullable
  - `exclude` string[], nullable

## Response `200`

Successful Response

- StandardResponse: Standard API response wrapper.
  - `success` boolean, required
  - `data` unknown
  - `message` string, nullable
  - `error` string, nullable
  - `meta` object, nullable

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/anomalyarmor/apis/anomalyarmor-api.md) · [All operations](https://skmtc.dev/anomalyarmor/apis/anomalyarmor-api/llms.txt) · [OpenAPI document](https://skmtc.dev/anomalyarmor/apis/anomalyarmor-api/revisions/51c755fb5d0b?raw)
