REST API
Overview

REST API

Cobuntu's REST API lives at https://api.cobuntu.com, namespaced under /api/v1/. Every endpoint is scope-gated by an API key you generate per-community.

Base URL

https://api.cobuntu.com/api/v1

All endpoints in this section are relative to that.

Authentication

Pass your key in the X-API-Key header:

curl https://api.cobuntu.com/api/v1/communities/my-community/events \
  -H "X-API-Key: pk_live_..."

Two key types per community (Stripe-style):

TypePrefixUse fromScope cap
Publishablepk_live_…Browser, server, anywhereREAD_PUBLIC only
Secretsk_live_…Server only — never ship in browser bundlesAny scope (READ_PUBLIC + WRITE_MEMBERS + WRITE_SALES + WRITE_BROADCASTS + ADMIN)

Generate keys in cobuntu-admin → Integrations → API Keys.

Scopes

ScopeGrants
READ_PUBLICList/get public-readable resources: events, articles, products, members, atlas hotspots, segments
WRITE_MEMBERSCreate/update/delete member-level resources: RSVPs, form submissions, profile updates
WRITE_SALESRSVP for paid events, checkout flows
WRITE_BROADCASTSSend emails to segments (rate-limited 5 per 24h per community)
ADMINAll of the above + ban/kick members, edit segments

ADMIN satisfies every other scope's check. Choose the narrowest scope that works for your use case.

Endpoints (today)

MethodPathScopePurpose
GET/communities/:tag/eventsREAD_PUBLICList events
GET/communities/:tag/events/:slugREAD_PUBLICEvent detail
GET/communities/:tag/events/:slug/tiersREAD_PUBLICTier list for an event
POST/communities/:tag/events/:slug/rsvpWRITE_SALESRSVP to a free event
GET/communities/:tag/tiers/:tierId/formREAD_PUBLICForm schema for a tier
GET/communities/:tag/articlesREAD_PUBLICList published articles
GET/communities/:tag/productsREAD_PUBLICList products
GET/communities/:tag/products/:skuREAD_PUBLICProduct detail
GET/communities/:tag/membersREAD_PUBLICList members (public)
GET/communities/:tag/atlas/hotspotsREAD_PUBLICList atlas hotspots
GET/communities/:tag/atlas/hotspots/:idREAD_PUBLICHotspot detail
GET/communities/:tag/atlas/categoriesREAD_PUBLICAtlas categories
GET/communities/:tag/segments/publicREAD_PUBLICPublic segments (tiers)
GET/communities/:tag/segments/:id/formREAD_PUBLICSegment form schema
POST/communities/:tag/segments/:id/submitWRITE_MEMBERSSubmit segment form
POST/communities/:tag/rules/acceptWRITE_MEMBERSAcknowledge community rules
POST/communities/:tag/members/:userId/kickWRITE_MEMBERSKick a member
POST/communities/:tag/members/:userId/banWRITE_MEMBERSBan a member
POST/communities/:tag/applications/:id/approveWRITE_MEMBERSApprove a membership application
POST/communities/:tag/applications/:id/rejectWRITE_MEMBERSReject a membership application
PATCH/communities/:tag/segments/:idADMINUpdate segment (name / pricing / active)
POST/communities/:tag/broadcastsWRITE_BROADCASTSSend a one-shot mass email

OpenAPI 3.1 spec at https://api.cobuntu.com/openapi.json (coming in the next docs release; for now, this table is the contract).

Versioning

  • /api/v1/... is forever-stable. Additive changes (new fields, new endpoints) land here.
  • Breaking changes mint /api/v2/... — both coexist until external consumers migrate.

Rate limits

KeyLimit
Publishable (pk_live_…)100 req/s per key
Secret (sk_live_…)50 req/s per key
Broadcasts5 sends per community per 24h (windows are shared with admin-UI sends)

Exceeded limits return 429 Too Many Requests with a Retry-After header.

Pagination

List endpoints accept ?limit=20&offset=0 (or ?cursor=... for cursor-paginated ones — noted per-endpoint). Default limit is 20, max is 100.