The machine-readable spec is
https://api.bweze.com/v1/openapi.json
(OpenAPI 3.1). Where this page and the spec disagree, this page follows what
the API does.
Base URL: https://api.bweze.com. Every path starts with /v1.
Auth: Authorization: Bearer <token>. Secret tokens (bw_sk_...) work
everywhere; publishable tokens (bw_pk_...) only read, and only where an
endpoint says so (today: GET /v1/domains/rw/{name}). Every endpoint below
also needs the token to hold the permission listed, on the resource it
touches. See API tokens.
Bodies are JSON: send content-type: application/json.
Money is in RWF minor units in fields that end in Minor
(priceMinor: 18000 is 18,000 RWF).
Lists return the whole set. The exceptions take query parameters: job
runs (?limit=, 1-200, default 50), a job's log lines (?after=<line id>,
up to 2,000 at a time) and analytics (?days=, 1-90, default 30).
Rate limit: 300 requests a minute per token. Over that, requests fail
with rate_limited until the minute is up.
Idempotency: POST /v1/messages takes an Idempotency-Key header (or
idempotencyKey in the body). A retry with the same key returns the first
result with replayed: true and charges nothing; the same key with
different content is 409 idempotency_key_reuse_mismatch.
Every error has the same shape. Branch on code; message is for people.
{ "error": { "code": "insufficient_balance", "message": "This message costs 15 RWF; available balance is 0. Top up to send.", "docs": "https://docs.bweze.com/errors/insufficient_balance" }}
The error codes page lists every code, its status and whether
a retry can help.