Skip to main content
POST
/
api
/
batch-update
Process batch document update
curl --request POST \
  --url https://platform.kodexa.ai/api/batch-update \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "contentObjectUploads": {
    "uploads": [
      {
        "documentFamilyId": "<string>",
        "fileIndex": 123,
        "fileName": "<string>",
        "uploadType": "<string>"
      }
    ]
  },
  "deletes": {
    "documentFamilyIds": [
      "<string>"
    ]
  },
  "documentFamilyIds": [
    "<string>"
  ],
  "labelUpdates": {
    "newLabels": [
      {}
    ],
    "removedLabels": [
      {}
    ]
  },
  "notes": {
    "deletedNotes": [
      "<string>"
    ],
    "newNotes": [
      {}
    ]
  },
  "projectId": "<string>",
  "task": {},
  "transactionStart": "<string>"
}
'
{
  "contentObjectUpdates": [
    {
      "documentFamily": {},
      "documentFamilyId": "<string>",
      "error": "<string>",
      "success": true
    }
  ],
  "task": {}
}

Authorizations

x-api-key
string
header
required

API key for authentication. Create one from the Kodexa platform UI under Settings > Access Tokens.

Body

A batch update request containing multiple document operations to be processed atomically.

contentObjectUploads
object

Content object file uploads to add to document families.

deletes
object

Document families to delete.

documentFamilyIds
string[]

IDs of document families to include in the batch.

labelUpdates
object

Label additions and removals.

notes
object

Note additions and deletions.

projectId
string

ID of the project containing the document families.

task
object

Optional task data to associate with the batch update.

transactionStart
string

Transaction start marker for optimistic concurrency.

Response

Batch update result

Response from a batch update operation, containing results for each document family.

contentObjectUpdates
object[]

Results for each content object upload.

task
object

Updated task data, if a task was included in the batch.