Security and data
API keys, signed webhooks, how long Sparkle keeps a transcript, and how to erase one.
API keys
Every request carries an API key in the X-API-Key header. A key belongs to one organization of
your company and sees only that organization's conversations, webhooks and custom moments.
| Prefix | Environment | Use |
|---|---|---|
spk_test_ | test | Building and testing. Never billed. |
spk_live_ | live | Production traffic. |
A conversation records the environment of the key that created it. Each key also 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.
- Keep keys on your server. Never ship one in a browser or a mobile app: the stream, the turns endpoint and everything else need a key, so relay what your client needs from your backend.
- Create one key per service, so you can revoke one without touching the others. Manage them in the dashboard under Settings → API keys.
- A receiver URL, such as the one for Recall.ai, carries a token that identifies its conversation. Treat it like a key.
Signed webhooks
Every webhook delivery carries a Sparkle-Signature header: an HMAC-SHA256 of the timestamp and
the raw body, keyed with the subscription's secret or the conversation's webhook.secret. Before
you trust a delivery:
- Compute the HMAC over the raw body, before parsing it, and compare in constant time.
- Reject a timestamp more than 5 minutes from your clock, so a captured request can't be replayed later.
- Drop an event
idyou've already handled.
Verify the signature has the exact format and the code. Secrets are shown once, when they're created; rotating one in the dashboard takes effect on the next attempt.
What Sparkle keeps, and for how long
| Data | Kept |
|---|---|
| Turns and moments | 30 days, then deleted. |
| The conversation itself: title, metadata, status, counts | Until you delete it. |
Sparkle processes a conversation on your behalf: you decide what it holds and when it goes. The receivers log each request's outcome, never the transcript.
Deleting
DELETE /conversations/{id} erases the conversation with its turns, its moments and the webhook
deliveries that carry them, and stops its stream. Your subscriptions receive conversation.deleted.
Use it when someone in a call asks to be forgotten.
Deleting your company in the dashboard schedules everything in it for erasure after 30 days, during which you can restore it.