API reference

All 50 endpoints, grouped by purpose. Guides lead, this is the reference.

Complete endpoint reference for the COHESION Judgment Independence Score API. If you are just starting, read the guides first. The reference is here for when you need the exact wire shape.

Base URL: https://api.cohesionauth.com. All endpoints return JSON. Every response includes request_id and timestamp.

Meta

EndpointAuthPurpose
GET /noneHealth check
GET /v1noneAPI self-describe

Scoring

All scoring endpoints authenticate via X-API-Key: ck_live_<26-char> (the per-org key issued at signup or via key rotation).

EndpointAuthPurpose
POST /v1/scoreper-org keyScore one interaction
POST /v1/score/batchper-org keyScore up to 100 interactions
POST /v1/score/{session_id}/commitper-org keyFinalize a provisional score (2026-04-23 additive)
GET /v1/operator/:operator_id/profileper-org keyOperator judgment profile
GET /v1/organization/dashboardper-org keyOrg aggregate dashboard
POST /v1/maintenance/recommendper-org keyIntervention recommendation
GET /v1/compliance/reportper-org keyPersisted Article 14 report

Admin (per-org self-serve)

These endpoints authenticate via the org’s own X-API-Key. Every action is audit-logged to the org’s own audit_log.

EndpointAuthPurpose
POST /v1/admin/key/rotateper-org keySelf-serve key rotation (returns new key once)
POST /v1/admin/key/revokeper-org keySelf-serve key revocation (active=0)
GET /v1/admin/audit-logper-org keyOwn-org audit events
GET /v1/admin/audit-log/exportper-org keyNDJSON streaming export, own-org
POST /v1/admin/webhook/registerper-org keyRegister webhook destination
GET /v1/admin/webhook/listper-org keyList registered webhooks
DELETE /v1/admin/webhook/{id}per-org keyRemove webhook destination

Admin (master-key — added 2026-05-02)

Nine endpoints added in the 2026-05-02 additive authorization bundle. These authenticate via the endpoint’s OWN scoped Cloudflare Secret (MASTER_ADMIN_KEY_*) — NOT the per-org X-API-Key. Each handler reads ONLY its scope’s secret per defense-in-depth (D15). Layer 2 rate limit bypassed; Layer 1 per-IP enforced. No X-RateLimit-Limit header on these endpoints (avoids leaking the bypass).

Caller split:

EndpointCallerScoped keyPurpose
POST /v1/admin/org/createpayment-workerMASTER_ADMIN_KEY_ORG_CREATEProvision new org + mint first key (Stripe checkout success)
POST /v1/admin/billing/org/{org_id}/suspendpayment-workerMASTER_ADMIN_KEY_BILLING_SUSPENDQuota cross / cancel / refund / dispute (active=0)
POST /v1/admin/billing/org/{org_id}/rotatepayment-workerMASTER_ADMIN_KEY_BILLING_ROTATESubscription reactivation (mints NEW key, returned once)
GET /v1/admin/org/{org_id}/usagepayment-workerMASTER_ADMIN_KEY_ORG_USAGE_READ5-min quota poll (interaction count + tier limit + utilization)
POST /v1/admin/org/{org_id}/suspendadmin-workerMASTER_ADMIN_KEY_ORG_SUSPENDManual suspend (Peyton-initiated)
POST /v1/admin/org/{org_id}/reactivateadmin-workerMASTER_ADMIN_KEY_ORG_REACTIVATEManual reactivate
POST /v1/admin/org/{org_id}/force-rotateadmin-workerMASTER_ADMIN_KEY_ORG_FORCE_ROTATEManual key rotation (suspected compromise; returns new key once)
POST /v1/admin/org/{org_id}/force-revokeadmin-workerMASTER_ADMIN_KEY_ORG_FORCE_REVOKEManual revoke
POST /v1/admin/alerts/{alert_id}/ackadmin-workerMASTER_ADMIN_KEY_ALERT_ACKAcknowledge alert

Idempotency contract: the 8 mutating endpoints accept Idempotency-Key: <stripe-event-id-or-uuid> header. Replays return the cached envelope (sanitized — plaintext keys NEVER cached; replays of org/create, billing/rotate, or force-rotate return prefix + already_provisioned: true only, and the original caller had ONE chance to capture the plaintext from the first response). The composite primary key on admin_action_idempotency is (endpoint, idempotency_key) per Codex P1-16 — prevents cross-endpoint replay where a key minted for one endpoint could be replayed against another.

Read endpoint exemption: GET /v1/admin/org/{org_id}/usage is read-only and skips the idempotency cache.

Postman collection: the new “Admin (master-key)” folder in api/postman/cohesion-api.postman_collection.json covers all 9 endpoints with sample requests + responses. Set scope-specific {{master_admin_key_*}} env variables (NOT {{api_key}}) to avoid sending a per-org key to a master-auth endpoint.

Public demo

EndpointAuthPurpose
POST /assessmentsIP-rate-limitedSubmit a public demo run
GET /assessments/:sessionIdpublicRetrieve a shared demo run

Interactive playground

All endpoints can be called from the playground with your own API key.

Error shape

Uniform K8 v2 envelope:

{
  "error": {
    "code": "VALIDATION_FAILED",
    "message": "modification_extent must be between 0.0 and 1.0",
    "request_id": "req_01H...",
    "timestamp": "2026-04-22T18:22:10.432Z"
  }
}

See the full error catalog.