Integrate Update
Pull your moderated live updates into any website or app with a read-only API key. No SDK, no build step — one script tag or a few HTTP calls.
Get started in 4 steps
- Create your organization. Sign up at the portal — no approval needed.
- Create an event. You get a shareable #CODE that contributors post to via WhatsApp/Telegram/SMS/email/web.
- Create a public API key. Under API keys → copy the upd_… value (shown once). It is read-only.
- Embed. Drop the widget below into a page, or generate a full themed reader page under Reader theme.
Authentication
Every request needs your public key, sent either as a header or a query parameter. Public keys are read-only — safe to ship in a browser (and the generated index.php reader keeps it fully server-side if you prefer).
X-API-Key: upd_your_public_key
— or —
?key=upd_your_public_key
Quick embed (widget)
Renders a live, auto-updating feed inside an existing page. Replace YOUR_EVENT_CODE and YOUR_PUBLIC_KEY:
<script src="https://api.cscafrica.com/public/events/YOUR_EVENT_CODE/widget.js?key=YOUR_PUBLIC_KEY"></script>
Want a whole page instead of a widget? In the portal → Reader theme → Generate → index.php gives you a branded, ready-to-host reader that hides your key on the server.
Public endpoints
Base URL: https://api.cscafrica.com. Responses are JSON: { ok, data } on success, { ok:false, error } on failure.
| Method | Path | Returns |
|---|---|---|
| GET | /public/events | Your events |
| GET | /public/events/{code} | Event meta + branding |
| GET | /public/events/{code}/updates | Approved updates feed |
| GET | /public/events/{code}/stream | Live stream (SSE) |
| GET | /public/events/{code}/voices | Top contributors |
| GET | /public/events/{code}/top | Top moments |
| POST | /public/updates/{id}/like | Like an update |
| POST | /public/events/{code}/follow | Follow an event |
| GET | /public/updates/{id}/replies | Replies on an update |
| POST | /public/updates/{id}/reply | Post a reply (reader sign-in) |
| POST | /public/events/{code}/post | Reader posts an update (reader sign-in) |
Reader sign-in. Posting and replying need a contributor token — readers sign in on your site with an email code or Google/Facebook (/auth/reader/*, /auth/oauth/*). OAuth only returns readers to approved origins: propose yours in the portal under API keys → Reader OAuth return origins, and a platform admin approves it before it works.
Example
curl "https://api.cscafrica.com/public/events/NGR2027/updates?limit=10" \ -H "X-API-Key: upd_your_public_key"
{
"ok": true,
"data": {
"updates": [
{ "id": 42, "author": "Ada Obi", "text": "Doors are open…",
"media_type": "image", "media_url": "https://…", "likes": 24,
"submitted_at": "2027-05-01T09:12:00Z" }
]
}
}