Conversations and sources
A conversation is one call or meeting. Sources are how its transcript gets in.
A conversation is one call, meeting or interview. It holds the turns of its transcript and the
moments Sparkle found in them, and it has its own clock: turn times are seconds from its
started_at.
Who owns what
Your company has one or more organizations, such as one per product or per team. API keys, conversations, webhooks and custom moments belong to one organization, and a key only sees its own organization's data.
A conversation is created in the environment of the key that created it, test or live, and
says so in its environment field. Test conversations are never billed.
Create a conversation
@sparkle/sdk is in private beta
The TypeScript tabs use @sparkle/sdk, which isn't on npm yet. To try it, ask us for
access. Python and Go have no SDK yet: the cURL, Python and Go tabs
call the HTTP API directly.
curl https://api.sparkle.ai/public/v1/conversations \
-H "X-API-Key: $SPARKLE_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"title": "Globex onboarding",
"receivers": ["recall"],
"moment_types": ["decision", "request.do", "knowledge_gap"],
"webhook_url": "https://example.com/hooks/sparkle",
"metadata": { "crm_account": "acct_8812" }
}'Every field is optional:
| Field | What it does |
|---|---|
title | A label for the conversation, up to 200 characters. |
started_at | Time zero of the conversation's clock. Defaults to now; set it when the call began earlier than you create the conversation. |
receivers | recall or deepgram: vendors that will post the transcript for you. Each gets a receiver path in the response, shown only once. |
moment_types | The moment kinds to detect, built-in or custom. Empty or absent detects every built-in kind and every live custom moment. |
webhook_url | An HTTPS URL that receives this conversation's events. The response's webhook.secret signs them, shown only once. |
metadata | Your own JSON, up to 16 KB, returned as sent. |
Sources
A source is how a conversation's transcript arrives. Pick the one that matches what you already have:
| You have | Use |
|---|---|
| Your own speech-to-text, or any transcript as it's spoken | Post turns to POST /conversations/{id}/turns. |
| A Recall.ai meeting bot | The Recall.ai receiver: Recall posts its transcript to Sparkle. |
| A Deepgram live stream | The Deepgram receiver: forward Deepgram's results as they come. |
| A microphone or a meeting tab in a web page | Capture audio in the browser: Sparkle transcribes it. |
| Raw audio on a server, a phone bridge or a mobile app | The audio streaming protocol. |
| A finished recording's transcript | Import it with POST /conversations/import. |
Every source produces turns under the same turn contract, and every turn records the source it came from. Send each stretch of speech through one source. Sources says when to use each, and covers connections, which create a conversation per call for you.
Lifecycle
status | Means |
|---|---|
live | It takes turns and detects moments as they arrive. |
processing | An imported transcript is being read. progress counts the turns read. |
ended | It takes no more turns. Moments still settling go out within seconds, then conversation.ended. |
End a live conversation with POST /conversations/{id}/end when the call is over. Sparkle lets go
any moment still settling, then sends conversation.ended with a summary of what it found. An
imported conversation ends by itself.
A live conversation left open ends by itself too, once no turn has arrived for 60 minutes (counted
from when it was created or started, if it never had a turn). An open
audio socket keeps it live, even through silence. It ends the same way
an end call does, and conversation.ended says why in data.reason:
reason | Means |
|---|---|
requested | You ended it, with POST /conversations/{id}/end or from the dashboard. |
idle | No turn arrived for 60 minutes and no audio socket was open. |
completed | An imported transcript was read to its end. |
failed | An imported transcript could not be read to its end. |
Handle a reason you don't recognize as requested: more may be added.
DELETE /conversations/{id} erases the conversation with its turns, its moments and the webhook
deliveries that carry them. Your webhook subscriptions get conversation.deleted.
Read it back
| Endpoint | Returns |
|---|---|
GET /conversations | The organization's conversations, newest first. |
GET /conversations/{id} | One conversation, with moments_count so far. |
GET /conversations/{id}/turns | Its stored turns in start order, partial ones included. |
GET /conversations/{id}/moments | Its moments, in the order they were let go. |
Lists are cursor-paginated: pass the previous response's page_info.end_cursor as cursor, and up
to 100 items per page as limit.