Ada
Online- Free tonight?seq 1
- Yes, after 7.seq 2
- Call me on •••seq 3
PingSpan delivers every message once and in order, lets your server moderate before anything is stored, and bills per message instead of per user.
Type a message and scroll to follow it through the system.
The SDK tags each message with a client_message_id before it leaves the device. Every retry reuses it, so a flaky network never creates a duplicate.
Before anything is stored, PingSpan calls your before_send hook with the message and recent context. Answer allow, reject, rewrite or shadow. Rejected messages are never stored and never billed.
This demo hook hides phone numbers, so it rewrote yours.
PUT /v1/hooks/before_sendThe message gets the next number in its conversation, seq 4812, in the same transaction that stores it. No gaps and no reordering, so every client knows exactly what it has and what it is missing.
message.seq === 4812Ada's network dropped the server's answer. The SDK sends again with the same client_message_id and gets back the message already stored. Grace sees one copy, and you pay for one message.
Every stored message triggers a signed message.created webhook, delivered in order and retried if your server is down. Verify it with our SDK or any Standard Webhooks library.
Each device with an open connection gets the message as soon as it is stored. Grace's phone shows it now. Her laptop is asleep.
conversation.on("message.new", render)When the laptop wakes, the SDK asks for everything after seq 4809, the last one it saw, and emits 4810, 4811 and 4812 once each, in order. You never write sync code.
GET …/messages?after_seq=4809Its reply was lost and your hook checked it, yet it was stored and delivered once. PingSpan does that for every message, so your team does not build it.
Send from Ada to Grace, then drop replies, take Grace offline, or change what your moderation hook answers. The simulation runs in your browser and follows the same rules as the SDK and the server.
What you get when your team comes off the waitlist.
A REST API, a WebSocket protocol and a typed TypeScript SDK generated from our OpenAPI spec. You design the chat screens. There is no widget kit to fight.
npm i @pingspan/sdkOne hook, four decisions: allow, reject, rewrite or shadow. Pick fail-open or fail-closed for the moments your hook is slow or down.
before_send → { action: "shadow" }Gap-free sequence numbers per conversation. The SDK drops repeats and fetches any gap before it emits the next message.
message.new · seq 4812Signed events for messages and conversation changes, in order, with retries. Index messages, send push notifications or feed analytics from one stream.
message.created · conversation.updatedAn MCP server gives your agent tools for users, conversations, tokens and messages, plus the OpenAPI spec and an explanation for every error code.
npx @pingspan/mcpTyping indicators, read receipts, unread counts, replies, reactions, edits and deletes. Only a reply counts as a billable message.
member.read · unreadCountBlock users, unmatch, freeze or expire conversations. A blocked user sees a frozen chat with no reason given.
users.block(userId, blockedUserId)Upload files to PingSpan, to your own storage bucket, or reference files you already host. Your own bucket and external links are never billed for storage.
managed · your bucket · externalSeparate test and live environments with scoped API keys. Mint short-lived user tokens on your server, or sign them with your own key.
sk_test_… · sk_live_…Add the PingSpan MCP server to Claude Code, Cursor or any MCP client. Your agent reads the OpenAPI spec, seeds test users and conversations, mints tokens and sends messages to check its own work. It runs with test keys only, so it never touches production data.
Point at a line to see where it acts on the S.
import {
beforeSendHandler,
ChatServer,
verifyWebhookEvent,
WebhookVerificationError,
} from "@pingspan/sdk/server";
import { env } from "./env.js";
import { notify } from "./push.js";
const chat = new ChatServer({ apiKey: env.PINGSPAN_API_KEY });
// Each device gets a short-lived token. Your API key stays here.
export const session = (userId: string) => chat.tokens.create({ userId });
// Runs before anything is stored. This one hides phone numbers.
export const beforeSend = beforeSendHandler(env.HOOK_SECRET, ({ message }) => {
if (message.text === null) return { action: "allow" }; // attachments only
const text = message.text.replace(/\d[\d\s().-]{5,}\d/g, "•••");
return text === message.text ? { action: "allow" } : { action: "rewrite", text };
});
// Every stored message, signed, right after it is saved.
export async function onWebhook(req: Request) {
try {
const event = await verifyWebhookEvent(env.WEBHOOK_SECRET, await req.text(), req.headers);
if (event?.type === "message.created") await notify(event.data.message);
return new Response(null, { status: 204 });
} catch (e) {
if (e instanceof WebhookVerificationError) return new Response(null, { status: 401 });
throw e;
}
}import { ChatClient } from "@pingspan/sdk";
import { conversationId, render } from "./ui.js";
const chat = new ChatClient({
token: () =>
fetch("/session")
.then((r) => r.json())
.then((s: { token: string }) => s.token),
});
await chat.connect();
const match = chat.conversation(conversationId);
// Once each, in seq order. Gaps are fetched before anything shows.
match.on("message.new", (m) => render(m));
// Safe to retry: the SDK reuses the client_message_id.
await match.send({ text: "Meet me at 8." });No monthly active user fees and no connection fees. A message is billed once when it is stored, however many people and devices receive it.
Prices per month, paid for the year.Prices per month, paid month to month.
$0
No card needed
100,000 messages a month
$99$124/month
$1,188 billed yearly. You save $300.Or $99/month paid yearly, to save $300 a year.
250 thousand messages included
$999$1,249/month
$11,988 billed yearly. You save $3,000.Or $999/month paid yearly, to save $3,000 a year.
2.5 million messages included
Committed volume
Scale is the cheaper plan here, at $375 per million messages.
Scale is the cheaper plan here, at $470 per million messages.
Paying yearly saves you $5,700 a year here.
Paying yearly would save you $5,700 a year here.
API calls and bandwidth fall under fair use. We talk to you before any bill.
We import your full history into PingSpan and keep both systems running side by side while you move users over in stages. Users keep every conversation, and you can roll back at any step.
We bring teams in from the waitlist in small groups so each one gets direct help from our engineers. Join with your work email and we will write when your invite is ready.
The TypeScript SDK runs in the browser and on your server. Any other language can use the REST API, described in OpenAPI, and the documented WebSocket protocol.
No. You pay for stored messages. Users, devices, open connections and API calls are free, and paid plans keep your full message history at no extra cost, so a quiet user costs you nothing.
API calls and bandwidth are not billed. Fair use is up to 25 API calls and 100 kB of bandwidth per billed message, averaged over the month. If you go above it, we talk to you first. You never get a surprise bill.
Yes. Your before_send hook sees each message before it is stored and decides what happens. You choose whether sends fail open or fail closed when your hook is unavailable.
Your server mints a short-lived user token with your API key, or signs its own with a key you register. Your API key never reaches a device.
The MCP server only accepts test keys, so an agent can build and test the integration without access to live data.
We are onboarding teams from the waitlist in small groups. Leave your work email and we will send your invite, with free messages to build on.