Bring a soft-deleted segment back with its members (find it via GET /segments?deleted=true). An integration sync it had does not come back with it. Refused (E1046) while its conditions use deleted attributes — restore those first. Idempotent on a segment that is not deleted.
all = the built-in everyone segment (one per bizType; immutable, cannot be deleted); condition = membership computed from conditions; manual = explicit member list.
Present on condition segments (decompiled to stable attribute codes). Top-level siblings are ANDed; an OR lives inside a match:"any" group — same rules as writes.
Members in the requested environment — only on GET one segment with expand=memberCount (+ environmentId); the list endpoint never returns it. manual = explicit members; condition = users/companies matching the conditions right now; all = everyone in the environment. Counted with the SAME filter the users/companies list applies for segmentId, so the two always agree.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Usertour documention","colors":{"primary":"#0D9373","light":"#07C983","dark":"#0D9373"},"logo":{"light":"https://mintcdn.com/usertour/fGy2waOqk2YYQ2QK/logo-dark.svg?fit=max\u0026auto=format\u0026n=fGy2waOqk2YYQ2QK\u0026q=85\u0026s=841070ff620cff55401ec69cfc514e27","dark":"https://mintcdn.com/usertour/fGy2waOqk2YYQ2QK/logo-light.svg?fit=max\u0026auto=format\u0026n=fGy2waOqk2YYQ2QK\u0026q=85\u0026s=28f06f1ac3d117bd77837574e801ed7b","href":"https://www.usertour.io/"},"favicon":"https://mintcdn.com/usertour/nYBy6MD0LzNhBLol/images/favicon.png?fit=max\u0026auto=format\u0026n=nYBy6MD0LzNhBLol\u0026q=85\u0026s=2d933e312d87107d569af0615a00225b","api":{"playground":{"display":"simple"}},"navbar":{"links":[{"href":"mailto:support@usertour.io","label":"Support"}]},"footer":{"socials":{"x":"https://x.com/usertourio","github":"https://github.com/usertour/usertour","discord":"https://discord.gg/WPVJPX8fJh"}},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"usertour","hasAudioNarration":false,"actualSubdomain":"usertour","customDomains":["docs.usertour.io"],"gitSource":{"type":"github","owner":"usertour","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"entitlements":{},"buildId":"6ae457b0f07304f334661ff9","clientVersion":"0.0.4094","searchFilterCounts":[{"language":"default","tag":"API Reference","count":92},{"language":"default","tag":"Endpoints","count":79},{"language":"default","tag":"Documentation","count":48},{"language":"default","tag":"API Reference (v1)","count":37},{"language":"default","tag":"Usertour.js Reference","count":31},{"language":"default","tag":"How-to Guides","count":30},{"language":"default","tag":"Self-Hosting","count":20},{"language":"default","tag":"Content","count":15},{"language":"default","tag":"Users","count":14},{"language":"default","tag":"Companies","count":13}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"comment-mode","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"api-reference/segments/restore-a-deleted-segment","slug":"/api-reference/segments/restore-a-deleted-segment","pageMetadata":{"title":"Restore a deleted segment","description":"Bring a soft-deleted segment back with its members (find it via GET /segments?deleted=true). An integration sync it had does not come back with it. Refused (E1046) while its conditions use deleted attributes — restore those first. Idempotent on a segment that is not deleted.","deprecated":null,"version":null,"openapi":"/api-reference-v2/openapi.json post /v2/projects/{projectId}/segments/{id}/restore","href":"/api-reference/segments/restore-a-deleted-segment","autogeneratedByOpenApi":true},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Bring a soft-deleted segment back with its members (find it via GET /segments?deleted=true). An integration sync it had does not come back with it. Refused (E1046) while its conditions use deleted attributes — restore those first. Idempotent on a segment that is not deleted.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Restore a deleted segment","description":"Bring a soft-deleted segment back with its members (find it via GET /segments?deleted=true). An integration sync it had does not come back with it. Refused (E1046) while its conditions use deleted attributes — restore those first. Idempotent on a segment that is not deleted.","deprecated":null,"version":null,"openapi":"/api-reference-v2/openapi.json post /v2/projects/{projectId}/segments/{id}/restore","href":"/api-reference/segments/restore-a-deleted-segment","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"operationId":"ApiSegmentsController_restore","summary":"Restore a deleted segment","description":"Bring a soft-deleted segment back with its members (find it via GET /segments?deleted=true). An integration sync it had does not come back with it. Refused (E1046) while its conditions use deleted attributes — restore those first. Idempotent on a segment that is not deleted.","parameters":["a3ccd378-3cd3-43fc-92d1-6cdb93bc3b8a","5cb6c4da-ad92-485f-a7f7-4941918e3936"],"responses":{"200":"5f975883-5ed2-4c8c-8122-b84e71762b6f","400":"701d515f-df54-48de-9549-f2b70f883722","401":"5fed99dd-bcc2-4bfb-bf8a-74e71ef3a2be","403":"347f4ab1-cb73-4c2c-8f61-976be2cc46a4","404":"1a97868e-b89f-4030-af04-673617237fa3","409":"81b6790a-067a-4184-b707-2a8c71c364a3","429":"863445ca-5b8e-45f1-bb41-e3a584561f29"},"tags":["Segments"],"security":["99726c51-d38f-4e58-be47-a8c5adb857ea"],"method":"post","type":"path","servers":["ae7053da-bd87-4bef-9f34-b1cef7f5e8a1"],"path":"/v2/projects/{projectId}/segments/{id}/restore","baseUrlOptions":["https://api.usertour.io"],"title":"Restore a deleted segment","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{"a3ccd378-3cd3-43fc-92d1-6cdb93bc3b8a":{"name":"projectId","required":true,"in":"path","description":"Project ID","schema":{"type":"string","isRequired":true,"description":"Project ID","uniqueKey":"","typeLabel":"string"}},"5cb6c4da-ad92-485f-a7f7-4941918e3936":{"name":"id","required":true,"in":"path","description":"Segment ID","schema":{"type":"string","isRequired":true,"description":"Segment ID","uniqueKey":"","typeLabel":"string"}}},"responses":{"5f975883-5ed2-4c8c-8122-b84e71762b6f":{"description":"Restored segment","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","isRequired":true,"uniqueKey":"id","typeLabel":"string"},"object":{"type":"string","enum":["segment"],"isRequired":true,"uniqueKey":"object","typeLabel":"enum\u003cstring>"},"name":{"type":"string","isRequired":true,"uniqueKey":"name","typeLabel":"string"},"bizType":{"type":"string","enum":["user","company"],"isRequired":true,"uniqueKey":"bizType","typeLabel":"enum\u003cstring>"},"kind":{"type":"string","enum":["all","condition","manual"],"description":"`all` = the built-in everyone segment (one per bizType; immutable, cannot be deleted); `condition` = membership computed from `conditions`; `manual` = explicit member list.","isRequired":true,"uniqueKey":"kind","typeLabel":"enum\u003cstring>"},"createdAt":{"type":"string","format":"date-time","isRequired":true,"uniqueKey":"createdAt","typeLabel":"string\u003cdate-time>"},"updatedAt":{"type":"string","format":"date-time","isRequired":true,"uniqueKey":"updatedAt","typeLabel":"string\u003cdate-time>"},"conditions":{"description":"Present on condition segments (decompiled to stable attribute codes). Top-level siblings are ANDed; an OR lives inside a match:\"any\" group — same rules as writes.","type":"array","items":{"oneOf":[{"type":"object","required":["type","match","conditions"],"properties":{"type":{"type":"string","enum":["group"],"isRequired":true,"uniqueKey":"conditions.items.[INDEX].oneOf.0.type","typeLabel":"enum\u003cstring>"},"match":{"type":"string","enum":["all","any"],"isRequired":true,"uniqueKey":"conditions.items.[INDEX].oneOf.0.match","typeLabel":"enum\u003cstring>"},"conditions":{"minItems":1,"type":"array","items":{"$circularRef":"3ce53ad3-8f16-43a5-ac28-01ad4bc5b529"},"description":"The grouped conditions — at least one. An EMPTY group is not \"no filter\": it never matches, so next to an AND it makes the whole rule unmatchable, and writing one is rejected. A version saved with an empty group in the BUILDER still reads back with it (validate warns); writing that list back is refused until the group is filled or dropped.","isRequired":true,"uniqueKey":"conditions.items.[INDEX].oneOf.0.conditions","typeLabel":"array"}},"uniqueKey":"conditions.items.[INDEX].oneOf.0","typeLabel":"object"},{"type":"object","required":["type","scope","attribute","op"],"properties":{"type":{"type":"string","enum":["attribute"],"isRequired":true,"uniqueKey":"conditions.items.[INDEX].oneOf.1.type","typeLabel":"enum\u003cstring>"},"scope":{"type":"string","enum":["user","company","companyMembership"],"description":"Which entity owns the attribute — `user` (the end user), `company`, or `companyMembership`. Same value as the attribute definition's `scope` (see the attribute definitions list); required to disambiguate a codeName that exists in more than one scope.","isRequired":true,"uniqueKey":"conditions.items.[INDEX].oneOf.1.scope","typeLabel":"enum\u003cstring>"},"attribute":{"type":"string","isRequired":true,"uniqueKey":"conditions.items.[INDEX].oneOf.1.attribute","typeLabel":"string"},"op":{"type":"string","enum":["is","not","contains","not_contains","starts_with","ends_with","any","empty","lt","lte","gt","gte","between","true","false","includes_any","includes_all","not_includes_any","not_includes_all","less_than","exactly","more_than","before","on","after"],"description":"Operator — the allowed set depends on the attribute dataType. String: is | not | contains | not_contains | starts_with | ends_with | any | empty. Number: is | not | lt | lte | gt | gte | between | any | empty. Boolean: true | false | any | empty. List: includes_any | includes_all | not_includes_any | not_includes_all | any | empty. DateTime: less_than | exactly | more_than (relative — `value` is a number of days) | before | on | after (`value` is an absolute date) | any | empty. The relative ops are ONE-SIDED bounds around (now − N days): `less_than N` = the date is AFTER now−N — so it also matches every FUTURE date, and on a future-dated attribute (a trial end, a renewal date) it is NOT \"within the last N days\"; `more_than N` = the date is BEFORE now−N. **\"Signed up in the last N days\" therefore needs BOTH bounds** — `less_than N` AND `more_than 0` in one `all` group; `less_than N` alone silently includes anyone whose date is in the future (a mis-mapped trial-end column, a clock/timezone slip), and those are exactly the users a new-user audience must not contain (observed in testing). Negative N shifts the bound into the future: the rolling \"within the NEXT 7 days\" window is `less_than` value \"0\" AND `more_than` value \"-7\" (two conditions, both required). The relative ops are DAY-granularity only — no unit field; for hour/minute windows use an `event` condition with a `within` (which has a `unit`).","isRequired":true,"uniqueKey":"conditions.items.[INDEX].oneOf.1.op","typeLabel":"enum\u003cstring>"},"value":{"description":"The comparison value (string / number-as-string / date). Omit for any/empty/true/false.","type":"string","uniqueKey":"conditions.items.[INDEX].oneOf.1.value","typeLabel":"string"},"value2":{"description":"Upper bound for the `between` operator (`value` is the lower bound).","type":"string","uniqueKey":"conditions.items.[INDEX].oneOf.1.value2","typeLabel":"string"},"values":{"description":"Values for the List operators (includes_any / includes_all / …).","type":"array","items":{"type":"string","uniqueKey":"conditions.items.[INDEX].oneOf.1.values.items.[INDEX]","typeLabel":"string"},"uniqueKey":"conditions.items.[INDEX].oneOf.1.values","typeLabel":"string[]"}},"uniqueKey":"conditions.items.[INDEX].oneOf.1","typeLabel":"object"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["unsupported"],"isRequired":true,"uniqueKey":"conditions.items.[INDEX].oneOf.2.type","typeLabel":"enum\u003cstring>"},"note":{"type":"string","uniqueKey":"conditions.items.[INDEX].oneOf.2.note","typeLabel":"string"}},"uniqueKey":"conditions.items.[INDEX].oneOf.2","typeLabel":"object"}],"uniqueKey":"conditions.items.[INDEX]","typeLabel":"object"},"uniqueKey":"conditions","typeLabel":"object[]"},"memberCount":{"description":"Members in the requested environment — only on GET one segment with `expand=memberCount` (+ environmentId); the list endpoint never returns it. manual = explicit members; condition = users/companies matching the conditions right now; all = everyone in the environment. Counted with the SAME filter the users/companies list applies for `segmentId`, so the two always agree.","type":"number","uniqueKey":"memberCount","typeLabel":"number"}},"required":["id","object","name","bizType","kind","createdAt","updatedAt"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"id":"\u003cstring>","object":"segment","name":"\u003cstring>","bizType":"user","kind":"all","createdAt":"2023-11-07T05:31:56Z","updatedAt":"2023-11-07T05:31:56Z","conditions":[{"type":"group","match":"all","conditions":"\u003carray>"}],"memberCount":123}}},"exampleType":"generated"}},"exampleType":"generated"},"701d515f-df54-48de-9549-f2b70f883722":{"description":"Invalid request — E1017 validation (may carry `issues`; an invalid orderBy/limit is also E1017), E1015 invalid scope, E0003 invalid against current domain state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine-readable code (e.g. E1017). Match on this, never on `message`.","uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","description":"Human-readable summary. Wording may change between releases.","uniqueKey":"error.message","typeLabel":"string"},"issues":{"description":"Validation errors (E1017) may carry one entry per problem so every field can be fixed in a single round-trip. Absent on other errors.","type":"array","items":{"type":"object","properties":{"rule":{"type":"string","description":"Which validation layer rejected it: schema | reactive_condition | action_not_allowed | step_shape | reference_target | auto_start | media_url | destination_url. New values may be added; treat an unknown value as a generic validation failure.","isRequired":true,"uniqueKey":"error.issues.items.[INDEX].rule","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.issues.items.[INDEX].message","typeLabel":"string"},"path":{"description":"Path into the request body (e.g. `steps[0].triggers[0].when[1]`).","type":"string","uniqueKey":"error.issues.items.[INDEX].path","typeLabel":"string"}},"required":["rule","message"],"uniqueKey":"error.issues.items.[INDEX]","typeLabel":"object"},"uniqueKey":"error.issues","typeLabel":"object[]"},"doc_url":{"type":"string","description":"Base URL of the API documentation.","uniqueKey":"error.doc_url","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"\u003cstring>","message":"\u003cstring>","issues":[{"rule":"\u003cstring>","message":"\u003cstring>","path":"\u003cstring>"}],"doc_url":"\u003cstring>"}}}},"exampleType":"generated"}},"exampleType":"generated"},"5fed99dd-bcc2-4bfb-bf8a-74e71ef3a2be":{"description":"Missing or expired API key — E1010, E1020.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine-readable code (e.g. E1017). Match on this, never on `message`.","uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","description":"Human-readable summary. Wording may change between releases.","uniqueKey":"error.message","typeLabel":"string"},"issues":{"description":"Validation errors (E1017) may carry one entry per problem so every field can be fixed in a single round-trip. Absent on other errors.","type":"array","items":{"type":"object","properties":{"rule":{"type":"string","description":"Which validation layer rejected it: schema | reactive_condition | action_not_allowed | step_shape | reference_target | auto_start | media_url | destination_url. New values may be added; treat an unknown value as a generic validation failure.","isRequired":true,"uniqueKey":"error.issues.items.[INDEX].rule","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.issues.items.[INDEX].message","typeLabel":"string"},"path":{"description":"Path into the request body (e.g. `steps[0].triggers[0].when[1]`).","type":"string","uniqueKey":"error.issues.items.[INDEX].path","typeLabel":"string"}},"required":["rule","message"],"uniqueKey":"error.issues.items.[INDEX]","typeLabel":"object"},"uniqueKey":"error.issues","typeLabel":"object[]"},"doc_url":{"type":"string","description":"Base URL of the API documentation.","uniqueKey":"error.doc_url","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"\u003cstring>","message":"\u003cstring>","issues":[{"rule":"\u003cstring>","message":"\u003cstring>","path":"\u003cstring>"}],"doc_url":"\u003cstring>"}}}},"exampleType":"generated"}},"exampleType":"generated"},"347f4ab1-cb73-4c2c-8f61-976be2cc46a4":{"description":"Refused — E1000 invalid key, E1011 project not in token scope, E1012 insufficient scope, E1029 environment not in token scope, E1032 environment creation needs a token without env-targeted capabilities (its allowlist cannot cover a not-yet-existing environment), E0043 the project's plan does not include the feature (e.g. webhooks require a paid plan on cloud).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine-readable code (e.g. E1017). Match on this, never on `message`.","uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","description":"Human-readable summary. Wording may change between releases.","uniqueKey":"error.message","typeLabel":"string"},"issues":{"description":"Validation errors (E1017) may carry one entry per problem so every field can be fixed in a single round-trip. Absent on other errors.","type":"array","items":{"type":"object","properties":{"rule":{"type":"string","description":"Which validation layer rejected it: schema | reactive_condition | action_not_allowed | step_shape | reference_target | auto_start | media_url | destination_url. New values may be added; treat an unknown value as a generic validation failure.","isRequired":true,"uniqueKey":"error.issues.items.[INDEX].rule","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.issues.items.[INDEX].message","typeLabel":"string"},"path":{"description":"Path into the request body (e.g. `steps[0].triggers[0].when[1]`).","type":"string","uniqueKey":"error.issues.items.[INDEX].path","typeLabel":"string"}},"required":["rule","message"],"uniqueKey":"error.issues.items.[INDEX]","typeLabel":"object"},"uniqueKey":"error.issues","typeLabel":"object[]"},"doc_url":{"type":"string","description":"Base URL of the API documentation.","uniqueKey":"error.doc_url","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"\u003cstring>","message":"\u003cstring>","issues":[{"rule":"\u003cstring>","message":"\u003cstring>","path":"\u003cstring>"}],"doc_url":"\u003cstring>"}}}},"exampleType":"generated"}},"exampleType":"generated"},"1a97868e-b89f-4030-af04-673617237fa3":{"description":"Segment not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine-readable code (e.g. E1017). Match on this, never on `message`.","uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","description":"Human-readable summary. Wording may change between releases.","uniqueKey":"error.message","typeLabel":"string"},"issues":{"description":"Validation errors (E1017) may carry one entry per problem so every field can be fixed in a single round-trip. Absent on other errors.","type":"array","items":{"type":"object","properties":{"rule":{"type":"string","description":"Which validation layer rejected it: schema | reactive_condition | action_not_allowed | step_shape | reference_target | auto_start | media_url | destination_url. New values may be added; treat an unknown value as a generic validation failure.","isRequired":true,"uniqueKey":"error.issues.items.[INDEX].rule","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.issues.items.[INDEX].message","typeLabel":"string"},"path":{"description":"Path into the request body (e.g. `steps[0].triggers[0].when[1]`).","type":"string","uniqueKey":"error.issues.items.[INDEX].path","typeLabel":"string"}},"required":["rule","message"],"uniqueKey":"error.issues.items.[INDEX]","typeLabel":"object"},"uniqueKey":"error.issues","typeLabel":"object[]"},"doc_url":{"type":"string","description":"Base URL of the API documentation.","uniqueKey":"error.doc_url","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"\u003cstring>","message":"\u003cstring>","issues":[{"rule":"\u003cstring>","message":"\u003cstring>","path":"\u003cstring>"}],"doc_url":"\u003cstring>"}}}},"exampleType":"generated"}},"exampleType":"generated"},"81b6790a-067a-4184-b707-2a8c71c364a3":{"description":"E1046 its conditions use deleted definitions — the message names them with their ids; restore them first, then retry.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine-readable code (e.g. E1017). Match on this, never on `message`.","uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","description":"Human-readable summary. Wording may change between releases.","uniqueKey":"error.message","typeLabel":"string"},"issues":{"description":"Validation errors (E1017) may carry one entry per problem so every field can be fixed in a single round-trip. Absent on other errors.","type":"array","items":{"type":"object","properties":{"rule":{"type":"string","description":"Which validation layer rejected it: schema | reactive_condition | action_not_allowed | step_shape | reference_target | auto_start | media_url | destination_url. New values may be added; treat an unknown value as a generic validation failure.","isRequired":true,"uniqueKey":"error.issues.items.[INDEX].rule","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.issues.items.[INDEX].message","typeLabel":"string"},"path":{"description":"Path into the request body (e.g. `steps[0].triggers[0].when[1]`).","type":"string","uniqueKey":"error.issues.items.[INDEX].path","typeLabel":"string"}},"required":["rule","message"],"uniqueKey":"error.issues.items.[INDEX]","typeLabel":"object"},"uniqueKey":"error.issues","typeLabel":"object[]"},"doc_url":{"type":"string","description":"Base URL of the API documentation.","uniqueKey":"error.doc_url","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"\u003cstring>","message":"\u003cstring>","issues":[{"rule":"\u003cstring>","message":"\u003cstring>","path":"\u003cstring>"}],"doc_url":"\u003cstring>"}}}},"exampleType":"generated"}},"exampleType":"generated"},"863445ca-5b8e-45f1-bb41-e3a584561f29":{"description":"Rate limit exceeded — E1013. The limit follows the project's plan (100/500/1000/3000 requests per minute); unknown credentials share a per-IP bucket. Every response also carries X-RateLimit-Limit / -Remaining / -Reset for pacing; a 429 adds the standard Retry-After header (seconds to back off).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine-readable code (e.g. E1017). Match on this, never on `message`.","uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","description":"Human-readable summary. Wording may change between releases.","uniqueKey":"error.message","typeLabel":"string"},"issues":{"description":"Validation errors (E1017) may carry one entry per problem so every field can be fixed in a single round-trip. Absent on other errors.","type":"array","items":{"type":"object","properties":{"rule":{"type":"string","description":"Which validation layer rejected it: schema | reactive_condition | action_not_allowed | step_shape | reference_target | auto_start | media_url | destination_url. New values may be added; treat an unknown value as a generic validation failure.","isRequired":true,"uniqueKey":"error.issues.items.[INDEX].rule","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.issues.items.[INDEX].message","typeLabel":"string"},"path":{"description":"Path into the request body (e.g. `steps[0].triggers[0].when[1]`).","type":"string","uniqueKey":"error.issues.items.[INDEX].path","typeLabel":"string"}},"required":["rule","message"],"uniqueKey":"error.issues.items.[INDEX]","typeLabel":"object"},"uniqueKey":"error.issues","typeLabel":"object[]"},"doc_url":{"type":"string","description":"Base URL of the API documentation.","uniqueKey":"error.doc_url","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"\u003cstring>","message":"\u003cstring>","issues":[{"rule":"\u003cstring>","message":"\u003cstring>","path":"\u003cstring>"}],"doc_url":"\u003cstring>"}}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"99726c51-d38f-4e58-be47-a8c5adb857ea":{"bearer":{"scheme":"bearer","bearerFormat":"utp_... personal API token (opaque)","type":"http","scopes":[],"schemeName":"bearer"}}},"servers":{"ae7053da-bd87-4bef-9f34-b1cef7f5e8a1":{"url":"https://api.usertour.io"}},"schemas":{"3ce53ad3-8f16-43a5-ac28-01ad4bc5b529":{"oneOf":[{"type":"object","required":["type","match","conditions"],"properties":{"type":{"type":"string","enum":["group"],"isRequired":true},"match":{"type":"string","enum":["all","any"],"isRequired":true},"conditions":{"minItems":1,"type":"array","items":{"$circularRef":"3ce53ad3-8f16-43a5-ac28-01ad4bc5b529"},"description":"The grouped conditions — at least one. An EMPTY group is not \"no filter\": it never matches, so next to an AND it makes the whole rule unmatchable, and writing one is rejected. A version saved with an empty group in the BUILDER still reads back with it (validate warns); writing that list back is refused until the group is filled or dropped.","isRequired":true}}},{"type":"object","required":["type","scope","attribute","op"],"properties":{"type":{"type":"string","enum":["attribute"],"isRequired":true},"scope":{"type":"string","enum":["user","company","companyMembership"],"description":"Which entity owns the attribute — `user` (the end user), `company`, or `companyMembership`. Same value as the attribute definition's `scope` (see the attribute definitions list); required to disambiguate a codeName that exists in more than one scope.","isRequired":true},"attribute":{"type":"string","isRequired":true},"op":{"type":"string","enum":["is","not","contains","not_contains","starts_with","ends_with","any","empty","lt","lte","gt","gte","between","true","false","includes_any","includes_all","not_includes_any","not_includes_all","less_than","exactly","more_than","before","on","after"],"description":"Operator — the allowed set depends on the attribute dataType. String: is | not | contains | not_contains | starts_with | ends_with | any | empty. Number: is | not | lt | lte | gt | gte | between | any | empty. Boolean: true | false | any | empty. List: includes_any | includes_all | not_includes_any | not_includes_all | any | empty. DateTime: less_than | exactly | more_than (relative — `value` is a number of days) | before | on | after (`value` is an absolute date) | any | empty. The relative ops are ONE-SIDED bounds around (now − N days): `less_than N` = the date is AFTER now−N — so it also matches every FUTURE date, and on a future-dated attribute (a trial end, a renewal date) it is NOT \"within the last N days\"; `more_than N` = the date is BEFORE now−N. **\"Signed up in the last N days\" therefore needs BOTH bounds** — `less_than N` AND `more_than 0` in one `all` group; `less_than N` alone silently includes anyone whose date is in the future (a mis-mapped trial-end column, a clock/timezone slip), and those are exactly the users a new-user audience must not contain (observed in testing). Negative N shifts the bound into the future: the rolling \"within the NEXT 7 days\" window is `less_than` value \"0\" AND `more_than` value \"-7\" (two conditions, both required). The relative ops are DAY-granularity only — no unit field; for hour/minute windows use an `event` condition with a `within` (which has a `unit`).","isRequired":true},"value":{"description":"The comparison value (string / number-as-string / date). Omit for any/empty/true/false.","type":"string"},"value2":{"description":"Upper bound for the `between` operator (`value` is the lower bound).","type":"string"},"values":{"description":"Values for the List operators (includes_any / includes_all / …).","type":"array","items":{"type":"string"}}}},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["unsupported"],"isRequired":true},"note":{"type":"string"}}}]}},"processedSecurityOptions":[{"schemes":[{"scheme":{"scheme":"bearer","bearerFormat":"utp_... personal API token (opaque)","type":"http","scopes":[],"schemeName":"bearer"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"Bearer authentication header of the form `Bearer \u003ctoken>`, where `\u003ctoken>` is your auth token.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"bearer","name":"Authorization"}],"title":"bearer"}]},"originalFileLocation":"api-reference-v2/openapi.json"},"subdomain":"usertour","siteName":"Usertour documention","title":"Restore a deleted segment - Usertour documention","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-08T03:07:03.433Z","originalFileLocation":"api-reference/segments/restore-a-deleted-segment.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Bring a soft-deleted segment back with its members (find it via GET /segments?deleted=true). An integration sync it had does not come back with it. Refused (E1046) while its conditions use deleted attributes — restore those first. Idempotent on a segment that is not deleted.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Usertour documention\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/usertour/vM2wRfIVfuMnzscJ/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/usertour/vM2wRfIVfuMnzscJ/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/usertour/vM2wRfIVfuMnzscJ/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/usertour/vM2wRfIVfuMnzscJ/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/usertour/vM2wRfIVfuMnzscJ/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/usertour/vM2wRfIVfuMnzscJ/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/usertour/vM2wRfIVfuMnzscJ/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/usertour/vM2wRfIVfuMnzscJ/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/usertour/vM2wRfIVfuMnzscJ/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Restore a deleted segment - Usertour documention\">\u003cmeta data-mint-head property=\"og:description\" content=\"Bring a soft-deleted segment back with its members (find it via GET /segments?deleted=true). An integration sync it had does not come back with it. Refused (E1046) while its conditions use deleted attributes — restore those first. Idempotent on a segment that is not deleted.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Usertour documention\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.usertour.io/api-reference/segments/restore-a-deleted-segment\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://usertour.mintlify.site/_mintlify/api/og/v2?division=Segments\u0026amp;title=Restore+a+deleted+segment\u0026amp;description=Bring+a+soft-deleted+segment+back+with+its+members+%28find+it+via+GET+%2Fsegments%3Fdeleted%3Dtrue%29.+An+integration+sync+it+had+does+not+come+back+with+it.+Refused+%28E10\u0026amp;theme=51092ed6781dc62f07a52a12\u0026amp;signature=27a306e47afff2f2f7ab50c15b35efc9686964882c6d09f04317f56c52908fc5\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Restore a deleted segment - Usertour documention\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Bring a soft-deleted segment back with its members (find it via GET /segments?deleted=true). An integration sync it had does not come back with it. Refused (E1046) while its conditions use deleted attributes — restore those first. Idempotent on a segment that is not deleted.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://usertour.mintlify.site/_mintlify/api/og/v2?division=Segments\u0026amp;title=Restore+a+deleted+segment\u0026amp;description=Bring+a+soft-deleted+segment+back+with+its+members+%28find+it+via+GET+%2Fsegments%3Fdeleted%3Dtrue%29.+An+integration+sync+it+had+does+not+come+back+with+it.+Refused+%28E10\u0026amp;theme=51092ed6781dc62f07a52a12\u0026amp;signature=27a306e47afff2f2f7ab50c15b35efc9686964882c6d09f04317f56c52908fc5\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/usertour/vM2wRfIVfuMnzscJ/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Usertour documention\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#0D9373\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.usertour.io/api-reference/segments/restore-a-deleted-segment\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/segments/restore-a-deleted-segment.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.usertour.io/#organization\",\"name\":\"Usertour documention\",\"url\":\"https://docs.usertour.io\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/usertour/fGy2waOqk2YYQ2QK/logo-dark.svg?fit=max\u0026auto=format\u0026n=fGy2waOqk2YYQ2QK\u0026q=85\u0026s=841070ff620cff55401ec69cfc514e27\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.usertour.io#website\",\"name\":\"Usertour documention\",\"url\":\"https://docs.usertour.io\",\"publisher\":{\"@id\":\"https://docs.usertour.io/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.usertour.io/api-reference/segments/restore-a-deleted-segment#webpage\",\"url\":\"https://docs.usertour.io/api-reference/segments/restore-a-deleted-segment\",\"name\":\"Restore a deleted segment\",\"description\":\"Bring a soft-deleted segment back with its members (find it via GET /segments?deleted=true). An integration sync it had does not come back with it. Refused (E1046) while its conditions use deleted attributes — restore those first. Idempotent on a segment that is not deleted.\",\"dateModified\":\"2026-10-08T03:07:03.433Z\",\"isPartOf\":{\"@id\":\"https://docs.usertour.io#website\"},\"breadcrumb\":{\"@id\":\"https://docs.usertour.io/api-reference/segments/restore-a-deleted-segment#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.usertour.io/api-reference/segments/restore-a-deleted-segment#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Endpoints\",\"item\":\"https://docs.usertour.io/api-reference/analytics/get-content-analytics\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Segments\",\"item\":\"https://docs.usertour.io/api-reference/segments/list-segments\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Restore a deleted segment\",\"item\":\"https://docs.usertour.io/api-reference/segments/restore-a-deleted-segment\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.usertour.io/api-reference/segments/restore-a-deleted-segment#apireference\",\"headline\":\"Restore a deleted segment\",\"name\":\"Restore a deleted segment\",\"description\":\"Bring a soft-deleted segment back with its members (find it via GET /segments?deleted=true). An integration sync it had does not come back with it. Refused (E1046) while its conditions use deleted attributes — restore those first. Idempotent on a segment that is not deleted.\",\"url\":\"https://docs.usertour.io/api-reference/segments/restore-a-deleted-segment\",\"mainEntityOfPage\":{\"@id\":\"https://docs.usertour.io/api-reference/segments/restore-a-deleted-segment#webpage\"},\"dateModified\":\"2026-10-08T03:07:03.433Z\",\"publisher\":{\"@id\":\"https://docs.usertour.io/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.usertour.io#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Usertour documention\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Usertour documention","nav":{"global":null,"anchors":[{"anchor":"Documentation","icon":"book-open","pages":[{"title":"Documentation","href":"/build-onboarding-with-ai"}]},{"anchor":"Usertour.js Reference","icon":"connectdevelop","pages":[{"title":"Usertour.js Reference","href":"/developers/usertourjs-reference/overview"}]},{"anchor":"API Reference","icon":"terminal","groups":[{"group":"Getting started","pages":[{"title":"Introduction","href":"/api-reference-v2/introduction"},{"title":"Authentication","href":"/api-reference-v2/authentication"},{"title":"Errors","href":"/api-reference-v2/errors"},{"title":"MCP server","href":"/api-reference-v2/mcp"}]},{"group":"Conventions","pages":[{"title":"Pagination","href":"/api-reference-v2/pagination"},{"title":"Ordering","href":"/api-reference-v2/ordering"},{"title":"Expanding objects","href":"/api-reference-v2/expanding-objects"},{"title":"Attributes","href":"/api-reference-v2/attributes"}]},{"group":"Concepts","pages":[{"title":"Content representation","href":"/api-reference-v2/content-representation"},{"title":"Blocks","href":"/api-reference-v2/blocks"},{"title":"Conditions \u0026 actions","href":"/api-reference-v2/conditions-and-actions"},{"title":"Start, hide \u0026 trigger rules","href":"/api-reference-v2/rules"},{"title":"Type-specific data","href":"/api-reference-v2/type-data"}]},{"group":"Endpoints","pages":[{"group":"Analytics","pages":[{"title":"Get content analytics","deprecated":null,"version":null,"openapi":"/api-reference-v2/openapi.json get /v2/projects/{projectId}/content/{id}/analytics","href":"/api-reference/analytics/get-content-analytics"},{"title":"Get question analytics","deprecated":null,"version":null,"openapi":"/api-reference-v2/openapi.json get /v2/projects/{projectId}/content/{id}/analytics/questions","href":"/api-reference/analytics/get-question-analytics"}]},{"group":"Content","pages":[{"title":"List content","deprecated":null,"version":null,"openapi":"/api-reference-v2/openapi.json get /v2/projects/{projectId}/content","href":"/api-reference/content/list-content"},{"title":"Create content","deprecated":null,"version":null,"openapi":"/api-reference-v2/openapi.json post /v2/projects/{projectId}/content","href":"/api-reference/content/create-content"},{"title":"Get content","deprecated":null,"version":null,"openapi":"/api-reference-v2/openapi.json get /v2/projects/{projectId}/content/{id}","href":"/api-reference/content/get-content"},{"title":"Delete content","deprecated":null,"version":null,"openapi":"/api-reference-v2/openapi.json delete /v2/projects/{projectId}/content/{id}","href":"/api-reference/content/delete-content"},{"title":"Update content","deprecated":null,"version":null,"openapi":"/api-reference-v2/openapi.json patch /v2/projects/{projectId}/content/{id}","href":"/api-reference/content/update-content"},{"title":"Restore deleted content","deprecated":null,"version":null,"openapi":"/api-reference-v2/openapi.json post /v2/projects/{projectId}/content/{id}/restore","href":"/api-reference/content/restore-deleted-content"},{"title":"Duplicate content","deprecated":null,"version":null,"openapi":"/api-reference-v2/openapi.json post /v2/projects/{projectId}/content/{id}/duplicate","href":"/api-reference/content/duplicate-content"},{"title":"Publish a version","deprecated":null,"version":null,"openapi":"/api-reference-v2/openapi.json post /v2/projects/{projectId}/content/{id}/publish","href":"/api-reference/content/publish-a-version"},{"title":"Unpublish a version","deprecated":null,"version":null,"openapi":"/api-reference-v2/openapi.json post /v2/projects/{projectId}/content/{id}/unpublish","href":"/api-reference/content/unpublish-a-version"}]},{"group":"Content versions","pages":[{"title":"List content versions","deprecated":null,"version":null,"openapi":"/api-reference-v2/openapi.json get /v2/projects/{projectId}/content/{contentId}/versions","href":"/api-reference/content-versions/list-content-versions"},{"title":"Create a content version","deprecated":null,"version":null,"openapi":"/api-reference-v2/openapi.json post /v2/projects/{projectId}/content/{contentId}/versions","href":"/api-reference/content-versions/create-a-content-version"},{"title":"Get a content version","deprecated":null,"version":null,"openapi":"/api-reference-v2/openapi.json get /v2/projects/{projectId}/content/{contentId}/versions/{id}","href":"/api-reference/content-versions/get-a-content-version"},{"title":"Update a content version","deprecated":null,"version":null,"openapi":"/api-reference-v2/openapi.json patch /v2/projects/{projectId}/content/{contentId}/versions/{id}","href":"/api-reference/content-versions/update-a-content-version"},{"title":"Validate a content version","deprecated":null,"version":null,"openapi":"/api-reference-v2/openapi.json get /v2/projects/{projectId}/content/{contentId}/versions/{id}/validate","href":"/api-reference/content-versions/validate-a-content-version"},{"title":"Restore a content version","deprecated":null,"version":null,"openapi":"/api-reference-v2/openapi.json post /v2/projects/{projectId}/content/{contentId}/versions/{id}/restore","href":"/api-reference/content-versions/restore-a-content-version"},{"title":"Get a translation","deprecated":null,"version":null,"openapi":"/api-reference-v2/openapi.json get /v2/projects/{projectId}/content/{contentId}/versions/{versionId}/localizations/{code}","href":"/api-reference/content-versions/get-a-translation"},{"title":"Update a translation","deprecated":null,"version":null,"openapi":"/api-reference-v2/openapi.json put /v2/projects/{projectId}/content/{contentId}/versions/{versionId}/localizations/{code}","href":"/api-reference/content-versions/update-a-translation"}]},{"group":"Themes","pages":[{"title":"List themes","deprecated":null,"version":null,"openapi":"/api-reference-v2/openapi.json get /v2/projects/{projectId}/themes","href":"/api-reference/themes/list-themes"},{"title":"Create a theme","deprecated":null,"version":null,"openapi":"/api-reference-v2/openapi.json post /v2/projects/{projectId}/themes","href":"/api-reference/themes/create-a-theme"},{"title":"Get a theme","deprecated":null,"version":null,"openapi":"/api-reference-v2/openapi.json get /v2/projects/{projectId}/themes/{id}","href":"/api-reference/themes/get-a-theme"},{"title":"Delete a theme","deprecated":null,"version":null,"openapi":"/api-reference-v2/openapi.json delete /v2/projects/{projectId}/themes/{id}","href":"/api-reference/themes/delete-a-theme"},{"title":"Update a theme","deprecated":null,"version":null,"openapi":"/api-reference-v2/openapi.json patch /v2/projects/{projectId}/themes/{id}","href":"/api-reference/themes/update-a-theme"},{"title":"Duplicate a theme","deprecated":null,"version":null,"openapi":"/api-reference-v2/openapi.json post /v2/projects/{projectId}/themes/{id}/duplicate","href":"/api-reference/themes/duplicate-a-theme"},{"title":"Restore a deleted theme","deprecated":null,"version":null,"openapi":"/api-reference-v2/openapi.json post /v2/projects/{projectId}/themes/{id}/restore","href":"/api-reference/themes/restore-a-deleted-theme"}]},{"group":"Users","pages":[{"title":"List users","deprecated":null,"version":null,"openapi":"/api-reference-v2/openapi.json get /v2/projects/{projectId}/environments/{environmentId}/users","href":"/api-reference/users/list-users"},{"title":"Get a user","deprecated":null,"version":null,"openapi":"/api-reference-v2/openapi.json get /v2/projects/{projectId}/environments/{environmentId}/users/{id}","href":"/api-reference/users/get-a-user"},{"title":"Create or update a user","deprecated":null,"version":null,"openapi":"/api-reference-v2/openapi.json put /v2/projects/{projectId}/environments/{environmentId}/users/{id}","href":"/api-reference/users/create-or-update-a-user"},{"title":"Delete a user","deprecated":null,"version":null,"openapi":"/api-reference-v2/openapi.json delete /v2/projects/{projectId}/environments/{environmentId}/users/{id}","href":"/api-reference/users/delete-a-user"}]},{"group":"Companies","pages":[{"title":"List companies","deprecated":null,"version":null,"openapi":"/api-reference-v2/openapi.json get /v2/projects/{projectId}/environments/{environmentId}/companies","href":"/api-reference/companies/list-companies"},{"title":"Get a company","deprecated":null,"version":null,"openapi":"/api-reference-v2/openapi.json get /v2/projects/{projectId}/environments/{environmentId}/companies/{id}","href":"/api-reference/companies/get-a-company"},{"title":"Create or update a company","deprecated":null,"version":null,"openapi":"/api-reference-v2/openapi.json put /v2/projects/{projectId}/environments/{environmentId}/companies/{id}","href":"/api-reference/companies/create-or-update-a-company"},{"title":"Delete a company","deprecated":null,"version":null,"openapi":"/api-reference-v2/openapi.json delete /v2/projects/{projectId}/environments/{environmentId}/companies/{id}","href":"/api-reference/companies/delete-a-company"},{"title":"Add a company member","deprecated":null,"version":null,"openapi":"/api-reference-v2/openapi.json put /v2/projects/{projectId}/environments/{environmentId}/companies/{id}/memberships/{userId}","href":"/api-reference/companies/add-a-company-member"},{"title":"Remove a company member","deprecated":null,"version":null,"openapi":"/api-reference-v2/openapi.json delete /v2/projects/{projectId}/environments/{environmentId}/companies/{id}/memberships/{userId}","href":"/api-reference/companies/remove-a-company-member"}]},{"group":"Segments","pages":[{"title":"List segments","deprecated":null,"version":null,"openapi":"/api-reference-v2/openapi.json get /v2/projects/{projectId}/segments","href":"/api-reference/segments/list-segments"},{"title":"Create a segment","deprecated":null,"version":null,"openapi":"/api-reference-v2/openapi.json post /v2/projects/{projectId}/segments","href":"/api-reference/segments/create-a-segment"},{"title":"Get a segment","deprecated":null,"version":null,"openapi":"/api-reference-v2/openapi.json get /v2/projects/{projectId}/segments/{id}","href":"/api-reference/segments/get-a-segment"},{"title":"Delete a segment","deprecated":null,"version":null,"openapi":"/api-reference-v2/openapi.json delete /v2/projects/{projectId}/segments/{id}","href":"/api-reference/segments/delete-a-segment"},{"title":"Update a segment","description":null,"deprecated":null,"version":null,"openapi":"/api-reference-v2/openapi.json patch /v2/projects/{projectId}/segments/{id}","href":"/api-reference/segments/update-a-segment"},{"title":"Restore a deleted segment","deprecated":null,"version":null,"openapi":"/api-reference-v2/openapi.json post /v2/projects/{projectId}/segments/{id}/restore","href":"/api-reference/segments/restore-a-deleted-segment"},{"title":"Add a segment member","description":"Add a user or company (per the segment's bizType) to a manual segment.","deprecated":null,"version":null,"openapi":"/api-reference-v2/openapi.json put /v2/projects/{projectId}/environments/{environmentId}/segments/{id}/members/{externalId}","href":"/api-reference/segments/add-a-segment-member"},{"title":"Remove a segment member","deprecated":null,"version":null,"openapi":"/api-reference-v2/openapi.json delete /v2/projects/{projectId}/environments/{environmentId}/segments/{id}/members/{externalId}","href":"/api-reference/segments/remove-a-segment-member"}]},{"group":"Sessions","pages":[{"title":"List sessions","deprecated":null,"version":null,"openapi":"/api-reference-v2/openapi.json get /v2/projects/{projectId}/environments/{environmentId}/sessions","href":"/api-reference/sessions/list-sessions"},{"title":"Get a session","deprecated":null,"version":null,"openapi":"/api-reference-v2/openapi.json get /v2/projects/{projectId}/environments/{environmentId}/sessions/{id}","href":"/api-reference/sessions/get-a-session"},{"title":"Delete a session","deprecated":null,"version":null,"openapi":"/api-reference-v2/openapi.json delete /v2/projects/{projectId}/environments/{environmentId}/sessions/{id}","href":"/api-reference/sessions/delete-a-session"},{"title":"End a session","deprecated":null,"version":null,"openapi":"/api-reference-v2/openapi.json post /v2/projects/{projectId}/environments/{environmentId}/sessions/{id}/end","href":"/api-reference/sessions/end-a-session"}]},{"group":"Attribute definitions","pages":[{"title":"List attribute definitions","deprecated":null,"version":null,"openapi":"/api-reference-v2/openapi.json get /v2/projects/{projectId}/attribute-definitions","href":"/api-reference/attribute-definitions/list-attribute-definitions"},{"title":"Create an attribute definition","deprecated":null,"version":null,"openapi":"/api-reference-v2/openapi.json post /v2/projects/{projectId}/attribute-definitions","href":"/api-reference/attribute-definitions/create-an-attribute-definition"},{"title":"Get an attribute definition","deprecated":null,"version":null,"openapi":"/api-reference-v2/openapi.json get /v2/projects/{projectId}/attribute-definitions/{id}","href":"/api-reference/attribute-definitions/get-an-attribute-definition"},{"title":"Delete an attribute definition","deprecated":null,"version":null,"openapi":"/api-reference-v2/openapi.json delete /v2/projects/{projectId}/attribute-definitions/{id}","href":"/api-reference/attribute-definitions/delete-an-attribute-definition"},{"title":"Update an attribute definition","deprecated":null,"version":null,"openapi":"/api-reference-v2/openapi.json patch /v2/projects/{projectId}/attribute-definitions/{id}","href":"/api-reference/attribute-definitions/update-an-attribute-definition"},{"title":"Restore a deleted attribute definition","deprecated":null,"version":null,"openapi":"/api-reference-v2/openapi.json post /v2/projects/{projectId}/attribute-definitions/{id}/restore","href":"/api-reference/attribute-definitions/restore-a-deleted-attribute-definition"}]},{"group":"Event definitions","pages":[{"title":"List event definitions","deprecated":null,"version":null,"openapi":"/api-reference-v2/openapi.json get /v2/projects/{projectId}/event-definitions","href":"/api-reference/event-definitions/list-event-definitions"},{"title":"Create an event definition","deprecated":null,"version":null,"openapi":"/api-reference-v2/openapi.json post /v2/projects/{projectId}/event-definitions","href":"/api-reference/event-definitions/create-an-event-definition"},{"title":"Get an event definition","deprecated":null,"version":null,"openapi":"/api-reference-v2/openapi.json get /v2/projects/{projectId}/event-definitions/{id}","href":"/api-reference/event-definitions/get-an-event-definition"},{"title":"Delete an event definition","deprecated":null,"version":null,"openapi":"/api-reference-v2/openapi.json delete /v2/projects/{projectId}/event-definitions/{id}","href":"/api-reference/event-definitions/delete-an-event-definition"},{"title":"Update an event definition","deprecated":null,"version":null,"openapi":"/api-reference-v2/openapi.json patch /v2/projects/{projectId}/event-definitions/{id}","href":"/api-reference/event-definitions/update-an-event-definition"},{"title":"Restore a deleted event definition","deprecated":null,"version":null,"openapi":"/api-reference-v2/openapi.json post /v2/projects/{projectId}/event-definitions/{id}/restore","href":"/api-reference/event-definitions/restore-a-deleted-event-definition"}]},{"group":"Webhooks","pages":[{"title":"List webhooks","deprecated":null,"version":null,"openapi":"/api-reference-v2/openapi.json get /v2/projects/{projectId}/environments/{environmentId}/webhooks","href":"/api-reference/webhooks/list-webhooks"},{"title":"Create a webhook","deprecated":null,"version":null,"openapi":"/api-reference-v2/openapi.json post /v2/projects/{projectId}/environments/{environmentId}/webhooks","href":"/api-reference/webhooks/create-a-webhook"},{"title":"Get a webhook (includes the signing secret for webhook:manage tokens)","deprecated":null,"version":null,"openapi":"/api-reference-v2/openapi.json get /v2/projects/{projectId}/environments/{environmentId}/webhooks/{id}","href":"/api-reference/webhooks/get-a-webhook-includes-the-signing-secret-for-webhook:manage-tokens"},{"title":"Delete a webhook","deprecated":null,"version":null,"openapi":"/api-reference-v2/openapi.json delete /v2/projects/{projectId}/environments/{environmentId}/webhooks/{id}","href":"/api-reference/webhooks/delete-a-webhook"},{"title":"Update a webhook","deprecated":null,"version":null,"openapi":"/api-reference-v2/openapi.json patch /v2/projects/{projectId}/environments/{environmentId}/webhooks/{id}","href":"/api-reference/webhooks/update-a-webhook"},{"title":"Rotate the signing secret","deprecated":null,"version":null,"openapi":"/api-reference-v2/openapi.json post /v2/projects/{projectId}/environments/{environmentId}/webhooks/{id}/rotate-secret","href":"/api-reference/webhooks/rotate-the-signing-secret"}]},{"group":"Me","pages":[{"title":"Introspect the token","deprecated":null,"version":null,"openapi":"/api-reference-v2/openapi.json get /v2/me","href":"/api-reference/me/introspect-the-token"}]},{"group":"Localizations","pages":[{"title":"List locales","deprecated":null,"version":null,"openapi":"/api-reference-v2/openapi.json get /v2/locales","href":"/api-reference/localizations/list-locales"},{"title":"List localizations","deprecated":null,"version":null,"openapi":"/api-reference-v2/openapi.json get /v2/projects/{projectId}/localizations","href":"/api-reference/localizations/list-localizations"},{"title":"Create a localization","deprecated":null,"version":null,"openapi":"/api-reference-v2/openapi.json post /v2/projects/{projectId}/localizations","href":"/api-reference/localizations/create-a-localization"},{"title":"Delete a localization","deprecated":null,"version":null,"openapi":"/api-reference-v2/openapi.json delete /v2/projects/{projectId}/localizations/{id}","href":"/api-reference/localizations/delete-a-localization"},{"title":"Update a localization","deprecated":null,"version":null,"openapi":"/api-reference-v2/openapi.json patch /v2/projects/{projectId}/localizations/{id}","href":"/api-reference/localizations/update-a-localization"},{"title":"Restore a deleted localization","deprecated":null,"version":null,"openapi":"/api-reference-v2/openapi.json post /v2/projects/{projectId}/localizations/{id}/restore","href":"/api-reference/localizations/restore-a-deleted-localization"}]},{"group":"Events","pages":[{"title":"Track an event","deprecated":null,"version":null,"openapi":"/api-reference-v2/openapi.json post /v2/projects/{projectId}/environments/{environmentId}/events","href":"/api-reference/events/track-an-event"}]},{"group":"Environments","pages":[{"title":"List environments","deprecated":null,"version":null,"openapi":"/api-reference-v2/openapi.json get /v2/projects/{projectId}/environments","href":"/api-reference/environments/list-environments"},{"title":"Create an environment","deprecated":null,"version":null,"openapi":"/api-reference-v2/openapi.json post /v2/projects/{projectId}/environments","href":"/api-reference/environments/create-an-environment"},{"title":"Get an environment","deprecated":null,"version":null,"openapi":"/api-reference-v2/openapi.json get /v2/projects/{projectId}/environments/{id}","href":"/api-reference/environments/get-an-environment"},{"title":"Delete an environment","deprecated":null,"version":null,"openapi":"/api-reference-v2/openapi.json delete /v2/projects/{projectId}/environments/{id}","href":"/api-reference/environments/delete-an-environment"},{"title":"Update an environment","deprecated":null,"version":null,"openapi":"/api-reference-v2/openapi.json patch /v2/projects/{projectId}/environments/{id}","href":"/api-reference/environments/update-an-environment"}]}]}]},{"anchor":"Self-Hosting","icon":"github","pages":[{"title":"Self-Hosting","href":"/open-source/self-hosting"}]},{"anchor":"Use Cases","icon":"route","pages":[{"title":"Use Cases","href":"/use-cases/analyze-onboarding-with-ai"}]},{"anchor":"API Reference (v1)","icon":"terminal","pages":[{"title":"API Reference (v1)","href":"/api-reference/introduction"}]},{"anchor":"Changelog","icon":"clock-rotate-left","pages":[{"title":"Changelog","href":"/changelog/2026"}]}]},"basePath":"","title":"Restore a deleted segment - Usertour documention","buildId":"dpl_42LwxxU1kGN114H4XzwGYXa9ZDah","deploymentId":"dpl_42LwxxU1kGN114H4XzwGYXa9ZDah","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-C-hEh3I2.js","utils-CnF4QiUD.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-C7PVNbel.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-8ytevL2A.js","snippetPresets-BT1alx3v.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","conditional-requirements-CFM0id0Q.js","ApiExamples-BLXC0i_W.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-CyLIGI9_.js","shallow-DC0lGVIW.js","getApiPlaygroundDisplay-CgDQ85tN.js","CodeSnippet-6-I-Gpv9.js","CodeSnippets-BAk1kDdu.js","Page-C945cI-W.js","getPastedJson-B276RuWN.js","icon-BqP8etTm.js","MethodPill-DM6sbxG1.js","DuplicateIcon-PyJglOaE.js","createIcon-CMeOMAc_.js","DynamicMarkdown-BoyYAA8K.js","SectionHeading-DAYv3gvZ.js","axios-vUo_bRtp.js","Markdown-BhTTmazV.js","clsx-CR-RHrVC.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-CBUH0-zX.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-BmARFYNC.js"]}