API ReferenceDocuments

Get staged document upload status

GET
/api/v1/orgs/{orgId}/document-uploads/{documentId}

Polls processing status for a staged PDF upload after complete has been called. Poll until status is ready or failed; when finished, the response includes detection with outcome, participantCount, and signatureFieldCount. Returns pollAfterMs as a suggested client backoff.

Requires the api_deals_create scope.

Authorization

bearerAuth
AuthorizationBearer <token>

Bearer token using a Clai API key secret (clai_live_*).

In: header

Path Parameters

NameTypeDescription
orgId
required
string

Organization ID the key is operating in

documentId
required
string

Staged document ID returned from create-deal

Formatuuid

Response Body

application/json

application/json

application/json

application/json

curl -X GET "https://app.goclai.com/api/v1/orgs/org_2abc123/document-uploads/550e8400-e29b-41d4-a716-446655440000"
{
  "documentId": "4704590c-004e-410d-adf7-acb7ca0a7052",
  "flowId": "ccd52024-9c9c-4751-993a-9d75a778bf9d",
  "collectionId": "string",
  "status": "awaiting_upload",
  "updatedAt": "2019-08-24T14:15:22Z",
  "pollAfterMs": 2000,
  "error": "invalid_pdf",
  "errorMessage": "string",
  "detection": {
    "outcome": "detected",
    "participantCount": 0,
    "signatureFieldCount": 0
  },
  "canFindSignatures": true
}
{
  "error": {
    "code": "ERROR_CODE",
    "message": "Human-readable error message",
    "details": {}
  }
}
{
  "error": {
    "code": "ERROR_CODE",
    "message": "Human-readable error message",
    "details": {}
  }
}
{
  "error": {
    "code": "ERROR_CODE",
    "message": "Human-readable error message",
    "details": {}
  }
}