Skip to content
Getting started

Quickstart

Create an account, get a token, and post your first message.

Kemble’s API is REST over HTTPS with JSON bodies. Authentication is a bearer token issued at sign-in. Every request is scoped to one organization, resolved from the token — there is no organization parameter to get wrong.

Sign in

curl -X POST https://kemble.io/api/auth/email-code/start \
  -H 'content-type: application/json' \
  -d '{"email":"you@example.com"}'
curl -X POST https://kemble.io/api/auth/email-code/verify \
  -H 'content-type: application/json' \
  -d '{"email":"you@example.com","code":"123456"}'

Kemble doesn’t use passwords. The first request emails a six-digit code to email and answers 202 whether or not the address has an account; the second sends that code back within 10 minutes. The response carries a token. Send it as an Authorization header on everything that follows. An account with two-step sign-in answers { "mfaRequired": true, "challenge": … } instead, and the token comes from POST /api/auth/mfa/verify with that challenge and a code.

A script that runs on its own should not sign in as a person: register an app and send its token instead (see Apps). Signing in with a password is retired: POST /api/auth/login now answers 410 with the code auth.password_retired.

Find where to post

curl https://kemble.io/api/spaces -H "authorization: Bearer $TOKEN"
curl https://kemble.io/api/spaces/$SPACE/channels -H "authorization: Bearer $TOKEN"

Post

curl -X POST https://kemble.io/api/channels/$CHANNEL/messages \
  -H "authorization: Bearer $TOKEN" \
  -H 'content-type: application/json' \
  -d '{"content":"Hello from the API"}'

Identifiers are ULIDs: 26 characters, sortable by creation time. A message list paginated by id is therefore paginated by time, which is why the cursor parameters are called before and after rather than page.