API
Conversation events, straight into your code
A REST API for live transcripts, and a typed event for each decision, request or question in them: as a signed webhook, and on the conversation's event stream.
- Test keys are never billed
- OpenAPI 3.1 spec
- Signed webhooks
The API in numbers
- per key, by plan
- 120–6,000 req/min
- per request
- 500 turns
- per page, cursor-paged
- 100 items
- per webhook delivery
- 5 attempts
- errors, each with a stable code
- RFC 9457
What the API covers
Paths from https://api.sparkle.ai/public/v1
- Conversations
/conversationsCreate, send turns, end, import a finished transcript, delete - Moments
/conversations/{id}/momentsList a conversation's, or follow its event stream - Audio sessions
/conversations/{id}/audio-sessionsStream a microphone or a meeting tab for Sparkle to transcribe - Custom moments
/momentsDefine, evaluate on a transcript, shadow a new version, promote it - Connections
/connectionsStanding links to Recall.ai, Deepgram, Zoom or any tool that can POST - Webhooks
/webhooksSubscriptions, deliveries, replay, test events and secret rotation - Plan
/planThe plan, its limits and this month's usage - Authentication
/meThe credential behind a request, and what it can do
Webhooks and streams
Every event, pushed or streamed
Subscribe a URL to the organization's events, give one conversation its own, or follow its server-sent event stream: the same events, with the same IDs.
- Sparkle-Signature carries an HMAC-SHA256 of the timestamp and the raw body.
- A network error, a timeout, a 429 or a 5xx is retried after 1, 2, 4 and 8 minutes.
- After 3 days without a successful delivery the endpoint is paused, and its skipped deliveries wait for a replay.
- A test conversation's events reach only test subscriptions, not the live ones.
Events
-
conversation.created - A conversation was created.
-
moment.detected - A moment was detected in a conversation.
-
conversation.ended - An ended conversation let its last moment go, with a summary of what it produced.
-
conversation.deleted - A conversation was deleted, with everything it held. Subscriptions only.
-
webhook.ping - A subscription was created, its URL changed, or you sent a test.
The event stream carries moment.detected,
then conversation.ended after the
last moment.
One header, two environments
Every request carries a key in X-API-Key. Build on a test key, ship on a live one.
-
spk_test_…Test - Never billed. Its conversations' events reach only test webhook subscriptions.
-
spk_live_…Live - Production traffic, counted against your plan's live minutes.
A key works in one organization, with a role and optional scopes, such as conversation:*. Keep keys on your server: relay what a browser needs from your backend.
Build with what you have
-
Any language
The API is HTTP and JSON. Generate a client from the OpenAPI spec, or call it with the client you already use.
OpenAPI spec -
TypeScript SDK
Typed from the spec, with streams, retries and webhook verification. In private beta, not on npm yet.
Ask for access -
Your AI agent
Sparkle's MCP server lets Claude, Claude Code or Cursor read moments and test custom moments.
Connect an agent
Every docs page is also markdown, listed for agents in llms.txt.
Questions from integrators
Something else? hello@sparkle.ai
How does the API authenticate requests?
With a key in the X-API-Key header. A key belongs to one organization and has a role, owner, editor or viewer, and can be limited to some scopes. GET /me shows what the key in a request can do. A personal access token (pat_) works in the same header.
What's the difference between test and live keys?
A conversation takes the environment of the key that creates it. Conversations on spk_test_ keys are never billed and their events reach only test webhook subscriptions. spk_live_ keys are for production traffic. Every event carries livemode, so one handler can tell them apart.
How do I know a webhook came from Sparkle?
Check Sparkle-Signature before you trust the body: t= is the Unix time and v1= the hex HMAC-SHA256 of the timestamp, a dot and the raw body, keyed with the signing secret. Compare in constant time, reject a timestamp more than 5 minutes from your clock, and drop an event id you have already handled.
What happens when my endpoint is down?
Answer 2xx within 30 seconds. A network error, a timeout, a 429 or a 5xx is retried, up to 5 attempts, the next after 1, 2, 4 and 8 minutes; any other 4xx fails at once. Owners and editors get a warning email while an endpoint keeps failing, and after 3 days without a successful delivery it is paused. Re-enable it and replay what it skipped, from the dashboard or the API.
Can I retry a request safely?
Yes. Every POST and PUT takes an Idempotency-Key header. Sending the same key again returns the first response and does nothing twice; a retry that arrives while the first is still running gets a 409, so wait and send it again.
What are the rate limits?
Each key gets its plan's requests a minute: 120, 600, 3,000, 6,000 on Free, Pro, Scale and Enterprise. Responses carry X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset, and a refused request answers 429 with Retry-After.
Is there an SDK?
A TypeScript SDK, in private beta and not on npm yet; ask us for access. Python and Go have no SDK: the docs' samples in those languages call the HTTP API directly, and the OpenAPI spec generates a client in any language.
Your first moment in five minutes
Create a test key, send two turns, and watch the events arrive. Test keys are never billed.