Kenso

AI feedback

The AI feedback endpoints of the Kenso API.

4 endpointsKen-Version: 1.1AuthenticationWorkspacesErrors

Rate an AI output

POST/v1/ai-feedbackai-feedback.create

Needs the ai_feedback feature on your workspace. Until it is on, calls answer 404.

Try it on developer.ken.so

Saves the caller's thumbs on one output, or updates their rating of it: 201 for a new rating with a Location, 200 for an update. Body: surface (a surface key such as ken_chat, reply_draft, ai_line), targetRef (the output's id on that surface, such as ken_chat:12:turn_3:ken), rating (up or down), reasons (chip keys), note (optional, at most 4,000 characters: a longer one is 400 on note and nothing is saved), outputSnapshot (what the person saw, cut to 16,000 characters), traceId and context (campaignId, contactId, threadId). An unknown surface, a targetRef that does not fit it or another rating is 400 naming the field. The save never looks the output up and never waits for the reward check: reward.status is pending while the note is checked (poll GET /v1/ai-feedback/{feedbackId}), none when rewards do not apply to the caller. A note earns 10 credits at 8 words and 50 at 40 on a thumbs down (a thumbs up caps at 10), once per person per output. Changing the note or reasons updates the same rating and never pays twice. Accepts Idempotency-Key. 60 writes a minute and 2,000 a day per person: past either, 429 quota_exceeded with Retry-After.

Parameters

Name
In
Type
Required
Description
Ken-Version
In: header
string, one of: 2026-11-02, 1.1
optional
The API version, a date in YYYY-MM-DD form. 1.1 is another name for the first dated version. Leave it out to use your API key's pinned version. Keys created in the Kenso app are pinned to the newest version; keys minted by the CLI login are not. A key with no pinned version and no header gets the legacy shape where the path has one, and 404 where the path exists only in this version. A date that is not a version answers 400 unsupported_version; any other value that is not a version is treated as legacy.
X-Ken-Workspace-Id
In: header
integer (int64)
optional
The id of the workspace to act in. Leave it out when your API key reaches only one workspace. When the key reaches more than one, a request without this header answers 400 workspace_required. A workspace you are not a member of answers 404 not_found.
Idempotency-Key
In: header
string
optional
A unique value, such as a UUID, that makes a retry safe. Send the same key when you retry. For 24 hours, a repeat of the same request with the same key gets the first response again, with the Idempotent-Replayed: true header, and Kenso does not run the action twice. The same key with a different request answers 422 idempotency_key_reused. Keys are per workspace and at most 200 characters long. A repeat sent while the first request is still running can get 503 service_unavailable with Retry-After. Retry it with the same key. Kenso does not store a 5xx response, so a retry after one runs the action again.

Request body

application/json, optional.

Field
Type
Required
Description
surface
string
optional
Where the output shows, a surface key such as ken_chat, reply_draft or ai_line.
targetRef
string
optional
The output's id on that surface, such as ken_chat:12:turn_3:ken or reply_job:881.
rating
string
optional
up or down.
reasons
array of string
optional
Reason chip keys (snake_case), such as wrong_or_made_up. At most 12 are kept.
note
string
optional
The person's note, at most 4,000 characters (a longer one is refused, never cut).
outputSnapshot
string
optional
What the person saw (text, or an asset URL), cut to 16,000 characters.
traceId
string
optional
The Langfuse / OTLP trace id of the run that produced the output, when the surface has one.
context
SaveAiFeedbackContext
optional
Optional context of a rating, for filtering.

Response 201

Also answers 200. data is a AiFeedback.

Field
Type
Description
id
integer (int64)
surface
string
Where the output shows, such as ken_chat or reply_draft.
targetRef
string
The output's id on that surface.
rating
string
up or down.
reasons
array of string
Reason chip keys.
note
string
The note; omitted when there is none.
noteWords
integer (int32)
Words in the note as the server counts them (tokens of at least 2 letters). This count sets the tier.
reward
AiFeedbackReward
The reward on a rating's note.
Request
curl -X POST "https://api.ken.so/v1/ai-feedback" \
  -H "Authorization: Bearer $KEN_API_KEY" \
  -H "Ken-Version: 1.1" \
  -H "X-Ken-Workspace-Id: $KEN_WORKSPACE_ID" \
  -H "Content-Type: application/json" \
  -d '{
  "surface": "string",
  "targetRef": "string",
  "rating": "string",
  "reasons": [
    "string"
  ],
  "note": "string",
  "outputSnapshot": "string",
  "traceId": "string",
  "context": {
    "campaignId": 812,
    "contactId": 812,
    "threadId": "thr_ZW1haWw6NDAyMjg0LjFAZXhhbXBsZS5jb20"
  }
}'
Response 201
{
  "success": true,
  "data": {
    "id": 812,
    "surface": "string",
    "targetRef": "string",
    "rating": "string",
    "reasons": [
      "string"
    ],
    "note": "string",
    "noteWords": 1,
    "reward": {
      "status": "none",
      "tier": "none",
      "credits": 1,
      "reason": "string",
      "alreadyRewarded": true
    }
  }
}

Get one of the caller's ratings

GET/v1/ai-feedback/{feedbackId}ai-feedback.get

Needs the ai_feedback feature on your workspace. Until it is on, calls answer 404.

Try it on developer.ken.so

The caller's own rating and its reward, for the poll after Send (every 1.5 s for up to 15 s). Another person's rating, another workspace's, a cleared rating or an unknown id is 404.

Parameters

Name
In
Type
Required
Description
feedbackId
In: path
integer (int64)
required
Ken-Version
In: header
string, one of: 2026-11-02, 1.1
optional
The API version, a date in YYYY-MM-DD form. 1.1 is another name for the first dated version. Leave it out to use your API key's pinned version. Keys created in the Kenso app are pinned to the newest version; keys minted by the CLI login are not. A key with no pinned version and no header gets the legacy shape where the path has one, and 404 where the path exists only in this version. A date that is not a version answers 400 unsupported_version; any other value that is not a version is treated as legacy.
X-Ken-Workspace-Id
In: header
integer (int64)
optional
The id of the workspace to act in. Leave it out when your API key reaches only one workspace. When the key reaches more than one, a request without this header answers 400 workspace_required. A workspace you are not a member of answers 404 not_found.

Response 200

data is a AiFeedback.

Field
Type
Description
id
integer (int64)
surface
string
Where the output shows, such as ken_chat or reply_draft.
targetRef
string
The output's id on that surface.
rating
string
up or down.
reasons
array of string
Reason chip keys.
note
string
The note; omitted when there is none.
noteWords
integer (int32)
Words in the note as the server counts them (tokens of at least 2 letters). This count sets the tier.
reward
AiFeedbackReward
The reward on a rating's note.
Request
curl -X GET "https://api.ken.so/v1/ai-feedback/812" \
  -H "Authorization: Bearer $KEN_API_KEY" \
  -H "Ken-Version: 1.1" \
  -H "X-Ken-Workspace-Id: $KEN_WORKSPACE_ID"
Response 200
{
  "success": true,
  "data": {
    "id": 812,
    "surface": "string",
    "targetRef": "string",
    "rating": "string",
    "reasons": [
      "string"
    ],
    "note": "string",
    "noteWords": 1,
    "reward": {
      "status": "none",
      "tier": "none",
      "credits": 1,
      "reason": "string",
      "alreadyRewarded": true
    }
  }
}

Clear one of the caller's ratings

DELETE/v1/ai-feedback/{feedbackId}ai-feedback.delete

Needs the ai_feedback feature on your workspace. Until it is on, calls answer 404.

Try it on developer.ken.so

Removes the caller's thumbs from the output (204). A reward already granted or held on it stays, and a new rating of the same output earns nothing more. Another person's rating, another workspace's or an unknown id is 404; clearing a cleared rating again is 204.

Parameters

Name
In
Type
Required
Description
feedbackId
In: path
integer (int64)
required
Ken-Version
In: header
string, one of: 2026-11-02, 1.1
optional
The API version, a date in YYYY-MM-DD form. 1.1 is another name for the first dated version. Leave it out to use your API key's pinned version. Keys created in the Kenso app are pinned to the newest version; keys minted by the CLI login are not. A key with no pinned version and no header gets the legacy shape where the path has one, and 404 where the path exists only in this version. A date that is not a version answers 400 unsupported_version; any other value that is not a version is treated as legacy.
X-Ken-Workspace-Id
In: header
integer (int64)
optional
The id of the workspace to act in. Leave it out when your API key reaches only one workspace. When the key reaches more than one, a request without this header answers 400 workspace_required. A workspace you are not a member of answers 404 not_found.

Response 204

Request
curl -X DELETE "https://api.ken.so/v1/ai-feedback/812" \
  -H "Authorization: Bearer $KEN_API_KEY" \
  -H "Ken-Version: 1.1" \
  -H "X-Ken-Workspace-Id: $KEN_WORKSPACE_ID"
Response 204
HTTP/1.1 204 No Content

Record that the caller regenerated a Ken draft or suggestion

POST/v1/ai-feedback/signalsai-feedback.signal

Needs the ai_feedback feature on your workspace. Until it is on, calls answer 404.

Try it on developer.ken.so

The one implicit signal only the client sees: Rewrite on a Ken reply draft or composer suggestion. Body: surface (reply_draft or reply_suggest), targetRef (the draft's or suggestion's id, such as reply_job:881 or reply_suggest:sug_12) and signal (regenerated). Recorded as a thumbs down that earns nothing (204); a repeat on the same output updates the one record. Anything else is 400 naming the field. Shares the rating write limit.

Parameters

Name
In
Type
Required
Description
Ken-Version
In: header
string, one of: 2026-11-02, 1.1
optional
The API version, a date in YYYY-MM-DD form. 1.1 is another name for the first dated version. Leave it out to use your API key's pinned version. Keys created in the Kenso app are pinned to the newest version; keys minted by the CLI login are not. A key with no pinned version and no header gets the legacy shape where the path has one, and 404 where the path exists only in this version. A date that is not a version answers 400 unsupported_version; any other value that is not a version is treated as legacy.
X-Ken-Workspace-Id
In: header
integer (int64)
optional
The id of the workspace to act in. Leave it out when your API key reaches only one workspace. When the key reaches more than one, a request without this header answers 400 workspace_required. A workspace you are not a member of answers 404 not_found.

Request body

application/json, optional.

Field
Type
Required
Description
surface
string
optional
reply_draft or reply_suggest.
targetRef
string
optional
The draft's or suggestion's id, such as reply_job:881 or reply_suggest:sug_12.
signal
string
optional
regenerated.

Response 204

Request
curl -X POST "https://api.ken.so/v1/ai-feedback/signals" \
  -H "Authorization: Bearer $KEN_API_KEY" \
  -H "Ken-Version: 1.1" \
  -H "X-Ken-Workspace-Id: $KEN_WORKSPACE_ID" \
  -H "Content-Type: application/json" \
  -d '{
  "surface": "string",
  "targetRef": "string",
  "signal": "string"
}'
Response 204
HTTP/1.1 204 No Content