Know the moment it happens.
Conversation events for developers. Send a live transcript and get a typed, signed event the moment someone makes a decision, asks a question or commits to something.
1,000 live minutes a month on Free. Test keys are never billed.
Two calls to your first moment
Create a conversation with your webhook URL, then post each turn once it is final.
The HTTP API works from any language. The TypeScript SDK is in private beta.
import { Sparkle } from "@sparkle/sdk";
const sparkle = new Sparkle(); // reads SPARKLE_API_KEY
const { conversation, webhook } = await sparkle.conversations.create({
title: "Acme renewal call",
webhook_url: "https://yourapp.com/hooks/sparkle",
});
// webhook.secret signs this conversation's deliveries. It is shown once.
await sparkle.conversations.turns.send(conversation.id, [{
id: "t2", final: true, speaker: "dana", name: "Dana",
channel: "remote", start: 21.0, end: 23.4,
text: "I'll get the SSO fix out by Friday.",
}]); import os
import uuid
import requests
API = "https://api.sparkle.ai/public/v1"
headers = {"X-API-Key": os.environ["SPARKLE_API_KEY"]}
created = requests.post(
f"{API}/conversations",
headers={**headers, "Idempotency-Key": str(uuid.uuid4())},
json={
"title": "Acme renewal call",
"webhook_url": "https://yourapp.com/hooks/sparkle",
},
).json()
requests.post(
f"{API}/conversations/{created['conversation']['id']}/turns",
headers={**headers, "Idempotency-Key": str(uuid.uuid4())},
json={"turns": [{
"id": "t2", "final": True, "speaker": "dana", "name": "Dana",
"channel": "remote", "start": 21.0, "end": 23.4,
"text": "I'll get the SSO fix out by Friday.",
}]},
) package main
import (
"bytes"
"crypto/rand"
"encoding/json"
"net/http"
"os"
)
const api = "https://api.sparkle.ai/public/v1"
func post(path string, body any) (*http.Response, error) {
data, _ := json.Marshal(body)
req, _ := http.NewRequest(http.MethodPost, api+path, bytes.NewReader(data))
req.Header.Set("X-API-Key", os.Getenv("SPARKLE_API_KEY"))
req.Header.Set("Idempotency-Key", rand.Text())
req.Header.Set("Content-Type", "application/json")
return http.DefaultClient.Do(req)
}
func main() {
res, err := post("/conversations", map[string]any{
"title": "Acme renewal call",
"webhook_url": "https://yourapp.com/hooks/sparkle",
})
if err != nil {
panic(err)
}
defer res.Body.Close()
var created struct {
Conversation struct{ ID string } `json:"conversation"`
}
if err := json.NewDecoder(res.Body).Decode(&created); err != nil {
panic(err)
}
post("/conversations/"+created.Conversation.ID+"/turns", map[string]any{
"turns": []map[string]any{{
"id": "t2", "final": true, "speaker": "dana", "name": "Dana",
"channel": "remote", "start": 21.0, "end": 23.4,
"text": "I'll get the SSO fix out by Friday.",
}},
})
} require "json"
require "net/http"
require "securerandom"
API = "https://api.sparkle.ai/public/v1"
def post(path, body)
Net::HTTP.post(
URI("#{API}#{path}"),
body.to_json,
"X-API-Key" => ENV.fetch("SPARKLE_API_KEY"),
"Idempotency-Key" => SecureRandom.uuid,
"Content-Type" => "application/json",
)
end
created = JSON.parse(post("/conversations", {
title: "Acme renewal call",
webhook_url: "https://yourapp.com/hooks/sparkle",
}).body)
post("/conversations/#{created["conversation"]["id"]}/turns", {
turns: [{
id: "t2", final: true, speaker: "dana", name: "Dana",
channel: "remote", start: 21.0, end: 23.4,
text: "I'll get the SSO fix out by Friday.",
}],
}) import com.fasterxml.jackson.databind.ObjectMapper;
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.util.UUID;
public class Sparkle {
static final String API = "https://api.sparkle.ai/public/v1";
static final HttpClient http = HttpClient.newHttpClient();
static String post(String path, String json) throws Exception {
var request = HttpRequest.newBuilder(URI.create(API + path))
.header("X-API-Key", System.getenv("SPARKLE_API_KEY"))
.header("Idempotency-Key", UUID.randomUUID().toString())
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(json))
.build();
return http.send(request, HttpResponse.BodyHandlers.ofString()).body();
}
public static void main(String[] args) throws Exception {
var created = post("/conversations", """
{"title": "Acme renewal call",
"webhook_url": "https://yourapp.com/hooks/sparkle"}""");
var id = new ObjectMapper().readTree(created).at("/conversation/id").asText();
post("/conversations/" + id + "/turns", """
{"turns": [{
"id": "t2", "final": true, "speaker": "dana", "name": "Dana",
"channel": "remote", "start": 21.0, "end": 23.4,
"text": "I'll get the SSO fix out by Friday."
}]}""");
}
} use reqwest::blocking::Client;
use serde_json::{json, Value};
use uuid::Uuid;
const API: &str = "https://api.sparkle.ai/public/v1";
fn main() -> Result<(), reqwest::Error> {
let key = std::env::var("SPARKLE_API_KEY").expect("SPARKLE_API_KEY is set");
let client = Client::new();
let post = |path: String, body: Value| {
client
.post(format!("{API}{path}"))
.header("X-API-Key", &key)
.header("Idempotency-Key", Uuid::new_v4().to_string())
.json(&body)
.send()
};
let created: Value = post(
"/conversations".into(),
json!({
"title": "Acme renewal call",
"webhook_url": "https://yourapp.com/hooks/sparkle",
}),
)?
.json()?;
let id = created["conversation"]["id"].as_str().unwrap_or_default();
post(
format!("/conversations/{id}/turns"),
json!({ "turns": [{
"id": "t2", "final": true, "speaker": "dana", "name": "Dana",
"channel": "remote", "start": 21.0, "end": 23.4,
"text": "I'll get the SSO fix out by Friday.",
}] }),
)?;
Ok(())
} <?php
const API = 'https://api.sparkle.ai/public/v1';
function post(string $path, array $body): ?array
{
$ch = curl_init(API . $path);
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POSTFIELDS => json_encode($body),
CURLOPT_HTTPHEADER => [
'X-API-Key: ' . getenv('SPARKLE_API_KEY'),
'Idempotency-Key: ' . bin2hex(random_bytes(16)),
'Content-Type: application/json',
],
]);
return json_decode(curl_exec($ch), true);
}
$created = post('/conversations', [
'title' => 'Acme renewal call',
'webhook_url' => 'https://yourapp.com/hooks/sparkle',
]);
post("/conversations/{$created['conversation']['id']}/turns", [
'turns' => [[
'id' => 't2', 'final' => true, 'speaker' => 'dana', 'name' => 'Dana',
'channel' => 'remote', 'start' => 21.0, 'end' => 23.4,
'text' => "I'll get the SSO fix out by Friday.",
]],
]); 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": "Acme renewal call",
"webhook_url": "https://yourapp.com/hooks/sparkle"
}'
curl https://api.sparkle.ai/public/v1/conversations/$CONVERSATION_ID/turns \
-H "X-API-Key: $SPARKLE_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"turns": [{
"id": "t2", "final": true, "speaker": "dana", "name": "Dana",
"channel": "remote", "start": 21.0, "end": 23.4,
"text": "I'\''ll get the SSO fix out by Friday."
}]
}' Ten kinds built in
A request goes out as soon as it's said. A question waits 2 seconds in case someone answers it. A decision waits 5 seconds of quiet, so you get the conclusion.
- Open question “Does anyone know how many seats they have?” 2 s
- Question for someone “Dana, what's the SLA on that?” 2 s
- Knowledge gap “I think they own about 51%, but I'm not sure.” 2 s
- Reference “That's done under a scheme of arrangement.” 2 s
- Find request “Can someone pull up the NDA?” 2 s
- Action request “I'll send the board a summary tonight.” No wait
- Decision “Let's go with the two-year term.” 5 s
- Work item “That export button is broken.” 5 s
- Next steps “Where do we go from here?” 2 s
- Ideas wanted “Any ideas for the launch?” 8 s
Signed webhooks with retries
Each moment is a moment.detected
POST to your URL. The dashboard keeps every attempt.
-
Signed
Sparkle-Signature carries an HMAC-SHA256 of the timestamp and the raw body.
-
Retried
A 5xx, a 429 or a timeout is tried again after 1, 2, 4 and 8 minutes.
-
Replayable
Send any delivery again from the dashboard or the API.
-
Also streamed
Each conversation has a server-sent event stream with the same events.
Your own moments, in plain English
Write the one the built-in kinds don't cover, like a pricing objection or a churn signal. It's detected in the same pass, at no extra latency.
- Describe when it fires, when it doesn't, a few example lines
- Test on a past call, with the near misses
- Shadow a new version beside the live one, then promote it
Use the transcript you already have
Post turns from any speech-to-text, or connect a source and Sparkle reads it for you.
- Your own turns from Deepgram, AssemblyAI, OpenAI or your own model
- Connections to a Recall.ai bot, a Deepgram stream or any tool that can POST
- After the call from Zoom recordings, or a WebVTT, SRT or text file
The dashboard
See what each conversation produced, what is live right now, and which deliveries failed.
-
Conversations
Each call's transcript next to its moments, test and live kept apart.
-
Deliveries
Every attempt with its HTTP answer and payload, and a replay button.
-
Playground
Talk, paste a transcript or play a demo call, and watch the moments arrive.
Works with Claude Code and Codex
Every docs page is also markdown, listed in an llms.txt for agents. Add the MCP server and your agent can start conversations, read moments and test custom moments.
Codex command MCP server llms.txt
The buttons fill in the prompt or the connector; nothing runs until you confirm.
Use cases
-
Sales copilots
Battlecards and follow-ups while the rep is still on the call.
Pricing objection (custom moment pricing_objection)Competitor mentioned (custom moment competitor_mentioned)Action requestNext steps -
Voice-agent platforms
Hand the call to a person the moment the caller needs one.
Escalation request (custom moment escalation_request)Frustration expressed (custom moment frustration_expressed)Callback requested (custom moment callback_requested) -
Contact centres
Supervisor alerts, promise tracking and QA flags, by each brand's rules.
Escalation request (custom moment escalation_request)Action requestComplaint (custom moment complaint) -
Recruiting and interviews
Scorecard evidence and a private nudge while the interview is running.
Policy question (custom moment policy_question)Competency example (custom moment competency_example)Question for someone -
Customer success
Churn risk, expansion signals and renewal commitments from every customer call.
Churn signal (custom moment churn_signal)Expansion signal (custom moment expansion_signal)Commitment with date (custom moment commitment_with_date) -
Meeting assistants
Decisions and action items as they happen, and a follow-up drafted before the call ends.
DecisionAction requestNext meeting scheduled (custom moment next_meeting_scheduled)
1,000 free minutes every month
Then $0.015 a minute on Pro. Test keys are never billed.
