API Overview
Build custom integrations with the Coherence API
The Coherence API lets you read and write workspace data and delegate work to your
Coherence agent (Nash). The machine-readable OpenAPI 3.1 spec is published at
https://getcoherence.io/openapi.json.
Getting Started
Base URL
https://api.getcoherence.io/v1
Authentication
Every request requires a workspace API key sent as Authorization: Bearer sk_live_....
Quick Example
List contacts:
curl -X GET "https://api.getcoherence.io/v1/modules/contacts/records" \
-H "Authorization: Bearer sk_live_..."{
"records": [
{
"recordId": "5f0c2f8a-9a1e-4a9b-8d8f-2f7f4f3f9d10",
"displayName": "John Smith",
"fields": { "email": "[email protected]", "company": "Acme Corp" }
}
],
"total": 1,
"page": 1,
"pageSize": 25
}Endpoints
This is the complete public API surface. Richer operations — sending email,
creating reminders, drafting and scheduling outreach, posting to social — run
through the agent via POST /agents/messages, governed by your workspace's
approval rules.
| Method | Endpoint | Scope | Description |
|---|---|---|---|
| GET | /me | workspace:read | Identity / key health check |
| GET | /modules | workspace:read | List modules |
| GET | /modules/{moduleSlug} | workspace:read | Get a module's full schema (fields, views, references) |
| GET | /modules/{moduleSlug}/fields | workspace:read | List fields on a module |
| GET | /modules/{moduleSlug}/views | workspace:read | List a module's views |
| GET | /modules/{moduleSlug}/records | records:read | List records (filtering, sorting, field selection) |
| GET | /modules/{moduleSlug}/records/{recordId} | records:read | Get a record |
| POST | /modules/{moduleSlug}/records | records:write | Create a record |
| PATCH | /modules/{moduleSlug}/records/{recordId} | records:write | Update a record |
| DELETE | /modules/{moduleSlug}/records/{recordId} | records:write | Delete a record |
| POST | /modules/{moduleSlug}/records/bulk | records:write | Bulk add/remove labels and types |
| POST | /modules/{moduleSlug}/records/bulk-delete | records:write | Bulk soft-delete records |
| GET | /modules/{moduleSlug}/references | records:read | List a module's reference fields |
| GET | /modules/{moduleSlug}/references/{referenceSlug}/records/{recordId} | records:read | Get linked record IDs |
| GET | /modules/{moduleSlug}/references/{referenceSlug}/picker | records:read | Search records to link |
| POST | /search | records:read | Cross-module semantic + keyword search |
| GET | /activity | workspace:read | Workspace-wide activity feed |
| GET | /modules/{moduleSlug}/activity | workspace:read | Activity feed for a module |
| GET | /modules/{moduleSlug}/records/{recordId}/activity | workspace:read | Grouped activity feed for a record |
| POST | /agents/messages | agents:write | Chat with a Coherence agent (Nash) |
Core Concepts
Workspaces
Your workspace contains all your data. API keys are scoped to a single workspace.
Modules
Modules are your data types (Contacts, Deals, etc.). Records live under a module:
/modules/{moduleSlug}/records
Records
Records are individual entries in a module. Each has a UUID recordId, a displayName,
and a fields object keyed by field slug.
Request & Response
Headers
Authorization: Bearer sk_live_...
Content-Type: application/json
List query parameters
| Parameter | Description | Example |
|---|---|---|
page | Page number (1-based) | ?page=2 |
pageSize | Results per page (max 100) | ?pageSize=50 |
search | Free-text query within the module | ?search=acme |
sortField | Field to sort by | ?sortField=createdAt |
sortDirection | asc or desc | ?sortDirection=desc |
filter[field] | Simple field filter (comma = OR) | ?filter[status]=active,pending |
advancedFilter | JSON-encoded operator/AND-OR filter | see Records API |
labelIds / typeIds | Comma-separated label/type IDs (UUIDs) | ?labelIds=<uuid>,<uuid> |
fields | Comma-separated field slugs to return | ?fields=name,email |
Creating a record
curl -X POST "https://api.getcoherence.io/v1/modules/contacts/records" \
-H "Authorization: Bearer sk_live_..." \
-H "Content-Type: application/json" \
-d '{
"displayName": "Jane Doe",
"fields": { "email": "[email protected]", "status": "active" }
}'displayName is required; fields and ownerUserId are optional.
Response envelopes
{ "modules": [ ... ] }
{ "fields": [ ... ] }
{ "records": [ ... ], "total": 100, "page": 1, "pageSize": 25 }
{ "record": { ... } }Error envelope
{
"error": {
"code": "not_found",
"message": "Record not found",
"statusCode": 404
}
}Validation failures carry code: "validation_error" and an issues array describing the failed fields. See Errors for the full code catalog.
Talking to the agent
curl -X POST "https://api.getcoherence.io/v1/agents/messages" \
-H "Authorization: Bearer sk_live_..." \
-H "Content-Type: application/json" \
-d '{ "message": "Draft a follow-up email to the leads I created this week." }'{ "response": "...", "success": true, "durationMs": 8421, "toolCalls": 3 }Pass an optional agentId to target a specific agent with its own system prompt.
MCP
For MCP-compatible clients (Claude Desktop, Cursor, Cline, Windsurf, VS Code, ChatGPT), install the official MCP server:
npx @coherenceos/mcp-serverIt wraps this API plus the Nash agent. See MCP Server Overview.
TypeScript SDK
For TypeScript and JavaScript, use the official SDK instead of hand-rolling fetch calls:
npm install @coherenceos/sdkIt wraps this entire API — records, modules, search, activity, and agents (including SSE streaming) — with full types, zero runtime dependencies, and ESM + CommonJS builds.
import { CoherenceClient } from '@coherenceos/sdk';
const coherence = new CoherenceClient({ apiKey: process.env.COHERENCE_API_KEY! });
const { records } = await coherence.records.list('contacts', { pageSize: 50 });In other languages, call the REST API directly — the OpenAPI spec at /openapi.json generates type-safe clients. For MCP-compatible clients, use the MCP server.
Next: Learn about Authentication to create your API key.