REST API
Full REST reference rendered from the server's live OpenAPI spec.
The reference below is rendered by Scalar from the Cariosan OpenAPI spec. The viewer resolves the spec URL in this order:
NEXT_PUBLIC_CARIOSAN_OPENAPI_URLset at docs-build time — point this at a hosted Cariosan server's/openapi.jsonfor the always-current spec./openapi.jsonserved as a static snapshot from this docs site (apps/docs/public/openapi.json). Regenerate the snapshot by booting any Cariosan server, fetching/openapi.json, and committing the result intopublic/.
Spec stays blank? — boot any Cariosan server (docker compose up -d from the repo root), commit apps/docs/public/openapi.json from the live /openapi.json, and refresh.
Authentication
- Server-side endpoints (
/v1/users,/v1/channels,/v1/webhooks, etc.) take your workspace API credentials asAuthorization: Bearer <api_key>:<api_secret>. - Client-side endpoints (
/v1/me/channels,/v1/channels/:id/messages,/v1/attachments/presign) take a user JWT asAuthorization: Bearer <jwt>. Issue these from your backend with the Go SDK'sIssueUserToken.
Try it console — Scalar's "Try it" picks up whichever auth scheme the endpoint declares. Paste credentials once and it remembers them for the session.
Private attachment downloads
public_url returned by upload presigning and attachment_url on a message are stable references. They no longer authorize anonymous reads. Request a fresh download grant using the message ID and channel external ID:
Response: { "url": "https://storage.example/...signed...", "expires_at": "..." }.
Only current members of the matching workspace and channel can request a grant. Deleted messages are unavailable. Grants expire after five minutes and remain usable until expiry even if membership is later revoked. Do not persist signed URLs or include them in analytics. Refresh a grant after expiry.
Upload references are restricted to the authenticated uploader's workspace/user prefix. Reusing another user's raw object reference as a new attachment is rejected. Existing messages retain their references and can be resolved through the authorized endpoint while the configured bucket and URL base remain unchanged.
Was this page helpful?