API Reference

The Keme REST API gives you programmatic access to tickets, workspaces, users, automations, and analytics. All endpoints use HTTPS and return JSON. The base URL is https://api.keme.io/v1.

Authentication

All API requests must include an Authorization header with a Bearer token. Generate API tokens under Settings → API → New Token. Tokens are workspace-scoped and inherit the permissions of the user who created them.

Example request header: Authorization: Bearer keme_live_abc123xyz. Tokens are prefixed with keme_live_ for production and keme_test_ for sandbox environments.
Tokens do not expire by default but can be set to expire after 30, 60, or 90 days. Revoke tokens immediately if they are compromised — use the Revoke button in the API token list or the DELETE /auth/tokens/{id} endpoint.

Rate Limits

The API enforces rate limits per token: 120 requests per minute for read endpoints and 60 requests per minute for write endpoints. Limits reset on a rolling 60-second window.

When you exceed a rate limit, the API returns HTTP 429 Too Many Requests with a Retry-After header indicating the number of seconds to wait. Build exponential backoff into your client.

Enterprise customers can request higher rate limits by contacting support. Dedicated rate limit tiers are available for high-volume integrations such as real-time ticketing pipelines.

Tickets API

GET /tickets — list tickets with optional filters: status, priority, assignee, tag, channel, created_after, created_before. Returns paginated results (max 100 per page).
POST /tickets — create a ticket. Required fields: subject (string), channel_id (string), contact_email (string). Optional: body (string), priority (critical|high|normal|low), assignee_id (string), tags (string[]).
PATCH /tickets/{id} — update a ticket's status, priority, assignee, or tags. PUT /tickets/{id}/reply — add a reply to a ticket as the authenticated user. DELETE /tickets/{id} — soft-deletes a ticket; recoverable for 30 days.

Workspaces API

GET /workspaces — list all workspaces the authenticated token has access to. Returns workspace id, name, timezone, created_at, and plan information.
GET /workspaces/{id} — full workspace detail including channel list, active SLA policies, and agent count. POST /workspaces — create a new workspace (organisation Admin token required).
PATCH /workspaces/{id} — update name, timezone, or default language. DELETE /workspaces/{id} requires explicit confirmation (pass confirm: true in the request body) and permanently deletes all workspace data after a 30-day grace period.

Users API

GET /users — list all users in the organisation. Filter by workspace_id to list agents for a specific workspace. Returns id, name, email, role, created_at, and last_active_at.
POST /users/invite — invite a new user by email. Specify role (agent|manager|admin) and an optional workspace_id. The invited user receives an activation email.
PATCH /users/{id} — update a user's role or name. DELETE /users/{id} — deactivates the user and unassigns all open tickets. Deactivated users can be reactivated within 90 days.

Webhooks

Webhooks deliver real-time event payloads to your endpoint via HTTP POST. Supported events: ticket.created, ticket.updated, ticket.resolved, ticket.closed, ticket.sla_breached, automation.fired, risk_signal.triggered.

Configure webhooks under Settings → Integrations → Webhooks → New Endpoint. Provide the URL and select the events to subscribe to. Keme signs each delivery with an HMAC-SHA256 signature in the X-Keme-Signature header.

Failed webhook deliveries are retried with exponential backoff: immediately, then after 1 min, 5 min, 30 min, and 2 hours. After 5 failed attempts, the webhook is paused and you receive an email notification.

SDKs

Official SDKs are available for Node.js (npm install @keme/sdk) and Python (pip install keme-sdk). Both SDKs wrap the REST API with typed methods, automatic retry logic, and pagination helpers.
Node.js example: import { KemeClient } from "@keme/sdk"; const client = new KemeClient({ token: process.env.KEME_API_TOKEN }); const tickets = await client.tickets.list({ status: "open" });

Community-maintained SDKs exist for Ruby, Go, and PHP. These are not officially supported but are linked in the Developer Community forum. OpenAPI 3.0 schema is available at https://api.keme.io/v1/openapi.json for generating your own client.