Skip to content

REST API

BetaMedium · Pro

A conventional JSON API over HTTPS. Every response is JSON; every request that carries a body is JSON. All endpoints live under a single versioned base URL.

Not live yet

This section documents Klaarin’s finalized REST contract, ahead of the /v1 launch. Nothing below is callable today — see Known limitations.

Base URL

https://klaarin.com/api/v1

Authentication

Every request needs an API key sent as a Bearer token. Keys are created from your profile under Connected Apps and are scoped to your workspace plan — see Authentication.

Field selection and expansion

Trim a response to just what you need with fields=id,name,status (comma-separated, top-level fields only). Pull in a relation that isn’t part of the default response with expand= — for example expand=members on /projects. The two combine: fields= trims the primary resource, and anything named in expand= always comes back in full regardless. Each endpoint below that has a real expand target names it in its parameter table.

Errors

Errors return an HTTP status and a JSON body with error.code and a human message naming the problem and the recovery.

  • 400invalid_requestMalformed JSON, an unknown field, or a value that failed validation
  • 401unauthorizedMissing, invalid or revoked API key
  • 403forbidden_planWorkspace plan does not include API access
  • 404not_foundResource does not exist or is not visible to this user
  • 429rate_limitedToo many requests — see Retry-After
  • 500internalSomething failed on our side; safe to retry

Rate limits, once live

REST calls will be limited to 300 requests per 15 minutes per API key, with X-RateLimit-* response headers and a 429 when exceeded — matching the limiter already protecting OAuth token and registration calls today. Not enforced yet, since the API itself isn’t live.

View example
Authenticated request
curl "https://klaarin.com/api/v1/projects?limit=10" \
  -H "Authorization: Bearer kl_live_9f2ac…"
Error shape
{
  "error": {
    "code": "unauthorized",
    "message": "API key is invalid or was revoked. Create a new key from Connected Apps."
  }
}