Developers

REST API

The JSON-LD REST API — interactive docs, authentication, versioning.

Everything the web client does goes through the public REST API — your scripts and bots can do the same.

Interactive docs

Every server hosts its own API reference at https://<SERVER_DOMAIN>/api — a browsable Swagger UI over the OpenAPI schema, with every operation documented. Responses are JSON-LD (application/ld+json); resources carry @id IRIs you can follow.

Authentication

Two ways in:

  • API keysAuthorization: Bearer pat_…, scoped per key. Users issue their own in Preferences; admins issue keys for bot accounts. The right choice for scripts, bots and integrations.
  • JWT — the login flow the web client uses (/auth + refresh tokens); short-lived, for interactive sessions.
curl -H "Authorization: Bearer pat_..." \
  https://chat.example.com/api/communities

Versioning

Versioned paths (/api/v1/…) with unversioned aliases for the current version. GET /api/versions lists what the server speaks — negotiate once at startup and pin the path prefix you were given.

Events out

For pushes instead of polling, subscribe your systems via webhooks — HMAC-signed deliveries on message, reaction and moderation events.