Skip to content
OpenPulseDocs

Reference

HTTP API

The relay, management and auth endpoints, for languages without an SDK.

Everything the SDK does is plain HTTP underneath, so any language can use OpenPulse. Send Authorization: Bearer <token> on every call except health checks.

Realtime: edge.openpulse.org#

Stream ids contain slashes; percent-encode them in paths: realm/acme/chat becomes realm%2Facme%2Fchat.

CallDoes
PUT /v1/streams/{id}Create or ensure a stream. Body: { "preset": "chat" }
POST /v1/streams/{id}/eventsAppend events; answers with sequences and what was billed
GET /v1/streams/{id}/eventsRead after a cursor: ?after=&limit=&waitMs= (long-poll up to 30 s, 500 events)
POST /v1/streams/{id}/endEnd the stream; readers get ended: true
GET /v1/wsThe multiplexed socket the SDK uses (ops: sub, read, post, ensure, end, ping, auth)
GET /healthLiveness; no token needed

Post#

HTTP
POST /v1/streams/realm%2Facme%2Fchat/eventsAuthorization: Bearer opw1.…Content-Type: application/json{"events": [{"kind": "delta", "body": {"kind": "extension", "schema": "app.message@v1", "value": {"text": "hi"}}}], "producer": {"id": "worker-7", "seq": 42}}
200 OK
{"ok": true, "sequences": [118], "billed": {"messages": 1, "presence": 0, "runs": 0, "run_events": 0}}

producer makes a post idempotent: a retry with the same id and seq appends nothing new and answers with the original sequences.

An AI answer over HTTP#

Send a top-level start first and end last; everything between is one answer and counts as one message.

JSON
{"events": [{"kind": "start"}]}{"events": [{"kind": "delta", "body": {"kind": "text_delta", "text": "Checking"}}]}{"events": [{"kind": "end", "body": {"kind": "final"}}]}

Read#

GET /v1/streams/realm%2Facme%2Fchat/events?after=117&waitMs=25000
{"ok": true, "streamId": "realm/acme/chat", "ended": false, "nextAfter": 118, "events": [{"…": "…", "sequence": 118}]}

Pass nextAfter back as after. A gap field means events you had not read were dropped under load; reload from your own records if they matter.

Management: api.openpulse.org#

CallDoes
GET /v1/plansPlans, allowances and prices (public)
GET /v1/orgs/{org}/usage?month=YYYY-MMUsage per meter, realtime by day, the bill so far (owner token)
GET /v1/orgs/{org}/billingPlan, subscription status, spend cap (owner token)
GET /v1/handles/check?local=&realm_id=Whether a handle is free

Sign-in: openpulse.org/auth#

CallDoes
GET /.well-known/openid-configurationOIDC discovery (authorize, token, JWKS)
POST /v1/wire/tokenExchange a signed-in access token for a wire token
/deviceApprove a device code
POST /v1/agent/device/register · /assertDevice-bound agent keys (see agent identity)