Base address and keys
curl https://api.paza.social/api/platform/v1/workspace \
-H "Authorization: Bearer pz_live_…"Every answer is JSON. Errors look like {"error": {"code", "message", "request_id"}} with a plain-words message; 401 means the key is wrong or revoked, 403 insufficient_scope names the scope, 402 means the allowance is used up and says when it resets, 429 is rate limiting with Retry-After.
| Scope | Allows |
|---|---|
| whatson:read | What's on |
| audience:read | Audiences |
| intel:read / intel:run | Read analyses / start them (uses credits) |
| insights:read | Brand insights and story |
| insights_data:read | Insights from your own connected data (My Data) |
| ingest:write | Send your WhatsApp conversations to Paza |
| connections:manage | Create and remove conversation channels |
| companion:skill | Let your bot answer through Paza Companion |
| webhooks:manage / exports:manage / embeds:manage | Webhooks, scheduled exports, embeds |
Intelligence
| Endpoint | What it does |
|---|---|
| GET /workspace | The key's workspace and plan |
| GET /usage | Credits and calls used and left |
| GET /whatson?location=&when= | What's on, with sources and freshness |
| GET /audiences?market=&query= | Audience groups |
| POST /intelligence/runs {brief} | Start an analysis (202, credits reserved then settled; refunded if it fails) |
| GET /intelligence/runs, GET /intelligence/runs/{id} | Analyses and their results |
| GET /insights/brand, GET /insights/story | Released brand insights and story |
| GET /insights/my-data?days= | What your customers say, from connected conversations |
WhatsApp conversations
ChatBreez: POST /ingest/channels {provider: "chatbreez", label} (connections:manage) returns a webhook address once; paste it in ChatBreez for messages.upsert. Any other provider or your own bot posts batches:
{
"source": "whatsapp",
"provider": "360dialog",
"channel_id": "+254700000000",
"messages": [
{
"external_id": "wamid.HBgM…",
"direction": "inbound",
"from": "+254711111111",
"timestamp": "2026-11-29T08:00:00Z",
"type": "text",
"text": "Do you deliver to Mombasa?",
"consent": { "basis": "customer_service" }
}
]
}- Up to 500 messages and 1 MB per call; each refused message is named with its index and reason, the rest are kept.
- Phone numbers are never stored: each customer becomes a one-way key. Text is encrypted at rest; messages are deleted 90 days after analysis.
- Voice notes with an https media.url are transcribed, then the audio is deleted.
- Conversations are read in windows (30 minutes of quiet, or 23:00 East Africa time); results appear in My Data and /insights/my-data.
Answer with Paza Companion
{
"person": "+254711111111",
"message": "What's on this weekend?",
"message_id": "wamid.HBgM…",
"context": { "business_name": "Acme", "market": "Nairobi" }
}Answers {reply, replies, pending, turn_id}. When pending is true, GET /companion/turns/{turn_id} after a few seconds for the rest. Your bot sends the replies; Paza never contacts the customer.
Webhooks
POST /webhooks {url, events[]} (webhooks:manage). Events: intelligence.completed, credits.low, credits.exhausted, connection.status_changed, and webhook.test on request. Each delivery carries Standard Webhooks headers (webhook-id, webhook-timestamp, webhook-signature) and Paza-Signature; failed deliveries retry for about two days, and an address failing for 7 days is switched off with an email.
import crypto from "crypto";
const secret = Buffer.from(whsec.replace(/^whsec_/, ""), "base64");
const signed = `${id}.${timestamp}.${rawBody}`;
const expected = crypto.createHmac("sha256", secret).update(signed).digest("base64");
const ok = header.split(" ").some((s) => s === `v1,${expected}`);Exports and embeds
- POST /exports {dataset, schedule, timezone} for a daily or weekly CSV of analyses, audiences, what's on or usage; files are downloadable for 7 days.
- POST /embeds {view, allowed_origins} returns an iframe snippet for your own site (what's on list, audience card, what your customers say); it only loads on the sites you list.