DKBSignDocs

API reference

POSTRequires Bearer token

Upload a document for AI

/api/ai/documents

Ingest a PDF.

  • Multipart: file plus optional external_id.
  • JSON: filename and either content_base64 or storage_path.

Response 201: document_id, status (often pending / indexing), and optional job_id. Poll GET /api/ai/documents/{document_id}/status until ready or failed. Cross-tenant ids return 404 (never 403).

Path parameters

This endpoint has no path parameters.

Query parameters

This endpoint has no query parameters.

Request body

Send as multipart/form-data.

FieldTypeDescription
file
stringPDF file (multipart).
external_id
stringOptional external reference (for example a signing document id).
e.g. "sig-123"
filename
stringFile name when sending JSON.
e.g. "contract.pdf"
content_base64
stringPDF content, base64-encoded (JSON).
storage_path
stringExisting object path under the tenant prefix (JSON).

Responses

StatusMeaning
201See the example response.
401Missing or invalid Bearer token.

Request

curl
curl -X POST 'https://api.dkbsigns.com/api/ai/documents' \
  -H 'Authorization: Bearer $DKBSIGN_TOKEN' \
  -H 'Accept: application/json' \
  -F 'file=file' \
  -F 'external_id=sig-123' \
  -F 'filename=contract.pdf' \
  -F 'content_base64=content_base64' \
  -F 'storage_path=storage_path'

Response 201

json
{
  "document_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "status": "pending",
  "job_id": "7c9e6679-7425-40de-944b-e07fc1f90ae7"
}