Deployments.ai Docs
Brains

Capture a Brain document revision

POST /v1/brains/{brainId}/sources/{sourceId}/documents · SDK captureBrainDocument · CLI deployments brain-document capture

POST
/v1/brains/{brainId}/sources/{sourceId}/documents

Requires brains:write.

Authorization

tenantJwt
headerAuthorizationBearer <token>

Tenant JWT carrying organization, project, and environment claims.

Path Parameters

brainId*string
Match^[0-7][0-9A-HJKMNP-TV-Z]{25}$
sourceId*string
Match^[0-7][0-9A-HJKMNP-TV-Z]{25}$

Header Parameters

x-deployments-organization*string
Match^[0-7][0-9A-HJKMNP-TV-Z]{25}$
idempotency-key*string

Limited to 500 UTF-8 bytes.

Length1 <= length <= 500

Request Body

application/json
  1. body
completedUploadTicketId?string
Match^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$
externalItemIdentity*string
kind*string
Value in"archive""content""restore""tombstone"
mediaType?string
restoredContentVersionId?string
Match^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$
sensitivity?string
Value in"confidential""internal""public""restricted"
sourceLocator?string
sourceOrder?integer
Range0 <= value
sourceRevision?string
sourceTimestamp?string
stableVersion?string
title?string
transitionReason?string

Response Body

BrainDocumentResponse

application/json
  1. response
document*
version*
curl -X POST "https://example.com/v1/brains/string/sources/string/documents" \  -H "x-deployments-organization: string" \  -H "idempotency-key: string" \  -H "Content-Type: application/json" \  -d '{    "externalItemIdentity": "string",    "kind": "archive"  }'
{  "document": {    "brainId": "string",    "createdAt": "string",    "currentContentVersionId": "string",    "currentEnvelopeHash": "string",    "currentSourceOrder": 0,    "currentVersionId": "string",    "externalItemIdentity": "string",    "id": "string",    "lifecycle": "active",    "organizationId": "string",    "projectionGeneration": 0,    "reviewStatus": "approved",    "sensitivity": "confidential",    "sourceId": "string",    "sourceLocator": "string",    "title": "string",    "updatedAt": "string",    "version": 0  },  "version": {    "bodyRef": {      "bucket": "string",      "byteSize": 0,      "contentType": "string",      "etag": "string",      "fileName": "string",      "key": "string",      "sha256": "string",      "versionId": "string"    },    "brainId": "string",    "byteSize": 0,    "contentHash": "string",    "createdAt": "string",    "documentId": "string",    "envelopeHash": "string",    "id": "string",    "kind": "archive",    "language": "string",    "mediaType": "string",    "organizationId": "string",    "originalRenditionId": "string",    "predecessorVersionId": "string",    "restoredContentVersionId": "string",    "sourceId": "string",    "sourceOrder": 0,    "sourceRevision": "string",    "sourceTimestamp": "string",    "transitionReason": "string"  }}