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

# Batch Upload

> Upload multiple artifacts at once

# Batch Upload

Upload multiple artifacts in a single request.

## Endpoint

```
POST /upload endpoint/artifacts/batch
```

## Request

```bash theme={null}
curl -X POST https://api.docyard.io/v1/upload/artifacts/batch \
  -H "X-API-Key: dk_live_dist_aaaaaaaa" \
  -H "X-API-Secret: dk_secret_dist_bbbbbbbb" \
  -H "Content-Type: application/json" \
  -d '{
    "artifacts": [
      {
        "template_id": "tmpl-ins-dec-001",
        "locks": {
          "policy_number": { "value": "POL-11111111" },
          "effective_date": { "value": "2026-03-15" }
        },
        "threshold": 20,
        "content": "<base64-pdf-1>"
      },
      {
        "template_id": "tmpl-ins-dec-001",
        "locks": {
          "policy_number": { "value": "POL-22222222" },
          "effective_date": { "value": "2026-03-15" }
        },
        "threshold": 20,
        "content": "<base64-pdf-2>"
      }
    ]
  }'
```

## Response

```json theme={null}
{
  "batch_id": "batch-xyz789",
  "status": "processing",
  "total": 2,
  "processed": 0
}
```

## Check Batch Status

```bash theme={null}
curl -X GET https://api.docyard.io/v1/upload/artifacts/batch/batch-xyz789 \
  -H "X-API-Key: dk_live_dist_aaaaaaaa"
```

```json theme={null}
{
  "batch_id": "batch-xyz789",
  "status": "completed",
  "total": 2,
  "processed": 2,
  "succeeded": 2,
  "failed": 0,
  "artifacts": [
    { "id": "art-001", "status": "active" },
    { "id": "art-002", "status": "active" }
  ]
}
```

***

## Related Endpoints

* \[Upload Artifact]\(/api-reference/upload endpoints/upload)
