{"openapi":"3.0.4","info":{"title":"Kenso API: Credit estimates","version":"1.1","description":"The Credit estimates 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":"credits","description":"Credits pay for work in Kenso, such as finding emails, AI qualification and personalization, campaign builds, and\nKenso inboxes, domains and LinkedIn accounts. Every amount in this section is in millicredits: 1 credit\nis 1,000 millicredits and costs $0.02. Read the balance and estimate a job before you start it, then read the ledger\nto see where the credits went. A white-label client workspace shares its parent workspace's balance.","x-displayName":"Credits"}],"paths":{"/v1/credits/estimates":{"post":{"tags":["credits"],"summary":"Estimate the credits a job needs","description":"Estimates the credits a job needs before you start it, and their price in US cents (`totalAmount`). Kenso only\ncomputes the estimate: nothing is charged or reserved.\n            \nSet `kind` and send only the fields of that kind:\n            \n- `campaign`: `targetLeads` (from 1 to 1,000,000), `sequenceSteps` (from 1 to 50) and\n`personalization`. With `campaignId`, missing values come from that campaign: its contact limit, step\ncount and personalization setting. Otherwise steps default to 3 and personalization to true.\nWithout `targetLeads`, the campaign's contact limit below 1,000,000 is priced, else its lead count;\n`targetLeads` is required when the campaign has neither. Instead of\n`personalization`, send `depth` to price every lead at a depth on the rate card: `bulk`,\n`personalized` or `multichannel`. The response names the `depth` and `targetLeads` it\npriced.\nWith a `campaignId`, leads already qualified, already written or already holding an email are quoted\nfree (stages with note `already_done_free`), and `leadsWithCopy` says how many leads have copy. Send\n`run` `rewrite` to quote writing copy again for every lead. Send `run` `write_new` to quote\nwriting copy only for the leads that have none. A campaign whose own workflow is live\nalso gets that workflow's stages (each with a `stepId`) and one line with action `workflow`.\n- `build`: one typical campaign build. It costs 0 while the workspace's free monthly build is left.\n- `infra`: `items`, from 1 to 50 purchases of inboxes, domains, LinkedIn accounts, WhatsApp accounts or\niMessage lines. A monthly item counts its first month up front.\n- `accounts`: `accountCount`, from 1 to 1,000. Each account costs an estimated 12 credits of\nresearch, metered per run, plus about 6 buying committee emails, charged only when found. Where the plan's AI\nlimit applies, research costs 0 credits and counts toward that limit instead.\n- `leads`: `leadCount`, from 1 to 1,000,000. Before the workspace has measured rates, a lead costs\n1.45 credits: about 3 rows qualified, 1 email found and 1 personalization. Once rates are measured the price\nfollows them, so use the response's total and `quote`, not this figure. Send `leadsWithEmail` (from 0\nto `leadCount`) when some leads already hold an email: they need no find.\n- `committee_mapping`: `accountCount`, from 1 to 1,000. Mapping the buying committee for that many\naccounts: one mapping run an account, metered per run, plus the emails the run finds, up to 6 an account, charged\nonly when found. Where the plan's AI limit applies, the run costs 0 credits and counts toward that limit instead.\n- `account_research`: `accountCount`, from 1 to 1,000. Refreshing research on that many accounts: one\nresearch run an account, metered per run. Where the plan's AI limit applies, the run costs 0 credits and counts\ntoward that limit instead.\n- `places`: `pages`, from 0 to 1,000 (a search page holds up to 200 places), and `opens` of a\nplace's details, reviews or photos, from 0 to 100,000. Send at least one of them above 0. Under new pricing each\npage and each open is one request, at 5 credits per 1,000 requests, with no free opens. Otherwise a page costs 1\ncredit, and a workspace gets 500 free opens each UTC day, then 0.1 credits an open; the estimate assumes none of\ntoday's free opens is used.\n- `capacity`: what the plan covers in a month. Send `leadsPerMonth` (from 1 to 1,000,000) and\n`depth` (default `personalized`) to learn whether the plan's monthly credits and its AI limit cover\nthat goal; `capacity.extraMillicredits` and `capacity.extraUsdCents` say what is missing. Omit\n`leadsPerMonth` to get `capacity.coveredLeadsPerMonth`, the volume the plan covers at that depth, and\n`capacity.limitedBy`, what caps it. The comparison uses the plan's monthly credits, not the balance. When the\nplan's AI limit pays for part of the work and cannot be read, or is 0, the answer carries neither `quote`\nnor `capacity`.\n            \n`sufficient` says whether the workspace can cover the estimate now. Free and bonus credits cannot pay for\nKenso inboxes, domains or iMessage lines, unless the workspace is exempt or Kenso staff allowed its free credits\nfor them.\n            \nErrors:\n            \n- `400 validation_failed`: `kind` is missing or unknown, a value is out of range, or a field\nbelongs to another kind.\n- `404 not_found`: `campaignId` is not a campaign in this workspace.\n            \nOpen to any workspace member.\n\nRate limit: 12,000 calls a minute per API key, on top of the workspace limits.","operationId":"credit-estimates.create","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"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCreditEstimateRequest"}}}},"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/CreditEstimateResponse"}}}},"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"]}},"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"}}}},"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":{"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."},"CostQuote":{"type":"object","properties":{"credits":{"allOf":[{"$ref":"#/components/schemas/CostQuoteCredits"}],"description":"Credits: expected, the low and high that aim to contain 80% of runs, and the most the work is priced at. That most is a\ncap only where the action caps its charge: a run charged by what it costs (account research, a committee mapping run)\nis priced at its range's high and nothing caps it, while committee mapping's emails stop at 6 an account."},"aiLimit":{"allOf":[{"$ref":"#/components/schemas/CostQuoteAiLimit"}],"description":"The work's share of the workspace's AI limit, in percent."},"balance":{"allOf":[{"$ref":"#/components/schemas/CostQuoteBalance"}],"description":"The available balance against the expected cost, and what would be missing at the high end."},"basis":{"allOf":[{"$ref":"#/components/schemas/CostQuoteBasis"}],"description":"Where the rates came from, over how many days and samples: `workspace` (the workspace's own trailing rates),\n`kenso` (typical across customer workspaces), `pilot` (this campaign's or workflow's own first runs) or\n`preset` (no data yet)."},"per":{"allOf":[{"$ref":"#/components/schemas/CostQuotePer"}],"description":"What the quote counts (`lead`, `record`, `account`, `run` or `item`) and how many."},"stages":{"type":"array","items":{"$ref":"#/components/schemas/CostQuoteStage"}},"savings":{"type":"array","items":{"$ref":"#/components/schemas/CostQuoteSaving"}}},"additionalProperties":false,"description":"The cost quote an estimate response carries as `quote`: the credits range, the share of the AI\nlimit, the balance, what the numbers are based on, and the stages and savings behind them."},"CostQuoteAiLimit":{"type":"object","properties":{"applies":{"type":"boolean"},"expectedPercent":{"type":"number","format":"double"},"lowPercent":{"type":"number","format":"double"},"highPercent":{"type":"number","format":"double"},"usedPercentNow":{"type":"number","format":"double"},"fits":{"type":"boolean"}},"additionalProperties":false,"description":"The work's share of the workspace's AI limit, in percent."},"CostQuoteBalance":{"type":"object","properties":{"availableMillicredits":{"type":"integer","format":"int64"},"afterMillicredits":{"type":"integer","format":"int64"},"sufficient":{"type":"boolean"},"shortMillicredits":{"type":"integer","format":"int64"},"shortAtHighMillicredits":{"type":"integer","format":"int64"}},"additionalProperties":false,"description":"The available balance against the expected cost, and what would be missing at the high end."},"CostQuoteBasis":{"type":"object","properties":{"source":{"type":"string"},"windowDays":{"type":"integer","format":"int32"},"sampleSize":{"type":"integer","format":"int64"}},"additionalProperties":false,"description":"Where the rates came from, over how many days and samples: `workspace` (the workspace's own trailing rates),\n`kenso` (typical across customer workspaces), `pilot` (this campaign's or workflow's own first runs) or\n`preset` (no data yet)."},"CostQuoteCredits":{"type":"object","properties":{"expectedMillicredits":{"type":"integer","format":"int64"},"lowMillicredits":{"type":"integer","format":"int64"},"highMillicredits":{"type":"integer","format":"int64"},"maxMillicredits":{"type":"integer","format":"int64"},"expectedUsdCents":{"type":"integer","format":"int64"},"lowUsdCents":{"type":"integer","format":"int64"},"highUsdCents":{"type":"integer","format":"int64"}},"additionalProperties":false,"description":"Credits: expected, the low and high that aim to contain 80% of runs, and the most the work is priced at. That most is a\ncap only where the action caps its charge: a run charged by what it costs (account research, a committee mapping run)\nis priced at its range's high and nothing caps it, while committee mapping's emails stop at 6 an account."},"CostQuotePer":{"type":"object","properties":{"unit":{"type":"string"},"count":{"type":"integer","format":"int64"}},"additionalProperties":false,"description":"What the quote counts (`lead`, `record`, `account`, `run` or `item`) and how many."},"CostQuoteSaving":{"type":"object","properties":{"code":{"type":"string"},"stepId":{"type":"string","nullable":true},"title":{"type":"string"},"detail":{"type":"string"},"savesMillicredits":{"type":"integer","format":"int64"},"savesAiLimitPercent":{"type":"number","format":"double"},"per":{"type":"integer","format":"int32"},"fixDefinition":{}},"additionalProperties":false,"description":"One way to spend less: what the fix saves for every `per` units, and the definition with the fix applied."},"CostQuoteStage":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"unitsIn":{"type":"integer","format":"int64"},"unitsOut":{"type":"integer","format":"int64"},"paidBy":{"type":"string"},"expectedMillicredits":{"type":"integer","format":"int64"},"aiLimitPercent":{"type":"number","format":"double"},"note":{"type":"string","nullable":true},"stepId":{"type":"string","nullable":true}},"additionalProperties":false,"description":"One stage of the work: units in and out, its expected cost, and what pays for it: `credits`, `ai_limit`\n(the plan's AI limit), `plan` (included, unless `note` is `price_unknown`) or `dollars` (add-ons).\n`note` is `only_when_found` (charged only for a result), `already_done_free` (done already, not charged\nagain), `list_below_limit` (the list yields fewer leads than its contact limit), `price_unknown` (the price\ndepends on something the estimate does not have yet: its 0 credits are not a price and the stage is not included) or\nabsent."},"CreateCreditEstimateRequest":{"required":["kind"],"type":"object","properties":{"kind":{"type":"string","description":"Required. The job to estimate: `campaign`, `build`, `infra`, `accounts`,\n            `leads`, `places`, `committee_mapping`, `account_research` or `capacity`."},"campaignId":{"type":"integer","description":"Campaign estimates only: a campaign to read the contact limit, step count and personalization setting\n            from.","format":"int64","nullable":true},"targetLeads":{"type":"integer","description":"Campaign estimates only: the contacts the campaign should finish with, from 1 to 1,000,000. Without\n            it a `campaignId` is priced on its contact limit below 1,000,000, else on its lead count; required when the\n            campaign has neither.","format":"int32","nullable":true},"sequenceSteps":{"type":"integer","description":"Campaign estimates only: the number of sequence steps, from 1 to 50. Defaults to the campaign's step\n            count, else 3.","format":"int32","nullable":true},"personalization":{"type":"boolean","description":"Campaign estimates only: whether Kenso personalizes each contact. Defaults to the campaign's setting,\n            else true.","nullable":true},"depth":{"type":"string","description":"Campaign and capacity estimates: how deep Kenso works each lead, `bulk`, `personalized` or\n            `multichannel`. Send it or `personalization`, not both. Defaults to `personalized` when\n            personalization is on, else `bulk`. A capacity estimate defaults to `personalized`.","nullable":true},"run":{"type":"string","description":"Campaign estimates only: which run to quote. `campaign` (the default) is the whole campaign, with\n            leads already qualified, written or holding an email quoted free. `rewrite` is writing copy again for every\n            lead that reaches writing, and needs `campaignId`. `write_new` is writing copy only for leads that have\n            none, and needs `campaignId` too.","nullable":true},"items":{"type":"array","items":{"$ref":"#/components/schemas/CreditEstimateInfraItemRequest"},"description":"Infra estimates only: from 1 to 50 purchases.","nullable":true},"accountCount":{"type":"integer","description":"Accounts, committee mapping and account research estimates: the accounts to add, map or refresh, from 1\n            to 1,000.","format":"int32","nullable":true},"leadCount":{"type":"integer","description":"Leads estimates only: the leads to import, from 1 to 1,000,000.","format":"int32","nullable":true},"leadsWithEmail":{"type":"integer","description":"Leads estimates only: how many of the leads already hold an email, from 0 to `leadCount`. They need\n            no email found. Omit it when none do.","format":"int32","nullable":true},"pages":{"type":"integer","description":"Places estimates only: search pages of up to 200 places each, from 0 to 1,000. Send `pages` or\n            `opens` above 0.","format":"int32","nullable":true},"opens":{"type":"integer","description":"Places estimates only: opens of a place's details, reviews or photos, from 0 to 100,000. Under new pricing\n            every open is charged; otherwise the first 500 a workspace makes each UTC day are free.","format":"int32","nullable":true},"leadsPerMonth":{"type":"integer","description":"Capacity estimates only: the goal, leads a month, from 1 to 1,000,000. Omit it to ask how many leads a\n            month the plan covers.","format":"int32","nullable":true}},"additionalProperties":false,"description":"Body of `POST /v1/credits/estimates`. Send `kind` and only the fields of that kind."},"CreditCapacity":{"type":"object","properties":{"depth":{"type":"string","description":"The depth priced: `bulk`, `personalized` or `multichannel`."},"leadsPerMonth":{"type":"integer","description":"The goal as sent, leads a month. Null when the request asked what the plan covers.","format":"int32","nullable":true},"quotedLeads":{"type":"integer","description":"The leads the `quote` and `aiLimitPercent` are for: the goal, or 1,000 when the request asked\n            what the plan covers. Scale nothing from it: `coveredLeadsPerMonth` is already the plan's volume.","format":"int32"},"planMonthlyMillicredits":{"type":"integer","description":"The credits the plan includes each month, in millicredits.","format":"int64"},"covered":{"type":"boolean","description":"Whether the plan's monthly credits and its AI limit both cover the goal. Null without a goal.","nullable":true},"extraMillicredits":{"type":"integer","description":"The credits the goal needs beyond the plan's monthly credits, in millicredits. 0 when covered or\n            without a goal.","format":"int64"},"extraUsdCents":{"type":"integer","description":"`extraMillicredits` in US cents, at `usdPerCredit` on the rate card.","format":"int64"},"aiLimitPercent":{"type":"number","description":"The share of the AI limit the `quotedLeads` use, in percent. Null where the workspace's AI work is\n            charged in credits.","format":"double","nullable":true},"coveredLeadsPerMonth":{"type":"integer","description":"About how many leads a month the plan's credits and AI limit cover at this depth, at most\n            1,000,000.","format":"int64"},"limitedBy":{"type":"string","description":"What caps `coveredLeadsPerMonth`: `credits` or `ai_limit`. Null when neither caps it\n            below 1,000,000.","nullable":true},"exempt":{"type":"boolean","description":"True when the workspace's credit balance is never checked. The other fields are the plan's numbers, as\n            for any workspace."}},"additionalProperties":false,"description":"What a plan covers in a month at one depth. Credits are the plan's monthly credits, never the balance."},"CreditEstimate":{"type":"object","properties":{"object":{"type":"string","description":"Always `credit_estimate`."},"totalMillicredits":{"type":"integer","description":"The millicredits the job needs now, counting the first month of monthly items.","format":"int64"},"monthlyRecurringMillicredits":{"type":"integer","description":"What an infra purchase adds to `reservedMonthlyMillicredits`. 0 for other kinds.","format":"int64"},"lines":{"type":"array","items":{"$ref":"#/components/schemas/CreditEstimateLine"},"description":"The estimate's lines, one per credit action."},"availableMillicredits":{"type":"integer","description":"What the estimate is measured against: the whole balance for `infra`, else available\n            credits.","format":"int64"},"sufficient":{"type":"boolean","description":"Whether the workspace can cover the estimate now. Always true for an exempt workspace."},"freeBuild":{"type":"boolean","description":"Build estimates only: whether the free monthly build covers it.","nullable":true},"inboxDomainEligibleMillicredits":{"type":"integer","description":"Infra estimates only: what can pay the inbox, domain and iMessage line items, the balance minus free and\n            bonus credits, or the whole balance when the workspace is exempt or Kenso staff allowed its free credits for them.\n            `sufficient` is false when those items cost more, even when\n            `availableMillicredits` covers the total.","format":"int64","nullable":true},"totalAmount":{"allOf":[{"$ref":"#/components/schemas/Money"}],"description":"`totalMillicredits` in US cents, at `usdPerCredit` on the rate card."},"depth":{"type":"string","description":"Campaign and capacity estimates only: the depth priced, `bulk`, `personalized` or\n            `multichannel`, as sent or derived from the campaign's personalization. Omitted for other kinds.","nullable":true},"targetLeads":{"type":"integer","description":"Campaign estimates only: the leads priced, as sent or read from the campaign's contact limit or lead count. Omitted\n            for other kinds.","format":"int32","nullable":true},"leadsNeedingEmailFind":{"type":"integer","description":"Campaign estimates only: the email finds the estimate charges for, the units of its `email_found`\n            line. Leads whose email find is already settled in the campaign are quoted none. Omitted for other kinds.","format":"int32","nullable":true},"leadsWithCopy":{"type":"integer","description":"Campaign estimates with a `campaignId`: how many of the campaign's leads already have copy. A\n            `rewrite` run writes them again. Omitted for other kinds and without a campaign.","format":"int32","nullable":true},"quote":{"allOf":[{"$ref":"#/components/schemas/CostQuote"}],"description":"The cost quote behind this estimate (range, stages, share of the AI limit). Null until this estimate is quoted."},"capacity":{"allOf":[{"$ref":"#/components/schemas/CreditCapacity"}],"description":"Capacity estimates only: what the plan covers at the depth priced. Omitted for other kinds, and when the\n            estimate carries no `quote`."}},"additionalProperties":false,"description":"The credits a job would need, line by line."},"CreditEstimateInfraItemRequest":{"required":["action"],"type":"object","properties":{"action":{"type":"string","description":"Required. What to buy: `ken_inbox_monthly`, `prewarmed_inbox`, `azure_domain_monthly`,\n            `smtp_domain_monthly`, `smtp_inbox_domain_monthly`, `linkedin_account_monthly`,\n            `imessage_line_monthly`, `whatsapp_account_monthly` or `domain_registration`."},"quantity":{"type":"integer","description":"How many to buy, from 1 to 1,000. The default is 1.","format":"int32","nullable":true},"registrarPriceUsd":{"type":"number","description":"The registrar's price in US dollars, above 0 and at most 1,000. Required for\n            `domain_registration` and refused for every other action.","format":"double","nullable":true},"renewalPriceUsd":{"type":"number","description":"The yearly renewal price in US dollars, above 0 and at most 1,000. Only for\n            `domain_registration`.","format":"double","nullable":true}},"additionalProperties":false,"description":"One purchase in an infra estimate."},"CreditEstimateLine":{"type":"object","properties":{"action":{"type":"string","description":"The credit action, such as `email_found`; `workflow` for the one line that covers a campaign's\n            own live workflow."},"units":{"type":"integer","description":"Units the job needs.","format":"int64"},"millicredits":{"type":"integer","description":"What the line costs, in millicredits.","format":"int64"},"description":{"type":"string","description":"What the line covers, in plain words."}},"additionalProperties":false,"description":"One line of a credit estimate."},"CreditEstimateResponse":{"type":"object","properties":{"success":{"type":"boolean","description":"Always true on a success."},"data":{"allOf":[{"$ref":"#/components/schemas/CreditEstimate"}],"description":"The result of the operation."}},"additionalProperties":false,"description":"The body of a successful operation that returns one result. The result is in `data`."},"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."},"Money":{"type":"object","properties":{"amount":{"type":"integer","description":"The amount in the currency's smallest unit, such as cents for `usd`: 1250 is 12.50 dollars.","format":"int64"},"currency":{"type":"string","description":"The currency, as a lowercase three-letter ISO 4217 code such as `usd`."}},"additionalProperties":false,"description":"An amount of money."},"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."},"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."}}}}