Skip to main content
All paths are under the base URL (/api/v1) and require authentication. Reads are workspace-member; writes require the work:write scope over OAuth. See Collections for the model.

Collections

MethodPathPermPurpose
POST/workspaces/:slug/collectionsmember (work:write)Create a collection
GET/workspaces/:slug/collectionsmemberList collections (?status)
GET/workspaces/:slug/collections/doctormemberAudit collections (?full)
GET/workspaces/:slug/collections/:idmemberCollection detail
GET/workspaces/:slug/collections/:id/contextmemberResolve the criterion Knowledge
PATCH/workspaces/:slug/collections/:idmember (work:write)Update a collection
Create body (CreateCollectionDto): name (required), archetype (required, one of pipeline, analysis, content), record_schema, views, criterion_rel_slugs, distill_policy, owner_clerk_id. Update accepts name, status (active or archived), record_schema, views, criterion_rel_slugs, distill_policy.

Records

Base path /workspaces/:slug/collections/:id.
MethodPathPermPurpose
POST.../recordsmember (work:write)Add a record
GET.../recordsmemberList records (cursor paginated)
GET.../retrievememberRecords plus criterion in one call
GET.../records/:recordIdmemberRecord detail
PATCH.../records/:recordIdmember (work:write)Update a record
DELETE.../records/:recordIdmember (work:write)Delete a record
Record body (CreateRecordDto / UpdateRecordDto): fields, status, field_meta, entity_id, and drifted on update. A record’s status is validated against the collection’s stages. List and retrieve accept status, entity_id, drifted, updated_after, view, fields, limit, and cursor.

Entities

MethodPathPermPurpose
POST/workspaces/:slug/entitiesmember (work:write)Upsert an entity
GET/workspaces/:slug/entitiesmemberList entities (?kind)
GET/workspaces/:slug/entities/:idmemberEntity detail
Upsert body (UpsertEntityDto): kind (required), name (required), dedup_key, attributes. The upsert is idempotent on (kind, dedup_key).
curl -X POST https://api.driftless.icu/api/v1/workspaces/acme/entities \
  -H "x-api-key: drift_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{"kind":"company","name":"Acme","dedup_key":"acme.com"}'

Pagination and errors

Records and retrieve paginate by keyset (limit plus cursor, returning nextCursor). Collections and entities list without a cursor. An invalid status (outside the collection’s stages) or archetype, or an unknown body field, returns 400 VALIDATION_FAILED. See errors for the envelope.