Deployments.ai Docs
Brains

Create a Brain source

POST /v1/brains/{brainId}/sources · SDK createBrainSource · CLI deployments brain-source create

POST
/v1/brains/{brainId}/sources

Requires brains:admin.

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}$

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
kind*"upload"
Value in"upload"
name*string
Lengthlength <= 200

Response Body

BrainSourceResponse

application/json
  1. response
brainId*string
Match^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$
connectionId?string
Match^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$
configuration?
createdAt*string
createdByPrincipalId*string
Match^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$
id*string
Match^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$
environmentId?string
Match^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$
kind*string
Value in"email""github""google-drive""notion""platform-conversation""slack""teams""upload"
lastSyncAt?string
name*string
Lengthlength <= 200
organizationId*string
Match^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$
projectId?string
Match^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$
status*string
Value in"active""archived""failed""paused"
syncCursor?string
syncError?string
updatedAt*string
updatedByPrincipalId*string
Match^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$
version*integer
Range0 <= value
curl -X POST "https://example.com/v1/brains/string/sources" \  -H "x-deployments-organization: string" \  -H "idempotency-key: string" \  -H "Content-Type: application/json" \  -d '{    "kind": "upload",    "name": "string"  }'
{  "brainId": "string",  "connectionId": "string",  "configuration": {},  "createdAt": "string",  "createdByPrincipalId": "string",  "id": "string",  "environmentId": "string",  "kind": "email",  "lastSyncAt": "string",  "name": "string",  "organizationId": "string",  "projectId": "string",  "status": "active",  "syncCursor": "string",  "syncError": "string",  "updatedAt": "string",  "updatedByPrincipalId": "string",  "version": 0}