{"openapi":"3.0.4","info":{"title":"Kenso API: Agent work","version":"1.1","description":"The Agent work endpoints of the Kenso API, with every component they use. The full spec is https://api.ken.so/v1/docs/openapi.json. Every request sends `Authorization: Bearer <your API key>` and `Ken-Version: 2026-11-02`."},"servers":[{"url":"https://api.ken.so"}],"security":[{"Bearer":[]}],"tags":[{"name":"agent-work","description":"The agent work queue: the work a workspace gave its own coding agent in the agent work settings, handed out\nthrough claims. An agent reads what waits, claims a batch of one kind, writes the answers on its own AI plan and submits\nthem; Kenso checks the format and stores each accepted answer where its own AI would have. Work is built when it is\nclaimed, and a claim holds its items until it expires, is released or every item is answered. Behind the\n`agent_work` feature, and never open to a Client seat. Each claim, answer and release needs the access the route\nthat writes the same thing by hand declares: Campaigns edit for the campaign kinds, Meetings edit for\n`meeting_brief`, Accounts edit for `call_brief` and Workflows edit for `workflow_prompt`.","x-displayName":"Agent work"}],"paths":{"/v1/agent-work":{"get":{"tags":["agent-work"],"summary":"Get the agent work queue","description":"Returns every kind, always all eight in hand-out order, with its executor, the items waiting for your agent\n(`waiting`), the items held by open claims (`claimed`), what holds the kind back (`heldBy`:\n`billing_blocked`, `out_of_credits` or `ai_paused`, else null) and when an answer of it was last\naccepted. With `campaignId`, the counts are that campaign's and `executor` is the campaign's: its override,\nelse the workspace's. Without it, `executor` is the workspace's switch and `waiting` counts every campaign\nyour agent takes, including a campaign that gives a kind to your agent while the workspace keeps it on\n`kenso_ai`. So read `waiting`, not `executor`, to tell whether there is work. Kinds you may not write\nare listed too. `scope` picks the campaigns the campaign kinds (`qualification`, `segmentation`,\n`personalization`, `rewriting`) count: `all` (the default) is every campaign that is not deleted or\nAI-paused, a Draft, finished or errored one included; `live` is only the campaigns Kenso's AI works on by\nitself, so an unattended runner gets only work Kenso's AI would have done. The other kinds count the same in both.\nThe `waiting` counts are kept between reads and recounted in the background: `waitingCountedAt` says\nwhen they were taken (up to 15 minutes ago). A kind whose count was not ready in time reads `waiting` 0 and\nis named in `uncountedKinds`; ask again in a minute.\n            \nErrors:\n            \n- `400 validation_failed`: `scope` is not `all` or `live`.\n- `404 not_found`: the workspace does not have the `agent_work` feature, or the campaign is not the\n  workspace's.\n- `503 service_unavailable` with `Retry-After`: the agent work settings could not be read. Try again.\n            \nOpen to any workspace member except a Client seat.\n\nRate limit: 12,000 calls a minute per API key, on top of the workspace limits.\n\nNeeds the `agent_work` feature on your workspace. Until it is on, calls answer 404.","operationId":"agent-work.get","parameters":[{"name":"campaignId","in":"query","description":"Optional. One campaign's counts instead of the workspace's.","schema":{"type":"integer","format":"int64"}},{"name":"scope","in":"query","description":"Optional. `all` (the default) or `live`: only the campaigns Kenso's AI works on by itself.","schema":{"type":"string"}},{"name":"Ken-Version","in":"header","description":"The API version, a date in `YYYY-MM-DD` form. `1.1` is another name for the first dated version. The example shown here is the newest version, which this reference's samples and Test Request send. 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 value that is not a version, such as `2027-01-01` or `2026-11-2`, answers `400 unsupported_version`, whose `details` list the supported versions.","schema":{"enum":["2026-11-02","1.1"],"type":"string"},"examples":{"default":{"value":"2026-11-02","x-disabled":false}}},{"name":"X-Ken-Workspace-Id","in":"header","description":"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`.","schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"OK","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentWorkStatusResponse"}}}},"400":{"description":"Bad Request","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}},"x-ken-error-codes":["unsupported_version","validation_failed","workspace_required"]},"401":{"description":"Unauthorized","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}},"x-ken-error-codes":["unauthenticated"]},"404":{"description":"Not Found","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}},"x-ken-error-codes":["not_found"]},"429":{"description":"Too Many Requests","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsError"}},"text/plain":{"schema":{"$ref":"#/components/schemas/RateLimitedText"}}},"x-ken-error-codes":["rate_limited"]},"503":{"description":"Service Unavailable","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableError"}}},"x-ken-error-codes":["service_unavailable"]}},"x-ken-features":["agent_work"],"x-ken-permission":{"kind":"workspace_member","summary":"Any workspace member except a Network member"},"x-ken-rate-limit":{"limit":12000,"windowSeconds":60,"per":"api_key"}}},"/v1/agent-work/claims":{"post":{"tags":["agent-work"],"summary":"Claim agent work","description":"Hands out up to `limit` items (1 to 50, default 10) of the first kind, in hand-out order, that waits for your\nagent and that you may write: only the kinds in `kinds` when you send it, only `campaignId`'s work when you\nsend it. A kind on `kenso_ai`, one Kenso cannot hand out yet, or one held back (`heldBy`) is skipped. With\n`scope` `live` a campaign kind hands out only the campaigns Kenso's AI works on by itself, never a Draft,\nfinished or errored one; `all`, the default, hands out every campaign's. One claim holds one kind, and one\ncampaign for a campaign kind. The claim holds its items for `leaseMinutes`\n(5 to 240, default 30): Kenso's AI and other claims leave them alone until then. Each item carries its target, the\nprompt Kenso's AI would have run and what the answer must look like (`answer.format` `json` or\n`text`, and `answer.schema`, a JSON Schema object or null). Nothing waiting is `200` with\n`id` null and no items, and stores no claim. A claim stops short of `limit` when its items would pass about\n900 KB; the rest stay in the queue. Send an `Idempotency-Key` to retry safely: a resend with the same key\nreturns the same claim.\n            \nErrors:\n            \n- `400 validation_failed`: an unknown kind, an empty `kinds`, `limit` or `leaseMinutes` out\n  of range, or a `scope` other than `all` or `live`. Each problem is one `details[]` entry,\n  such as `kinds[1]`.\n- `404 not_found`: the workspace does not have the `agent_work` feature, or the campaign is not the\n  workspace's.\n- `429 rate_limited`: more than 120 claims a minute or 1,800 an hour for the workspace.\n- `503 service_unavailable` with `Retry-After`: the agent work settings could not be read. Nothing was\n  handed out. Try again.\n            \nOpen to any workspace member except a Client seat; hands out only the kinds the caller may write.\n\nRate limit: 4,800 calls a minute per API key, on top of the workspace limits.\n\nNeeds the `agent_work` feature on your workspace. Until it is on, calls answer 404.","operationId":"agent-work.create-claim","parameters":[{"name":"Ken-Version","in":"header","description":"The API version, a date in `YYYY-MM-DD` form. `1.1` is another name for the first dated version. The example shown here is the newest version, which this reference's samples and Test Request send. 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 value that is not a version, such as `2027-01-01` or `2026-11-2`, answers `400 unsupported_version`, whose `details` list the supported versions.","schema":{"enum":["2026-11-02","1.1"],"type":"string"},"examples":{"default":{"value":"2026-11-02","x-disabled":false}}},{"name":"X-Ken-Workspace-Id","in":"header","description":"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`.","schema":{"type":"integer","format":"int64"}},{"name":"Idempotency-Key","in":"header","description":"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. It does not store a `408`, a `429` or another `4xx` that carries `Retry-After` either: retry with the same key after that time and Kenso runs the action again.","schema":{"maxLength":200,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAgentWorkClaimBody"}}}},"responses":{"200":{"description":"OK","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentWorkClaimResponse"}}}},"400":{"description":"Bad Request","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}},"x-ken-error-codes":["unsupported_version","validation_failed","workspace_required"]},"401":{"description":"Unauthorized","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}},"x-ken-error-codes":["unauthenticated"]},"404":{"description":"Not Found","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}},"x-ken-error-codes":["not_found"]},"422":{"description":"Unprocessable Content","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}},"x-ken-error-codes":["idempotency_key_reused"]},"429":{"description":"Too Many Requests","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsError"}},"text/plain":{"schema":{"$ref":"#/components/schemas/RateLimitedText"}}},"x-ken-error-codes":["rate_limited"]},"503":{"description":"Service Unavailable","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableError"}}},"x-ken-error-codes":["service_unavailable"]}},"x-ken-features":["agent_work"],"x-ken-permission":{"kind":"workspace_member","summary":"Any workspace member except a Network member"},"x-ken-rate-limit":{"limit":4800,"windowSeconds":60,"per":"api_key","summary":"120 requests a minute and 1,800 an hour per workspace","quotas":[{"policy":"agentWorkClaims","per":"workspace","limits":[{"limit":120,"windowSeconds":60},{"limit":1800,"windowSeconds":3600}]}]}}},"/v1/agent-work/claims/{claimId}/answers":{"post":{"tags":["agent-work"],"summary":"Submit agent work answers","description":"Takes in up to 50 answers to the claim's items: <c>{ \"agent\": { \"cli\", \"model\" }, \"answers\": [ { \"itemId\",\n\"output\" } ] }</c>. `output` is a JSON object for a `json` item and a string for a `text` item, at most\n64 KB. Returns one result per answer, in the order sent: `accepted` (stored where Kenso's AI would have stored\nit); `rejected` with a `reason` (`invalid_format`, `too_large`, `unknown_item` or a check\nthe answer failed; the item is closed and its work goes back to the queue); `expired` (the claim ran out or was\nreleased, or the record no longer needs an answer); `duplicate` (the item already has an answer, or one is being\ntaken in). Each result also has `retryable`: true only when Kenso could not take the answer in and the item is\nstill held (`rejected` with `failed_checks`), so send that answer again; false for every other result.\nAlways `200` when the claim exists, whatever each answer's result. Answer items of a claim in as many calls as you like: the claim closes once\nevery item is answered. The agent's `cli` and `model` are saved on the claim. Send an\n`Idempotency-Key` to retry safely: an answer stored once is never stored twice.\n            \nErrors:\n            \n- `400 validation_failed`: no answers, more than 50, an answer that is not an object, or an agent name over\n  100 characters.\n- `403 forbidden`: you may not write the claim's kind.\n- `404 not_found`: the workspace does not have the `agent_work` feature, or the claim is not the\n  workspace's.\n- `429 rate_limited`: more than 300 submits a minute or 6,000 an hour for the workspace.\n            \nOpen to any workspace member except a Client seat who may write the claim's kind.\n\nRate limit: 4,800 calls a minute per API key, on top of the workspace limits.\n\nNeeds the `agent_work` feature on your workspace. Until it is on, calls answer 404.","operationId":"agent-work.submit-answers","parameters":[{"name":"claimId","in":"path","required":true,"schema":{"type":"string"}},{"name":"Ken-Version","in":"header","description":"The API version, a date in `YYYY-MM-DD` form. `1.1` is another name for the first dated version. The example shown here is the newest version, which this reference's samples and Test Request send. 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 value that is not a version, such as `2027-01-01` or `2026-11-2`, answers `400 unsupported_version`, whose `details` list the supported versions.","schema":{"enum":["2026-11-02","1.1"],"type":"string"},"examples":{"default":{"value":"2026-11-02","x-disabled":false}}},{"name":"X-Ken-Workspace-Id","in":"header","description":"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`.","schema":{"type":"integer","format":"int64"}},{"name":"Idempotency-Key","in":"header","description":"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. It does not store a `408`, a `429` or another `4xx` that carries `Retry-After` either: retry with the same key after that time and Kenso runs the action again.","schema":{"maxLength":200,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitAgentWorkAnswersBody"}}}},"responses":{"200":{"description":"OK","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentWorkSubmitResponse"}}}},"400":{"description":"Bad Request","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}},"x-ken-error-codes":["unsupported_version","validation_failed","workspace_required"]},"401":{"description":"Unauthorized","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}},"x-ken-error-codes":["unauthenticated"]},"403":{"description":"Forbidden","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}},"x-ken-error-codes":["forbidden"]},"404":{"description":"Not Found","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}},"x-ken-error-codes":["not_found"]},"422":{"description":"Unprocessable Content","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}},"x-ken-error-codes":["idempotency_key_reused"]},"429":{"description":"Too Many Requests","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsError"}},"text/plain":{"schema":{"$ref":"#/components/schemas/RateLimitedText"}}},"x-ken-error-codes":["rate_limited"]},"503":{"description":"Service Unavailable","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableError"}}},"x-ken-error-codes":["service_unavailable"]}},"x-ken-features":["agent_work"],"x-ken-permission":{"kind":"workspace_member","summary":"Any workspace member except a Network member"},"x-ken-rate-limit":{"limit":4800,"windowSeconds":60,"per":"api_key","summary":"300 requests a minute and 6,000 an hour per workspace","quotas":[{"policy":"agentWorkAnswers","per":"workspace","limits":[{"limit":300,"windowSeconds":60},{"limit":6000,"windowSeconds":3600}]}]}}},"/v1/agent-work/claims/{claimId}":{"delete":{"tags":["agent-work"],"summary":"Release an agent work claim","description":"Gives the claim's unanswered items back to the queue now and closes the claim; answers already stored stay. Returns\nhow many items went back. Releasing a claim that is already closed (answered, released or expired) is `200`\nwith `released` 0.\n            \nErrors:\n            \n- `403 forbidden`: you may not write the claim's kind.\n- `404 not_found`: the workspace does not have the `agent_work` feature, or the claim is not the\n  workspace's.\n            \nOpen to any workspace member except a Client seat who may write the claim's kind.\n\nRate limit: 4,800 calls a minute per API key, on top of the workspace limits.\n\nNeeds the `agent_work` feature on your workspace. Until it is on, calls answer 404.","operationId":"agent-work.release-claim","parameters":[{"name":"claimId","in":"path","required":true,"schema":{"type":"string"}},{"name":"Ken-Version","in":"header","description":"The API version, a date in `YYYY-MM-DD` form. `1.1` is another name for the first dated version. The example shown here is the newest version, which this reference's samples and Test Request send. 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 value that is not a version, such as `2027-01-01` or `2026-11-2`, answers `400 unsupported_version`, whose `details` list the supported versions.","schema":{"enum":["2026-11-02","1.1"],"type":"string"},"examples":{"default":{"value":"2026-11-02","x-disabled":false}}},{"name":"X-Ken-Workspace-Id","in":"header","description":"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`.","schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"OK","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentWorkReleaseResponse"}}}},"400":{"description":"Bad Request","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}},"x-ken-error-codes":["unsupported_version","workspace_required"]},"401":{"description":"Unauthorized","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}},"x-ken-error-codes":["unauthenticated"]},"403":{"description":"Forbidden","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}},"x-ken-error-codes":["forbidden"]},"404":{"description":"Not Found","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}},"x-ken-error-codes":["not_found"]},"429":{"description":"Too Many Requests","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsError"}},"text/plain":{"schema":{"$ref":"#/components/schemas/RateLimitedText"}}},"x-ken-error-codes":["rate_limited"]}},"x-ken-features":["agent_work"],"x-ken-permission":{"kind":"workspace_member","summary":"Any workspace member except a Network member"},"x-ken-rate-limit":{"limit":4800,"windowSeconds":60,"per":"api_key"}}}},"components":{"securitySchemes":{"Bearer":{"type":"http","description":"Enter: Bearer {your Kenso API key}. Create one in the Kenso app under Settings > Integrations > API Keys.","scheme":"bearer","bearerFormat":"Opaque API key"}},"headers":{"RateLimit-Limit":{"description":"The request limit of the rate limit this request is closest to reaching: your plan's limit for this kind of call, your API key's own limit, or the operation's own limit, whichever has the fewest requests left.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The requests left under that limit. `0` on a `429`.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The seconds until that limit resets.","schema":{"type":"integer"}}},"schemas":{"AgentWorkAgentBody":{"type":"object","properties":{"cli":{"type":"string","description":"The agent's CLI, such as `claude-code` or `codex`. At most 100 characters.","nullable":true},"model":{"type":"string","description":"The model that wrote the answers. At most 100 characters.","nullable":true}},"additionalProperties":false,"description":"The agent that wrote the answers."},"AgentWorkAnswerBody":{"type":"object","properties":{"itemId":{"type":"string","description":"The item's id from the claim.","nullable":true},"output":{"description":"The answer: a JSON object for a `json` item, a string for a `text` item. At most 64 KB."}},"additionalProperties":false,"description":"One answer."},"AgentWorkAnswerFormat":{"type":"object","properties":{"format":{"type":"string","description":"`json` (send `output` as a JSON object) or `text` (send `output` as a string)."},"schema":{"description":"The JSON Schema object a `json` answer follows, or null."},"instruction":{"type":"string","description":"How to write the answer, in a sentence or two."}},"additionalProperties":false,"description":"What an item's answer must look like."},"AgentWorkAnswerResult":{"type":"object","properties":{"itemId":{"type":"string","description":"The answer's `itemId`, as sent."},"status":{"type":"string","description":"`accepted` (stored); `rejected` (see `reason`; the item is closed and its work goes back to the\nqueue, unless `retryable` is true); `expired` (the claim ran out or was released, or the record no longer\nneeds an answer); `duplicate` (the item already has an answer, or one is being taken in)."},"reason":{"type":"string","description":"Why a `rejected` answer was refused: `invalid_format`, `schema_mismatch`, `wrong_language`,\n`leaked_reasoning`, `failed_checks`, `human_written`, `unknown_item` or `too_large`.\nNull otherwise.","nullable":true},"message":{"type":"string","description":"A sentence for a person, or null.","nullable":true},"retryable":{"type":"boolean","description":"True only when the answer was not taken in and its item is still held, so send it again (a `rejected` result\nwith `failed_checks`). False for every other result: do not send that answer again."}},"additionalProperties":false,"description":"One answer's result."},"AgentWorkClaim":{"type":"object","properties":{"id":{"type":"string","description":"The claim id (`awc_` and 22 URL-safe characters). Null when nothing was waiting.","nullable":true},"kind":{"type":"string","description":"The one kind this claim holds; null when nothing was waiting.","nullable":true},"campaignId":{"type":"integer","description":"The campaign of a campaign kind's claim; null otherwise.","format":"int64","nullable":true},"expiresAt":{"type":"string","description":"When the claim lets go of its unanswered items, in UTC; null when nothing was waiting.","format":"date-time","nullable":true},"items":{"type":"array","items":{"$ref":"#/components/schemas/AgentWorkItem"},"description":"The items to answer. Empty when nothing was waiting."}},"additionalProperties":false,"description":"A claim: items of one kind, held for your agent until `expiresAt`."},"AgentWorkClaimResponse":{"type":"object","properties":{"success":{"type":"boolean","description":"Always true on a success."},"data":{"allOf":[{"$ref":"#/components/schemas/AgentWorkClaim"}],"description":"The result of the operation."}},"additionalProperties":false,"description":"The body of a successful operation that returns one result. The result is in `data`."},"AgentWorkItem":{"type":"object","properties":{"id":{"type":"string","description":"The item id (`awi_` and 22 URL-safe characters): the `itemId` of its answer."},"kind":{"type":"string","description":"The item's kind, the claim's kind."},"target":{"allOf":[{"$ref":"#/components/schemas/AgentWorkTarget"}],"description":"What the answer is for."},"prompt":{"allOf":[{"$ref":"#/components/schemas/AgentWorkPrompt"}],"description":"The prompt Kenso's AI would have run."},"answer":{"allOf":[{"$ref":"#/components/schemas/AgentWorkAnswerFormat"}],"description":"What the answer must look like."}},"additionalProperties":false,"description":"One item to answer."},"AgentWorkKind":{"type":"object","properties":{"kind":{"type":"string","description":"`meeting_brief`, `call_brief`, `workflow_prompt`, `qualification`, `segmentation`,\n`personalization`, `rewriting` or `background_ai`."},"executor":{"type":"string","description":"`kenso_ai` or `my_agent`, as the agent work settings set it."},"waiting":{"type":"integer","description":"Items waiting for your agent now. 0 for a kind on `kenso_ai` or one Kenso cannot hand out yet.","format":"int32"},"claimed":{"type":"integer","description":"Items held by open claims right now.","format":"int32"},"heldBy":{"type":"string","description":"Why nothing of this kind is handed out now, or null: `billing_blocked`, `out_of_credits` or\n`ai_paused`. A claim skips a held kind.","nullable":true},"lastAcceptedAt":{"type":"string","description":"When an answer of this kind was last accepted, in UTC; null when none was.","format":"date-time","nullable":true}},"additionalProperties":false,"description":"One kind of agent work."},"AgentWorkPrompt":{"type":"object","properties":{"system":{"type":"string","description":"The system prompt, or null when the kind has none.","nullable":true},"user":{"type":"string","description":"The user prompt."}},"additionalProperties":false,"description":"The prompt to run."},"AgentWorkRelease":{"type":"object","properties":{"released":{"type":"integer","description":"How many held items went back to the queue. 0 for a claim already closed.","format":"int32"}},"additionalProperties":false,"description":"What a release gave back."},"AgentWorkReleaseResponse":{"type":"object","properties":{"success":{"type":"boolean","description":"Always true on a success."},"data":{"allOf":[{"$ref":"#/components/schemas/AgentWorkRelease"}],"description":"The result of the operation."}},"additionalProperties":false,"description":"The body of a successful operation that returns one result. The result is in `data`."},"AgentWorkStatus":{"type":"object","properties":{"kinds":{"type":"array","items":{"$ref":"#/components/schemas/AgentWorkKind"},"description":"All eight kinds, always, in hand-out order (work with a deadline first)."},"waitingCountedAt":{"type":"string","description":"When the `waiting` counts were taken, in UTC. Kenso keeps them between reads and recounts in the background, so\nthey can be up to 15 minutes old; usually under a minute, or one poll behind for a caller that polls less often.\nNull when no kind waits for your agent.","format":"date-time","nullable":true},"uncountedKinds":{"type":"array","items":{"type":"string"},"description":"The kinds your agent takes whose `waiting` was not counted for this answer, in hand-out order: counting them\ntook longer than the read allows, or failed. Their `waiting` reads 0 and says nothing about their queue: ask\nagain in a minute. Empty when every kind was counted."}},"additionalProperties":false,"description":"Every kind of agent work, in hand-out order, with what waits for the workspace's agent."},"AgentWorkStatusResponse":{"type":"object","properties":{"success":{"type":"boolean","description":"Always true on a success."},"data":{"allOf":[{"$ref":"#/components/schemas/AgentWorkStatus"}],"description":"The result of the operation."}},"additionalProperties":false,"description":"The body of a successful operation that returns one result. The result is in `data`."},"AgentWorkSubmit":{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/AgentWorkAnswerResult"},"description":"One result per answer, in the order sent."},"accepted":{"type":"integer","description":"How many answers were accepted.","format":"int32"},"rejected":{"type":"integer","description":"How many answers were rejected.","format":"int32"}},"additionalProperties":false,"description":"Every answer's result, in the order sent."},"AgentWorkSubmitResponse":{"type":"object","properties":{"success":{"type":"boolean","description":"Always true on a success."},"data":{"allOf":[{"$ref":"#/components/schemas/AgentWorkSubmit"}],"description":"The result of the operation."}},"additionalProperties":false,"description":"The body of a successful operation that returns one result. The result is in `data`."},"AgentWorkTarget":{"type":"object","properties":{"type":{"type":"string","description":"The kind of record, such as `contact` or `meeting`."},"id":{"type":"string","description":"The record's id, as text."},"campaignId":{"type":"integer","description":"The record's campaign, or null.","format":"int64","nullable":true}},"additionalProperties":false,"description":"What an item's answer is for."},"ApiKeyError":{"required":["error"],"type":"object","properties":{"error":{"type":"string","description":"A sentence for people that says what went wrong. It can change, so do not parse it."}},"additionalProperties":false,"description":"The body the API key check in front of the operations answered until November 2026, instead of the error body (`Failure`): `{ \"error\": \"Invalid or revoked API key\" }` on a `401`, `{ \"error\": \"Rate limit exceeded\" }` on a `429` and `{ \"error\": \"Authentication is temporarily unavailable\" }` on a `503`. It has no `code`, so branch on the HTTP status."},"CreateAgentWorkClaimBody":{"type":"object","properties":{"kinds":{"type":"array","items":{"type":"string"},"description":"The kinds to take, in any order; left out for every kind. Kinds are still handed out in hand-out order.","nullable":true},"campaignId":{"type":"integer","description":"Only this campaign's work (campaign kinds). The campaign must be the workspace's.","format":"int64","nullable":true},"limit":{"type":"integer","description":"The most items to take, 1 to 50. Default 10.","format":"int32","nullable":true},"leaseMinutes":{"type":"integer","description":"How long the claim holds its items, in minutes, 5 to 240. Default 30.","format":"int32","nullable":true},"scope":{"type":"string","description":"Which campaigns' work a campaign kind hands out: `all` (the default) is every campaign that is not deleted or\nAI-paused, a Draft, finished or errored one included; `live` is only the campaigns Kenso's AI works on by\nitself. Kinds outside a campaign hand out the same in both.","nullable":true}},"additionalProperties":false,"description":"The claim body. Every field is optional."},"ErrorAccount":{"type":"object","properties":{"accountId":{"type":"integer","description":"The account's id.","format":"int64"},"name":{"type":"string","description":"The account's name."},"stakeholderId":{"type":"integer","description":"The person's stakeholder id on this account.","format":"int64"}},"additionalProperties":false,"description":"An account named in an error detail."},"ErrorBody":{"type":"object","properties":{"code":{"type":"string","description":"Stable error code, such as `validation_failed` or `not_found`. Branch on this value."},"message":{"type":"string","description":"A sentence for people that explains the error. It can change, so do not parse it."},"details":{"type":"array","items":{"$ref":"#/components/schemas/ErrorDetail"},"description":"One entry per problem, naming the field or limit it is about. Omitted when there are none.","nullable":true},"requestId":{"type":"string","description":"The id of this request: the same value as the `X-Correlation-Id` response header. Quote it when you write\nto contact@ken.so."},"docUrl":{"type":"string","description":"The page on this code in the developer docs, which says what it means and how to fix it. The errors guide for a\ncode that has no page of its own.","readOnly":true},"refusal":{"allOf":[{"$ref":"#/components/schemas/Refusal"}],"description":"On a `402`, the plan rule or usage limit that refused the request and how to lift it. Omitted otherwise."},"impact":{"allOf":[{"$ref":"#/components/schemas/InvalidationImpact"}],"description":"On a `409` that refuses a change because it would clear stored AI output (a prompt edit, a restore or a\nreset), how much the change would clear. Omitted otherwise."},"surface":{"type":"string","description":"Set only by the voice ticket's `409` (code `voice_conversation_active`): the chat the person's other\nvoice conversation runs in, `support`, `ken` or `onboarding`. Omitted on every other error.","nullable":true}},"additionalProperties":false,"description":"What went wrong in a request."},"ErrorDetail":{"type":"object","properties":{"field":{"type":"string","description":"The request field, header or limit the problem is about, such as `name` or `Ken-Version`."},"code":{"type":"string","description":"Stable code for this problem, such as `required` or `invalid`."},"message":{"type":"string","description":"A sentence for people that explains this problem."},"count":{"type":"integer","description":"On `export_limit_exceeded`, how many rows match the export. Omitted otherwise.","format":"int32","nullable":true},"index":{"type":"integer","description":"The position of the refused item in the request's list. Omitted otherwise.","format":"int32","nullable":true},"limit":{"type":"integer","description":"On `export_limit_exceeded`, the row limit the export ran with. On a `quota_exceeded` detail whose\n`field` names a quota, that quota's limit. On a `rate_limited` detail from your workspace's rate\nlimits, the limit that was hit. Omitted otherwise.","format":"int32","nullable":true},"resetAt":{"type":"string","description":"On some `quota_exceeded` details, when the quota frees up, in UTC. It is the same instant as the top-level\n`quotaResetAt`. On a `rate_limited` detail from your workspace's rate limits, when that limit resets.\nOmitted otherwise.","format":"date-time","nullable":true},"retryAfterSeconds":{"type":"integer","description":"On those `quota_exceeded` details and on most `rate_limited` details, the seconds to wait. It is the\nsame value as the `Retry-After` header. Omitted otherwise.","format":"int32","nullable":true},"inboxId":{"type":"integer","description":"The inbox the problem is about. Omitted otherwise.","format":"int64","nullable":true},"domainId":{"type":"integer","description":"The domain the problem is about. Omitted otherwise.","format":"int64","nullable":true},"domainName":{"type":"string","description":"The name of that domain, or the domain name the request gave. Omitted otherwise.","nullable":true},"accountId":{"type":"integer","description":"On `domain_taken`, `already_stakeholder` and `previously_removed`, the existing account to use\ninstead. Omitted otherwise.","format":"int64","nullable":true},"personId":{"type":"integer","description":"On `email_taken` and `linkedin_url_taken`, the existing person to use instead. Omitted otherwise.","format":"int64","nullable":true},"stakeholderId":{"type":"integer","description":"The account stakeholder the problem is about. Omitted otherwise.","format":"int64","nullable":true},"championId":{"type":"integer","description":"Not used. Always omitted.","format":"int64","nullable":true},"callTaskId":{"type":"integer","description":"On `call_task_exists`, the open call task that already holds the person's slot. Omitted otherwise.","format":"int64","nullable":true},"status":{"type":"string","description":"On `invalid_transition`, the current status. Omitted otherwise.","nullable":true},"allowed":{"type":"array","items":{"type":"string"},"description":"On `out_of_range`, the allowed values. On `invalid_transition`, the statuses the change is allowed\nfrom. Omitted otherwise.","nullable":true},"scope":{"type":"string","description":"On a `permission_denied` for an account owner change, the account scope the call needs (`all`). On\n`sending_paused`, what the pause covers: `inbox`, `domain` or `workspace`. Omitted otherwise.","nullable":true},"removedAt":{"type":"string","description":"On `previously_removed`, when a person removed the stakeholder, in UTC. Omitted otherwise.","format":"date-time","nullable":true},"page":{"type":"string","description":"On `permission_denied`, the page the call needs, such as `campaigns`. Omitted otherwise.","nullable":true},"required":{"type":"string","description":"On `permission_denied`, the access `page` needs: `view` or `edit`. Omitted otherwise.","nullable":true},"feature":{"type":"string","description":"On `permission_denied`, the permission the call needs, such as `launch`. Omitted otherwise.","nullable":true},"runId":{"type":"integer","description":"On `committee_run_active` and `run_not_finding`, the committee run the problem is about. Omitted\notherwise.","format":"int64","nullable":true},"mergedIntoId":{"type":"integer","description":"On `person_merged`, the person the merged person now lives on. On `account_merged`, the account the\nmerged account now lives on. Omitted otherwise.","format":"int64","nullable":true},"accounts":{"type":"array","items":{"$ref":"#/components/schemas/ErrorAccount"},"description":"On `person_on_accounts`, the accounts that block the change. Omitted otherwise.","nullable":true},"stage":{"type":"string","description":"On `stage_in_use` and `system_stage`, the opportunity stage key the problem is about. Omitted otherwise.","nullable":true},"opportunityCount":{"type":"integer","description":"On `stage_in_use`, how many opportunities are in that stage. Omitted otherwise.","format":"int32","nullable":true},"rule":{"type":"string","description":"On `guardrail_violation`, the contact limit rule the change breaks. Omitted otherwise.","nullable":true},"nextAllowedAt":{"type":"string","description":"On `guardrail_violation`, the first `dueAt` that passes every contact limit, in UTC. On a refused\nsend, when to retry. Omitted otherwise, and when waiting does not clear it.","format":"date-time","nullable":true},"fix":{"type":"string","description":"On a refused send, what to do next, in plain words. Omitted otherwise.","nullable":true},"opensAt":{"type":"string","description":"On `outside_calling_hours`, when the person's calling window opens, in UTC. Omitted otherwise.","format":"date-time","nullable":true},"currentVersion":{"type":"integer","description":"On a knowledge file's `version_conflict`, the file's current version. Omitted otherwise.","format":"int32","nullable":true},"provider":{"type":"string","description":"On a CRM connection error (`provider_error`, `exchange_failed`, `already_connected`,\n`account_mismatch` or `provider_unavailable`), the CRM it is about. Omitted otherwise.","nullable":true},"sharedWithMaster":{"type":"boolean","description":"True on a `quota_exceeded` detail when the shared limit of the white-label master workspace was hit, so\n`limit` is the limit of the whole white-label account. Omitted otherwise. The master's id is never sent.","nullable":true},"stepId":{"type":"integer","description":"On `link_reputation_blocked`, the saved sequence step that holds the blocked link. Omitted otherwise, and\nfor a step the save would have created.","format":"int64","nullable":true},"stepOrder":{"type":"integer","description":"On `link_reputation_blocked`, the `stepOrder` of that step. Omitted otherwise.","format":"int32","nullable":true},"url":{"type":"string","description":"On `link_reputation_blocked`, the blocked link as the step's copy writes it. Omitted otherwise.","nullable":true},"key":{"type":"string","description":"On `unfilled_template_key`, the template key the text still holds, such as `first_name` for\n`{first_name}`. Omitted otherwise.","nullable":true},"marker":{"type":"string","description":"On `unfilled_template_key`, that key as the text writes it, such as `{first_name}` or `[company]`.\nOmitted otherwise.","nullable":true},"retryAt":{"type":"string","description":"On a warm path Start's `guardrail_connector_monthly`, `guardrail_account_monthly`,\n`guardrail_connector_cooldown` and `guardrail_handoff_weekly`, when the limit frees up, in UTC. Omitted\notherwise.","format":"date-time","nullable":true},"workspaceId":{"type":"integer","description":"On `last_admin`, a workspace that needs a new admin before the account can be deleted. On\n`new_admin_not_found`, the workspace of the refused choice. Omitted otherwise.","format":"int64","nullable":true},"workspaceName":{"type":"string","description":"On `last_admin`, the name of that workspace. Omitted otherwise.","nullable":true},"class":{"type":"string","description":"On a `rate_limited` detail from your workspace's rate limits, the class of call that hit its limit:\n`read`, `write`, `bulk`, `heavy` or `sensitive`. Omitted otherwise.","nullable":true},"window":{"type":"string","description":"On that detail, the window whose limit was hit: `minute`, `day` or `bulkItemsDay`. Omitted\notherwise.","nullable":true}},"additionalProperties":false,"description":"One problem in an error: the field or limit it is about, a stable `code` and a `message`. The other fields\nappear only with the codes their descriptions name."},"Failure":{"type":"object","properties":{"success":{"type":"boolean","description":"Always false on an error."},"error":{"allOf":[{"$ref":"#/components/schemas/ErrorBody"}],"description":"What went wrong."},"quotaResetAt":{"type":"string","description":"When the quota that refused the request frees up, in UTC. Set on some quota refusals. Omitted otherwise.","format":"date-time","nullable":true},"currentVersion":{"type":"integer","description":"The current revision of a workflow draft, on a draft save's `409 version_conflict`. Read the workflow\nagain, then send this value as `baseVersion`. Omitted otherwise.","format":"int32","nullable":true},"current":{"allOf":[{"$ref":"#/components/schemas/MeetingRepNotesCurrent"}],"description":"Your meeting notes and their version as stored now, on a meeting notes save's `409 version_conflict`.\nMerge your change, then save again with `baseVersion` set to `current.repNotesVersion`. Omitted\notherwise."},"refusal":{"allOf":[{"$ref":"#/components/schemas/Refusal"}],"description":"A copy of `error.refusal`, set on some billing refusals. Omitted otherwise."},"message":{"type":"string","description":"A copy of `error.message`, set together with `refusal`. Omitted otherwise.","nullable":true},"lookalikeSeeds":{"description":"How Kenso read each seed of a lookalike search, on its `422 no_usable_seeds`:\n`{resolved: [{input, companyId, personId, name, domain}], unresolved: [{input, reason}]}`. Use it to show\nwhy no seed was usable. Omitted otherwise."}},"additionalProperties":false,"description":"The body of every error, with a 4xx or 5xx status. Branch on `error.code`."},"InvalidationImpact":{"type":"object","properties":{"qualificationResponses":{"type":"integer","description":"Stored qualification answers the change would clear.","format":"int32"},"qualifiedFlags":{"type":"integer","description":"Contacts whose qualified result the change would clear.","format":"int32"},"segmentationReasoning":{"type":"integer","description":"Stored segmentation explanations the change would clear.","format":"int32"},"segmentationAssignmentsKept":{"type":"integer","description":"Contacts that keep their segment.","format":"int32"},"segmentationAssignmentsReset":{"type":"integer","description":"Contacts that go back to the default segment.","format":"int32"},"personalizationLines":{"type":"integer","description":"Personalized lines the change would clear.","format":"int32"},"personalizationLeads":{"type":"integer","description":"Contacts that would lose their personalized lines.","format":"int32"},"rewritingLines":{"type":"integer","description":"Rewritten lines the change would clear.","format":"int32"},"rewritingLeads":{"type":"integer","description":"Contacts that would lose their rewritten lines.","format":"int32"}},"additionalProperties":false,"description":"How much stored AI output a change would clear in each AI step of a campaign, and how many segment assignments it\nkeeps or resets."},"MeetingRepNotesCurrent":{"type":"object","properties":{"repNotes":{"type":"string","description":"Your notes as stored now. Empty before your first save."},"repNotesVersion":{"type":"integer","description":"The stored notes' version. Send it as `baseVersion` when you save again.","format":"int32"}},"additionalProperties":false,"description":"Your meeting notes as Kenso stores them now, sent with a `409 version_conflict` on a notes save."},"RateLimitedText":{"type":"string","description":"The gateway's plain-text body of a `429` over the operation's own limit, until November 2026: `Number of requests exceeded. Please try again later.`","example":"Number of requests exceeded. Please try again later."},"Refusal":{"type":"object","properties":{"code":{"type":"string","description":"Stable refusal code in upper case, such as `CAMPAIGN_LIMIT_REACHED` or `INSUFFICIENT_CREDITS`."},"metric":{"type":"string","description":"What the limit counts: `Campaigns`, `Leads`, `Emails`, `LinkedInSeats` or `AiCredits`,\n`jobs_export_rows` or `funding_export_rows` for an export allowance, `credit_pack_credits`,\n`credit_spend_usd_7d`, `domains` or `mailboxes` for a limit on a new paying workspace, or for a\nKenso Lifetime cap its key: `workspaces`, `inboxes`, `contacts`, `email_verifications_day`,\n`email_verifications_month`, `people_results_day`, `company_results_day`,\n`funding_results_day`, `job_post_results_day`, `website_visits_month` or\n`visitor_lookups_day`. Omitted when a plan rule, not a count, refused the request.","nullable":true},"used":{"type":"integer","description":"How much of the limit is used, in the unit of `metric`. Omitted when the refusal has no count.","format":"int32","nullable":true},"limit":{"type":"integer","description":"The limit, in the unit of `metric`. Omitted when the refusal has no count.","format":"int32","nullable":true},"remaining":{"type":"integer","description":"How much of the limit is left, in the unit of `metric`. Omitted when the refusal has no count.","format":"int32","nullable":true},"planType":{"type":"string","description":"The workspace's plan as its snake plan id, for example `free`, `legacy_core` or `growth`."},"remedy":{"type":"string","description":"What lifts the refusal: `Upgrade`, `BuyAddOn`, `UpdatePaymentMethod` or `ContactSupport`.\n`None` means no action of yours lifts it."},"unlocksAt":{"type":"string","description":"When the limit lifts by itself, in UTC: for a limit on a new paying workspace once it has paid an invoice, and for\na Kenso Lifetime daily or monthly cap its reset (00:00 UTC, or the 1st of the month). Omitted on every other\nrefusal.","format":"date-time","nullable":true},"requiredMillicredits":{"type":"integer","description":"On a credit refusal, the millicredits the action needed. 1,000 millicredits are one credit. Omitted on every\nother refusal.","format":"int64","nullable":true},"availableMillicredits":{"type":"integer","description":"On a credit refusal, the millicredits available. On `FREE_CREDITS_NOT_ELIGIBLE`, only the credits that may\npay for inboxes and domains. Omitted on every other refusal.","format":"int64","nullable":true},"restrictedMillicredits":{"type":"integer","description":"On `FREE_CREDITS_NOT_ELIGIBLE`, the free and bonus millicredits in the balance that cannot pay for inboxes\nand domains. Omitted on every other refusal.","format":"int64","nullable":true},"feature":{"type":"string","description":"On `PLAN_FEATURE_NOT_AVAILABLE`, the plan feature the plan does not include, in snake case (for example\n`website_visitor_id`). Omitted on every other refusal.","nullable":true},"requiredPlan":{"type":"string","description":"On `PLAN_FEATURE_NOT_AVAILABLE`, the cheapest plan that includes `feature`, in snake case (for example\n`growth`). For a feature the self-serve trial locks (`browser_runs`), the trial's own plan,\nwhich paying for unlocks it. Omitted on every other refusal.","nullable":true},"requiredTier":{"type":"integer","description":"On a Kenso Lifetime refusal, the lowest tier that lifts it: the next tier with a higher cap, or the lowest tier\nthat includes `feature`. Omitted at the top tier, when no tier includes the feature, and on every other\nrefusal.","format":"int32","nullable":true},"upgradeUrl":{"type":"string","description":"On a Kenso Lifetime refusal that a higher tier lifts, the AppSumo page where the buyer upgrades their license.\nOmitted until Kenso has read that page from AppSumo, when no tier lifts the refusal, and on every other refusal.","nullable":true}},"additionalProperties":false,"description":"Why a plan rule or usage limit refused the request, and how to lift it."},"ServiceUnavailableError":{"oneOf":[{"$ref":"#/components/schemas/Failure"},{"$ref":"#/components/schemas/ApiKeyError"}],"description":"The body of a `503`: the error body (`Failure`). When Kenso cannot check the API key, its code is `auth_unavailable`, with `Retry-After: 5`. Until November 2026 the API key check in front of the operations answered `{ \"error\": \"Authentication is temporarily unavailable\" }` (`ApiKeyError`) there instead, so handle both shapes. Retry after the `Retry-After` seconds."},"SubmitAgentWorkAnswersBody":{"type":"object","properties":{"agent":{"allOf":[{"$ref":"#/components/schemas/AgentWorkAgentBody"}],"description":"The agent that wrote the answers, saved on the claim. Optional."},"answers":{"type":"array","items":{"$ref":"#/components/schemas/AgentWorkAnswerBody"},"description":"1 to 50 answers, each to an item of this claim.","nullable":true}},"additionalProperties":false,"description":"The answers body."},"TooManyRequestsError":{"oneOf":[{"$ref":"#/components/schemas/Failure"},{"$ref":"#/components/schemas/ApiKeyError"}],"description":"The JSON body of a `429`: the error body (`Failure`), with code `rate_limited` or `quota_exceeded`, over your workspace's rate limits, your API key's own limit, the operation's own limit or a usage quota. Until November 2026, over your API key's own limit the API key check answered `{ \"error\": \"Rate limit exceeded\" }` (`ApiKeyError`), and over the operation's own limit the gateway answered plain text (`RateLimitedText`): `Number of requests exceeded. Please try again later.` A client built against those answers keeps working: handle each shape. Wait the `Retry-After` seconds."},"UnauthorizedError":{"oneOf":[{"$ref":"#/components/schemas/Failure"},{"$ref":"#/components/schemas/ApiKeyError"}],"description":"The body of a `401`: the error body (`Failure`), whose `code` says what is wrong with the credential. Until November 2026, when the API key was not valid (unknown, expired or revoked, or its member no longer active), the API key check in front of the operations answered `{ \"error\": \"Invalid or revoked API key\" }` (`ApiKeyError`), and a request with no API key got a `401` that has no body. A client built against those answers keeps working: handle both shapes and a `401` with no body."}}}}