API
reference.
312 endpoints, complete OpenAPI spec, idempotency on every mutation, and a public uptime contract. No black boxes.
"color:#22D3EE">curl "color:#22D3EE">-X "color:#34D399;font-weight:600">POST https://api.rozper.com/v2/calls \
"color:#22D3EE">-H "Authorization: Bearer $ROZPER_API_KEY" \
"color:#22D3EE">-H "Content-Type: application/json" \
"color:#22D3EE">-d '{
"to": "+14155551234",
"from": "+12025550100",
"url": "https://your.app/voice/answer"
}'{
"id": "call_01HXY7ZQ9V3J3X8K5N",
"status": "queued",
"to": "+14155551234",
"from": "+12025550100",
"created_at": "2026-05-12T14:23:01Z"
}Bearer tokens.
Scoped. Rotatable.
Every request carries a project key as a Bearer token. Keys are scoped (read, write, billing), rotatable without downtime, and can be IP-pinned from the dashboard.
- Per-environment keys (test / live)
- OAuth 2.0 client credentials supported
- Mutual TLS available on Enterprise
# .env → never commit me
ROZPER_API_KEY=sk_live_8FzqQ...XW7p
# request
curl https://api.rozper.com/v2/account \
-H "Authorization: Bearer $ROZPER_API_KEY"
# 200 OK
{
"id": "acct_01HXY7ZQ9V3J3X8K5N",
"scopes": ["calls.write", "messages.write", "numbers.read"],
"rate_limit": { "limit": 1000, "remaining": 998, "reset": 1715520000 }
}Explore every endpoint.
Create a call
Originate an outbound PSTN call. Returns immediately with a queued call object — listen on webhooks for state changes.
tostringrequiredE.164 destination number.
fromstringrequiredVerified or rented Rozper number.
urlstringHTTPS endpoint that returns voice instructions when the call connects.
recordbooleanRecord both legs to your storage. Default false.
timeoutintegerRing timeout in seconds. Default 60.
const call = await rozper.calls.create({
to: "+14155551234",
from: "+12025550100",
url: "https://your.app/voice/answer",
}){
"id": "call_01HXY7ZQ9V3J3X8K5N",
"object": "call",
"created_at": "2026-05-12T14:23:01Z"
}Predictable, machine-readable errors.
Every 4xx and 5xx returns the same shape: a stable code, a human-readable message, and a request id you can paste to support.
{
"error": {
"code": "invalid_param",
"message": "to: must be E.164",
"request_id": "req_01HXY7…",
"param_errors": [
{ "param": "to", "reason": "format" }
]
}
}bad_requestMalformed request body or missing required field.
unauthorizedMissing, expired, or revoked API key.
forbiddenKey lacks the scope required for this resource.
not_foundThe resource id does not exist for this account.
conflictIdempotency key collides with a different payload.
invalid_paramA parameter failed validation. Inspect param_errors[].
rate_limitedBackoff using the Retry-After header.
server_errorWe were notified. Retry idempotent calls.
Signed, retried, replay-protected.
Every event is delivered with an HMAC signature, a unique event id, and a UTC timestamp. We retry with exponential backoff for up to 24 hours.
import { verify } from "@rozper/sdk/webhooks"
app.post("/webhooks/rozper", (req, res) => {
const ok = verify({
payload: req.rawBody,
signature: req.header("Rozper-Signature"),
secret: process.env.ROZPER_WEBHOOK_SECRET,
})
if (!ok) return res.status(401).end()
const event = JSON.parse(req.rawBody)
switch (event.type) {
case "call.completed": /* … */
case "recording.ready": /* … */
}
res.json({ received: true })
})call.initiatedOutbound call accepted by the carrier.
call.ringingFar-end is ringing.
call.answeredFar-end answered (or AMD detected human).
call.completedCall ended. Includes duration, billing, leg metadata.
recording.readyRecording asset uploaded and signed URL available.
message.deliveredCarrier delivery receipt (where supported).
agent.handoffAI agent escalated to a human queue.
number.purchasedNumber acquisition completed.
Every change, in plain English.
- 2026-05-10v2026.05
- featVoice agents now support tool calling with streaming responses.
- featNew /v2/numbers/port endpoint for programmatic LNP submissions.
- 2026-04-22v2026.04
- fixIdempotency cache now correctly honors 24h TTL on POST /calls.
- choreDeprecated v1 endpoints removed (announced 2025-11).
- 2026-03-31v2026.03
- featWebSocket media-streams beta is now generally available.
- featWhatsApp template messages added under /v2/messages.