{"openapi":"3.0.4","info":{"title":"Kenso API: Segments","version":"1.1","description":"The Segments 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":"segments","description":"A segment is a group of contacts inside a campaign: a `manual` segment takes the contacts that match its filters, Ken sorts contacts into `ai` segments, and `ab_test` segments split the campaign's contacts by percentage. Each segment can have its own email sequence, LinkedIn sequence and AI prompts, and every campaign has a Default segment, which you cannot delete or deactivate. Create, update, activate and deactivate segments, preview the contacts a filter matches, and save versions you can restore later. Every segment call except `GET /v1/segments/filter-options` needs a token or API key tied to a member's email, and without one Kenso answers `401 unauthenticated`.","x-displayName":"Segments"}],"paths":{"/v1/campaigns/{campaignId}/segments":{"get":{"tags":["segments"],"summary":"List a campaign's segments","description":"Returns the campaign's segments in id order, the Default segment included.\n            \nSet `includeMetrics` to false when you need only ids and names. Kenso then skips the contact counts and leaves\nout `contactCount`, `rawContactCount` and `readyContactCount`.\n            \nErrors:\n            \n- `400 validation_failed`: `limit` is out of range, or `cursor` is invalid.\n- `404 not_found`: the campaign does not exist in this workspace.\n            \nRequires Campaigns view.\n\nRate limit: 12,000 calls a minute per API key, on top of the workspace limits.","operationId":"segments.list","parameters":[{"name":"campaignId","in":"path","description":"The campaign's id.","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"q","in":"query","description":"Keeps segments whose name contains this text, ignoring case.","schema":{"type":"string"}},{"name":"isActive","in":"query","description":"True keeps active segments, and false keeps inactive ones. Omit it to get both.","schema":{"type":"boolean"}},{"name":"limit","in":"query","description":"Segments per page, from 1 to 200. Defaults to 50.","schema":{"maximum":200,"minimum":1,"type":"integer","format":"int32","default":50}},{"name":"cursor","in":"query","description":"The `nextCursor` from the previous page. Omit it for the first page.","schema":{"type":"string"}},{"name":"includeMetrics","in":"query","description":"Set to false to skip the contact counts, which leaves out `contactCount`, `rawContactCount` and\n`readyContactCount`. Defaults to true.","schema":{"type":"boolean"}},{"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/SegmentListResponse"}}}},"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":"page","page":"campaigns","access":"view","summary":"Campaigns view"},"x-ken-rate-limit":{"limit":12000,"windowSeconds":60,"per":"api_key"}},"post":{"tags":["segments"],"summary":"Create a segment","description":"Adds a segment to the campaign and returns it, with its URL in the `Location` header. The new segment starts\nwith a copy of the Default segment's email sequence, or of the campaign's email sequence when the Default\nsegment has none of its own.\n            \nOn an A/B test campaign, every new segment is an `ab_test` segment. An `ab_test` segment needs\n`abTestPercentage` from 1 to 100, and other types cannot have one. Only a `manual` segment can have\n`filterCriteria`. `sortOrder` defaults to one more than the campaign's highest.\n            \nErrors:\n            \n- `400 validation_failed`: `name` is missing, or another segment in the campaign already has it.\n- `400 validation_failed`: `segmentationType` is not `manual`, `ai` or `ab_test`, or is `ab_test` on a campaign that is not an A/B test.\n- `400 validation_failed`: `abTestPercentage` is missing on an `ab_test` segment, set on another type, or out of range.\n- `400 validation_failed`: on an A/B test campaign that is scheduled, launching, sending or paused, the active segments' percentages would not add up to 100.\n- `400 validation_failed`: `filterCriteria` is set on a segment that is not `manual`, breaks a filter rule, or has keys but none of them is a filter field.\n- `400 validation_failed`: `filterCriteria` uses `behaviorTags` or `behaviorTagsExclude` while behavior signals are off for the workspace.\n- `404 not_found`: the campaign does not exist in this workspace.\n            \nRequires Campaigns edit.\n\nRate limit: 4,800 calls a minute per API key, on top of the workspace limits.","operationId":"segments.create","parameters":[{"name":"campaignId","in":"path","description":"The campaign's id.","required":true,"schema":{"type":"integer","format":"int64"}},{"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/CreateSegmentRequest"}}}},"responses":{"201":{"description":"Created","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/SegmentResponse"}}}},"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":"page","page":"campaigns","access":"edit","summary":"Campaigns edit"},"x-ken-rate-limit":{"limit":4800,"windowSeconds":60,"per":"api_key"}}},"/v1/segments/{segmentId}":{"get":{"tags":["segments"],"summary":"Get a segment","description":"Returns one segment with its filters and contact counts.\n            \nErrors:\n            \n- `404 not_found`: the segment does not exist in this workspace.\n            \nRequires Campaigns view.\n\nRate limit: 12,000 calls a minute per API key, on top of the workspace limits.","operationId":"segments.get","parameters":[{"name":"segmentId","in":"path","description":"The segment's id.","required":true,"schema":{"type":"integer","format":"int64"}},{"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/SegmentResponse"}}}},"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"]},"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":"page","page":"campaigns","access":"view","summary":"Campaigns view"},"x-ken-rate-limit":{"limit":12000,"windowSeconds":60,"per":"api_key"}},"patch":{"tags":["segments"],"summary":"Update a segment","description":"Changes the fields you send and leaves the others as they are. A JSON null clears `description` or\n`abTestPercentage`. An update does not save a version. Use `POST /v1/segments/{segmentId}/versions` to save\none.\n            \nA `filterCriteria` object replaces all of the segment's filters, and an empty object clears them. A null\n`filterCriteria` leaves the filters as they are. A segment with filters cannot change to `ai` or `ab_test`\nuntil you clear its filters.\n            \nErrors:\n            \n- `400 validation_failed`: `name` is empty, or another segment in the campaign already has it.\n- `400 validation_failed`: `segmentationType` is not `manual`, `ai` or `ab_test`, or the segment has filters and the new type is not `manual`.\n- `400 validation_failed`: `abTestPercentage` is out of range, missing on an `ab_test` segment, or set on another type.\n- `400 validation_failed`: on an A/B test campaign that is scheduled, launching, sending or paused, the active segments' percentages would not add up to 100.\n- `400 validation_failed`: `filterCriteria` is set on a segment that is not `manual`, breaks a filter rule, or has keys but none of them is a filter field.\n- `400 validation_failed`: `filterCriteria` adds a behavior tag the segment does not have while behavior signals are off for the workspace.\n- `404 not_found`: the segment does not exist in this workspace.\n            \nRequires Campaigns edit.\n\nRate limit: 4,800 calls a minute per API key, on top of the workspace limits.","operationId":"segments.update","parameters":[{"name":"segmentId","in":"path","description":"The segment's id.","required":true,"schema":{"type":"integer","format":"int64"}},{"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/UpdateSegmentRequest"}}}},"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/SegmentResponse"}}}},"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":"page","page":"campaigns","access":"edit","summary":"Campaigns edit"},"x-ken-rate-limit":{"limit":4800,"windowSeconds":60,"per":"api_key"}},"delete":{"tags":["segments"],"summary":"Delete a segment","description":"Deletes the segment with its email sequence, LinkedIn steps and AI prompts. Its contacts move to the Default\nsegment or, on an A/B test campaign, to the remaining active `ab_test` segments. Contacts keep their AI output.\n            \nErrors:\n            \n- `400 validation_failed`: the segment is the Default segment.\n- `400 validation_failed`: its contacts would move to the Default segment, and the segment has an email or LinkedIn sequence on a channel where neither the Default segment nor the campaign has one. Save that sequence on the Default segment, or delete it from this segment, first.\n- `400 validation_failed`: on an A/B test campaign that is scheduled, launching, sending or paused, the remaining active segments' percentages would not add up to 100.\n- `404 not_found`: the segment does not exist in this workspace.\n            \nRequires Campaigns edit.\n\nRate limit: 4,800 calls a minute per API key, on top of the workspace limits.","operationId":"segments.delete","parameters":[{"name":"segmentId","in":"path","description":"The segment's id.","required":true,"schema":{"type":"integer","format":"int64"}},{"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":{"204":{"description":"No Content","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"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":"page","page":"campaigns","access":"edit","summary":"Campaigns edit"},"x-ken-rate-limit":{"limit":4800,"windowSeconds":60,"per":"api_key"}}},"/v1/campaigns/{campaignId}/segments/preview":{"post":{"tags":["segments"],"summary":"Preview a segment filter","description":"Counts the campaign's contacts that match a filter and returns up to 10 of them, newest first, with the filter\noptions in `filterOptions`. Nothing is saved.\n            \nSend no body to get only the filter options, with the counts at 0. `GET /v1/segments/filter-options` returns\nthe same options without a campaign.\n            \nThe preview looks at contacts with no segment and contacts in the Default segment, plus the contacts of\n`segmentId` when you pass it. Contacts on the do-not-contact list are left out unless the filter sets\n`doNotContact` to true.\n            \nErrors:\n            \n- `400 validation_failed`: the body is an empty object, has keys but none of them is a filter field, or breaks a filter rule.\n- `400 validation_failed`: the filter uses `behaviorTags` or `behaviorTagsExclude` while behavior signals are off for the workspace.\n- `404 not_found`: the campaign does not exist in this workspace.\n            \nRequires Campaigns view.\n\nRate limit: 12,000 calls a minute per API key, on top of the workspace limits.","operationId":"segments.preview","parameters":[{"name":"campaignId","in":"path","description":"The campaign's id.","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"segmentId","in":"query","description":"A segment of the campaign whose contacts the preview also looks at. Omit it to look only at contacts with no segment and the Default segment's contacts.","schema":{"type":"integer","format":"int64"}},{"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/CampaignSegmentFilterCriteria"}}}},"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/SegmentPreviewResponse"}}}},"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":"page","page":"campaigns","access":"view","summary":"Campaigns view"},"x-ken-rate-limit":{"limit":12000,"windowSeconds":60,"per":"api_key"}}},"/v1/segments/{segmentId}/activate":{"post":{"tags":["segments"],"summary":"Activate a segment","description":"Turns the segment back on and saves a segment version. Activating a segment that is already active changes\nnothing.\n            \nErrors:\n            \n- `400 validation_failed`: on an A/B test campaign that is scheduled, launching, sending or paused, the active segments' percentages would not add up to 100.\n- `404 not_found`: the segment does not exist in this workspace.\n- `409 conflict`: another version save for this segment is running. Retry shortly.\n            \nRequires Campaigns edit.\n\nRate limit: 4,800 calls a minute per API key, on top of the workspace limits.","operationId":"segments.activate","parameters":[{"name":"segmentId","in":"path","description":"The segment's id.","required":true,"schema":{"type":"integer","format":"int64"}},{"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/SegmentResponse"}}}},"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"]},"409":{"description":"Conflict","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":["conflict"]},"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":"page","page":"campaigns","access":"edit","summary":"Campaigns edit"},"x-ken-rate-limit":{"limit":4800,"windowSeconds":60,"per":"api_key"}}},"/v1/segments/{segmentId}/deactivate":{"post":{"tags":["segments"],"summary":"Deactivate a segment","description":"Turns the segment off and saves a segment version. Kenso does not send to contacts in an inactive segment.\nDeactivating a segment that is already inactive changes nothing.\n            \nErrors:\n            \n- `400 validation_failed`: the segment is the Default segment.\n- `400 validation_failed`: on an A/B test campaign that is scheduled, launching, sending or paused, the remaining active segments' percentages would not add up to 100.\n- `404 not_found`: the segment does not exist in this workspace.\n- `409 conflict`: another version save for this segment is running. Retry shortly.\n            \nRequires Campaigns edit.\n\nRate limit: 4,800 calls a minute per API key, on top of the workspace limits.","operationId":"segments.deactivate","parameters":[{"name":"segmentId","in":"path","description":"The segment's id.","required":true,"schema":{"type":"integer","format":"int64"}},{"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/SegmentResponse"}}}},"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"]},"409":{"description":"Conflict","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":["conflict"]},"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":"page","page":"campaigns","access":"edit","summary":"Campaigns edit"},"x-ken-rate-limit":{"limit":4800,"windowSeconds":60,"per":"api_key"}}},"/v1/segments/filter-options":{"get":{"tags":["segments"],"summary":"Get the segment filter options","description":"Returns the values to offer for the list filters of a segment: seniority levels, functions, industries, company\ntypes, employment types, funding rounds, technologies, email validity, email providers and languages. Each\noption has the `value` to send in the filter and a `label` to show. The options are the same for every\nworkspace.\n            \n`industries` and `languages` list common values only, and their filters also accept other text.\n`technologies` has no options. `POST /v1/campaigns/{campaignId}/segments/preview` returns the same options in\n`filterOptions`.\n            \nRequires Campaigns view.\n\nRate limit: 12,000 calls a minute per API key, on top of the workspace limits.","operationId":"segments.get-filter-options","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"}}],"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/SegmentFilterMetadataResponse"}}}},"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"]},"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":"page","page":"campaigns","access":"view","summary":"Campaigns view"},"x-ken-rate-limit":{"limit":12000,"windowSeconds":60,"per":"api_key"}}},"/v1/segments/{segmentId}/provider-tracks":{"get":{"tags":["segments"],"summary":"Get a segment's provider tracks","description":"Returns the three provider tracks of one segment: `google`, `microsoft` and `other` (everyone\nelse). A contact's track comes from the mail provider of the address Kenso emails; a contact whose provider is\nnot known yet counts under `google`. Recipients on Google get plain text; recipients on Microsoft get the\nemail as written.\n            \nEach track has its `leadCount` (contacts that can still get an email; at most 100,000 are read, past that\n`isPartial` is true) and `sequenceSegmentId`, the segment whose\n`/v1/segments/{segmentId}/email-sequence` holds the track's copy. `hasOwnSequence` is false while the\ntrack still shares the segment's sequence, and `sameAs` lists the other tracks that share it.\n`enabled` is false when the campaign is not on provider tracks; its sends then go out as before.\n            \nErrors:\n            \n- `400 validation_failed`: the workspace does not have provider tracks (detail code\n  `feature_disabled`).\n- `404 not_found`: the segment does not exist in this workspace.\n            \nRequires Campaigns view.\n\nRate limit: 12,000 calls a minute per API key, on top of the workspace limits.","operationId":"segments.get-provider-tracks","parameters":[{"name":"segmentId","in":"path","description":"Id of the segment.","required":true,"schema":{"type":"integer","format":"int64"}},{"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/ProviderTracksResponse"}}}},"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":"page","page":"campaigns","access":"view","summary":"Campaigns view"},"x-ken-rate-limit":{"limit":12000,"windowSeconds":60,"per":"api_key"}}},"/v1/segments/{segmentId}/provider-tracks/{track}":{"put":{"tags":["segments"],"summary":"Give a provider track its own sequence, or share the segment's","description":"Sets the sequence one provider track of a segment sends. The track is `google`, `microsoft` or\n`other` (everyone else). Format follows the recipient's mail provider: a recipient on Google gets plain\ntext, a recipient on Microsoft gets the email as written.\n            \nSend `{ \"sequence\": \"own\" }` to give the track its own copy of the segment's email sequence: read and\nreplace that copy with `/v1/segments/{segmentId}/email-sequence` on the track's `sequenceSegmentId`.\nEditing one track's copy never changes another's. The segment needs an email sequence of its own first: a\nsegment that sends the campaign's emails answers `no_sequence`, so save those emails onto the segment with\n`PUT /v1/segments/{segmentId}/email-sequence` before you ask for a copy. Send\n`{ \"sequence\": \"shared\" }` to drop the track's copy: its contacts continue on the segment's sequence at the\nsame step. Both are safe to repeat. Returns the tracks as `GET /v1/segments/{segmentId}/provider-tracks`\ndoes.\n            \nErrors:\n            \n- `400 validation_failed`: detail code `feature_disabled` (the workspace does not have provider\n  tracks), `invalid_track`, `invalid_sequence`, `no_sequence` (the segment has no email\n  sequence to copy) or `sequence_has_conditions` (a sequence with conditions has one copy for all tracks).\n- `404 not_found`: the segment does not exist in this workspace.\n            \nRequires Campaigns edit.\n\nRate limit: 4,800 calls a minute per API key, on top of the workspace limits.","operationId":"segments.set-provider-track","parameters":[{"name":"segmentId","in":"path","description":"Id of the segment.","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"track","in":"path","description":"The provider track: `google`, `microsoft` or `other`.","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"}}],"requestBody":{"description":"The sequence the track sends: `own` or `shared`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetProviderTrackRequest"}}}},"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/ProviderTracksResponse"}}}},"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":"page","page":"campaigns","access":"edit","summary":"Campaigns edit"},"x-ken-rate-limit":{"limit":4800,"windowSeconds":60,"per":"api_key"}}},"/v1/segments/{segmentId}/provider-tracks/{track}/apply-to-all":{"post":{"tags":["segments"],"summary":"Apply one provider track's copy to all tracks","description":"Makes every provider track of the segment send the same copy. When the named track has its own sequence, the\nsegment's email sequence is replaced with it, with every check a sequence save runs; then every track's own\ncopy is dropped, so all three tracks share the segment's sequence again. When the named track already shares\nthe segment's sequence, only the other tracks' own copies are dropped. Contacts mid-sequence continue at the\nsame step. Returns the tracks as `GET /v1/segments/{segmentId}/provider-tracks` does.\n            \nErrors:\n            \n- `400 validation_failed`: detail code `feature_disabled`, `invalid_track`,\n  `no_sequence`, or the detail codes of a sequence save; nothing is dropped when the save is refused.\n- `404 not_found`: the segment does not exist in this workspace.\n- `409 conflict`: the segment's email sequence changed while it was being replaced; nothing is dropped.\n- `503 service_unavailable`: a sequence could not be read or saved; nothing is dropped. Try again.\n            \nRequires Campaigns edit.\n\nRate limit: 4,800 calls a minute per API key, on top of the workspace limits.","operationId":"segments.apply-provider-track-to-all","parameters":[{"name":"segmentId","in":"path","description":"Id of the segment.","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"track","in":"path","description":"The provider track whose copy all tracks get: `google`, `microsoft` or `other`.","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/ProviderTracksResponse"}}}},"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"]},"409":{"description":"Conflict","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":["conflict"]},"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-permission":{"kind":"page","page":"campaigns","access":"edit","summary":"Campaigns edit"},"x-ken-rate-limit":{"limit":4800,"windowSeconds":60,"per":"api_key"}}},"/v1/segments/{segmentId}/versions":{"get":{"tags":["segments"],"summary":"List a segment's versions","description":"Returns the segment's saved versions, newest first. Kenso adds a version when you save one, activate or\ndeactivate the segment, or restore a version. Updating the segment does not add one.\n            \nErrors:\n            \n- `400 validation_failed`: `limit` is out of range, or `cursor` is invalid.\n- `404 not_found`: the segment does not exist in this workspace.\n            \nRequires Campaigns view.\n\nRate limit: 12,000 calls a minute per API key, on top of the workspace limits.","operationId":"segments.list-versions","parameters":[{"name":"segmentId","in":"path","description":"The segment's id.","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"limit","in":"query","description":"Versions per page, from 1 to 100. Defaults to 20.","schema":{"maximum":100,"minimum":1,"type":"integer","format":"int32","default":20}},{"name":"cursor","in":"query","description":"The `nextCursor` from the previous page. Omit it for the first page.","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/SegmentVersionListResponse"}}}},"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":"page","page":"campaigns","access":"view","summary":"Campaigns view"},"x-ken-rate-limit":{"limit":12000,"windowSeconds":60,"per":"api_key"}},"post":{"tags":["segments"],"summary":"Save a segment version","description":"Applies the fields you send to the live segment, then saves a version of the result. Send no body to save the\nsegment as it is.\n            \nThe body takes the fields of `PATCH /v1/segments/{segmentId}`, with the same rules, plus `sourceVersionId`.\nAbsent fields keep the live segment's value, or that version's value when you pass `sourceVersionId`. A JSON\nnull clears `description` or `abTestPercentage`. When the segment is saved but Kenso cannot record the version,\n`version` is null and `versionWarning` says why.\n            \nErrors:\n            \n- `400 validation_failed`: a field breaks a rule of `PATCH /v1/segments/{segmentId}`.\n- `400 validation_failed`: `sourceVersionId` is 0.\n- `404 not_found`: the segment does not exist in this workspace, or `sourceVersionId` is not one of its versions.\n- `409 conflict`: another version save for this segment is running. Retry shortly.\n            \nRequires Campaigns edit.\n\nRate limit: 4,800 calls a minute per API key, on top of the workspace limits.","operationId":"segments.save-version","parameters":[{"name":"segmentId","in":"path","description":"The segment's id.","required":true,"schema":{"type":"integer","format":"int64"}},{"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/SaveSegmentVersionRequest"}}}},"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/SegmentVersionSaveResponse"}}}},"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"]},"409":{"description":"Conflict","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":["conflict"]},"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":"page","page":"campaigns","access":"edit","summary":"Campaigns edit"},"x-ken-rate-limit":{"limit":4800,"windowSeconds":60,"per":"api_key"}}},"/v1/segments/{segmentId}/versions/{versionId}":{"get":{"tags":["segments"],"summary":"Get a segment version","description":"Returns one saved version with `snapshot`, a copy of the segment's settings and filters as they were saved.\n            \nErrors:\n            \n- `404 not_found`: the segment does not exist in this workspace, or the version is not one of its versions.\n            \nRequires Campaigns view.\n\nRate limit: 12,000 calls a minute per API key, on top of the workspace limits.","operationId":"segments.get-version","parameters":[{"name":"segmentId","in":"path","description":"The segment's id.","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"versionId","in":"path","description":"The version's id, from the list of versions.","required":true,"schema":{"type":"integer","format":"int64"}},{"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/SegmentVersionDetailResponse"}}}},"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"]},"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":"page","page":"campaigns","access":"view","summary":"Campaigns view"},"x-ken-rate-limit":{"limit":12000,"windowSeconds":60,"per":"api_key"}}},"/v1/segments/{segmentId}/versions/{versionId}/restore":{"post":{"tags":["segments"],"summary":"Restore a segment version","description":"Brings the segment back to a saved version and saves a new version that records the restore. Kenso also\nbrings back the segment's AI prompts, email sequence and LinkedIn sequence, each to the latest version it had\nwhen the target version was saved. `children` reports what happened to each of them.\n            \nSet `dryRun` to true to see what a restore would do without changing anything. The response then carries the\ntarget `version`, its `snapshot`, and each child with the snapshot it would restore.\n            \nWhen the restore would clear AI output already generated for the campaign, Kenso answers `409 conflict` with\n`error.impact`. Send the call again with `confirm` set to true to go ahead.\n            \nErrors:\n            \n- `400 validation_failed`: a restored step breaks today's sequence rules.\n- `400 validation_failed`: on an A/B test campaign that is scheduled, launching, sending or paused, the active segments' percentages would not add up to 100.\n- `404 not_found`: the segment does not exist in this workspace, or the version is not one of its versions.\n- `409 conflict` with `error.impact`: the restore would clear AI output and `confirm` is not true.\n- `409 conflict`: another version save for this segment is running. Retry shortly.\n            \nRequires Campaigns edit.\n\nRate limit: 4,800 calls a minute per API key, on top of the workspace limits.","operationId":"segments.restore-version","parameters":[{"name":"segmentId","in":"path","description":"The segment's id.","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"versionId","in":"path","description":"The id of the version to restore.","required":true,"schema":{"type":"integer","format":"int64"}},{"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/RestoreSegmentVersionRequest"}}}},"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/SegmentRestoreResponse"}}}},"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"]},"409":{"description":"Conflict","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":["conflict"]},"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":"page","page":"campaigns","access":"edit","summary":"Campaigns edit"},"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":{"AiVariableFilter":{"type":"object","properties":{"promptId":{"type":"integer","description":"The id of the AI prompt whose output the rule checks.","format":"int64"},"operator":{"allOf":[{"$ref":"#/components/schemas/AiVariableFilterOperator"}],"description":"How the rule matches, such as `contains`. Kenso also reads the PascalCase name (`Contains`)."},"value":{"type":"string","description":"The text to look for with `contains` and `not_contains`, at most 500 characters. Kenso ignores it for `exists`\nand `not_exists`.","nullable":true}},"additionalProperties":false,"description":"A rule on the output of one of the campaign's AI prompts."},"AiVariableFilterOperator":{"enum":["exists","not_exists","contains","not_contains"],"type":"string","description":"How an AI prompt rule matches. `exists` keeps contacts with output for the prompt, and `not_exists` keeps contacts\nwithout it. `contains` keeps contacts whose output contains the value, ignoring case, and `not_contains` keeps the\nothers."},"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."},"CampaignSegmentFilterCriteria":{"type":"object","properties":{"fullName":{"allOf":[{"$ref":"#/components/schemas/StringFilter"}],"description":"Matches the contact's full name."},"titles":{"type":"array","items":{"type":"string"},"description":"Keeps contacts whose job title contains any of these values, ignoring case.","nullable":true},"excludeTitles":{"type":"array","items":{"type":"string"},"description":"Drops contacts whose job title contains any of these values, ignoring case. Contacts with no title stay.","nullable":true},"lastJobTitle":{"allOf":[{"$ref":"#/components/schemas/StringFilter"}],"description":"Matches the contact's last job title."},"headlines":{"type":"array","items":{"type":"string"},"description":"Keeps contacts whose headline contains any of these values, ignoring case.","nullable":true},"excludeHeadlines":{"type":"array","items":{"type":"string"},"description":"Drops contacts whose headline contains any of these values, ignoring case. Contacts with no headline stay.","nullable":true},"summaryContains":{"type":"string","description":"Keeps contacts whose profile summary contains this text, ignoring case.","nullable":true},"seniorityLevels":{"type":"array","items":{"type":"string"},"description":"Keeps contacts whose seniority level is exactly one of these values. `seniorityLevels` in\n`GET /v1/segments/filter-options` lists the values.","nullable":true},"excludeSeniorityLevels":{"type":"array","items":{"type":"string"},"description":"Drops contacts whose seniority level is exactly one of these values. Contacts with no seniority level stay.","nullable":true},"functions":{"type":"array","items":{"type":"string"},"description":"Keeps contacts whose job function is exactly one of these values. `functions` in\n`GET /v1/segments/filter-options` lists the values.","nullable":true},"excludeFunctions":{"type":"array","items":{"type":"string"},"description":"Drops contacts whose job function is exactly one of these values. Contacts with no function stay.","nullable":true},"employmentTypes":{"type":"array","items":{"type":"string"},"description":"Keeps contacts whose employment type is exactly one of these values. `employmentTypes` in\n`GET /v1/segments/filter-options` lists the values.","nullable":true},"isDecisionMaker":{"type":"boolean","description":"True keeps only contacts marked as decision makers, and false keeps only the others.","nullable":true},"changedJobRecently":{"type":"boolean","description":"True keeps only contacts marked as having changed jobs recently, and false keeps only the others.","nullable":true},"yearsOfExperience":{"allOf":[{"$ref":"#/components/schemas/FloatRange"}],"description":"The contact's total years of work experience. Contacts with no value do not match a bound."},"yearsInCurrentRole":{"allOf":[{"$ref":"#/components/schemas/FloatRange"}],"description":"The contact's years in their current role. Contacts with no value do not match a bound."},"yearsInCurrentCompany":{"allOf":[{"$ref":"#/components/schemas/FloatRange"}],"description":"The contact's years at their current company. Contacts with no value do not match a bound."},"profileCountries":{"type":"array","items":{"type":"string"},"description":"Keeps contacts whose country is exactly one of these values.","nullable":true},"excludeProfileCountries":{"type":"array","items":{"type":"string"},"description":"Drops contacts whose country is exactly one of these values. Contacts with no country stay.","nullable":true},"profileState":{"type":"string","description":"Keeps contacts whose state or region contains this text, ignoring case.","nullable":true},"profileCity":{"type":"string","description":"Keeps contacts whose city contains this text, ignoring case.","nullable":true},"skillsContains":{"type":"string","description":"Keeps contacts whose skills contain this text, ignoring case.","nullable":true},"certificationsContains":{"type":"string","description":"Keeps contacts whose certifications contain this text, ignoring case.","nullable":true},"languages":{"type":"array","items":{"type":"string"},"description":"Keeps contacts whose languages contain any of these values, ignoring case, such as `French`.","nullable":true},"emailValidity":{"type":"array","items":{"type":"string"},"description":"Keeps contacts with at least one email address in any of these validity states. Use the values of\n`emailValidity` in `GET /v1/segments/filter-options`. Kenso refuses a value it does not recognize.","nullable":true},"emailProviders":{"type":"array","items":{"type":"string"},"description":"Keeps contacts with at least one email address found by any of these sources. Use the values of\n`emailProviders` in `GET /v1/segments/filter-options`. Kenso refuses a value it does not recognize.","nullable":true},"excludeEmailProviders":{"type":"array","items":{"type":"string"},"description":"Drops contacts with an email address found by any of these sources. Use the values of `emailProviders` in\n`GET /v1/segments/filter-options`. Kenso refuses a value it does not recognize.","nullable":true},"isPersonalEmail":{"type":"boolean","description":"True keeps contacts with at least one personal email address. False keeps contacts with at least one email\naddress that is not personal.","nullable":true},"hasLinkedInUrl":{"type":"boolean","description":"True keeps only contacts with a LinkedIn profile URL, and false keeps only contacts without one.","nullable":true},"hasPhone":{"type":"boolean","description":"True keeps only contacts with a phone number, and false keeps only contacts without one.","nullable":true},"hasValidPhone":{"type":"boolean","description":"True keeps only contacts with a phone number checked as valid, and false keeps only contacts without a valid\nphone number.","nullable":true},"companyNames":{"type":"array","items":{"type":"string"},"description":"Keeps contacts whose company name contains any of these values, ignoring case.","nullable":true},"excludeCompanyNames":{"type":"array","items":{"type":"string"},"description":"Drops contacts whose company name contains any of these values, ignoring case. Contacts with no company stay.","nullable":true},"companyDomainContains":{"type":"string","description":"Keeps contacts whose company domain contains this text, ignoring case.","nullable":true},"companyDescriptionContains":{"type":"string","description":"Keeps contacts whose company description contains this text, ignoring case.","nullable":true},"companySpecialitiesContains":{"type":"string","description":"Keeps contacts whose company specialities contain this text, ignoring case.","nullable":true},"industries":{"type":"array","items":{"type":"string"},"description":"Keeps contacts whose company industry is one of these values, ignoring case. `industries` in\n`GET /v1/segments/filter-options` lists common values.","nullable":true},"excludeIndustries":{"type":"array","items":{"type":"string"},"description":"Drops contacts whose company industry is one of these values, ignoring case. Contacts with no industry stay.","nullable":true},"companyHeadcount":{"allOf":[{"$ref":"#/components/schemas/IntRange"}],"description":"The company's number of employees. Contacts with no company do not match a bound."},"companyFollowers":{"allOf":[{"$ref":"#/components/schemas/IntRange"}],"description":"The company's number of followers. Contacts with no company do not match a bound."},"companyFoundedYear":{"allOf":[{"$ref":"#/components/schemas/IntRange"}],"description":"The year the company was founded, each bound from 0 to 32767. Contacts with no company do not match a bound."},"companyTypes":{"type":"array","items":{"type":"string"},"description":"Keeps contacts whose company type is exactly one of these values. `companyTypes` in\n`GET /v1/segments/filter-options` lists the values.","nullable":true},"lastFundingRounds":{"type":"array","items":{"type":"string"},"description":"Keeps contacts whose company's last funding round contains any of these values, ignoring case.\n`lastFundingRounds` in `GET /v1/segments/filter-options` lists the values.","nullable":true},"totalFunding":{"allOf":[{"$ref":"#/components/schemas/LongRange"}],"description":"The company's total funding. Contacts with no company do not match a bound."},"technologies":{"type":"array","items":{"type":"string"},"description":"Keeps contacts whose company uses any of these technologies. A value must match one whole entry of the\ncompany's technology list.","nullable":true},"excludeTechnologies":{"type":"array","items":{"type":"string"},"description":"Drops contacts whose company uses any of these technologies, matched the same way as `technologies`. Contacts\nwith no company or technology list stay.","nullable":true},"companyHqCountries":{"type":"array","items":{"type":"string"},"description":"Keeps contacts whose company headquarters country is exactly one of these values.","nullable":true},"excludeCompanyHqCountries":{"type":"array","items":{"type":"string"},"description":"Drops contacts whose company headquarters country is exactly one of these values. Contacts with no company or\nheadquarters country stay.","nullable":true},"companyHqState":{"type":"string","description":"Keeps contacts whose company headquarters state or region contains this text, ignoring case.","nullable":true},"companyHqCity":{"type":"string","description":"Keeps contacts whose company headquarters city contains this text, ignoring case.","nullable":true},"doNotContact":{"type":"boolean","description":"True keeps only contacts marked do not contact, and false keeps only the others.","nullable":true},"createdAt":{"allOf":[{"$ref":"#/components/schemas/DateRange"}],"description":"When the contact was added."},"totalClicks":{"allOf":[{"$ref":"#/components/schemas/IntRange"}],"description":"The number of email link clicks the contact made, summed across all campaigns. A contact with no clicks counts\nas 0."},"leadQualityScore":{"allOf":[{"$ref":"#/components/schemas/IntRange"}],"description":"The lead quality score Ken gave the contact in its campaign, each bound from 1 to 10. Contacts without a score\ndo not match."},"behaviorTags":{"type":"array","items":{"type":"string"},"description":"Keeps contacts that carry any of these behavior tags, such as `cold_responder` or\n`best_window:weekday_morning`. Needs the behavior signals feature. At most 50 tags, and tags tied to one email\naddress or company cannot be filtered on.","nullable":true},"behaviorTagsExclude":{"type":"array","items":{"type":"string"},"description":"Drops contacts that carry any of these behavior tags. Needs the behavior signals feature, with the same tag\nrules as `behaviorTags`.","nullable":true},"aiVariableFilters":{"type":"array","items":{"$ref":"#/components/schemas/AiVariableFilter"},"description":"Rules on the output of the campaign's AI prompts. A contact must match every rule. At most 50 rules. Kenso drops\na rule without a `promptId` or `operator`, or a `contains` or `not_contains` rule without a `value`, and\nreports no error.","nullable":true},"customVariableFilters":{"type":"array","items":{"$ref":"#/components/schemas/CustomVariableFilter"},"description":"Rules on the contact's campaign custom variables. A contact must match every rule. At most 50 rules. Kenso drops\na rule without a `variableKey` or `operator`, or a rule that needs a `value` and has none, and reports no error.","nullable":true}},"additionalProperties":false,"description":"The filters of a `manual` segment. A contact must match every filter you set, and any one value in a list filter\nis enough. A null or omitted field sets no filter. A list takes at most 500 values, and a text value at most 500\ncharacters.","example":{"titles":["VP of Engineering","Head of Engineering"],"seniorityLevels":["VP","Director"],"functions":["Engineering"],"profileCountries":["United States"],"industries":["Computer Software"],"companyHeadcount":{"min":50,"max":500}}},"CampaignSegmentFilterCriteriaSnapshot":{"type":"object","properties":{"fullNameContains":{"type":"string","description":"Text the contact's full name must contain, ignoring case. Null when the version has no such filter.","nullable":true},"fullNameNotContains":{"type":"string","description":"Text the contact's full name must not contain, ignoring case. Null when the version has no such filter.","nullable":true},"lastJobTitleContains":{"type":"string","description":"Text the contact's last job title must contain, ignoring case. Null when the version has no such filter.","nullable":true},"lastJobTitleNotContains":{"type":"string","description":"Text the contact's last job title must not contain, ignoring case. Null when the version has no such filter.","nullable":true},"summaryContains":{"type":"string","description":"The `summaryContains` filter. Null when the version has no such filter.","nullable":true},"profileStateContains":{"type":"string","description":"The `profileState` filter: text the contact's state or region must contain. Null when the version has no such\nfilter.","nullable":true},"profileCityContains":{"type":"string","description":"The `profileCity` filter: text the contact's city must contain. Null when the version has no such filter.","nullable":true},"skillsContains":{"type":"string","description":"The `skillsContains` filter. Null when the version has no such filter.","nullable":true},"certificationsContains":{"type":"string","description":"The `certificationsContains` filter. Null when the version has no such filter.","nullable":true},"titles":{"type":"string","description":"The `titles` filter, as a JSON-encoded array string. Null when the version has no such filter.","nullable":true},"excludeTitles":{"type":"string","description":"The `excludeTitles` filter, as a JSON-encoded array string. Null when the version has no such filter.","nullable":true},"headlines":{"type":"string","description":"The `headlines` filter, as a JSON-encoded array string. Null when the version has no such filter.","nullable":true},"excludeHeadlines":{"type":"string","description":"The `excludeHeadlines` filter, as a JSON-encoded array string. Null when the version has no such filter.","nullable":true},"seniorityLevels":{"type":"string","description":"The `seniorityLevels` filter, as a JSON-encoded array string. Null when the version has no such filter.","nullable":true},"excludeSeniorityLevels":{"type":"string","description":"The `excludeSeniorityLevels` filter, as a JSON-encoded array string. Null when the version has no such filter.","nullable":true},"functions":{"type":"string","description":"The `functions` filter, as a JSON-encoded array string. Null when the version has no such filter.","nullable":true},"excludeFunctions":{"type":"string","description":"The `excludeFunctions` filter, as a JSON-encoded array string. Null when the version has no such filter.","nullable":true},"employmentTypes":{"type":"string","description":"The `employmentTypes` filter, as a JSON-encoded array string. Null when the version has no such filter.","nullable":true},"profileCountries":{"type":"string","description":"The `profileCountries` filter, as a JSON-encoded array string. Null when the version has no such filter.","nullable":true},"excludeProfileCountries":{"type":"string","description":"The `excludeProfileCountries` filter, as a JSON-encoded array string. Null when the version has no such\nfilter.","nullable":true},"languages":{"type":"string","description":"The `languages` filter, as a JSON-encoded array string. Null when the version has no such filter.","nullable":true},"emailValidity":{"type":"string","description":"The `emailValidity` filter, as a JSON-encoded array string. Null when the version has no such filter.","nullable":true},"emailProviders":{"type":"string","description":"The `emailProviders` filter, as a JSON-encoded array string. Null when the version has no such filter.","nullable":true},"excludeEmailProviders":{"type":"string","description":"The `excludeEmailProviders` filter, as a JSON-encoded array string. Null when the version has no such filter.","nullable":true},"isDecisionMaker":{"type":"boolean","description":"The `isDecisionMaker` filter. Null when the version has no such filter.","nullable":true},"changedJobRecently":{"type":"boolean","description":"The `changedJobRecently` filter. Null when the version has no such filter.","nullable":true},"isPersonalEmail":{"type":"boolean","description":"The `isPersonalEmail` filter. Null when the version has no such filter.","nullable":true},"hasLinkedInUrl":{"type":"boolean","description":"The `hasLinkedInUrl` filter. Null when the version has no such filter.","nullable":true},"hasPhone":{"type":"boolean","description":"The `hasPhone` filter. Null when the version has no such filter.","nullable":true},"hasValidPhone":{"type":"boolean","description":"The `hasValidPhone` filter. Null when the version has no such filter.","nullable":true},"yearsOfExperienceMin":{"type":"number","description":"The lower bound of the `yearsOfExperience` filter. Null when the version has no such filter.","format":"float","nullable":true},"yearsOfExperienceMax":{"type":"number","description":"The upper bound of the `yearsOfExperience` filter. Null when the version has no such filter.","format":"float","nullable":true},"yearsInCurrentRoleMin":{"type":"number","description":"The lower bound of the `yearsInCurrentRole` filter. Null when the version has no such filter.","format":"float","nullable":true},"yearsInCurrentRoleMax":{"type":"number","description":"The upper bound of the `yearsInCurrentRole` filter. Null when the version has no such filter.","format":"float","nullable":true},"yearsInCurrentCompanyMin":{"type":"number","description":"The lower bound of the `yearsInCurrentCompany` filter. Null when the version has no such filter.","format":"float","nullable":true},"yearsInCurrentCompanyMax":{"type":"number","description":"The upper bound of the `yearsInCurrentCompany` filter. Null when the version has no such filter.","format":"float","nullable":true},"companyDomainContains":{"type":"string","description":"The `companyDomainContains` filter. Null when the version has no such filter.","nullable":true},"companyDescriptionContains":{"type":"string","description":"The `companyDescriptionContains` filter. Null when the version has no such filter.","nullable":true},"companySpecialitiesContains":{"type":"string","description":"The `companySpecialitiesContains` filter. Null when the version has no such filter.","nullable":true},"companyHqStateContains":{"type":"string","description":"The `companyHqState` filter: text the company headquarters state or region must contain. Null when the version\nhas no such filter.","nullable":true},"companyHqCityContains":{"type":"string","description":"The `companyHqCity` filter: text the company headquarters city must contain. Null when the version has no such\nfilter.","nullable":true},"companyNames":{"type":"string","description":"The `companyNames` filter, as a JSON-encoded array string. Null when the version has no such filter.","nullable":true},"excludeCompanyNames":{"type":"string","description":"The `excludeCompanyNames` filter, as a JSON-encoded array string. Null when the version has no such filter.","nullable":true},"industries":{"type":"string","description":"The `industries` filter, as a JSON-encoded array string. Null when the version has no such filter.","nullable":true},"excludeIndustries":{"type":"string","description":"The `excludeIndustries` filter, as a JSON-encoded array string. Null when the version has no such filter.","nullable":true},"companyTypes":{"type":"string","description":"The `companyTypes` filter, as a JSON-encoded array string. Null when the version has no such filter.","nullable":true},"lastFundingRounds":{"type":"string","description":"The `lastFundingRounds` filter, as a JSON-encoded array string. Null when the version has no such filter.","nullable":true},"technologies":{"type":"string","description":"The `technologies` filter, as a JSON-encoded array string. Null when the version has no such filter.","nullable":true},"excludeTechnologies":{"type":"string","description":"The `excludeTechnologies` filter, as a JSON-encoded array string. Null when the version has no such filter.","nullable":true},"companyHqCountries":{"type":"string","description":"The `companyHqCountries` filter, as a JSON-encoded array string. Null when the version has no such filter.","nullable":true},"excludeCompanyHqCountries":{"type":"string","description":"The `excludeCompanyHqCountries` filter, as a JSON-encoded array string. Null when the version has no such\nfilter.","nullable":true},"companyHeadcountMin":{"type":"integer","description":"The lower bound of the `companyHeadcount` filter. Null when the version has no such filter.","format":"int32","nullable":true},"companyHeadcountMax":{"type":"integer","description":"The upper bound of the `companyHeadcount` filter. Null when the version has no such filter.","format":"int32","nullable":true},"companyFollowersMin":{"type":"integer","description":"The lower bound of the `companyFollowers` filter. Null when the version has no such filter.","format":"int32","nullable":true},"companyFollowersMax":{"type":"integer","description":"The upper bound of the `companyFollowers` filter. Null when the version has no such filter.","format":"int32","nullable":true},"companyFoundedYearMin":{"type":"integer","description":"The lower bound of the `companyFoundedYear` filter. Null when the version has no such filter.","format":"int32","nullable":true},"companyFoundedYearMax":{"type":"integer","description":"The upper bound of the `companyFoundedYear` filter. Null when the version has no such filter.","format":"int32","nullable":true},"totalFundingMin":{"type":"integer","description":"The lower bound of the `totalFunding` filter. Null when the version has no such filter.","format":"int64","nullable":true},"totalFundingMax":{"type":"integer","description":"The upper bound of the `totalFunding` filter. Null when the version has no such filter.","format":"int64","nullable":true},"doNotContact":{"type":"boolean","description":"The `doNotContact` filter. Null when the version has no such filter.","nullable":true},"createdFrom":{"type":"string","description":"The start of the `createdAt` filter. Null when the version has no such filter.","format":"date-time","nullable":true},"createdTo":{"type":"string","description":"The end of the `createdAt` filter. Null when the version has no such filter.","format":"date-time","nullable":true},"totalClicksMin":{"type":"integer","description":"The lower bound of the `totalClicks` filter. Null when the version has no such filter.","format":"int32","nullable":true},"totalClicksMax":{"type":"integer","description":"The upper bound of the `totalClicks` filter. Null when the version has no such filter.","format":"int32","nullable":true},"leadQualityScoreMin":{"type":"integer","description":"The lower bound of the `leadQualityScore` filter. Null when the version has no such filter.","format":"int32","nullable":true},"leadQualityScoreMax":{"type":"integer","description":"The upper bound of the `leadQualityScore` filter. Null when the version has no such filter.","format":"int32","nullable":true},"behaviorTags":{"type":"array","items":{"type":"string"},"description":"The `behaviorTags` filter, as an array. Null when the version has no such filter.","nullable":true},"behaviorTagsExclude":{"type":"array","items":{"type":"string"},"description":"The `behaviorTagsExclude` filter, as an array. Null when the version has no such filter.","nullable":true},"aiVariableFiltersJson":{"type":"string","description":"The `aiVariableFilters` rules, as a JSON-encoded array string of objects with `promptId`, `operator` and\n`value`. Null when the version has no such filter.","nullable":true},"customVariableFiltersJson":{"type":"string","description":"The `customVariableFilters` rules, as a JSON-encoded array string of objects with `variableKey`, `operator`\nand `value`. Null when the version has no such filter.","nullable":true}},"additionalProperties":false,"description":"The segment's filters as a version saved them, one flat field per filter. List filters are JSON-encoded array\nstrings, such as `[\"CEO\",\"Founder\"]`, and each range filter is split into a lower and an upper bound."},"CreateSegmentRequest":{"required":["name"],"type":"object","properties":{"name":{"type":"string","description":"The segment's name. Required, and unique within the campaign."},"description":{"type":"string","description":"A free-text description. Omit it for none.","nullable":true},"segmentationType":{"type":"string","description":"`manual`, `ai` or `ab_test`. On an A/B test campaign the segment is always `ab_test`, and on any other\ncampaign `ab_test` is refused. Omit it to create a segment with no type, which cannot have filters.","nullable":true},"abTestPercentage":{"type":"integer","description":"The share of the campaign's contacts the segment takes, from 1 to 100. Required on an `ab_test` segment and\nrefused on any other type.","format":"int32","nullable":true},"sortOrder":{"type":"integer","description":"The segment's display position among the campaign's segments. Defaults to one more than the campaign's\nhighest.","format":"int32","nullable":true},"filterCriteria":{"allOf":[{"$ref":"#/components/schemas/CampaignSegmentFilterCriteria"}],"description":"The segment's filters. Only a `manual` segment can have them. Omit it for none."}},"additionalProperties":false,"example":{"name":"Engineering leaders","description":"VPs and heads of engineering at B2B SaaS companies with 50 to 500 employees.","segmentationType":"ai","sortOrder":1}},"CustomVariableFilter":{"type":"object","properties":{"variableKey":{"type":"string","description":"The custom variable to check, such as `deal_stage`, at most 500 characters. Kenso normalizes the key the same\nway as custom variable names, so `Deal Stage` checks `deal_stage`."},"operator":{"allOf":[{"$ref":"#/components/schemas/CustomVariableFilterOperator"}],"description":"How the rule matches, such as `equals`. Kenso also reads the PascalCase name (`Equals`)."},"value":{"type":"string","description":"The text to compare, at most 500 characters. Required for `contains`, `not_contains`, `equals` and\n`not_equals`. Kenso ignores it for `is_empty` and `is_not_empty`.","nullable":true}},"additionalProperties":false,"description":"A rule on one of the contact's campaign custom variables."},"CustomVariableFilterOperator":{"enum":["contains","not_contains","equals","not_equals","is_empty","is_not_empty"],"type":"string","description":"How a custom variable rule matches. `contains` and `not_contains` look for the value inside the variable, and\n`equals` and `not_equals` compare the whole variable with it, all ignoring case. `is_empty` keeps contacts without\nthe variable or with an empty one, and `is_not_empty` keeps the others. A contact without the variable never\nmatches `contains` or `equals`, and always matches `not_contains` and `not_equals`."},"DateRange":{"type":"object","properties":{"from":{"type":"string","description":"The earliest date and time that matches, in ISO 8601. Null or omitted sets no start.","format":"date-time","nullable":true},"to":{"type":"string","description":"The latest date and time that matches, in ISO 8601. Null or omitted sets no end.","format":"date-time","nullable":true}},"additionalProperties":false,"description":"A range of dates and times. Both ends are inclusive, and a null or omitted end leaves that side open. `from` cannot\nbe later than `to`."},"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`."},"FilterOptionItem":{"type":"object","properties":{"value":{"type":"string","description":"The value to send in the filter field."},"label":{"type":"string","description":"A label to show for the value."},"category":{"type":"string","description":"A group the option belongs to. Null when the option has no group.","nullable":true}},"additionalProperties":false,"description":"One value a segment filter field accepts, with a label to show."},"FloatRange":{"type":"object","properties":{"min":{"type":"number","description":"The lowest value that matches. Null or omitted sets no lower bound.","format":"float","nullable":true},"max":{"type":"number","description":"The highest value that matches. Null or omitted sets no upper bound.","format":"float","nullable":true}},"additionalProperties":false,"description":"A range of numbers that can have decimals. Both bounds are inclusive, and a null or omitted bound leaves that side\nopen. `min` cannot be greater than `max`."},"IntRange":{"type":"object","properties":{"min":{"type":"integer","description":"The lowest value that matches. Null or omitted sets no lower bound.","format":"int32","nullable":true},"max":{"type":"integer","description":"The highest value that matches. Null or omitted sets no upper bound.","format":"int32","nullable":true}},"additionalProperties":false,"description":"A range of whole numbers. Both bounds are inclusive, and a null or omitted bound leaves that side open. `min`\ncannot be greater than `max`."},"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."},"LongRange":{"type":"object","properties":{"min":{"type":"integer","description":"The lowest value that matches. Null or omitted sets no lower bound.","format":"int64","nullable":true},"max":{"type":"integer","description":"The highest value that matches. Null or omitted sets no upper bound.","format":"int64","nullable":true}},"additionalProperties":false,"description":"A range of whole numbers that can be large. Both bounds are inclusive, and a null or omitted bound leaves that\nside open. `min` cannot be greater than `max`."},"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."},"Pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"Send this value as `cursor` to get the next page. Omitted on the last page.","nullable":true},"hasMore":{"type":"boolean","description":"True when more items follow this page. Stop paging when it is false."},"total":{"type":"integer","description":"Deprecated: the same number as `totalCount`. Read `totalCount`.","format":"int32","nullable":true,"deprecated":true},"totalCount":{"type":"integer","description":"The number of items that match the list's filters, across all pages. Omitted when the list does not count them.","format":"int32","nullable":true},"isTotalCapped":{"type":"boolean","description":"True when `totalCount` stopped counting at its cap, so more items match than it says. Keep paging with\n`hasMore`. Omitted when `totalCount` is exact. Only `GET /v1/threads` with `q` caps its total.","nullable":true}},"additionalProperties":false,"description":"Where a list page ends and how to get the next page."},"ProviderTrack":{"type":"object","properties":{"track":{"type":"string","description":"The track: `google`, `microsoft` or `other`."},"leadCount":{"type":"integer","description":"The segment's contacts on this track that can still get an email. A contact whose provider is not known yet\ncounts under `google`.","format":"int32"},"sequenceSegmentId":{"type":"integer","description":"Id of the segment whose `/v1/segments/{segmentId}/email-sequence` holds this track's copy: the track's own\nwhen `hasOwnSequence` is true, else this segment.","format":"int64"},"hasOwnSequence":{"type":"boolean","description":"True when the track has its own sequence. False while it shares the segment's sequence."},"sameAs":{"type":"array","items":{"type":"string"},"description":"The other tracks that share this track's copy. Empty when the track has its own sequence."},"sendsPlainText":{"type":"boolean","description":"True when the track sends as plain text: `google`."}},"additionalProperties":false,"description":"One provider track of a segment."},"ProviderTracks":{"type":"object","properties":{"campaignId":{"type":"integer","description":"Id of the segment's campaign.","format":"int64"},"segmentId":{"type":"integer","description":"Id of the segment.","format":"int64"},"enabled":{"type":"boolean","description":"True when the campaign is on provider tracks. False means its sends go out as before."},"googleFollowUpsAsWritten":{"type":"boolean","description":"True when the Google track sends the steps after the first as written. The first step stays plain text."},"isPartial":{"type":"boolean","description":"True when the segment has more than 100,000 contacts: the counts then cover the first 100,000 by id."},"tracks":{"type":"array","items":{"$ref":"#/components/schemas/ProviderTrack"},"description":"The three tracks, in the order `google`, `microsoft`, `other`."}},"additionalProperties":false,"description":"A segment's provider tracks. A contact's track comes from the mail provider of the address Kenso emails:\n`google`, `microsoft` or `other` (everyone else). Recipients on Google get plain text; recipients on\nMicrosoft and everyone else get the email as written.","example":{"campaignId":4821,"segmentId":1207,"enabled":true,"googleFollowUpsAsWritten":false,"isPartial":false,"tracks":[{"track":"google","leadCount":312,"sequenceSegmentId":1219,"hasOwnSequence":true,"sameAs":[],"sendsPlainText":true},{"track":"microsoft","leadCount":241,"sequenceSegmentId":1207,"hasOwnSequence":false,"sameAs":["other"],"sendsPlainText":false},{"track":"other","leadCount":87,"sequenceSegmentId":1207,"hasOwnSequence":false,"sameAs":["microsoft"],"sendsPlainText":false}]}},"ProviderTracksResponse":{"type":"object","properties":{"success":{"type":"boolean","description":"Always true on a success."},"data":{"allOf":[{"$ref":"#/components/schemas/ProviderTracks"}],"description":"The result of the operation."}},"additionalProperties":false,"description":"The body of a successful operation that returns one result. The result is in `data`."},"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."},"RestoreSegmentVersionRequest":{"type":"object","properties":{"confirm":{"type":"boolean","description":"Set to true to restore even when the restore would clear AI output already generated for the campaign.\nWithout it, such a restore answers `409 conflict` with `error.impact`. Defaults to false."},"dryRun":{"type":"boolean","description":"Set to true to see what the restore would do without changing anything. Defaults to false."}},"additionalProperties":false,"description":"Options for restoring a segment version. The body is optional.","example":{"confirm":false,"dryRun":true}},"SaveSegmentVersionRequest":{"type":"object","properties":{"sourceVersionId":{"type":"integer","description":"The id of a saved version of this segment to start from. Fields you leave out take that version's values.\nOmit it to start from the live segment.","format":"int64","nullable":true},"name":{"type":"string","description":"A new name, unique within the campaign. Cannot be empty.","nullable":true},"description":{"type":"string","description":"A new description. Null clears it.","nullable":true},"segmentationType":{"type":"string","description":"`manual`, `ai` or `ab_test`. A segment with filters can change only to `manual`.","nullable":true},"abTestPercentage":{"type":"integer","description":"The share of the campaign's contacts an `ab_test` segment takes, from 1 to 100. Null clears it, which only a\nsegment of another type can do.","format":"int32","nullable":true},"sortOrder":{"type":"integer","description":"The segment's display position among the campaign's segments.","format":"int32","nullable":true},"filterCriteria":{"allOf":[{"$ref":"#/components/schemas/CampaignSegmentFilterCriteria"}],"description":"Replaces all of the segment's filters. An empty object clears them, and null leaves them as they are. Field\nnames match in any letter case."}},"additionalProperties":false,"description":"The segment fields to change before the version is saved, and the version to start from. Fields you leave out keep\ntheir current value, and a JSON null clears `description` or `abTestPercentage`.","example":{"name":"Engineering leaders","description":"VPs and heads of engineering at B2B SaaS companies with 50 to 500 employees.","segmentationType":"manual","sortOrder":1,"filterCriteria":{"titles":["VP of Engineering","Head of Engineering"],"seniorityLevels":["VP","Director"],"functions":["Engineering"],"profileCountries":["United States"],"industries":["Computer Software"],"companyHeadcount":{"min":50,"max":500}},"sourceVersionId":1880}},"Segment":{"type":"object","properties":{"id":{"type":"integer","description":"The segment's id.","format":"int64"},"campaignId":{"type":"integer","description":"The id of the campaign the segment belongs to.","format":"int64"},"name":{"type":"string","description":"The segment's name, unique within the campaign."},"description":{"type":"string","description":"A free-text description. Null when the segment has none.","nullable":true},"isDefault":{"type":"boolean","description":"True for the campaign's Default segment, which cannot be deleted or deactivated."},"isActive":{"type":"boolean","description":"True when the segment is on. Kenso does not send to contacts in an inactive segment."},"sortOrder":{"type":"integer","description":"The segment's display position among the campaign's segments. Null when it has none.","format":"int32","nullable":true},"segmentationType":{"type":"string","description":"How the segment gets its contacts: `manual` from its filters, `ai` from Ken, or `ab_test` as a percentage\nsplit. Null when the segment has no type.","nullable":true},"abTestPercentage":{"type":"integer","description":"The share of the campaign's contacts an `ab_test` segment takes, from 1 to 100. Null on other types.","format":"int32","nullable":true},"contactCount":{"type":"integer","description":"The number of contacts to show for the segment: `readyContactCount` for the Default segment, and\n`rawContactCount` for any other. Omitted when you list with `includeMetrics` set to false.","format":"int32","nullable":true},"rawContactCount":{"type":"integer","description":"All contacts in the segment, ready to send or not. The Default segment also counts the campaign's contacts\nthat have no segment. Omitted when you list with `includeMetrics` set to false.","format":"int32","nullable":true},"readyContactCount":{"type":"integer","description":"Contacts in the segment that are ready to send. Omitted when you list with `includeMetrics` set to false.","format":"int32","nullable":true},"filterCriteria":{"allOf":[{"$ref":"#/components/schemas/CampaignSegmentFilterCriteria"}],"description":"The segment's filters. Null when it has none."},"createdAt":{"type":"string","description":"When the segment was created, in UTC (ISO 8601).","format":"date-time"},"modifiedAt":{"type":"string","description":"When the segment last changed, in UTC (ISO 8601).","format":"date-time"}},"additionalProperties":false,"description":"A group of contacts inside a campaign, with its type, filters and contact counts.","example":{"id":1207,"campaignId":4821,"name":"Engineering leaders","description":"VPs and heads of engineering at B2B SaaS companies with 50 to 500 employees.","isDefault":false,"isActive":true,"sortOrder":1,"segmentationType":"ai","contactCount":640,"rawContactCount":712,"readyContactCount":598,"createdAt":"2026-09-23T15:02:11Z","modifiedAt":"2026-10-14T09:41:27Z"}},"SegmentFilterMetadata":{"type":"object","properties":{"seniorityLevels":{"type":"array","items":{"$ref":"#/components/schemas/FilterOptionItem"},"description":"Options for `seniorityLevels` and `excludeSeniorityLevels`."},"functions":{"type":"array","items":{"$ref":"#/components/schemas/FilterOptionItem"},"description":"Options for `functions` and `excludeFunctions`."},"industries":{"type":"array","items":{"$ref":"#/components/schemas/FilterOptionItem"},"description":"Common options for `industries` and `excludeIndustries`. Those filters also accept other industries."},"companyTypes":{"type":"array","items":{"$ref":"#/components/schemas/FilterOptionItem"},"description":"Options for `companyTypes`."},"employmentTypes":{"type":"array","items":{"$ref":"#/components/schemas/FilterOptionItem"},"description":"Options for `employmentTypes`."},"lastFundingRounds":{"type":"array","items":{"$ref":"#/components/schemas/FilterOptionItem"},"description":"Options for `lastFundingRounds`."},"technologies":{"type":"array","items":{"$ref":"#/components/schemas/FilterOptionItem"},"description":"Options for `technologies` and `excludeTechnologies`. Empty: those filters take any technology name."},"emailValidity":{"type":"array","items":{"$ref":"#/components/schemas/FilterOptionItem"},"description":"Options for `emailValidity`, the verification result of an email address."},"emailProviders":{"type":"array","items":{"$ref":"#/components/schemas/FilterOptionItem"},"description":"Options for `emailProviders` and `excludeEmailProviders`, the source that found an email address."},"languages":{"type":"array","items":{"$ref":"#/components/schemas/FilterOptionItem"},"description":"Common options for `languages`. The filter also accepts other languages."}},"additionalProperties":false,"description":"The values to offer for the list filters of a segment. Each list holds the options for the filter field of the\nsame name.","example":{"seniorityLevels":[{"value":"Director","label":"Director"},{"value":"VP","label":"VP"},{"value":"CLevel","label":"C-Level"}],"functions":[{"value":"Engineering","label":"Engineering"},{"value":"Product Management","label":"Product Management"},{"value":"Sales","label":"Sales"}],"industries":[{"value":"Computer Software","label":"Computer Software"},{"value":"Financial Services","label":"Financial Services"},{"value":"Internet","label":"Internet"}],"companyTypes":[{"value":"Privately Held","label":"Privately Held"},{"value":"Public Company","label":"Public Company"}],"employmentTypes":[{"value":"Full-time","label":"Full-time"},{"value":"Contract","label":"Contract"}],"lastFundingRounds":[{"value":"Seed","label":"Seed"},{"value":"Series A","label":"Series A"},{"value":"Series B","label":"Series B"}],"technologies":[],"emailValidity":[{"value":"Safe","label":"Valid (Safe)"},{"value":"Verified","label":"Verified"},{"value":"CatchAll","label":"Catch-All"}],"emailProviders":[{"value":"Prospeo","label":"Prospeo"},{"value":"KenFinder","label":"Found by Kenso"}],"languages":[{"value":"English","label":"English"},{"value":"Spanish","label":"Spanish"},{"value":"German","label":"German"}]}},"SegmentFilterMetadataResponse":{"type":"object","properties":{"success":{"type":"boolean","description":"Always true on a success."},"data":{"allOf":[{"$ref":"#/components/schemas/SegmentFilterMetadata"}],"description":"The result of the operation."}},"additionalProperties":false,"description":"The body of a successful operation that returns one result. The result is in `data`."},"SegmentListResponse":{"type":"object","properties":{"success":{"type":"boolean","description":"Always true on a success."},"data":{"type":"array","items":{"$ref":"#/components/schemas/Segment"},"description":"The items on this page."},"pagination":{"allOf":[{"$ref":"#/components/schemas/Pagination"}],"description":"Where this page ends and how to get the next one."}},"additionalProperties":false,"description":"The body of a successful list operation: one page of results in `data`, and `pagination` to get the next\npage."},"SegmentPreview":{"type":"object","properties":{"matchingCount":{"type":"integer","description":"The number of contacts that match the filter. 0 when you sent no body.","format":"int32"},"totalCampaignContacts":{"type":"integer","description":"The number of contacts the preview looked at: contacts with no segment, contacts in the Default segment, and\nthe contacts of `segmentId` when you passed it. Contacts on the do-not-contact list count only when the filter\nsets `doNotContact` to true. 0 when you sent no body.","format":"int32"},"sampleContacts":{"type":"array","items":{"$ref":"#/components/schemas/SegmentPreviewContact"},"description":"Up to 10 matching contacts, newest first. Empty when you sent no body."},"filterOptions":{"allOf":[{"$ref":"#/components/schemas/SegmentFilterMetadata"}],"description":"The values to offer for the list filters, the same as `GET /v1/segments/filter-options` returns."}},"additionalProperties":false,"description":"The result of a segment filter preview: how many contacts match, a sample of them, and the filter options.","example":{"matchingCount":640,"totalCampaignContacts":1840,"sampleContacts":[{"id":90125,"fullName":"Amanda Chen","title":"VP of Engineering","companyName":"Northwind Labs","location":"Austin, Texas, United States","email":"amanda.chen@northwind.example.com","emailValidity":"safe"}],"filterOptions":{"seniorityLevels":[{"value":"Director","label":"Director"},{"value":"VP","label":"VP"},{"value":"CLevel","label":"C-Level"}],"functions":[{"value":"Engineering","label":"Engineering"},{"value":"Product Management","label":"Product Management"},{"value":"Sales","label":"Sales"}],"industries":[{"value":"Computer Software","label":"Computer Software"},{"value":"Financial Services","label":"Financial Services"},{"value":"Internet","label":"Internet"}],"companyTypes":[{"value":"Privately Held","label":"Privately Held"},{"value":"Public Company","label":"Public Company"}],"employmentTypes":[{"value":"Full-time","label":"Full-time"},{"value":"Contract","label":"Contract"}],"lastFundingRounds":[{"value":"Seed","label":"Seed"},{"value":"Series A","label":"Series A"},{"value":"Series B","label":"Series B"}],"technologies":[],"emailValidity":[{"value":"Safe","label":"Valid (Safe)"},{"value":"Verified","label":"Verified"},{"value":"CatchAll","label":"Catch-All"}],"emailProviders":[{"value":"Prospeo","label":"Prospeo"},{"value":"KenFinder","label":"Found by Kenso"}],"languages":[{"value":"English","label":"English"},{"value":"Spanish","label":"Spanish"},{"value":"German","label":"German"}]}}},"SegmentPreviewContact":{"type":"object","properties":{"id":{"type":"integer","description":"The contact's id.","format":"int64"},"fullName":{"type":"string","description":"The contact's full name. Null when unknown.","nullable":true},"title":{"type":"string","description":"The contact's job title. Null when unknown.","nullable":true},"companyName":{"type":"string","description":"The name of the contact's company. Null when unknown.","nullable":true},"location":{"type":"string","description":"The contact's location as free text. Null when unknown.","nullable":true},"email":{"type":"string","description":"One of the contact's email addresses. Null when the contact has none.","nullable":true},"emailValidity":{"type":"string","description":"The verification result for `email`: `safe`, `verified`, `catch_all`, `risky`, `invalid` or `unknown`. Null\nwhen the contact has no email address.","nullable":true}},"additionalProperties":false,"description":"A contact that matches a previewed segment filter."},"SegmentPreviewResponse":{"type":"object","properties":{"success":{"type":"boolean","description":"Always true on a success."},"data":{"allOf":[{"$ref":"#/components/schemas/SegmentPreview"}],"description":"The result of the operation."}},"additionalProperties":false,"description":"The body of a successful operation that returns one result. The result is in `data`."},"SegmentResponse":{"type":"object","properties":{"success":{"type":"boolean","description":"Always true on a success."},"data":{"allOf":[{"$ref":"#/components/schemas/Segment"}],"description":"The result of the operation."}},"additionalProperties":false,"description":"The body of a successful operation that returns one result. The result is in `data`."},"SegmentRestore":{"type":"object","properties":{"dryRun":{"type":"boolean","description":"True when this was a dry run and nothing changed."},"newVersionNumber":{"type":"integer","description":"The number of the new segment version that records the restore. Null on a dry run, or when Kenso could not\nrecord the version.","format":"int32","nullable":true},"versionWarning":{"type":"string","description":"Set when the restore was applied but Kenso could not record the segment's new version, or when a part in\n`children` has a `versionWarning`. Null otherwise.","nullable":true},"version":{"allOf":[{"$ref":"#/components/schemas/SegmentVersion"}],"description":"The version a dry run would restore. Null on an applied restore."},"snapshot":{"allOf":[{"$ref":"#/components/schemas/SegmentSnapshot"}],"description":"The segment's settings and filters in the version a dry run would restore. Null on an applied restore."},"children":{"type":"array","items":{"$ref":"#/components/schemas/SegmentVersionChild"},"description":"What happened, or would happen, to the segment's email sequence, AI prompts and LinkedIn sequence."}},"additionalProperties":false,"description":"The result of a segment restore, or of a dry run that shows what a restore would do.","example":{"dryRun":true,"version":{"id":1884,"versionNumber":4,"createdAt":"2026-10-14T09:41:27Z","createdByUserId":1093,"createdByEmail":"jordan.patel@northwind-outbound.example.com","isRevert":false},"snapshot":{"schemaVersion":1,"segment":{"name":"Engineering leaders","description":"VPs and heads of engineering at B2B SaaS companies with 50 to 500 employees.","isActive":true,"sortOrder":1,"segmentationType":"manual","status":"done"},"filterCriteria":{"titles":"[\"VP of Engineering\",\"Head of Engineering\"]","seniorityLevels":"[\"VP\",\"Director\"]","companyHeadcountMin":50,"companyHeadcountMax":500}},"children":[{"kind":"email_sequence","parentId":2210,"status":"reverted","versionId":3302,"versionNumber":6,"createdAt":"2026-10-14T09:41:27Z"}]}},"SegmentRestoreResponse":{"type":"object","properties":{"success":{"type":"boolean","description":"Always true on a success."},"data":{"allOf":[{"$ref":"#/components/schemas/SegmentRestore"}],"description":"The result of the operation."}},"additionalProperties":false,"description":"The body of a successful operation that returns one result. The result is in `data`."},"SegmentSnapshot":{"type":"object","properties":{"schemaVersion":{"type":"integer","description":"The format version of the snapshot. Kenso raises it when the snapshot's layout changes.","format":"int32"},"segment":{"allOf":[{"$ref":"#/components/schemas/SegmentSnapshotHeader"}],"description":"The segment's settings."},"filterCriteria":{"allOf":[{"$ref":"#/components/schemas/CampaignSegmentFilterCriteriaSnapshot"}],"description":"The segment's filters. Null when the segment had none."}},"additionalProperties":false,"description":"A copy of a segment's settings and filters as they were when a version was saved."},"SegmentSnapshotHeader":{"type":"object","properties":{"name":{"type":"string","description":"The segment's name."},"description":{"type":"string","description":"The segment's description. Null when it had none.","nullable":true},"isActive":{"type":"boolean","description":"True when the segment was on."},"sortOrder":{"type":"integer","description":"The segment's display position among the campaign's segments. Null when it had none.","format":"int32","nullable":true},"segmentationType":{"type":"string","description":"`manual`, `ai` or `ab_test`. Null when the segment had no type.","nullable":true},"abTestPercentage":{"type":"integer","description":"The share of the campaign's contacts an `ab_test` segment took, from 1 to 100. Null on other types.","format":"int32","nullable":true},"status":{"type":"string","description":"The segment's processing status: `draft`, `to_scrape`, `in_progress`, `scraped`, `done` or `error`."}},"additionalProperties":false,"description":"A segment's settings as they were when a version was saved."},"SegmentVersion":{"type":"object","properties":{"id":{"type":"integer","description":"The version's id.","format":"int64"},"versionNumber":{"type":"integer","description":"The version's number. Each new version of the segment gets the next number.","format":"int32"},"createdAt":{"type":"string","description":"When the version was saved, in UTC (ISO 8601).","format":"date-time"},"createdByUserId":{"type":"integer","description":"The id of the member who saved the version. Null when unknown.","format":"int64","nullable":true},"createdByEmail":{"type":"string","description":"The email address of the member who saved the version. Null when unknown.","nullable":true},"isRevert":{"type":"boolean","description":"True when a restore created this version."},"revertedFromVersionId":{"type":"integer","description":"The id of the version that was restored. Null unless `isRevert` is true.","format":"int64","nullable":true},"revertedFromVersionNumber":{"type":"integer","description":"The number of the version that was restored. Null unless `isRevert` is true.","format":"int32","nullable":true},"revertedFromCreatedAt":{"type":"string","description":"When the restored version was saved, in UTC (ISO 8601). Null unless `isRevert` is true.","format":"date-time","nullable":true}},"additionalProperties":false,"description":"A saved version of a segment, without its content.","example":{"id":1884,"versionNumber":4,"createdAt":"2026-10-14T09:41:27Z","createdByUserId":1093,"createdByEmail":"jordan.patel@northwind-outbound.example.com","isRevert":false}},"SegmentVersionChild":{"type":"object","properties":{"kind":{"type":"string","description":"The part of the segment: `email_sequence`, `prompt_bundle` (the AI prompts) or `linked_in_sequence`."},"parentId":{"type":"integer","description":"The email sequence's id for `email_sequence`, and the segment's id for the other kinds.","format":"int64"},"status":{"type":"string","description":"The outcome. `reverted` means the part is, or would be, restored. The other values leave the part as it is:\n`no_baseline_yet` (the part has no saved versions), `evicted_by_retention` (the version it had then was\nremoved because Kenso keeps a limited number of versions), `child_newer_than_target` (every saved version of\nthe part is newer than the target), `skipped_empty_snapshot` (that version has no steps while the live part\nhas some), `skipped_invalid_anchor` (a LinkedIn step is timed from an email step the restored email sequence\ndoes not have), `skipped_engagement_not_enabled` and `skipped_voice_notes_not_enabled` (that version has\nLinkedIn engagement or voice note steps while the feature is off for the workspace)."},"versionId":{"type":"integer","description":"The id of the part's version the restore would use. Set on a dry run only. Null when there is none.","format":"int64","nullable":true},"versionNumber":{"type":"integer","description":"The number of the part's version the restore would use. Set on a dry run only. Null when there is none.","format":"int32","nullable":true},"createdAt":{"type":"string","description":"When the part's version the restore would use was saved, in UTC (ISO 8601). Set on a dry run only. Null when\nthere is none.","format":"date-time","nullable":true},"newVersionNumber":{"type":"integer","description":"The number of the new version the restore added to the part. Set on an applied restore that restored the part.\nNull otherwise.","format":"int32","nullable":true},"versionWarning":{"type":"string","description":"Why the part was skipped, or a note that the part was restored but Kenso could not record its new version.\nNull when there is nothing to report.","nullable":true},"snapshot":{"description":"On a dry run, the content of the part's version: its email steps, AI prompts or LinkedIn steps, depending on\n`kind`. Absent on an applied restore."}},"additionalProperties":false,"description":"What a segment restore did, or would do, to one part of the segment: its email sequence, its AI prompts or its\nLinkedIn sequence."},"SegmentVersionDetail":{"type":"object","properties":{"id":{"type":"integer","description":"The version's id.","format":"int64"},"versionNumber":{"type":"integer","description":"The version's number. Each new version of the segment gets the next number.","format":"int32"},"createdAt":{"type":"string","description":"When the version was saved, in UTC (ISO 8601).","format":"date-time"},"createdByUserId":{"type":"integer","description":"The id of the member who saved the version. Null when unknown.","format":"int64","nullable":true},"createdByEmail":{"type":"string","description":"The email address of the member who saved the version. Null when unknown.","nullable":true},"isRevert":{"type":"boolean","description":"True when a restore created this version."},"revertedFromVersionId":{"type":"integer","description":"The id of the version that was restored. Null unless `isRevert` is true.","format":"int64","nullable":true},"revertedFromVersionNumber":{"type":"integer","description":"The number of the version that was restored. Null unless `isRevert` is true.","format":"int32","nullable":true},"revertedFromCreatedAt":{"type":"string","description":"When the restored version was saved, in UTC (ISO 8601). Null unless `isRevert` is true.","format":"date-time","nullable":true},"snapshot":{"allOf":[{"$ref":"#/components/schemas/SegmentSnapshot"}],"description":"The segment's settings and filters as they were saved."}},"additionalProperties":false,"description":"A saved version of a segment, with a copy of the segment's settings and filters as they were saved.","example":{"id":1884,"versionNumber":4,"createdAt":"2026-10-14T09:41:27Z","createdByUserId":1093,"createdByEmail":"jordan.patel@northwind-outbound.example.com","isRevert":false,"snapshot":{"schemaVersion":1,"segment":{"name":"Engineering leaders","description":"VPs and heads of engineering at B2B SaaS companies with 50 to 500 employees.","isActive":true,"sortOrder":1,"segmentationType":"manual","status":"done"},"filterCriteria":{"titles":"[\"VP of Engineering\",\"Head of Engineering\"]","seniorityLevels":"[\"VP\",\"Director\"]","companyHeadcountMin":50,"companyHeadcountMax":500}}}},"SegmentVersionDetailResponse":{"type":"object","properties":{"success":{"type":"boolean","description":"Always true on a success."},"data":{"allOf":[{"$ref":"#/components/schemas/SegmentVersionDetail"}],"description":"The result of the operation."}},"additionalProperties":false,"description":"The body of a successful operation that returns one result. The result is in `data`."},"SegmentVersionListResponse":{"type":"object","properties":{"success":{"type":"boolean","description":"Always true on a success."},"data":{"type":"array","items":{"$ref":"#/components/schemas/SegmentVersion"},"description":"The items on this page."},"pagination":{"allOf":[{"$ref":"#/components/schemas/Pagination"}],"description":"Where this page ends and how to get the next one."}},"additionalProperties":false,"description":"The body of a successful list operation: one page of results in `data`, and `pagination` to get the next\npage."},"SegmentVersionSave":{"type":"object","properties":{"segment":{"allOf":[{"$ref":"#/components/schemas/Segment"}],"description":"The segment after the save, in the same shape as `GET /v1/segments/{segmentId}` returns."},"version":{"allOf":[{"$ref":"#/components/schemas/SegmentVersion"}],"description":"The new version. Null when the segment was saved but Kenso could not record the version."},"versionWarning":{"type":"string","description":"Says why `version` is null. Null when the version was recorded.","nullable":true}},"additionalProperties":false,"description":"The result of saving a segment version: the segment as saved and the new version.","example":{"segment":{"id":1207,"campaignId":4821,"name":"Engineering leaders","description":"VPs and heads of engineering at B2B SaaS companies with 50 to 500 employees.","isDefault":false,"isActive":true,"sortOrder":1,"segmentationType":"ai","contactCount":640,"rawContactCount":712,"readyContactCount":598,"createdAt":"2026-09-23T15:02:11Z","modifiedAt":"2026-10-14T09:41:27Z"},"version":{"id":1884,"versionNumber":4,"createdAt":"2026-10-14T09:41:27Z","createdByUserId":1093,"createdByEmail":"jordan.patel@northwind-outbound.example.com","isRevert":false}}},"SegmentVersionSaveResponse":{"type":"object","properties":{"success":{"type":"boolean","description":"Always true on a success."},"data":{"allOf":[{"$ref":"#/components/schemas/SegmentVersionSave"}],"description":"The result of the operation."}},"additionalProperties":false,"description":"The body of a successful operation that returns one result. The result is in `data`."},"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."},"SetProviderTrackRequest":{"type":"object","properties":{"sequence":{"type":"string","description":"`own` gives the track its own copy of the segment's sequence; `shared` drops that copy.","nullable":true}},"additionalProperties":false,"description":"Body of PUT /v1/segments/{segmentId}/provider-tracks/{track}.","example":{"sequence":"own"}},"StringFilter":{"type":"object","properties":{"contains":{"type":"string","description":"Keeps contacts whose field contains this text. At most 500 characters. Null or omitted skips it.","nullable":true},"notContains":{"type":"string","description":"Drops contacts whose field contains this text. At most 500 characters. Null or omitted skips it.","nullable":true}},"additionalProperties":false,"description":"A text match on one contact field, ignoring case. A contact without a value in the field never matches `contains`\nand always passes `notContains`."},"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."},"UpdateSegmentRequest":{"type":"object","properties":{"name":{"type":"string","description":"A new name, unique within the campaign. Cannot be empty.","nullable":true},"description":{"type":"string","description":"A new description. Null clears it.","nullable":true},"segmentationType":{"type":"string","description":"`manual`, `ai` or `ab_test`. A segment with filters can change only to `manual`.","nullable":true},"abTestPercentage":{"type":"integer","description":"The share of the campaign's contacts an `ab_test` segment takes, from 1 to 100. Null clears it, which only a\nsegment of another type can do.","format":"int32","nullable":true},"sortOrder":{"type":"integer","description":"The segment's display position among the campaign's segments.","format":"int32","nullable":true},"filterCriteria":{"allOf":[{"$ref":"#/components/schemas/CampaignSegmentFilterCriteria"}],"description":"Replaces all of the segment's filters. An empty object clears them, and null leaves them as they are. Field\nnames match in any letter case."}},"additionalProperties":false,"description":"The segment fields to change. Fields you leave out stay as they are, and a JSON null clears `description` or\n`abTestPercentage`.","example":{"name":"Engineering leaders","description":"VPs and heads of engineering at B2B SaaS companies with 50 to 500 employees.","segmentationType":"manual","sortOrder":1,"filterCriteria":{"titles":["VP of Engineering","Head of Engineering"],"seniorityLevels":["VP","Director"],"functions":["Engineering"],"profileCountries":["United States"],"industries":["Computer Software"],"companyHeadcount":{"min":50,"max":500}}}}}}}