C Consayik

API reference

Push conversations to Consayik as they finish, and read back their analysis and QA evaluations.

Authentication

Create a key on Settings → API keys and send it as a bearer token. Every request acts on the key’s organization.

Authorization: Bearer csk_…

Errors are problem details JSON with a detail explaining what to fix: 401 for a missing or revoked key, 422 for a request that can’t be accepted, 413 for a file that is too large.

POST /api/v1/conversations

Sends one conversation as JSON. Give a transcript (an array of turns, or plain text in “Name: message” lines), or an audioUrl Consayik fetches the recording from (public https only). Answers 202 with the conversation’s id; analysis runs in the background, usually within a minute.

curl -X POST https://consayik.com/api/v1/conversations \
  -H "Authorization: Bearer $CONSAYIK_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "source": "chat",
    "externalId": "chat-81723",
    "agent": { "id": "E1042", "name": "Dana Reyes", "email": "dana@example.com" },
    "customer": "ACCT-55120",
    "startedAt": "2026-10-30T14:05:00Z",
    "durationSeconds": 412,
    "metadata": { "queue": "Billing", "csat": 4 },
    "transcript": [
      { "role": "customer", "speaker": "Sam", "text": "I was charged twice for October." },
      { "role": "agent", "speaker": "Dana", "text": "I'm sorry about that. Let me check your account." }
    ]
  }'
{ "id": "6f1c…", "status": "queued", "duplicate": false }
FieldDescription
sourceRequired. The key (or id) of one of your sources. It decides the instructions and scorecard used. GET /api/v1/sources lists them.
externalIdYour id for the conversation. Sending the same one again for the same source returns the existing conversation ("duplicate": true) instead of analysing and charging twice, so retries are safe.
agentWho handled it: matched to an agent by id, then email, then name; a new one is created otherwise. If omitted, the AI uses the name the agent gives in the conversation.
transcriptTurns with speaker, role (agent, customer, bot, system), text and optional atSeconds. Common variants (message, from, sender, …) are understood, as is a string of lines.
audioUrlA recording to fetch instead of a transcript: MP3, WAV, M4A, OGG, FLAC, WebM or AAC, up to 200 MB. It is transcribed with speakers labelled.
metadataUp to 50 key/value pairs, shown with the conversation and given to the AI.
analyzefalse stores the conversation without analysing it.

POST /api/v1/conversations/upload

The same, as multipart/form-data with a file: a recording, or a transcript file (.txt, .json, .vtt, .srt). Other fields: source, externalId, agentId, agentName, agentEmail, customer, startedAt, durationSeconds, metadata (a JSON object as text), analyze.

curl -X POST https://consayik.com/api/v1/conversations/upload \
  -H "Authorization: Bearer $CONSAYIK_KEY" \
  -F source=calls -F externalId=call-99812 -F agentName="Dana Reyes" \
  -F file=@call-99812.mp3

GET /api/v1/conversations/{id}

The conversation with its transcript, its analysis (summary, customer intent, sentiment, resolution, topics, key moments, findings, coaching notes, cost) once status is analyzed, and its submitted evaluations with every criterion’s points, rationale and evidence.

GET /api/v1/conversations?since=…&status=…&source=…&limit=…

Conversations received after since, oldest first, up to limit (default 50, at most 200). Pass the response’s next back as since for the next page.

POST /api/v1/conversations/{id}/reanalyze

Queues the conversation for analysis again (for instance after changing the source’s instructions or scorecard).

GET /api/v1/sources · GET /api/v1/balance

Your sources, and your organization’s credit balance.

Result webhooks

Give a source a webhook address and each finished analysis is POSTed to it as {"type": "conversation.analyzed", "data": {…}}, the same shape as GET /api/v1/conversations/{id} without the transcript. Verify it with the source’s signing secret:

Consayik-Signature: t=1761836700,v1=5f0c…
expected = hex(HMAC_SHA256(secret, t + "." + raw_body))   // compare to v1; reject if t is old

Credit

Each analysis is charged when it completes, at the model’s token cost. When the balance reaches zero, new conversations are accepted and kept with status awaitingCredits, and analysed automatically once credit is added.