What a consumer can do for themselves — profile, password, deletion and their chat history.
Partner-driven flows a consumer performs on their own account.
Self-service is the family of flows a partner application runs on behalf of a logged-in consumer: reading and updating the profile, changing or resetting the password, deleting the account, and working with the chat history (list, search, read, rename, delete). Every call goes to the KeenAgents public HTTPS API and carries the two-token pair — the partner backend's Authorization: Bearer <application_token> plus the consumer's X-Access-Token — and KeenAgents refuses the request unless both belong to the same tenant. The one exception is forgot-password: the user is logged out, so it is a single-token flow and the emailed link proves ownership.
Reversible edits (profile update, chat rename) are authorized by the live login alone. Destructive or out-of-band actions — password reset, logged-in password change, account delete — use a claim → email → redeem handshake backed by a single-use confirmation grant, so a forged or replayed confirmation link can never change an account on its own.
X-Hash plus its embedded secret via X-Callback-Secret — performs the change, and removing the grant happens in the same step, so each link works exactly once.{ action, consumer, apikeyID, contractKey } is sent to it, once, without retries. It never blocks or affects the action itself.Exact values an integrator or operator will hit.
X-Callback-Secret and it must match the link's embedded value exactly.firstName, lastName, gender, dobDay, dobMonth, dobYear is required, else 400. Empty or whitespace values count as not supplied — a blank field never blanks the stored value. Email cannot be changed on this route, and the target is always the access token's own account.firstName, lastName, gender, dobDay, dobMonth, dobYear, email — never the password, space grants, or confirmation grants.external-registration | consumer-delete | password-reset | auth-password-reset | consumer-update. It is sent once and its result is ignored.The claim → email → redeem pattern, using the logged-out reset as the exemplar.
/v1/consumer/reset-password-claim (application_token only — no live login exists) with { email, password } (the new password) and the required X-Callback-Url email-link target./v1/consumer/reset-password-redeem?client_id=… with X-Hash + X-Callback-Secret (plus an optional completion X-Callback-Url).action: password-reset).The logged-in change-password flow (auth-reset-password-claim / -redeem) is identical except it also requires X-Access-Token on both legs and uses its own grant — reset and change-password links never cross-redeem. Account delete follows the same shape with both tokens on the claim and a readable, signed link the partner verifies with the tenant certificate's public PEM; the account and its grant are removed together at redeem.
All chat routes carry both tokens and resolve the consumer through the same two-token check.
| Route | What it does |
|---|---|
GET /v1/consumer/chat-list | The consumer's active chats — archived chats are excluded. |
GET /v1/consumer/chat/search?q=&limit= | Case-insensitive title substring search. limit caps at 150; an empty q is a 400. |
GET /v1/consumer/chat/:id/history | Cursor-paginated messages: default limit 50, cursor ?before=<createdAt>:<id>; a malformed cursor falls back to the first page. |
POST /v1/consumer/chat/:id/title | Renames the chat; title is capped at 200 characters. |
POST /v1/consumer/chat/:id/delete | Deletes the chat. By default a real erasure — the conversation and all its messages are removed. A deployment can be configured to archive instead (kept, but hidden). Either way it vanishes from list, search and history. |
Archived chats and other users' chats both answer Chat not found — a deliberate choice that leaks no existence information. Every chat belongs to exactly one tenant, and KeenAgents resolves that tenant from the verified credentials on the request — a client can never choose a tenant for itself.
X-Callback-Url header means two different things by leg — required email-link target on claim, optional completion ping on redeem/update (a non-http(s) value is a silent no-op). Easy to misread in integrations.Keen Agents 2026
Documentation
Release 15