Skip to main content

Create Artifact (Metadata Only)

Creates an artifact metadata record without uploading binary content. Use this when the file is stored externally and you want to register it in Docyard’s catalog.
POST /v1/docks/:dockId/artifacts

Path Parameters

ParameterTypeDescription
dockIdstringThe dock ID

Request Body

ParameterTypeRequiredDescription
filenamestringRequiredThe artifact filename
metadataobjectOptionalArbitrary key-value metadata

Example Request

curl -X POST https://api.docyard.io/v1/docks/dock_01HQ3K.../artifacts \
  -H "Authorization: Bearer dk_live_a1b2c3d4..." \
  -H "Content-Type: application/json" \
  -d '{
    "filename": "policy-renewal-2025.pdf",
    "metadata": {
      "policy_number": "POL-2025-4821",
      "effective_date": "2025-01-01",
      "document_type": "renewal"
    }
  }'

Response

{
  "id": "art_01HQ3R...",
  "filename": "policy-renewal-2025.pdf",
  "contentType": null,
  "size": null,
  "hash": null,
  "checksum": null,
  "storageKey": null,
  "metadata": {
    "policy_number": "POL-2025-4821",
    "effective_date": "2025-01-01",
    "document_type": "renewal"
  },
  "createdAt": "2025-01-15T10:35:00.000Z"
}

Error Handling

StatusCondition
400filename is missing or empty
401Missing or invalid API key
404Dock not found