Skip to main content

Batch Upload Artifacts

Uploads multiple files to a dock in a single request. Each file is individually hashed and deduplicated.
POST /v1/docks/:dockId/artifacts/upload/batch

Path Parameters

ParameterTypeDescription
dockIdstringThe dock ID

Request Body

Multipart form data with multiple file fields.
FieldTypeRequiredDescription
filesfile[]RequiredUp to 100 files

Example Request

curl -X POST https://api.docyard.io/v1/docks/dock_01HQ3K.../artifacts/upload/batch \
  -H "Authorization: Bearer dk_live_a1b2c3d4..." \
  -F "[email protected]" \
  -F "[email protected]" \
  -F "[email protected]"

Response

{
  "batchId": "batch_01HQ3N...",
  "artifacts": [
    {
      "id": "art_01HQ3M...",
      "filename": "dec-page-2025.pdf",
      "contentType": "application/pdf",
      "size": 245760,
      "hash": "sha256:a3f8c2d1...",
      "isDuplicate": false,
      "createdAt": "2025-01-15T10:31:00.000Z"
    },
    {
      "id": "art_01HQ3N...",
      "filename": "coi-renewal.pdf",
      "contentType": "application/pdf",
      "size": 189440,
      "hash": "sha256:b7d2e4f5...",
      "isDuplicate": true,
      "createdAt": "2025-01-14T08:00:00.000Z"
    },
    {
      "id": "art_01HQ3P...",
      "filename": "endorsement-7a.pdf",
      "contentType": "application/pdf",
      "size": 52480,
      "hash": "sha256:c1f9a3b7...",
      "isDuplicate": false,
      "createdAt": "2025-01-15T10:31:00.000Z"
    }
  ]
}

Error Handling

StatusCondition
400No files provided, or more than 100 files
401Missing or invalid API key
404Dock not found
The maximum batch size is 100 files. For larger ingestion volumes, split uploads into multiple batch requests or use the async batch assembler.