The SyncX public API (/v1) lets you read and manage chat
sessions, capture leads, index knowledge-base content, trigger
workflow automations, and queue outbound voice-agent calls from your
own systems — all scoped to your company via a single API key.
Every request must include an X-API-Key header. Create a key from
Admin → API Keys in your dashboard once you're signed in, and
grant it only the scopes your integration needs.
X-API-Key: sk_live_xxxxxxxxxxxxxxxxxxxx
A missing or invalid key is rejected with 401 Unauthorized. A key
that lacks the scope a route requires is rejected with 403 Forbidden.
All routes below are mounted under https://api.mindsyncx.ai/v1/... —
the gateway routes each /v1/{domain} path to the service that owns it
(chat/leads → chatbot, kb → knowledge base, workflows/executions → orchestrator),
so you only ever talk to one base URL.
Each API key is issued with one or more scopes. Requests fail with
403 Forbidden if the key lacks the scope a route requires. The
special * wildcard scope grants full access. Grant the minimum your
integration needs — most read-only dashboards only need chat:read.
| Scope | Grants |
|---|---|
| chat:read | Read chat sessions, messages, and conversation history. |
| chat:write | Start conversations and send chat messages (tag/escalate sessions). |
| kb:read | Read knowledge bases and query indexed documents. |
| kb:write | Create, update, and delete knowledge-base documents. |
| workflows:read | Read workflow definitions and execution status. |
| workflows:execute | Trigger workflow / agent-pipeline executions. |
| calls:read | Poll voice-agent call status and disposition. |
| calls:write | Queue outbound voice-agent calls. |
| leads:read | Read captured leads. |
| leads:write | Capture and update leads. |
| analytics:read | Read usage and analytics data. |
| * | Wildcard — grants every scope above. |
Every /v1 endpoint returns a consistent JSON envelope, whether it
succeeds or fails.
The payload is always under a top-level data field, with optional
out-of-band meta (pagination cursors, totals):
{
"data": { },
"meta": { }
}
List endpoints page their results and return the page contract inside
data (items, page, limit,
total, has_next) — see the quickstart examples below.
Errors use a stable, machine-readable code clients can branch on,
a human-readable message, and optional details /
request_id for debugging and cross-service correlation:
{
"code": "not_found",
"message": "Human-readable description.",
"details": null,
"request_id": "req_01H..."
}
| Status | Code | Meaning |
|---|---|---|
| 400 | bad_request | Malformed request body or path parameter. |
| 401 | unauthorized | Missing or invalid X-API-Key. |
| 403 | forbidden / insufficient_scope | Key lacks the scope this route requires. |
| 404 | not_found | No such resource for this company (cross-tenant access is indistinguishable from missing). |
| 429 | rate_limited | Per-key rate limit exceeded; check Retry-After. |
| 500 | internal_error | Unexpected server error. |
Write endpoints (POST / PUT) accept an optional
Idempotency-Key header. Send a unique value (e.g. a
UUID) per logical operation. If a request with the same
Idempotency-Key is retried — after a timeout or a network failure —
the original response is replayed and the operation is not
executed a second time.
Idempotency-Key: 8f14e45f-ceea-4d92-9c1a-2b5f3a7e1c00
Requests are rate limited per API key (not per IP), so one
tenant's integration can never exhaust another's budget. When a key exceeds its
allowance the API responds with 429 Too Many Requests and a
Retry-After header — back off and retry after that window.
All endpoints are mounted under /v1 and return the { data, meta } envelope above.
| Method & path | Description | Scope |
|---|---|---|
GET/v1/chat/sessions |
List chat sessions, most recent first (paginated, optional status filter) |
chat:read |
GET/v1/chat/sessions/{id} |
Get one session, including its full message transcript | chat:read |
POST/v1/chat/sessions/{id}/tag |
Attach tags to a chat session | chat:write |
POST/v1/chat/sessions/{id}/escalate |
Escalate a session for human follow-up | chat:write |
| Method & path | Description | Scope |
|---|---|---|
POST/v1/leads |
Create a lead from your own system (PII encrypted at rest) | leads:write |
PUT/v1/leads/{id} |
Update an existing lead | leads:write |
| Method & path | Description | Scope |
|---|---|---|
GET/v1/kb/items |
List knowledge-base items, newest first (paginated, optional status filter) | kb:read |
GET/v1/kb/items/{id} |
Get a single knowledge-base item | kb:read |
POST/v1/kb/items |
Create a text or url item (indexed asynchronously) |
kb:write |
POST/v1/kb/items/{id}/reindex |
Re-trigger processing of an item | kb:write |
GET/v1/kb/items/{id}/status |
Get an item's processing status, chunk count, and any error | kb:read |
GET/v1/kb/usage |
Get current storage/document usage against your plan limits | kb:read |
| Method & path | Description | Scope |
|---|---|---|
GET/v1/workflows |
List workflows, most recent first (paginated, optional status filter) | workflows:read |
POST/v1/workflows/{id}/trigger |
Start an asynchronous execution of a workflow | workflows:execute |
GET/v1/executions/{id} |
Get an execution's current status and node-level detail | workflows:read |
| Method & path | Description | Scope |
|---|---|---|
POST/v1/calls/outbound |
Queue an outbound voice-agent call | calls:write |
GET/v1/calls/{id} |
Poll a call's status and, once it ends, its structured disposition | calls:read |
POST /v1/calls/outbound takes to_phone, an
agent_profile_id (created in your dashboard — voice, persona, and
prompt bundle), an optional free-form context object injected into the
agent's prompt (e.g. lead name, campaign), an optional callback_url the
disposition is POSTed to when the call ends, and an optional workflow_id
to run automation afterward. It accepts Idempotency-Key like other write
endpoints and returns 202 Accepted immediately — call execution is
asynchronous, so poll GET /v1/calls/{id} (or wait for the callback) for
the result.
context is capped at 8 KB and must not contain special-category
personal data (GDPR Art. 9 — health, religion, sexual orientation, etc.): it is
injected directly into the agent's prompt and persisted on the call record.
Call-specific error codes, on top of the standard envelope above:
400 invalid_agent_profile_id, 400 invalid_workflow_id,
400 unsafe_callback_url (the URL failed our SSRF guard — non-http(s)
schemes and private/loopback/link-local targets are always rejected), and
422 context_too_large.
When a call ends, if you supplied a callback_url, SyncX POSTs the call's
CallDisposition JSON there — signed, so you can verify it actually came
from us. Delivery retries with backoff on failure or timeout.
X-SyncX-Timestamp: 1752483600
X-SyncX-Signature: sha256=6f1a9c3e2b0d7a4f8c1e5b9d3a7f2c6e0b4d8a1f5c9e3b7d2a6f0c4e8b1d5a9f
Verify by recomputing the signature over the raw request body bytes (re-serializing parsed JSON changes the bytes and breaks the check) and comparing in constant time. Reject a timestamp more than 300 seconds old — the timestamp is inside the signed material precisely so a captured payload cannot be replayed indefinitely.
signed_payload = f"{timestamp}.".encode() + raw_body
expected = hmac.new(secret.encode(), signed_payload, hashlib.sha256).hexdigest()
hmac.compare_digest(f"sha256={expected}", received_signature_header)
Five real requests to get you moving — each shows the request and an example response in the envelope shape above.
curl https://api.mindsyncx.ai/v1/chat/sessions \
-H "X-API-Key: sk_live_xxxxxxxxxxxxxxxxxxxx"
import requests
resp = requests.get(
"https://api.mindsyncx.ai/v1/chat/sessions",
headers={"X-API-Key": "sk_live_xxxxxxxxxxxxxxxxxxxx"},
)
resp.raise_for_status()
print(resp.json())
const resp = await fetch("https://api.mindsyncx.ai/v1/chat/sessions", {
headers: { "X-API-Key": "sk_live_xxxxxxxxxxxxxxxxxxxx" },
});
const data = await resp.json();
console.log(data);
{
"data": [
{
"id": "665f1c2a9b3e4a1d2c3b4a5e",
"session_id": "sess_a1b2c3",
"company_id": "665e0000000000000000000a",
"status": "active",
"tags": ["vip"],
"created_at": "2026-07-14T10:15:00Z"
}
],
"meta": { "page": 1, "limit": 20, "total": 1, "has_next": false }
}
curl -X POST https://api.mindsyncx.ai/v1/leads \
-H "X-API-Key: sk_live_xxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: 8f14e45f-ceea-4d92-9c1a-2b5f3a7e1c00" \
-d '{
"name": "Ada Lovelace",
"email": "ada@example.com",
"phone": "+1-555-0100",
"notes": "Interested in the Pro plan."
}'
import requests
resp = requests.post(
"https://api.mindsyncx.ai/v1/leads",
headers={
"X-API-Key": "sk_live_xxxxxxxxxxxxxxxxxxxx",
"Content-Type": "application/json",
"Idempotency-Key": "8f14e45f-ceea-4d92-9c1a-2b5f3a7e1c00",
},
json={
"name": "Ada Lovelace",
"email": "ada@example.com",
"phone": "+1-555-0100",
"notes": "Interested in the Pro plan.",
},
)
resp.raise_for_status()
print(resp.json())
const resp = await fetch("https://api.mindsyncx.ai/v1/leads", {
method: "POST",
headers: {
"X-API-Key": "sk_live_xxxxxxxxxxxxxxxxxxxx",
"Content-Type": "application/json",
"Idempotency-Key": "8f14e45f-ceea-4d92-9c1a-2b5f3a7e1c00",
},
body: JSON.stringify({
name: "Ada Lovelace",
email: "ada@example.com",
phone: "+1-555-0100",
notes: "Interested in the Pro plan.",
}),
});
const data = await resp.json();
console.log(data);
{
"data": {
"id": "665f1c2a9b3e4a1d2c3b4a60",
"company_id": "665e0000000000000000000a",
"name": "Ada Lovelace",
"email": "ada@example.com",
"phone": "+1-555-0100",
"status": "new",
"source": "api",
"notes": "Interested in the Pro plan.",
"created_at": "2026-07-14T10:15:00Z",
"updated_at": "2026-07-14T10:15:00Z"
}
}
curl https://api.mindsyncx.ai/v1/kb/items?limit=20 \
-H "X-API-Key: sk_live_xxxxxxxxxxxxxxxxxxxx"
import requests
resp = requests.get(
"https://api.mindsyncx.ai/v1/kb/items",
params={"limit": 20},
headers={"X-API-Key": "sk_live_xxxxxxxxxxxxxxxxxxxx"},
)
resp.raise_for_status()
print(resp.json())
const resp = await fetch("https://api.mindsyncx.ai/v1/kb/items?limit=20", {
headers: { "X-API-Key": "sk_live_xxxxxxxxxxxxxxxxxxxx" },
});
const data = await resp.json();
console.log(data);
{
"data": {
"items": [
{
"id": "665f1c2e9a3b4c1d2e3f4a5b",
"company_id": "acme",
"title": "Onboarding guide",
"type": "url",
"url": "https://docs.example.com/onboarding",
"processing_status": "processed",
"processed_at": "2026-07-14T10:32:11+00:00",
"chunk_count": 12,
"error_message": null,
"created_at": "2026-07-14T10:30:00+00:00",
"updated_at": "2026-07-14T10:32:11+00:00"
}
],
"page": 1,
"limit": 20,
"total": 1,
"has_next": false
}
}
Direct file upload isn't exposed on this public route — send raw
text, or a url pointing at a file you've hosted
out-of-band. New items are created pending and indexed
asynchronously.
curl -X POST https://api.mindsyncx.ai/v1/kb/items \
-H "X-API-Key: sk_live_xxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: 3c2a9e0a-5b3d-4f1e-8a2b-1d4e7c9f0a11" \
-d '{
"type": "text",
"title": "Refund policy",
"content": "Refunds are issued within 14 days of purchase..."
}'
import requests
resp = requests.post(
"https://api.mindsyncx.ai/v1/kb/items",
headers={
"X-API-Key": "sk_live_xxxxxxxxxxxxxxxxxxxx",
"Content-Type": "application/json",
"Idempotency-Key": "3c2a9e0a-5b3d-4f1e-8a2b-1d4e7c9f0a11",
},
json={
"type": "text",
"title": "Refund policy",
"content": "Refunds are issued within 14 days of purchase...",
},
)
resp.raise_for_status()
print(resp.json())
const resp = await fetch("https://api.mindsyncx.ai/v1/kb/items", {
method: "POST",
headers: {
"X-API-Key": "sk_live_xxxxxxxxxxxxxxxxxxxx",
"Content-Type": "application/json",
"Idempotency-Key": "3c2a9e0a-5b3d-4f1e-8a2b-1d4e7c9f0a11",
},
body: JSON.stringify({
type: "text",
title: "Refund policy",
content: "Refunds are issued within 14 days of purchase...",
}),
});
const data = await resp.json();
console.log(data);
{
"data": {
"id": "665f1c2e9a3b4c1d2e3f4a5c",
"company_id": "acme",
"title": "Refund policy",
"type": "text",
"url": null,
"processing_status": "pending",
"processed_at": null,
"chunk_count": 0,
"error_message": null,
"created_at": "2026-07-16T09:00:00+00:00",
"updated_at": "2026-07-16T09:00:00+00:00"
}
}
curl -X POST https://api.mindsyncx.ai/v1/workflows/6630f1a2b3c4d5e6f7a8b9c0/trigger \
-H "X-API-Key: sk_live_xxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: 0e2b7f4a-6c1d-4a9e-9f3b-5a8d2c1e7b44" \
-d '{
"trigger_data": { "lead_id": "665f1c2a9b3e4a1d2c3b4a60" }
}'
import requests
resp = requests.post(
"https://api.mindsyncx.ai/v1/workflows/6630f1a2b3c4d5e6f7a8b9c0/trigger",
headers={
"X-API-Key": "sk_live_xxxxxxxxxxxxxxxxxxxx",
"Content-Type": "application/json",
"Idempotency-Key": "0e2b7f4a-6c1d-4a9e-9f3b-5a8d2c1e7b44",
},
json={"trigger_data": {"lead_id": "665f1c2a9b3e4a1d2c3b4a60"}},
)
resp.raise_for_status()
print(resp.json())
const resp = await fetch("https://api.mindsyncx.ai/v1/workflows/6630f1a2b3c4d5e6f7a8b9c0/trigger", {
method: "POST",
headers: {
"X-API-Key": "sk_live_xxxxxxxxxxxxxxxxxxxx",
"Content-Type": "application/json",
"Idempotency-Key": "0e2b7f4a-6c1d-4a9e-9f3b-5a8d2c1e7b44",
},
body: JSON.stringify({ trigger_data: { lead_id: "665f1c2a9b3e4a1d2c3b4a60" } }),
});
const data = await resp.json();
console.log(data);
{
"data": {
"execution_id": "6630f9c1b3c4d5e6f7a8b9d4",
"status": "pending"
}
}
Poll the execution to see it complete:
curl https://api.mindsyncx.ai/v1/executions/6630f9c1b3c4d5e6f7a8b9d4 \
-H "X-API-Key: sk_live_xxxxxxxxxxxxxxxxxxxx"
import requests
resp = requests.get(
"https://api.mindsyncx.ai/v1/executions/6630f9c1b3c4d5e6f7a8b9d4",
headers={"X-API-Key": "sk_live_xxxxxxxxxxxxxxxxxxxx"},
)
resp.raise_for_status()
print(resp.json())
const resp = await fetch("https://api.mindsyncx.ai/v1/executions/6630f9c1b3c4d5e6f7a8b9d4", {
headers: { "X-API-Key": "sk_live_xxxxxxxxxxxxxxxxxxxx" },
});
const data = await resp.json();
console.log(data);
{
"data": {
"id": "6630f9c1b3c4d5e6f7a8b9d4",
"workflow_id": "6630f1a2b3c4d5e6f7a8b9c0",
"company_id": "507f1f77bcf86cd799439011",
"status": "completed",
"started_at": "2026-01-01T00:00:00+00:00",
"completed_at": "2026-01-01T00:00:05+00:00",
"node_executions": [],
"trigger_data": { "lead_id": "665f1c2a9b3e4a1d2c3b4a60" },
"error": null
}
}
curl -X POST https://api.mindsyncx.ai/v1/calls/outbound \
-H "X-API-Key: sk_live_xxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: 4b6a2e10-8f2c-4c1a-9d3b-2f6e8a1c9d02" \
-d '{
"to_phone": "+15551230000",
"agent_profile_id": "6630a1b2c3d4e5f6a7b8c9d0",
"context": { "leadName": "Ada Lovelace", "campaignId": "spring-2026" },
"callback_url": "https://yourapp.example.com/webhooks/syncx-call"
}'
import requests
resp = requests.post(
"https://api.mindsyncx.ai/v1/calls/outbound",
headers={
"X-API-Key": "sk_live_xxxxxxxxxxxxxxxxxxxx",
"Content-Type": "application/json",
"Idempotency-Key": "4b6a2e10-8f2c-4c1a-9d3b-2f6e8a1c9d02",
},
json={
"to_phone": "+15551230000",
"agent_profile_id": "6630a1b2c3d4e5f6a7b8c9d0",
"context": {"leadName": "Ada Lovelace", "campaignId": "spring-2026"},
"callback_url": "https://yourapp.example.com/webhooks/syncx-call",
},
)
resp.raise_for_status()
print(resp.json())
const resp = await fetch("https://api.mindsyncx.ai/v1/calls/outbound", {
method: "POST",
headers: {
"X-API-Key": "sk_live_xxxxxxxxxxxxxxxxxxxx",
"Content-Type": "application/json",
"Idempotency-Key": "4b6a2e10-8f2c-4c1a-9d3b-2f6e8a1c9d02",
},
body: JSON.stringify({
to_phone: "+15551230000",
agent_profile_id: "6630a1b2c3d4e5f6a7b8c9d0",
context: { leadName: "Ada Lovelace", campaignId: "spring-2026" },
callback_url: "https://yourapp.example.com/webhooks/syncx-call",
}),
});
const data = await resp.json();
console.log(data);
{
"data": {
"call_id": "6630f9c1b3c4d5e6f7a8b9e1",
"status": "queued"
}
}
Poll the call for its status and, once it ends, the disposition:
curl https://api.mindsyncx.ai/v1/calls/6630f9c1b3c4d5e6f7a8b9e1 \
-H "X-API-Key: sk_live_xxxxxxxxxxxxxxxxxxxx"
import requests
resp = requests.get(
"https://api.mindsyncx.ai/v1/calls/6630f9c1b3c4d5e6f7a8b9e1",
headers={"X-API-Key": "sk_live_xxxxxxxxxxxxxxxxxxxx"},
)
resp.raise_for_status()
print(resp.json())
const resp = await fetch("https://api.mindsyncx.ai/v1/calls/6630f9c1b3c4d5e6f7a8b9e1", {
headers: { "X-API-Key": "sk_live_xxxxxxxxxxxxxxxxxxxx" },
});
const data = await resp.json();
console.log(data);
{
"data": {
"call_id": "6630f9c1b3c4d5e6f7a8b9e1",
"company_id": "665e0000000000000000000a",
"status": "completed",
"direction": "outbound",
"to_phone": "+15551230000",
"agent_profile_id": "6630a1b2c3d4e5f6a7b8c9d0",
"workflow_id": null,
"context": { "leadName": "Ada Lovelace", "campaignId": "spring-2026" },
"created_at": "2026-07-14T10:15:00Z",
"started_at": "2026-07-14T10:15:04Z",
"ended_at": "2026-07-14T10:19:25Z",
"duration_seconds": 261,
"error": null,
"disposition": {
"callId": "6630f9c1b3c4d5e6f7a8b9e1",
"companyId": "665e0000000000000000000a",
"direction": "outbound",
"customerName": "Ada Lovelace",
"phone": "+15551230000",
"intent": "Sales",
"status": "SALES_LEAD",
"summary": "Interested in the Pro plan, requested a callback next week.",
"sentiment": "Positive",
"requiresHuman": true,
"priority": "High",
"transferredTo": null,
"recordingUrl": "https://cdn.mindsyncx.ai/recordings/abc123.mp3",
"transcript": "...",
"context": { "campaignId": "spring-2026" },
"durationSeconds": 261
}
}
}
Don't have an API key yet? Start a free trial — every Starter plan can generate keys immediately, no card required.