Version 1.0 · Stable

API documentation

A typed REST API for every part of the platform. All endpoints are tenant-scoped and honor role-based permissions.

42
Endpoints
84ms
Avg latency
99.98%
SLA
18 events
Webhooks

Authentication

POST/v1/auth/token
200 OK
Exchange credentials for a bearer token

OAuth 2.1 client-credentials flow scoped to a tenant.

curl -X POST https://api.commandreai.com/v1/auth/token \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json"
POST/v1/auth/refresh
200 OK
Refresh an expiring token

Rotates the access token and returns a new refresh token.

curl -X POST https://api.commandreai.com/v1/auth/refresh \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json"

Transactions

GET/v1/transactions
200 OK
List transactions

Paginated list with filters: status, agent_id, close_before.

curl -X GET https://api.commandreai.com/v1/transactions \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json"
POST/v1/transactions
200 OK
Create a transaction

Requires role: tc, brokerage_admin.

curl -X POST https://api.commandreai.com/v1/transactions \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json"
GET/v1/transactions/{id}
200 OK
Retrieve one transaction

Includes parties, milestones, and progress.

curl -X GET https://api.commandreai.com/v1/transactions/{id} \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json"
PATCH/v1/transactions/{id}
200 OK
Update a transaction

Any subset of mutable fields.

curl -X PATCH https://api.commandreai.com/v1/transactions/{id} \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json"
DELETE/v1/transactions/{id}
200 OK
Archive a transaction

Soft delete; retained in audit log.

curl -X DELETE https://api.commandreai.com/v1/transactions/{id} \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json"

Documents & Compliance

POST/v1/documents
200 OK
Upload a document

Multipart upload; triggers AI pre-screen.

curl -X POST https://api.commandreai.com/v1/documents \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json"
POST/v1/documents/{id}/approve
200 OK
Approve a document

Role: compliance. Enforces separation of duties.

curl -X POST https://api.commandreai.com/v1/documents/{id}/approve \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json"
POST/v1/documents/{id}/reject
200 OK
Reject a document

Requires reason and optional annotations.

curl -X POST https://api.commandreai.com/v1/documents/{id}/reject \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json"

Commissions

GET/v1/commissions
200 OK
List commissions

Filter by agent, status, cycle.

curl -X GET https://api.commandreai.com/v1/commissions \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json"
POST/v1/commissions/{id}/pay
200 OK
Trigger disbursement

Idempotent. Blocked when compliance is not approved.

curl -X POST https://api.commandreai.com/v1/commissions/{id}/pay \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json"

Webhooks

POSTyourapp.com/webhooks
200 OK
Event delivery

Signed with HMAC-SHA256. Retries with exponential backoff.

curl -X POST https://api.commandreai.comyourapp.com/webhooks \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json"