Skip to content

API Reference ​

The Klero Public API is versioned under v1.

Base URLs ​

All documented endpoints in this reference live under the /v1/ prefix inside the public API path:

EnvironmentBase URL
Subdomainhttps://{projectSlug}.klero.ai/api/v1/
Custom domainhttps://feedback.yourdomain.com/api/v1/

Authentication ​

Customer-authenticated endpoints use the X-Customer-Token header:

http
X-Customer-Token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...

See Authentication for token issuance.

Anonymous identity ​

Anonymous actions are controlled by the project settings returned by GET v1/settings.

When anonymous interaction is enabled for a project:

  • same-origin requests use the Klero anonymous cookie automatically
  • cross-origin requests can send X-Klero-Anon-Id
  • vote and comment-like toggles should also send anonymous: true in the request body when not using X-Customer-Token

Anonymous settings flags ​

FlagMeaning
allow_anonymous_postingUnauthenticated users may create feedback items
allow_anonymous_upvotingUnauthenticated users may vote on feedback items
allow_anonymous_commentingUnauthenticated users may create comments and like comments

Rate limits ​

Rate limits are applied per IP address.

GroupLimit
Read endpoints120/min
Write endpoints20/min
Vote / like endpoints30/min
Comment update / delete endpoints15/min

When a limit is exceeded, the API returns 429 Too Many Requests.

Common error responses ​

Error responses return JSON with a message field. Many write endpoints also include success: false.

json
{
  "message": "...",
  "success": false
}
StatusMeaning
400Bad request, such as missing anonymous identity for an anonymous vote / like
401Authentication required for a customer-owned action
403Feature disabled, blocked customer, or action forbidden
404Resource not found or feature disabled
422Validation error, often with an errors object
429Rate limit exceeded

Customer Feedback Management