Bearer authentication using the project Secret Key (prefixed with sk_), used exactly as shown in the dashboard. Endpoints that support sandbox data take an explicit environment field or parameter. All v4 public endpoints require the Secret Key — see Authentication. Never expose the Secret Key in client-side code.
Targeting rules. Every rule must match for a user to fall into the segment
(logical AND). Omit on update to leave existing conditions untouched; pass
an empty array to clear.
{"docsConfig":{"theme":"aspen","$schema":"https://mintlify.com/docs.json","name":"Qonversion","colors":{"primary":"#7357C2","light":"#AB7DFF","dark":"#7357C2"},"favicon":"https://mintcdn.com/qonversion/i4lAeIKmC47lf8K-/59c36df-small-Avatars_500x500_Black.png?fit=max\u0026auto=format\u0026n=i4lAeIKmC47lf8K-\u0026q=85\u0026s=3f20c2a21d5255fe08a1688d9bfc9efb","api":{"examples":{"languages":["curl","python","javascript","php","ruby","go","java"]}},"appearance":{"default":"system","strict":false},"background":{"color":{"light":"#FFFFFF","dark":"#161617"}},"navbar":{"links":[{"href":"https://qonversion.io","label":"Home"},{"href":"https://dash.qonversion.io","label":"Dashboard"},{"href":"https://status.qonversion.io","label":"Status"}]},"footer":{"socials":{"github":"https://github.com/qonversion","x":"https://x.com/qonversion_io","linkedin":"https://www.linkedin.com/company/qonversion"}},"search":{"prompt":"Search Qonversion docs..."},"seo":{"indexing":"all"},"fonts":{"family":"Inter"},"icons":{"library":"fontawesome"},"styling":{"eyebrows":"section","codeblocks":{"theme":{"light":"github-light-default","dark":"github-dark-default"}},"latex":true},"contextual":{"options":["copy","view","claude","chatgpt"],"display":"header"},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"qonversion","hasAudioNarration":false,"actualSubdomain":"qonversion","customDomains":["documentation.qonversion.io"],"gitSource":{"type":"github","owner":"qonversion","repo":"documentation_mintlify","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6ae89516de528214ed20219a","collectionId":"2752c13e-1865-43c9-aaa0-2f7d51285deb","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ae89516de528214ed20219a"},"entitlements":{},"buildId":"6ae89516de528214ed20219a","clientVersion":"0.0.4067","searchFilterCounts":[{"language":"default","tag":"API reference","count":159},{"language":"default","tag":"Guides","count":146},{"language":"default","tag":"REST API v4","count":112},{"language":"default","tag":"Get started","count":57},{"language":"default","tag":"SDK migration guides","count":32},{"language":"default","tag":"Integrations","count":31},{"language":"default","tag":"No-Code Builder","count":27},{"language":"default","tag":"Platform resources","count":22},{"language":"default","tag":"Resource guides","count":21},{"language":"default","tag":"Analytics","count":19}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableAskAiSearchBar":true},"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":"vite-origin","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":"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}],"googleFontsInlined":false},"customCss":[{"filePath":"custom.css","content":":root{--qdoc-page: #ffffff;--qdoc-chrome: #fafafa;--qdoc-surface: #ffffff;--qdoc-field: #f7f7f9;--qdoc-subtle: #f6f6f6;--qdoc-text: #272727;--qdoc-text-secondary: #6e6e6e;--qdoc-text-tertiary: #595959;--qdoc-border: rgba(51, 51, 51, 0.12);--qdoc-border-strong: rgba(51, 51, 51, 0.28);--qdoc-accent: #7357c2;--qdoc-accent-hover: #664cb0;--qdoc-accent-soft: #f3f0fe;--qdoc-accent-ring: rgba(115, 87, 194, 0.32);--qdoc-button: #8161db;--qdoc-button-label: #ffffff;--qdoc-positive: #166b37;--qdoc-warning: #7a5f17;--qdoc-negative: #b32b2b;--qdoc-info: #3155c6;--qdoc-p-infra: #70dda5;--qdoc-p-forecast: #00d8ff;--qdoc-p-ads: #ff76d5;--qdoc-p-experiments: #ff8347;--qdoc-p-mcp: #cabaf9;--qdoc-p-label: #14121c;--qdoc-radius-card: 12px;--qdoc-radius-control: 10px;--qdoc-radius-chip: 999px;--qdoc-measure: 68ch;--qdoc-ease: cubic-bezier(0.2, 0, 0, 1);--qdoc-fast: 120ms;--qdoc-normal: 200ms}.dark,:root[class~=\"dark\"]{--qdoc-page: #161617;--qdoc-chrome: #161617;--qdoc-surface: #232325;--qdoc-field: #1d1d1f;--qdoc-subtle: rgba(255, 255, 255, 0.06);--qdoc-text: #ffffff;--qdoc-text-secondary: rgba(255, 255, 255, 0.7);--qdoc-text-tertiary: rgba(255, 255, 255, 0.5);--qdoc-border: rgba(255, 255, 255, 0.12);--qdoc-border-strong: rgba(255, 255, 255, 0.28);--qdoc-accent: #ab7dff;--qdoc-accent-hover: #b98fff;--qdoc-accent-soft: rgba(130, 100, 219, 0.18);--qdoc-accent-ring: rgba(171, 125, 255, 0.4);--qdoc-button: #8161db;--qdoc-button-label: #ffffff;--qdoc-positive: #7adb9b;--qdoc-warning: #f0cd77;--qdoc-negative: #f08a8a;--qdoc-info: #a8c1ff}#content-area h1,#content-area h2,#content-area h3,#content-area h4,#content-area h5,#content-area h6{font-weight:600;text-wrap:balance;letter-spacing:-0.015em}#content-area h1{font-size:2.25rem;line-height:1.15;letter-spacing:-0.022em}#content-area h2{font-size:1.5rem;line-height:1.22}#content-area h3{font-size:1.1875rem;line-height:1.3}#content-area h2{margin-block:3rem 1rem}#content-area h3{margin-block:2.25rem 0.75rem}#content-area p,#content-area li{font-size:1.0625rem;line-height:1.65;color:var(--qdoc-text-secondary)}#content-area>div>p,#content-area .prose>p{max-width:var(--qdoc-measure)}#content-area p{text-wrap:pretty}#content-area h1+p{font-size:1.1875rem;line-height:1.55;color:var(--qdoc-text-secondary)}#content-area table td,#content-area table th,#content-area code{font-variant-numeric:tabular-nums}#content-area a.link,#content-area a:not([class]){color:var(--qdoc-accent);text-decoration-color:var(--qdoc-accent-ring);text-decoration-thickness:from-font;text-underline-position:from-font;text-underline-offset:0.12em;text-decoration-skip-ink:auto;transition:color var(--qdoc-fast) var(--qdoc-ease)}#content-area a.link:hover,#content-area a:not([class]):hover{color:var(--qdoc-accent-hover);text-decoration-color:currentColor}#content-area abbr[title]{text-decoration:underline dotted;cursor:help}#content-area [class*=\"code\"] [role=\"tab\"],#content-area .code-group-tab,#content-area figcaption{color:var(--qdoc-text-secondary)!important;font-size:0.75rem;font-weight:500;letter-spacing:0.02em}#content-area [class*=\"code\"] [role=\"tab\"][aria-selected=\"true\"],#content-area .code-group-tab[data-state=\"active\"]{color:var(--qdoc-text)!important;box-shadow:inset 0 -2px 0 0 var(--qdoc-accent)}#content-area pre{background:var(--qdoc-field);border:1px solid var(--qdoc-border);border-radius:var(--qdoc-radius-card);font-size:0.84375rem;line-height:1.6}#content-area :not(pre)>code{background:var(--qdoc-subtle);border:1px solid var(--qdoc-border);border-radius:6px;padding:0.1em 0.35em;font-size:0.875em}#content-area button[aria-label*=\"Copy\"i]{position:relative}#content-area button[aria-label*=\"Copy\"i]::after{content:\"\";position:absolute;inset:50% auto auto 50%;width:44px;height:44px;transform:translate(-50%, -50%)}#navigation-items a,#content-side-layout a{color:var(--qdoc-text-secondary);border-radius:var(--qdoc-radius-control);transition:color var(--qdoc-fast) var(--qdoc-ease),\n background-color var(--qdoc-fast) var(--qdoc-ease)}#navigation-items a:hover{color:var(--qdoc-text);background:var(--qdoc-subtle)}#navigation-items a[aria-current],#navigation-items a[data-active=\"true\"]{color:var(--qdoc-accent);background:var(--qdoc-accent-soft);font-weight:500;box-shadow:inset 2px 0 0 0 var(--qdoc-accent)}#content-area table{border-color:var(--qdoc-border)}#content-area thead th{background:var(--qdoc-subtle);color:var(--qdoc-text);font-size:0.8125rem;font-weight:600;letter-spacing:0.01em}#content-area tbody td{font-size:0.9375rem;line-height:1.5}#content-area tbody tr:hover{background:var(--qdoc-subtle)}#content-area .card{border-radius:var(--qdoc-radius-card);border:1px solid var(--qdoc-border);box-shadow:none;transition:border-color var(--qdoc-fast) var(--qdoc-ease)}@media (hover: hover) and (pointer: fine){#content-area a.card:hover{border-color:var(--qdoc-border-strong)}}#content-area [class*=\"callout\"],#content-area blockquote{border-radius:var(--qdoc-radius-card);border-inline-start:3px solid var(--qdoc-border-strong)}#content-area img:not([src*=\"shields.io\"]){border-radius:var(--qdoc-radius-card);outline:1px solid rgba(0, 0, 0, 0.1);outline-offset:-1px}.dark #content-area img:not([src*=\"shields.io\"]){outline-color:rgba(255, 255, 255, 0.1)}.qdoc-chip{display:inline-block;padding:0.15em 0.7em;border-radius:var(--qdoc-radius-chip);background:var(--qdoc-subtle);color:var(--qdoc-text);font-size:0.75rem;font-weight:600;line-height:1.5;white-space:nowrap}.qdoc-chip[data-product]{color:var(--qdoc-p-label)}.qdoc-chip[data-product=\"infra\"]{background:var(--qdoc-p-infra)}.qdoc-chip[data-product=\"forecast\"]{background:var(--qdoc-p-forecast)}.qdoc-chip[data-product=\"ads\"]{background:var(--qdoc-p-ads)}.qdoc-chip[data-product=\"experiments\"]{background:var(--qdoc-p-experiments)}.qdoc-chip[data-product=\"mcp\"]{background:var(--qdoc-p-mcp)}:root[data-qdoc-product] #content-area h1{padding-inline-start:0.75rem;border-inline-start:3px solid var(--qdoc-rail, var(--qdoc-border-strong));margin-inline-start:-0.75rem}:root[data-qdoc-product=\"infra\"]{--qdoc-rail: var(--qdoc-p-infra)}:root[data-qdoc-product=\"forecast\"]{--qdoc-rail: var(--qdoc-p-forecast)}:root[data-qdoc-product=\"ads\"]{--qdoc-rail: var(--qdoc-p-ads)}:root[data-qdoc-product=\"experiments\"]{--qdoc-rail: var(--qdoc-p-experiments)}:root[data-qdoc-product=\"mcp\"]{--qdoc-rail: var(--qdoc-p-mcp)}.qdoc-stage{display:inline-block;font-size:0.6875rem;font-weight:600;letter-spacing:0.08em;text-transform:uppercase;color:var(--qdoc-text-tertiary)}::selection{background:var(--qdoc-accent-soft);color:var(--qdoc-text)}:root{accent-color:var(--qdoc-accent);caret-color:var(--qdoc-accent)}:where(a,button,[role=\"button\"],summary,input,select,textarea):focus-visible{outline:2px solid transparent;outline-offset:2px;box-shadow:0 0 0 2px var(--qdoc-page), 0 0 0 4px var(--qdoc-accent);border-radius:var(--qdoc-radius-control)}@supports selector(::-webkit-scrollbar){#navigation-items::-webkit-scrollbar{width:10px}#navigation-items::-webkit-scrollbar-thumb{background:var(--qdoc-border-strong);border:3px solid transparent;background-clip:content-box;border-radius:999px}}.method-pill.text-green-700,.method-nav-pill>.text-green-700{color:var(--qdoc-positive)!important;background-color:rgba(39, 197, 90, 0.12)!important}.method-pill.text-blue-700,.method-nav-pill>.text-blue-700{color:var(--qdoc-accent)!important;background-color:var(--qdoc-accent-soft)!important}.method-nav-pill>.bg-\\[\\#2AB673\\]{background-color:#166b37!important}.method-nav-pill>.bg-\\[\\#3064E3\\]{background-color:#7357c2!important}.dark .method-nav-pill>.bg-\\[\\#2AB673\\]{background-color:#27633f!important}.dark .method-nav-pill>.bg-\\[\\#3064E3\\]{background-color:#8161db!important}@media (max-width: 767px){#content-area p,#content-area li{font-size:1rem;line-height:1.6}#content-area h1{font-size:1.75rem}#content-area h2{font-size:1.3125rem;margin-block:2.25rem 0.75rem}#content-area pre{font-size:0.8125rem}#content-area{padding-bottom:max(3rem, env(safe-area-inset-bottom))}}@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:0.01ms!important;animation-iteration-count:1!important;transition-duration:0.01ms!important;scroll-behavior:auto!important}}#navigation-items,#sidebar,header.z-30{background-color:var(--qdoc-page)}.z-30 a[href=\"/\"] img,.z-30 a[href=\"/\"] svg{height:26px;width:auto}.z-30 a[href=\"/\"]{font-size:1.5rem;letter-spacing:-0.025em}#navigation-items a{font-size:0.9375rem;font-weight:500;color:#4a4a4a;padding-block:0.5rem}.dark #navigation-items a{color:rgba(255, 255, 255, 0.82)}#navigation-items a[aria-current],#navigation-items a[data-active=\"true\"]{color:var(--qdoc-accent)}#navigation-items .sidebar-group-icon{width:16px;height:16px;flex:none;opacity:1;color:var(--qdoc-accent)}#navigation-items .sidebar-group-header{display:flex;align-items:center;gap:0.5rem;font-size:0.875rem;font-weight:600;letter-spacing:0;color:var(--qdoc-text)}#content-area .card,#content-area [class*=\"callout\"],#content-area blockquote,#content-area thead th{background:var(--qdoc-subtle)}#content-area pre{background:var(--qdoc-field)}#content-area .card pre{background:var(--qdoc-page)}#page-context-menu button{background-color:var(--qdoc-subtle)}#page-context-menu button:hover{background-color:var(--qdoc-border)}#content-area .qdoc-products .columns>.card{border-inline-start-width:3px}#content-area .qdoc-products .columns>.card:nth-child(1){border-inline-start-color:var(--qdoc-p-infra)}#content-area .qdoc-products .columns>.card:nth-child(2){border-inline-start-color:var(--qdoc-p-ads)}#content-area .qdoc-products .columns>.card:nth-child(3){border-inline-start-color:var(--qdoc-p-experiments)}#content-area .qdoc-products .columns>.card:nth-child(4){border-inline-start-color:var(--qdoc-p-mcp)}.z-30 .h-14{height:66px!important;padding:15px 16px 5px 16px!important}.z-30 .h-10{height:48px!important}.z-30 .h-14 a[href=\"/\"]{margin-top:-3px!important}"}],"page":{"pagePath":"api-reference/segments/create-a-segment","slug":"/api-reference/segments/create-a-segment","pageMetadata":{"title":"Create a segment","description":"Creates a new segment. Returns 201 with the created segment and Location header.","deprecated":null,"version":null,"openapi":"/api-reference/rest-api-v4.yaml post /segments","href":"/api-reference/segments/create-a-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: \"Creates a new segment. Returns 201 with the created segment and Location header.\"\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":{"codeStyling":{"theme":{"light":"github-light-default","dark":"github-dark-default"}},"config":{},"pageMetadata":{"title":"Create a segment","description":"Creates a new segment. Returns 201 with the created segment and Location header.","deprecated":null,"version":null,"openapi":"/api-reference/rest-api-v4.yaml post /segments","href":"/api-reference/segments/create-a-segment","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":["/_mintlify/custom/qonversion/a8b6627337592ade/custom.js"],"openApiReferenceData":{"operation":{"operationId":"v4CreateSegment","summary":"Create a segment","description":"Creates a new segment. Returns 201 with the created segment and Location header.","tags":["Segments"],"security":["3aff4f39-a341-4e57-a688-48df2aa91b09"],"parameters":["f15ff2ed-dd30-45a0-8884-91db9ed0583d"],"requestBody":"707a47d8-55d1-4535-8b54-f0c6d96be110","responses":{"201":"0fc40ecc-e125-4822-8d4c-5d070829c5a3","400":"d74cc8b5-10da-4cbd-b457-dc0987281194","401":"e1a231ee-a696-4b11-873e-5833ef6ced1a","409":"f7fbe2a2-12b4-414b-b75e-b6ccfa7bcff9","415":"ecdac11d-3b23-4b44-866f-c100f8009508","422":"f21e6047-0879-4fa0-91f0-ba428ace506b","500":"de63bb55-741e-4064-8345-bee572c4df2a","504":"d4315d21-29fb-403f-b762-a5e4fefcbdc7"},"method":"post","type":"path","servers":["9453fbdc-a545-4e91-bcda-791470f6f499"],"path":"/segments","baseUrlOptions":["https://api.qonversion.io/v4"],"title":"Create a segment","codeSamples":[],"requestExampleLanguages":["bash","python","javascript","php","ruby","go","java"],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{"f15ff2ed-dd30-45a0-8884-91db9ed0583d":{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","isRequired":false,"description":"Idempotency key for safe retries.","uniqueKey":"","typeLabel":"string"},"description":"Idempotency key for safe retries."}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string","description":"Segment name (max 256 characters).","example":"Premium Users","isRequired":true,"uniqueKey":"name","typeLabel":"string"},"conditions":{"type":"array","description":"Targeting rules. Every rule must match (logical AND). Optional;\nomit to create a segment with no rules.\n","items":{"type":"object","description":"A single targeting rule. Rules are joined with logical AND within a\nsegment.\n","required":["metric","comparator","value"],"properties":{"metric":{"type":"string","description":"Metric identifier. Corresponds to a configured `SegmentMetric`\n(`ref_table_field`). Common values: `environment`, `client_uid`,\n`custom_uid`, `client_advertiser_id`, `renewable`,\n`target_platform`.\n","example":"environment","isRequired":true,"uniqueKey":"conditions.items.[INDEX].metric","typeLabel":"string"},"comparator":{"type":"string","x-extensible-enum":["eq","ne","gt","gte","lt","lte","contains","not_contains"],"description":"Comparison operator applied between the metric and `value`.\n`contains` / `not_contains` map to SQL LIKE semantics on string\nmetrics; numeric comparators (`gt`/`gte`/`lt`/`lte`) require a\nnumeric metric.\n","example":"eq","isRequired":true,"uniqueKey":"conditions.items.[INDEX].comparator","typeLabel":"string"},"value":{"type":"string","description":"String-encoded value to compare against. Cast to the metric's\nunderlying type (e.g. int, string) on the server.\n","example":"prod","isRequired":true,"uniqueKey":"conditions.items.[INDEX].value","typeLabel":"string"},"negate":{"type":"boolean","description":"If `true`, the rule matches when the comparison is false\n(logical NOT applied to the individual rule). Defaults to `false`.\n","default":false,"uniqueKey":"conditions.items.[INDEX].negate","typeLabel":"boolean"}},"uniqueKey":"conditions.items.[INDEX]","typeLabel":"object"},"example":[{"metric":"environment","comparator":"eq","value":"prod","negate":false}],"uniqueKey":"conditions","typeLabel":"object[]"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"name":"Premium Users","conditions":[{"metric":"environment","comparator":"eq","value":"prod","negate":false}]}}},"exampleType":"generated"}},"exampleType":"generated"},"responses":{"0fc40ecc-e125-4822-8d4c-5d070829c5a3":{"description":"Segment created","headers":{"Location":{"description":"URL of the created segment","schema":{"type":"string","example":"/v4/segments/premium-users"}}},"content":{"application/json":{"schema":{"type":"object","required":["object","id","url","name","is_system","conditions","created_at","updated_at"],"properties":{"object":{"type":"string","example":"segment","isRequired":true,"uniqueKey":"object","typeLabel":"string"},"id":{"type":"string","description":"Segment identifier.","example":"premium-users","isRequired":true,"uniqueKey":"id","typeLabel":"string"},"url":{"type":"string","description":"Canonical API path.","example":"/v4/segments/premium-users","isRequired":true,"uniqueKey":"url","typeLabel":"string"},"name":{"type":"string","description":"Display name.","example":"Premium Users","isRequired":true,"uniqueKey":"name","typeLabel":"string"},"is_system":{"type":"boolean","description":"Whether this is a predefined system segment (read-only).","isRequired":true,"uniqueKey":"is_system","typeLabel":"boolean"},"conditions":{"type":"array","description":"Targeting rules. Every rule must match for a user to fall into the segment\n(logical AND). Omit on update to leave existing conditions untouched; pass\nan empty array to clear.\n","items":{"type":"object","description":"A single targeting rule. Rules are joined with logical AND within a\nsegment.\n","required":["metric","comparator","value"],"properties":{"metric":{"type":"string","description":"Metric identifier. Corresponds to a configured `SegmentMetric`\n(`ref_table_field`). Common values: `environment`, `client_uid`,\n`custom_uid`, `client_advertiser_id`, `renewable`,\n`target_platform`.\n","example":"environment","isRequired":true,"uniqueKey":"conditions.items.[INDEX].metric","typeLabel":"string"},"comparator":{"type":"string","x-extensible-enum":["eq","ne","gt","gte","lt","lte","contains","not_contains"],"description":"Comparison operator applied between the metric and `value`.\n`contains` / `not_contains` map to SQL LIKE semantics on string\nmetrics; numeric comparators (`gt`/`gte`/`lt`/`lte`) require a\nnumeric metric.\n","example":"eq","isRequired":true,"uniqueKey":"conditions.items.[INDEX].comparator","typeLabel":"string"},"value":{"type":"string","description":"String-encoded value to compare against. Cast to the metric's\nunderlying type (e.g. int, string) on the server.\n","example":"prod","isRequired":true,"uniqueKey":"conditions.items.[INDEX].value","typeLabel":"string"},"negate":{"type":"boolean","description":"If `true`, the rule matches when the comparison is false\n(logical NOT applied to the individual rule). Defaults to `false`.\n","default":false,"uniqueKey":"conditions.items.[INDEX].negate","typeLabel":"boolean"}},"uniqueKey":"conditions.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"conditions","typeLabel":"object[]"},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 creation timestamp.","example":"2025-09-15T12:30:00Z","isRequired":true,"uniqueKey":"created_at","typeLabel":"string\u003cdate-time>"},"updated_at":{"type":"string","format":"date-time","description":"ISO 8601 last update timestamp.","example":"2025-11-03T10:26:40Z","isRequired":true,"uniqueKey":"updated_at","typeLabel":"string\u003cdate-time>"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"object":"segment","id":"premium-users","url":"/v4/segments/premium-users","name":"Premium Users","is_system":true,"conditions":[{"metric":"environment","comparator":"eq","value":"prod","negate":false}],"created_at":"2025-09-15T12:30:00Z","updated_at":"2025-11-03T10:26:40Z"}}},"exampleType":"generated"}},"exampleType":"generated"},"d74cc8b5-10da-4cbd-b457-dc0987281194":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["type","code","message"],"properties":{"type":{"type":"string","enum":["request","resource","logical","internal"],"isRequired":true,"uniqueKey":"error.type","typeLabel":"enum\u003cstring>"},"code":{"type":"string","description":"Machine-readable snake_case error code. Examples include\n`invalid_data`, `invalid_request`, `invalid_product_id`,\n`not_found`, `already_exists`, `offering_already_exists`,\n`product_not_in_project`, `cannot_set_main_directly`,\n`cannot_demote_main`, `cannot_patch_experiment_variant`,\n`cannot_delete_experiment_variant`, and\n`cannot_setmain_experiment_variant`. Resource-specific codes\nare documented on the corresponding reference page.\n","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","description":"Human-readable description. May change; do not parse.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"details":{"oneOf":[{"type":"array","description":"Per-field validation errors, present on 400 validation failures.","items":{"type":"object","properties":{"field":{"type":"string","uniqueKey":"error.details.oneOf.0.items.[INDEX].field","typeLabel":"string"},"message":{"type":"string","uniqueKey":"error.details.oneOf.0.items.[INDEX].message","typeLabel":"string"},"reason":{"type":"string","description":"Apple Ads query validation reason; unsupported_parameter for unknown/unsupported keys, invalid_parameter for malformed values or shapes.","enum":["unsupported_parameter","invalid_parameter"],"uniqueKey":"error.details.oneOf.0.items.[INDEX].reason","typeLabel":"enum\u003cstring>"}},"uniqueKey":"error.details.oneOf.0.items.[INDEX]","typeLabel":"object"},"uniqueKey":"error.details.oneOf.0","typeLabel":"object[]"},{"type":"null","description":"Per-field validation errors, present on 400 validation failures.","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string","description":"Apple Ads query validation reason; unsupported_parameter for unknown/unsupported keys, invalid_parameter for malformed values or shapes.","enum":["unsupported_parameter","invalid_parameter"]}}},"uniqueKey":"error.details.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.details","typeLabel":"object[] | null"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"type":"request","code":"\u003cstring>","message":"\u003cstring>","details":[{"field":"\u003cstring>","message":"\u003cstring>","reason":"unsupported_parameter"}]}}}},"exampleType":"generated"}},"exampleType":"generated"},"e1a231ee-a696-4b11-873e-5833ef6ced1a":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["type","code","message"],"properties":{"type":{"type":"string","enum":["request","resource","logical","internal"],"isRequired":true,"uniqueKey":"error.type","typeLabel":"enum\u003cstring>"},"code":{"type":"string","description":"Machine-readable snake_case error code. Examples include\n`invalid_data`, `invalid_request`, `invalid_product_id`,\n`not_found`, `already_exists`, `offering_already_exists`,\n`product_not_in_project`, `cannot_set_main_directly`,\n`cannot_demote_main`, `cannot_patch_experiment_variant`,\n`cannot_delete_experiment_variant`, and\n`cannot_setmain_experiment_variant`. Resource-specific codes\nare documented on the corresponding reference page.\n","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","description":"Human-readable description. May change; do not parse.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"details":{"oneOf":[{"type":"array","description":"Per-field validation errors, present on 400 validation failures.","items":{"type":"object","properties":{"field":{"type":"string","uniqueKey":"error.details.oneOf.0.items.[INDEX].field","typeLabel":"string"},"message":{"type":"string","uniqueKey":"error.details.oneOf.0.items.[INDEX].message","typeLabel":"string"},"reason":{"type":"string","description":"Apple Ads query validation reason; unsupported_parameter for unknown/unsupported keys, invalid_parameter for malformed values or shapes.","enum":["unsupported_parameter","invalid_parameter"],"uniqueKey":"error.details.oneOf.0.items.[INDEX].reason","typeLabel":"enum\u003cstring>"}},"uniqueKey":"error.details.oneOf.0.items.[INDEX]","typeLabel":"object"},"uniqueKey":"error.details.oneOf.0","typeLabel":"object[]"},{"type":"null","description":"Per-field validation errors, present on 400 validation failures.","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string","description":"Apple Ads query validation reason; unsupported_parameter for unknown/unsupported keys, invalid_parameter for malformed values or shapes.","enum":["unsupported_parameter","invalid_parameter"]}}},"uniqueKey":"error.details.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.details","typeLabel":"object[] | null"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"type":"request","code":"\u003cstring>","message":"\u003cstring>","details":[{"field":"\u003cstring>","message":"\u003cstring>","reason":"unsupported_parameter"}]}}}},"exampleType":"generated"}},"exampleType":"generated"},"f7fbe2a2-12b4-414b-b75e-b6ccfa7bcff9":{"description":"Segment already exists","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["type","code","message"],"properties":{"type":{"type":"string","enum":["request","resource","logical","internal"],"isRequired":true,"uniqueKey":"error.type","typeLabel":"enum\u003cstring>"},"code":{"type":"string","description":"Machine-readable snake_case error code. Examples include\n`invalid_data`, `invalid_request`, `invalid_product_id`,\n`not_found`, `already_exists`, `offering_already_exists`,\n`product_not_in_project`, `cannot_set_main_directly`,\n`cannot_demote_main`, `cannot_patch_experiment_variant`,\n`cannot_delete_experiment_variant`, and\n`cannot_setmain_experiment_variant`. Resource-specific codes\nare documented on the corresponding reference page.\n","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","description":"Human-readable description. May change; do not parse.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"details":{"oneOf":[{"type":"array","description":"Per-field validation errors, present on 400 validation failures.","items":{"type":"object","properties":{"field":{"type":"string","uniqueKey":"error.details.oneOf.0.items.[INDEX].field","typeLabel":"string"},"message":{"type":"string","uniqueKey":"error.details.oneOf.0.items.[INDEX].message","typeLabel":"string"},"reason":{"type":"string","description":"Apple Ads query validation reason; unsupported_parameter for unknown/unsupported keys, invalid_parameter for malformed values or shapes.","enum":["unsupported_parameter","invalid_parameter"],"uniqueKey":"error.details.oneOf.0.items.[INDEX].reason","typeLabel":"enum\u003cstring>"}},"uniqueKey":"error.details.oneOf.0.items.[INDEX]","typeLabel":"object"},"uniqueKey":"error.details.oneOf.0","typeLabel":"object[]"},{"type":"null","description":"Per-field validation errors, present on 400 validation failures.","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string","description":"Apple Ads query validation reason; unsupported_parameter for unknown/unsupported keys, invalid_parameter for malformed values or shapes.","enum":["unsupported_parameter","invalid_parameter"]}}},"uniqueKey":"error.details.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.details","typeLabel":"object[] | null"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"type":"request","code":"\u003cstring>","message":"\u003cstring>","details":[{"field":"\u003cstring>","message":"\u003cstring>","reason":"unsupported_parameter"}]}}}},"exampleType":"generated"}},"exampleType":"generated"},"ecdac11d-3b23-4b44-866f-c100f8009508":{"description":"Unsupported Content-Type","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["type","code","message"],"properties":{"type":{"type":"string","enum":["request","resource","logical","internal"],"isRequired":true,"uniqueKey":"error.type","typeLabel":"enum\u003cstring>"},"code":{"type":"string","description":"Machine-readable snake_case error code. Examples include\n`invalid_data`, `invalid_request`, `invalid_product_id`,\n`not_found`, `already_exists`, `offering_already_exists`,\n`product_not_in_project`, `cannot_set_main_directly`,\n`cannot_demote_main`, `cannot_patch_experiment_variant`,\n`cannot_delete_experiment_variant`, and\n`cannot_setmain_experiment_variant`. Resource-specific codes\nare documented on the corresponding reference page.\n","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","description":"Human-readable description. May change; do not parse.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"details":{"oneOf":[{"type":"array","description":"Per-field validation errors, present on 400 validation failures.","items":{"type":"object","properties":{"field":{"type":"string","uniqueKey":"error.details.oneOf.0.items.[INDEX].field","typeLabel":"string"},"message":{"type":"string","uniqueKey":"error.details.oneOf.0.items.[INDEX].message","typeLabel":"string"},"reason":{"type":"string","description":"Apple Ads query validation reason; unsupported_parameter for unknown/unsupported keys, invalid_parameter for malformed values or shapes.","enum":["unsupported_parameter","invalid_parameter"],"uniqueKey":"error.details.oneOf.0.items.[INDEX].reason","typeLabel":"enum\u003cstring>"}},"uniqueKey":"error.details.oneOf.0.items.[INDEX]","typeLabel":"object"},"uniqueKey":"error.details.oneOf.0","typeLabel":"object[]"},{"type":"null","description":"Per-field validation errors, present on 400 validation failures.","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string","description":"Apple Ads query validation reason; unsupported_parameter for unknown/unsupported keys, invalid_parameter for malformed values or shapes.","enum":["unsupported_parameter","invalid_parameter"]}}},"uniqueKey":"error.details.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.details","typeLabel":"object[] | null"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"type":"request","code":"\u003cstring>","message":"\u003cstring>","details":[{"field":"\u003cstring>","message":"\u003cstring>","reason":"unsupported_parameter"}]}}}},"exampleType":"generated"}},"exampleType":"generated"},"f21e6047-0879-4fa0-91f0-ba428ace506b":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["type","code","message"],"properties":{"type":{"type":"string","enum":["request","resource","logical","internal"],"isRequired":true,"uniqueKey":"error.type","typeLabel":"enum\u003cstring>"},"code":{"type":"string","description":"Machine-readable snake_case error code. Examples include\n`invalid_data`, `invalid_request`, `invalid_product_id`,\n`not_found`, `already_exists`, `offering_already_exists`,\n`product_not_in_project`, `cannot_set_main_directly`,\n`cannot_demote_main`, `cannot_patch_experiment_variant`,\n`cannot_delete_experiment_variant`, and\n`cannot_setmain_experiment_variant`. Resource-specific codes\nare documented on the corresponding reference page.\n","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","description":"Human-readable description. May change; do not parse.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"details":{"oneOf":[{"type":"array","description":"Per-field validation errors, present on 400 validation failures.","items":{"type":"object","properties":{"field":{"type":"string","uniqueKey":"error.details.oneOf.0.items.[INDEX].field","typeLabel":"string"},"message":{"type":"string","uniqueKey":"error.details.oneOf.0.items.[INDEX].message","typeLabel":"string"},"reason":{"type":"string","description":"Apple Ads query validation reason; unsupported_parameter for unknown/unsupported keys, invalid_parameter for malformed values or shapes.","enum":["unsupported_parameter","invalid_parameter"],"uniqueKey":"error.details.oneOf.0.items.[INDEX].reason","typeLabel":"enum\u003cstring>"}},"uniqueKey":"error.details.oneOf.0.items.[INDEX]","typeLabel":"object"},"uniqueKey":"error.details.oneOf.0","typeLabel":"object[]"},{"type":"null","description":"Per-field validation errors, present on 400 validation failures.","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string","description":"Apple Ads query validation reason; unsupported_parameter for unknown/unsupported keys, invalid_parameter for malformed values or shapes.","enum":["unsupported_parameter","invalid_parameter"]}}},"uniqueKey":"error.details.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.details","typeLabel":"object[] | null"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"type":"request","code":"\u003cstring>","message":"\u003cstring>","details":[{"field":"\u003cstring>","message":"\u003cstring>","reason":"unsupported_parameter"}]}}}},"exampleType":"generated"}},"exampleType":"generated"},"de63bb55-741e-4064-8345-bee572c4df2a":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["type","code","message"],"properties":{"type":{"type":"string","enum":["request","resource","logical","internal"],"isRequired":true,"uniqueKey":"error.type","typeLabel":"enum\u003cstring>"},"code":{"type":"string","description":"Machine-readable snake_case error code. Examples include\n`invalid_data`, `invalid_request`, `invalid_product_id`,\n`not_found`, `already_exists`, `offering_already_exists`,\n`product_not_in_project`, `cannot_set_main_directly`,\n`cannot_demote_main`, `cannot_patch_experiment_variant`,\n`cannot_delete_experiment_variant`, and\n`cannot_setmain_experiment_variant`. Resource-specific codes\nare documented on the corresponding reference page.\n","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","description":"Human-readable description. May change; do not parse.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"details":{"oneOf":[{"type":"array","description":"Per-field validation errors, present on 400 validation failures.","items":{"type":"object","properties":{"field":{"type":"string","uniqueKey":"error.details.oneOf.0.items.[INDEX].field","typeLabel":"string"},"message":{"type":"string","uniqueKey":"error.details.oneOf.0.items.[INDEX].message","typeLabel":"string"},"reason":{"type":"string","description":"Apple Ads query validation reason; unsupported_parameter for unknown/unsupported keys, invalid_parameter for malformed values or shapes.","enum":["unsupported_parameter","invalid_parameter"],"uniqueKey":"error.details.oneOf.0.items.[INDEX].reason","typeLabel":"enum\u003cstring>"}},"uniqueKey":"error.details.oneOf.0.items.[INDEX]","typeLabel":"object"},"uniqueKey":"error.details.oneOf.0","typeLabel":"object[]"},{"type":"null","description":"Per-field validation errors, present on 400 validation failures.","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string","description":"Apple Ads query validation reason; unsupported_parameter for unknown/unsupported keys, invalid_parameter for malformed values or shapes.","enum":["unsupported_parameter","invalid_parameter"]}}},"uniqueKey":"error.details.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.details","typeLabel":"object[] | null"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"type":"request","code":"\u003cstring>","message":"\u003cstring>","details":[{"field":"\u003cstring>","message":"\u003cstring>","reason":"unsupported_parameter"}]}}}},"exampleType":"generated"}},"exampleType":"generated"},"d4315d21-29fb-403f-b762-a5e4fefcbdc7":{"description":"Upstream timeout","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["type","code","message"],"properties":{"type":{"type":"string","enum":["request","resource","logical","internal"],"isRequired":true,"uniqueKey":"error.type","typeLabel":"enum\u003cstring>"},"code":{"type":"string","description":"Machine-readable snake_case error code. Examples include\n`invalid_data`, `invalid_request`, `invalid_product_id`,\n`not_found`, `already_exists`, `offering_already_exists`,\n`product_not_in_project`, `cannot_set_main_directly`,\n`cannot_demote_main`, `cannot_patch_experiment_variant`,\n`cannot_delete_experiment_variant`, and\n`cannot_setmain_experiment_variant`. Resource-specific codes\nare documented on the corresponding reference page.\n","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","description":"Human-readable description. May change; do not parse.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"details":{"oneOf":[{"type":"array","description":"Per-field validation errors, present on 400 validation failures.","items":{"type":"object","properties":{"field":{"type":"string","uniqueKey":"error.details.oneOf.0.items.[INDEX].field","typeLabel":"string"},"message":{"type":"string","uniqueKey":"error.details.oneOf.0.items.[INDEX].message","typeLabel":"string"},"reason":{"type":"string","description":"Apple Ads query validation reason; unsupported_parameter for unknown/unsupported keys, invalid_parameter for malformed values or shapes.","enum":["unsupported_parameter","invalid_parameter"],"uniqueKey":"error.details.oneOf.0.items.[INDEX].reason","typeLabel":"enum\u003cstring>"}},"uniqueKey":"error.details.oneOf.0.items.[INDEX]","typeLabel":"object"},"uniqueKey":"error.details.oneOf.0","typeLabel":"object[]"},{"type":"null","description":"Per-field validation errors, present on 400 validation failures.","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string","description":"Apple Ads query validation reason; unsupported_parameter for unknown/unsupported keys, invalid_parameter for malformed values or shapes.","enum":["unsupported_parameter","invalid_parameter"]}}},"uniqueKey":"error.details.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.details","typeLabel":"object[] | null"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"type":"request","code":"\u003cstring>","message":"\u003cstring>","details":[{"field":"\u003cstring>","message":"\u003cstring>","reason":"unsupported_parameter"}]}}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"3aff4f39-a341-4e57-a688-48df2aa91b09":{"secretAuth":{"type":"http","scheme":"bearer","bearerFormat":"sk_…","description":"Bearer authentication using the project **Secret Key** (prefixed with `sk_`), used exactly as shown in the dashboard. Endpoints that support sandbox data take an explicit `environment` field or parameter. All v4 public endpoints require the Secret Key — see [Authentication](/reference/v4/authentication). Never expose the Secret Key in client-side code.","scopes":[],"schemeName":"secretAuth"}}},"servers":{"9453fbdc-a545-4e91-bcda-791470f6f499":{"url":"https://api.qonversion.io/v4","description":"Production"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","bearerFormat":"sk_…","description":"Bearer authentication using the project **Secret Key** (prefixed with `sk_`), used exactly as shown in the dashboard. Endpoints that support sandbox data take an explicit `environment` field or parameter. All v4 public endpoints require the Secret Key — see [Authentication](/reference/v4/authentication). Never expose the Secret Key in client-side code.","scopes":[],"schemeName":"secretAuth"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"Bearer authentication using the project **Secret Key** (prefixed with `sk_`), used exactly as shown in the dashboard. Endpoints that support sandbox data take an explicit `environment` field or parameter. All v4 public endpoints require the Secret Key — see [Authentication](/reference/v4/authentication). Never expose the Secret Key in client-side code.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"secretAuth","name":"Authorization"}],"title":"secretAuth"}]},"originalFileLocation":"api-reference/rest-api-v4.yaml"},"subdomain":"qonversion","siteName":"Qonversion","title":"Create a segment - Qonversion","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-23T00:21:08.897Z","originalFileLocation":"api-reference/segments/create-a-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=\"Creates a new segment. Returns 201 with the created segment and Location header.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Qonversion\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/qonversion/Dzad_pULPIRkhK0k/_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/qonversion/Dzad_pULPIRkhK0k/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/qonversion/Dzad_pULPIRkhK0k/_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/qonversion/Dzad_pULPIRkhK0k/_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/qonversion/Dzad_pULPIRkhK0k/_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/qonversion/Dzad_pULPIRkhK0k/_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/qonversion/Dzad_pULPIRkhK0k/_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/qonversion/Dzad_pULPIRkhK0k/_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/qonversion/Dzad_pULPIRkhK0k/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Create a segment - Qonversion\">\u003cmeta data-mint-head property=\"og:description\" content=\"Creates a new segment. Returns 201 with the created segment and Location header.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Qonversion\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://documentation.qonversion.io/api-reference/segments/create-a-segment\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://qonversion.mintlify.app/_mintlify/api/og/v2?division=Segments\u0026amp;title=Create+a+segment\u0026amp;description=Creates+a+new+segment.+Returns+201+with+the+created+segment+and+Location+header.\u0026amp;theme=5e06de6effeba4eba76a25c4\u0026amp;signature=1f95d7c4bc02619e5819939eba01f17d97d953ba49414fb149ad211b657daf8a\">\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=\"Create a segment - Qonversion\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Creates a new segment. Returns 201 with the created segment and Location header.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://qonversion.mintlify.app/_mintlify/api/og/v2?division=Segments\u0026amp;title=Create+a+segment\u0026amp;description=Creates+a+new+segment.+Returns+201+with+the+created+segment+and+Location+header.\u0026amp;theme=5e06de6effeba4eba76a25c4\u0026amp;signature=1f95d7c4bc02619e5819939eba01f17d97d953ba49414fb149ad211b657daf8a\">\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/qonversion/Dzad_pULPIRkhK0k/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Qonversion\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#7357C2\">\u003clink data-mint-head rel=\"canonical\" href=\"https://documentation.qonversion.io/api-reference/segments/create-a-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/create-a-segment.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://documentation.qonversion.io/#organization\",\"name\":\"Qonversion\",\"url\":\"https://documentation.qonversion.io\"},{\"@type\":\"WebSite\",\"@id\":\"https://documentation.qonversion.io#website\",\"name\":\"Qonversion\",\"url\":\"https://documentation.qonversion.io\",\"publisher\":{\"@id\":\"https://documentation.qonversion.io/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://documentation.qonversion.io/api-reference/segments/create-a-segment#webpage\",\"url\":\"https://documentation.qonversion.io/api-reference/segments/create-a-segment\",\"name\":\"Create a segment\",\"description\":\"Creates a new segment. Returns 201 with the created segment and Location header.\",\"dateModified\":\"2026-10-23T00:21:08.897Z\",\"isPartOf\":{\"@id\":\"https://documentation.qonversion.io#website\"},\"breadcrumb\":{\"@id\":\"https://documentation.qonversion.io/api-reference/segments/create-a-segment#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://documentation.qonversion.io/api-reference/segments/create-a-segment#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"REST API v4\",\"item\":\"https://documentation.qonversion.io/api-reference/products/list-products\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Segments\",\"item\":\"https://documentation.qonversion.io/api-reference/segments/list-segments\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Create a segment\",\"item\":\"https://documentation.qonversion.io/api-reference/segments/create-a-segment\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://documentation.qonversion.io/api-reference/segments/create-a-segment#apireference\",\"headline\":\"Create a segment\",\"name\":\"Create a segment\",\"description\":\"Creates a new segment. Returns 201 with the created segment and Location header.\",\"url\":\"https://documentation.qonversion.io/api-reference/segments/create-a-segment\",\"mainEntityOfPage\":{\"@id\":\"https://documentation.qonversion.io/api-reference/segments/create-a-segment#webpage\"},\"dateModified\":\"2026-10-23T00:21:08.897Z\",\"publisher\":{\"@id\":\"https://documentation.qonversion.io/#organization\"},\"isPartOf\":{\"@id\":\"https://documentation.qonversion.io#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Qonversion\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Qonversion","nav":{"global":null,"tabs":[{"tab":"Get started","icon":"rocket","pages":[{"title":"Get started","href":"/docs/qonversion-platform"}]},{"tab":"Guides","icon":"book-open","pages":[{"title":"Guides","href":"/docs/apple-ads"}]},{"tab":"For agents","icon":"robot","pages":[{"title":"For agents","href":"/docs/for-agents"}]},{"tab":"API reference","icon":"code","groups":[{"group":"Start here","icon":"square-terminal","pages":[{"title":"Overview","href":"/reference/v4/overview"},{"title":"Authentication","href":"/reference/v4/authentication"},{"title":"Handling Errors","href":"/reference/v4/handling-api-errors"}]},{"group":"Resource guides","icon":"book","pages":[{"title":"Users","href":"/reference/v4/users"},{"title":"User Properties","href":"/reference/v4/user-properties"},{"title":"Identities","href":"/reference/v4/identities"},{"title":"Entitlements","href":"/reference/v4/entitlements"},{"title":"Purchases","href":"/reference/v4/purchases"},{"title":"Products","href":"/reference/v4/products"},{"title":"Offerings","href":"/reference/v4/offerings"},{"title":"Remote Configurations","href":"/reference/v4/remote-configurations"},{"title":"Customers","href":"/reference/v4/customers"},{"title":"Segments","href":"/reference/v4/segments"},{"title":"Experiments","href":"/reference/v4/experiments"},{"title":"Screens","href":"/reference/v4/screens"},{"title":"Analytics","href":"/reference/v4/analytics"},{"title":"Apple Ads in REST API v4","sidebarTitle":"Apple Ads","href":"/reference/v4/apple-ads"},{"title":"Exports","href":"/reference/v4/exports"},{"title":"Events","href":"/reference/v4/events"},{"title":"Event logs","href":"/reference/v4/event-logs"},{"title":"Scheduled Reports","href":"/reference/v4/scheduled-reports"},{"title":"Integrations","href":"/reference/v4/integrations"},{"title":"Automations","href":"/reference/v4/automations"},{"title":"Project Settings","href":"/reference/v4/project-settings"}]},{"group":"REST API v4","icon":"code","pages":[{"group":"Products","pages":[{"title":"List products","deprecated":null,"version":null,"openapi":"/api-reference/rest-api.yaml get /products","href":"/api-reference/products/list-products"},{"title":"Create a product","deprecated":null,"version":null,"openapi":"/api-reference/rest-api.yaml post /products","href":"/api-reference/products/create-a-product"},{"title":"Get a product","deprecated":null,"version":null,"openapi":"/api-reference/rest-api-v4.yaml get /products/{product_id}","href":"/api-reference/products/get-a-product"},{"title":"Delete a product","deprecated":null,"version":null,"openapi":"/api-reference/rest-api.yaml delete /products/{uid}","href":"/api-reference/products/delete-a-product"},{"title":"Update a product (partial)","deprecated":null,"version":null,"openapi":"/api-reference/rest-api-v4.yaml patch /products/{product_id}","href":"/api-reference/products/update-a-product-partial"}]},{"group":"Users","pages":[{"title":"Create a user","deprecated":null,"version":null,"openapi":"/api-reference/rest-api.yaml post /users/{id}","href":"/api-reference/users/create-a-user"},{"title":"Get a user","deprecated":null,"version":null,"openapi":"/api-reference/rest-api-v4.yaml get /users/{user_id}","href":"/api-reference/users/get-a-user"}]},{"group":"Customers","pages":[{"title":"List customers","deprecated":null,"version":null,"openapi":"/api-reference/rest-api-v4.yaml get /customers","href":"/api-reference/customers/list-customers"},{"title":"Get aggregated customer metrics","deprecated":null,"version":null,"openapi":"/api-reference/rest-api-v4.yaml get /customers/metrics","href":"/api-reference/customers/get-aggregated-customer-metrics"},{"title":"Get a customer","deprecated":null,"version":null,"openapi":"/api-reference/rest-api-v4.yaml get /customers/{customer_id}","href":"/api-reference/customers/get-a-customer"},{"title":"Delete a customer (GDPR)","deprecated":null,"version":null,"openapi":"/api-reference/rest-api-v4.yaml delete /customers/{customer_id}","href":"/api-reference/customers/delete-a-customer-gdpr"},{"title":"Set customer properties","deprecated":null,"version":null,"openapi":"/api-reference/rest-api-v4.yaml post /customers/{customer_id}/properties","href":"/api-reference/customers/set-customer-properties"},{"title":"List customer permissions","deprecated":null,"version":null,"openapi":"/api-reference/rest-api-v4.yaml get /customers/{customer_id}/permissions","href":"/api-reference/customers/list-customer-permissions"},{"title":"Grant a permission to a customer","deprecated":null,"version":null,"openapi":"/api-reference/rest-api-v4.yaml post /customers/{customer_id}/permissions","href":"/api-reference/customers/grant-a-permission-to-a-customer"},{"title":"Revoke a customer permission","deprecated":null,"version":null,"openapi":"/api-reference/rest-api-v4.yaml delete /customers/{customer_id}/permissions/{permission_id}","href":"/api-reference/customers/revoke-a-customer-permission"}]},{"group":"Entitlements","pages":[{"title":"List entitlement definitions","deprecated":null,"version":null,"openapi":"/api-reference/rest-api-v4.yaml get /entitlements","href":"/api-reference/entitlements/list-entitlement-definitions"},{"title":"Create an entitlement definition","deprecated":null,"version":null,"openapi":"/api-reference/rest-api-v4.yaml post /entitlements","href":"/api-reference/entitlements/create-an-entitlement-definition"},{"title":"Get an entitlement definition","deprecated":null,"version":null,"openapi":"/api-reference/rest-api-v4.yaml get /entitlements/{entitlement_id}","href":"/api-reference/entitlements/get-an-entitlement-definition"},{"title":"Delete an entitlement definition","deprecated":null,"version":null,"openapi":"/api-reference/rest-api-v4.yaml delete /entitlements/{entitlement_id}","href":"/api-reference/entitlements/delete-an-entitlement-definition"},{"title":"Update an entitlement definition (partial)","deprecated":null,"version":null,"openapi":"/api-reference/rest-api-v4.yaml patch /entitlements/{entitlement_id}","href":"/api-reference/entitlements/update-an-entitlement-definition-partial"},{"title":"List user entitlements","deprecated":null,"version":null,"openapi":"/api-reference/rest-api-v4.yaml get /users/{user_id}/entitlements","href":"/api-reference/entitlements/list-user-entitlements"},{"title":"Grant an entitlement to a user","deprecated":null,"version":null,"openapi":"/api-reference/rest-api-v4.yaml post /users/{user_id}/entitlements","href":"/api-reference/entitlements/grant-an-entitlement-to-a-user"},{"title":"Revoke a user entitlement","deprecated":null,"version":null,"openapi":"/api-reference/rest-api-v4.yaml delete /users/{user_id}/entitlements/{entitlement_id}","href":"/api-reference/entitlements/revoke-a-user-entitlement"}]},{"group":"Offerings","pages":[{"title":"List offerings","deprecated":true,"version":null,"openapi":"/api-reference/rest-api-v4.yaml get /offerings","href":"/api-reference/offerings/list-offerings"},{"title":"Create an offering","deprecated":true,"version":null,"openapi":"/api-reference/rest-api-v4.yaml post /offerings","href":"/api-reference/offerings/create-an-offering"},{"title":"Get an offering","deprecated":true,"version":null,"openapi":"/api-reference/rest-api-v4.yaml get /offerings/{offering_id}","href":"/api-reference/offerings/get-an-offering"},{"title":"Delete an offering","deprecated":true,"version":null,"openapi":"/api-reference/rest-api-v4.yaml delete /offerings/{offering_id}","href":"/api-reference/offerings/delete-an-offering"},{"title":"Update an offering","deprecated":true,"version":null,"openapi":"/api-reference/rest-api-v4.yaml patch /offerings/{offering_id}","href":"/api-reference/offerings/update-an-offering"},{"title":"Set main offering","deprecated":true,"version":null,"openapi":"/api-reference/rest-api-v4.yaml post /offerings/{offering_id}/set-main","href":"/api-reference/offerings/set-main-offering"}]},{"group":"Remote Configurations","pages":[{"title":"List remote configurations","deprecated":null,"version":null,"openapi":"/api-reference/rest-api-v4.yaml get /remote-configurations","href":"/api-reference/remote-configurations/list-remote-configurations"},{"title":"Create a remote configuration","deprecated":null,"version":null,"openapi":"/api-reference/rest-api-v4.yaml post /remote-configurations","href":"/api-reference/remote-configurations/create-a-remote-configuration"},{"title":"Get a remote configuration","deprecated":null,"version":null,"openapi":"/api-reference/rest-api-v4.yaml get /remote-configurations/{config_id}","href":"/api-reference/remote-configurations/get-a-remote-configuration"},{"title":"Update a remote configuration (full replace)","deprecated":null,"version":null,"openapi":"/api-reference/rest-api-v4.yaml put /remote-configurations/{config_id}","href":"/api-reference/remote-configurations/update-a-remote-configuration-full-replace"},{"title":"Delete a remote configuration","deprecated":null,"version":null,"openapi":"/api-reference/rest-api-v4.yaml delete /remote-configurations/{config_id}","href":"/api-reference/remote-configurations/delete-a-remote-configuration"},{"title":"Change remote configuration status","deprecated":null,"version":null,"openapi":"/api-reference/rest-api-v4.yaml patch /remote-configurations/{config_id}/status","href":"/api-reference/remote-configurations/change-remote-configuration-status"},{"title":"Get the payload mapping","deprecated":null,"version":null,"openapi":"/api-reference/rest-api-v4.yaml get /remote-configurations/{config_id}/payload-mapping","href":"/api-reference/remote-configurations/get-the-payload-mapping"},{"title":"Set the payload mapping","deprecated":null,"version":null,"openapi":"/api-reference/rest-api-v4.yaml post /remote-configurations/{config_id}/payload-mapping","href":"/api-reference/remote-configurations/set-the-payload-mapping"},{"title":"Get the payload values","deprecated":null,"version":null,"openapi":"/api-reference/rest-api-v4.yaml get /remote-configurations/{config_id}/payload","href":"/api-reference/remote-configurations/get-the-payload-values"},{"title":"Replace the payload values","deprecated":null,"version":null,"openapi":"/api-reference/rest-api-v4.yaml put /remote-configurations/{config_id}/payload","href":"/api-reference/remote-configurations/replace-the-payload-values"},{"title":"Attach a user to a remote configuration","deprecated":null,"version":null,"openapi":"/api-reference/rest-api-v4.yaml post /remote-configurations/{config_id}/users/{user_id}","href":"/api-reference/remote-configurations/attach-a-user-to-a-remote-configuration"},{"title":"Detach a user from a remote configuration","deprecated":null,"version":null,"openapi":"/api-reference/rest-api-v4.yaml delete /remote-configurations/{config_id}/users/{user_id}","href":"/api-reference/remote-configurations/detach-a-user-from-a-remote-configuration"}]},{"group":"Segments","pages":[{"title":"List segments","description":"Returns a paginated list of segments for the authenticated project.\nSegments are ordered by creation date (newest first).\n","deprecated":null,"version":null,"openapi":"/api-reference/rest-api-v4.yaml get /segments","href":"/api-reference/segments/list-segments"},{"title":"Create a segment","deprecated":null,"version":null,"openapi":"/api-reference/rest-api-v4.yaml post /segments","href":"/api-reference/segments/create-a-segment"},{"title":"List system segments","description":"Returns all predefined system segments. System segments are read-only\nand cannot be modified or deleted.\n","deprecated":null,"version":null,"openapi":"/api-reference/rest-api-v4.yaml get /segments/system","href":"/api-reference/segments/list-system-segments"},{"title":"Get a segment","deprecated":null,"version":null,"openapi":"/api-reference/rest-api-v4.yaml get /segments/{segment_id}","href":"/api-reference/segments/get-a-segment"},{"title":"Update a segment (full replace)","deprecated":null,"version":null,"openapi":"/api-reference/rest-api-v4.yaml put /segments/{segment_id}","href":"/api-reference/segments/update-a-segment-full-replace"},{"title":"Delete a segment","deprecated":null,"version":null,"openapi":"/api-reference/rest-api-v4.yaml delete /segments/{segment_id}","href":"/api-reference/segments/delete-a-segment"}]},{"group":"Experiments","pages":[{"title":"List experiments","deprecated":null,"version":null,"openapi":"/api-reference/rest-api-v4.yaml get /experiments","href":"/api-reference/experiments/list-experiments"},{"title":"Create an experiment","deprecated":null,"version":null,"openapi":"/api-reference/rest-api-v4.yaml post /experiments","href":"/api-reference/experiments/create-an-experiment"},{"title":"Get experiments analytics summary","deprecated":null,"version":null,"openapi":"/api-reference/rest-api-v4.yaml get /experiments/summary","href":"/api-reference/experiments/get-experiments-analytics-summary"},{"title":"Get an experiment","deprecated":null,"version":null,"openapi":"/api-reference/rest-api-v4.yaml get /experiments/{experiment_id}","href":"/api-reference/experiments/get-an-experiment"},{"title":"Delete an experiment","deprecated":null,"version":null,"openapi":"/api-reference/rest-api-v4.yaml delete /experiments/{experiment_id}","href":"/api-reference/experiments/delete-an-experiment"},{"title":"Partially update an experiment","deprecated":null,"version":null,"openapi":"/api-reference/rest-api-v4.yaml patch /experiments/{experiment_id}","href":"/api-reference/experiments/partially-update-an-experiment"},{"title":"Change experiment status","deprecated":null,"version":null,"openapi":"/api-reference/rest-api-v4.yaml post /experiments/{experiment_id}/status","href":"/api-reference/experiments/change-experiment-status"},{"title":"List experiment groups","deprecated":null,"version":null,"openapi":"/api-reference/rest-api-v4.yaml get /experiments/{experiment_id}/groups","href":"/api-reference/experiments/list-experiment-groups"},{"title":"Create an experiment group","deprecated":null,"version":null,"openapi":"/api-reference/rest-api-v4.yaml post /experiments/{experiment_id}/groups","href":"/api-reference/experiments/create-an-experiment-group"},{"title":"Delete an experiment group","deprecated":null,"version":null,"openapi":"/api-reference/rest-api-v4.yaml delete /experiments/{experiment_id}/groups/{group_id}","href":"/api-reference/experiments/delete-an-experiment-group"},{"title":"Update an experiment group","deprecated":null,"version":null,"openapi":"/api-reference/rest-api-v4.yaml patch /experiments/{experiment_id}/groups/{group_id}","href":"/api-reference/experiments/update-an-experiment-group"},{"title":"Attach a user to an experiment group","deprecated":null,"version":null,"openapi":"/api-reference/rest-api-v4.yaml post /experiments/{experiment_id}/users/{user_id}","href":"/api-reference/experiments/attach-a-user-to-an-experiment-group"},{"title":"Detach a user from an experiment","deprecated":null,"version":null,"openapi":"/api-reference/rest-api-v4.yaml delete /experiments/{experiment_id}/users/{user_id}","href":"/api-reference/experiments/detach-a-user-from-an-experiment"}]},{"group":"Purchases","pages":[{"title":"List purchases for a user","deprecated":null,"version":null,"openapi":"/api-reference/rest-api-v4.yaml get /users/{user_id}/purchases","href":"/api-reference/purchases/list-purchases-for-a-user"}]},{"group":"User Properties","pages":[{"title":"List properties for a user","deprecated":null,"version":null,"openapi":"/api-reference/rest-api-v4.yaml get /users/{user_id}/properties","href":"/api-reference/user-properties/list-properties-for-a-user"},{"title":"Set (upsert) properties for a user","deprecated":null,"version":null,"openapi":"/api-reference/rest-api-v4.yaml post /users/{user_id}/properties","href":"/api-reference/user-properties/set-upsert-properties-for-a-user"}]},{"group":"Identities","pages":[{"title":"Get an identity by external ID","deprecated":null,"version":null,"openapi":"/api-reference/rest-api-v4.yaml get /identities/{identity_id}","href":"/api-reference/identities/get-an-identity-by-external-id"},{"title":"Create an identity link","deprecated":null,"version":null,"openapi":"/api-reference/rest-api-v4.yaml post /identities","href":"/api-reference/identities/create-an-identity-link"}]},{"group":"Exports","pages":[{"title":"Create export (async)","deprecated":null,"version":null,"openapi":"/api-reference/rest-api-v4.yaml post /exports","href":"/api-reference/exports/create-export-async"},{"title":"List past exports","deprecated":null,"version":null,"openapi":"/api-reference/rest-api-v4.yaml get /exports/history","href":"/api-reference/exports/list-past-exports"},{"title":"Get export status","deprecated":null,"version":null,"openapi":"/api-reference/rest-api-v4.yaml get /exports/{export_id}","href":"/api-reference/exports/get-export-status"}]},{"group":"Events","pages":[{"title":"List events","deprecated":null,"version":null,"openapi":"/api-reference/rest-api-v4.yaml get /events","href":"/api-reference/events/list-events"},{"title":"List integration delivery logs","deprecated":null,"version":null,"openapi":"/api-reference/rest-api-v4.yaml get /event-logs","href":"/api-reference/events/list-integration-delivery-logs"}]},{"group":"Scheduled Reports","pages":[{"title":"List scheduled reports","deprecated":null,"version":null,"openapi":"/api-reference/rest-api-v4.yaml get /scheduled-reports","href":"/api-reference/scheduled-reports/list-scheduled-reports"},{"title":"Create scheduled report","deprecated":null,"version":null,"openapi":"/api-reference/rest-api-v4.yaml post /scheduled-reports","href":"/api-reference/scheduled-reports/create-scheduled-report"},{"title":"List available destinations","deprecated":null,"version":null,"openapi":"/api-reference/rest-api-v4.yaml get /scheduled-reports/destinations","href":"/api-reference/scheduled-reports/list-available-destinations"},{"title":"Get scheduled report","deprecated":null,"version":null,"openapi":"/api-reference/rest-api-v4.yaml get /scheduled-reports/{report_id}","href":"/api-reference/scheduled-reports/get-scheduled-report"},{"title":"Update scheduled report","deprecated":null,"version":null,"openapi":"/api-reference/rest-api-v4.yaml put /scheduled-reports/{report_id}","href":"/api-reference/scheduled-reports/update-scheduled-report"},{"title":"Delete scheduled report","deprecated":null,"version":null,"openapi":"/api-reference/rest-api-v4.yaml delete /scheduled-reports/{report_id}","href":"/api-reference/scheduled-reports/delete-scheduled-report"},{"title":"Send test report","deprecated":null,"version":null,"openapi":"/api-reference/rest-api-v4.yaml post /scheduled-reports/{report_id}/send-test","href":"/api-reference/scheduled-reports/send-test-report"}]},{"group":"Integrations","pages":[{"title":"Get integrations metadata","deprecated":null,"version":null,"openapi":"/api-reference/rest-api-v4.yaml get /integrations/meta","href":"/api-reference/integrations/get-integrations-metadata"},{"title":"List integrations","deprecated":null,"version":null,"openapi":"/api-reference/rest-api-v4.yaml get /integrations","href":"/api-reference/integrations/list-integrations"},{"title":"Create integration","deprecated":null,"version":null,"openapi":"/api-reference/rest-api-v4.yaml post /integrations","href":"/api-reference/integrations/create-integration"},{"title":"Update integration status","deprecated":null,"version":null,"openapi":"/api-reference/rest-api-v4.yaml post /integrations/{integration_id}/status","href":"/api-reference/integrations/update-integration-status"},{"title":"Delete integration","deprecated":null,"version":null,"openapi":"/api-reference/rest-api-v4.yaml delete /integrations/{integration_id}","href":"/api-reference/integrations/delete-integration"}]},{"group":"Automations","pages":[{"title":"List automations","deprecated":true,"version":null,"openapi":"/api-reference/rest-api-v4.yaml get /automations","href":"/api-reference/automations/list-automations"},{"title":"Create an automation","deprecated":true,"version":null,"openapi":"/api-reference/rest-api-v4.yaml post /automations","href":"/api-reference/automations/create-an-automation"},{"title":"Get an automation","deprecated":true,"version":null,"openapi":"/api-reference/rest-api-v4.yaml get /automations/{automation_id}","href":"/api-reference/automations/get-an-automation"},{"title":"Update an automation","deprecated":true,"version":null,"openapi":"/api-reference/rest-api-v4.yaml put /automations/{automation_id}","href":"/api-reference/automations/update-an-automation"},{"title":"Delete an automation","deprecated":true,"version":null,"openapi":"/api-reference/rest-api-v4.yaml delete /automations/{automation_id}","href":"/api-reference/automations/delete-an-automation"},{"title":"Update automation status","deprecated":true,"version":null,"openapi":"/api-reference/rest-api-v4.yaml patch /automations/{automation_id}/status","href":"/api-reference/automations/update-automation-status"}]},{"group":"Analytics","pages":[{"title":"Get analytics chart data","deprecated":null,"version":null,"openapi":"/api-reference/rest-api-v4.yaml get /analytics/charts/{chart_code}","href":"/api-reference/analytics/get-analytics-chart-data"},{"title":"Get analytics chart metadata","deprecated":null,"version":null,"openapi":"/api-reference/rest-api-v4.yaml get /analytics/charts/{chart_code}/meta","href":"/api-reference/analytics/get-analytics-chart-metadata"},{"title":"Get analytics card data","deprecated":null,"version":null,"openapi":"/api-reference/rest-api-v4.yaml get /analytics/cards/{card_code}","href":"/api-reference/analytics/get-analytics-card-data"},{"title":"Get supported analytics currencies","deprecated":null,"version":null,"openapi":"/api-reference/rest-api-v4.yaml get /analytics/currencies","href":"/api-reference/analytics/get-supported-analytics-currencies"},{"title":"Get cohort analytics data","deprecated":null,"version":null,"openapi":"/api-reference/rest-api-v4.yaml get /analytics/cohorts","href":"/api-reference/analytics/get-cohort-analytics-data"},{"title":"Get cohort analytics metadata","deprecated":null,"version":null,"openapi":"/api-reference/rest-api-v4.yaml get /analytics/cohorts/meta","href":"/api-reference/analytics/get-cohort-analytics-metadata"},{"title":"Get LTV analytics data","deprecated":null,"version":null,"openapi":"/api-reference/rest-api-v4.yaml get /analytics/ltv","href":"/api-reference/analytics/get-ltv-analytics-data"},{"title":"Get LTV analytics metadata","deprecated":null,"version":null,"openapi":"/api-reference/rest-api-v4.yaml get /analytics/ltv/meta","href":"/api-reference/analytics/get-ltv-analytics-metadata"},{"title":"Get LTV trial-conversion analytics data","deprecated":null,"version":null,"openapi":"/api-reference/rest-api-v4.yaml get /analytics/ltv/trial-conversion","href":"/api-reference/analytics/get-ltv-trial-conversion-analytics-data"},{"title":"Get analytics insights","deprecated":null,"version":null,"openapi":"/api-reference/rest-api-v4.yaml get /analytics/insights","href":"/api-reference/analytics/get-analytics-insights"}]},{"group":"Screens","pages":[{"title":"List screens","deprecated":true,"version":null,"openapi":"/api-reference/rest-api-v4.yaml get /screens","href":"/api-reference/screens/list-screens"},{"title":"Create a screen","deprecated":true,"version":null,"openapi":"/api-reference/rest-api-v4.yaml post /screens","href":"/api-reference/screens/create-a-screen"},{"title":"Get screens analytics overview","deprecated":true,"version":null,"openapi":"/api-reference/rest-api-v4.yaml get /screens/analytics/overview","href":"/api-reference/screens/get-screens-analytics-overview"},{"title":"Get a screen","deprecated":true,"version":null,"openapi":"/api-reference/rest-api-v4.yaml get /screens/{screen_id}","href":"/api-reference/screens/get-a-screen"},{"title":"Update a screen","deprecated":true,"version":null,"openapi":"/api-reference/rest-api-v4.yaml put /screens/{screen_id}","href":"/api-reference/screens/update-a-screen"},{"title":"Delete a screen","deprecated":true,"version":null,"openapi":"/api-reference/rest-api-v4.yaml delete /screens/{screen_id}","href":"/api-reference/screens/delete-a-screen"},{"title":"Publish a screen","deprecated":true,"version":null,"openapi":"/api-reference/rest-api-v4.yaml post /screens/{screen_id}/publish","href":"/api-reference/screens/publish-a-screen"},{"title":"Duplicate a screen","deprecated":true,"version":null,"openapi":"/api-reference/rest-api-v4.yaml post /screens/{screen_id}/copy","href":"/api-reference/screens/duplicate-a-screen"},{"title":"Get per-screen analytics","deprecated":true,"version":null,"openapi":"/api-reference/rest-api-v4.yaml get /screens/{screen_id}/analytics","href":"/api-reference/screens/get-per-screen-analytics"}]},{"group":"Project Settings","pages":[{"title":"Get project settings","deprecated":null,"version":null,"openapi":"/api-reference/rest-api-v4.yaml get /project-settings","href":"/api-reference/project-settings/get-project-settings"},{"title":"Update project settings","deprecated":null,"version":null,"openapi":"/api-reference/rest-api-v4.yaml patch /project-settings","href":"/api-reference/project-settings/update-project-settings"},{"title":"Regenerate project secret key","deprecated":true,"version":null,"openapi":"/api-reference/rest-api-v4.yaml post /project-settings/regenerate-secret","href":"/api-reference/project-settings/regenerate-project-secret-key"},{"title":"Get store configuration","deprecated":null,"version":null,"openapi":"/api-reference/rest-api-v4.yaml get /project-settings/stores/{platform}","href":"/api-reference/project-settings/get-store-configuration"},{"title":"Update store configuration","deprecated":null,"version":null,"openapi":"/api-reference/rest-api-v4.yaml post /project-settings/stores/{platform}","href":"/api-reference/project-settings/update-store-configuration"}]},{"group":"Apple Ads","pages":[{"title":"Get Apple Ads report","deprecated":null,"version":null,"openapi":"/api-reference/rest-api-v4.yaml get /analytics/apple-ads/report","href":"/api-reference/apple-ads/get-apple-ads-report"},{"title":"Get the Apple Ads daily series","deprecated":null,"version":null,"openapi":"/api-reference/rest-api-v4.yaml get /analytics/apple-ads/report/series","href":"/api-reference/apple-ads/get-the-apple-ads-daily-series"},{"title":"Change an Apple Ads campaign, ad group or keyword","deprecated":null,"version":null,"openapi":"/api-reference/rest-api-v4.yaml post /analytics/apple-ads/entity/update","href":"/api-reference/apple-ads/change-an-apple-ads-campaign-ad-group-or-keyword"},{"title":"Get the Apple Ads connection status","deprecated":null,"version":null,"openapi":"/api-reference/rest-api-v4.yaml get /integrations/apple-ads/connection","href":"/api-reference/apple-ads/get-the-apple-ads-connection-status"}]}]},{"group":"Analytics API","icon":"chart-line","pages":[{"group":"Analytics Charts","pages":[{"title":"Get proceeds chart data","deprecated":null,"version":null,"openapi":"/api-reference/analytics-api.yaml get /{projectApiKey}/chart/proceeds","href":"/api-reference/analytics-charts/get-proceeds-chart-data"},{"title":"Get users overview chart data","deprecated":null,"version":null,"openapi":"/api-reference/analytics-api.yaml get /{projectApiKey}/chart/users-overview","href":"/api-reference/analytics-charts/get-users-overview-chart-data"},{"title":"Get paid subscriptions movement chart data","deprecated":null,"version":null,"openapi":"/api-reference/analytics-api.yaml get /{projectApiKey}/chart/paid-subscriptions-movement","href":"/api-reference/analytics-charts/get-paid-subscriptions-movement-chart-data"},{"title":"Get active subscriptions chart data","deprecated":null,"version":null,"openapi":"/api-reference/analytics-api.yaml get /{projectApiKey}/chart/active-subscriptions","href":"/api-reference/analytics-charts/get-active-subscriptions-chart-data"}]},{"group":"Customers","pages":[{"title":"Get customers list","deprecated":null,"version":null,"openapi":"/api-reference/analytics-api.yaml get /{projectApiKey}/customers","href":"/api-reference/customers/get-customers-list"},{"title":"Get customer metrics (Analytics)","deprecated":null,"version":null,"openapi":"/api-reference/analytics-api.yaml get /{projectApiKey}/customers-metrics","href":"/api-reference/customers/get-customer-metrics-analytics"}]}]},{"group":"Legacy: API v3","icon":"clock-rotate-left","expanded":false,"pages":[{"title":"API v3 (legacy)","href":"/reference/overview"},{"group":"REST API v3","pages":[{"group":"Users","pages":[{"title":"Retrieve a user","deprecated":null,"version":null,"openapi":"/api-reference/rest-api.yaml get /users/{id}","href":"/api-reference/users/retrieve-a-user"},{"title":"Create a user","deprecated":null,"version":null,"openapi":"/api-reference/rest-api.yaml post /users/{id}","href":"/api-reference/users/create-a-user"}]},{"group":"User Properties","pages":[{"title":"Retrieve user properties","deprecated":null,"version":null,"openapi":"/api-reference/rest-api.yaml get /users/{id}/properties","href":"/api-reference/user-properties/retrieve-user-properties"},{"title":"Create user properties","deprecated":null,"version":null,"openapi":"/api-reference/rest-api.yaml post /users/{id}/properties","href":"/api-reference/user-properties/create-user-properties"}]},{"group":"Identity","pages":[{"title":"Retrieve an identity","deprecated":null,"version":null,"openapi":"/api-reference/rest-api.yaml get /identities/{identity_id}","href":"/api-reference/identity/retrieve-an-identity"},{"title":"Create an identity","deprecated":null,"version":null,"openapi":"/api-reference/rest-api.yaml post /identities/{identity_id}","href":"/api-reference/identity/create-an-identity"}]},{"group":"Entitlements","pages":[{"title":"Retrieve entitlements","deprecated":null,"version":null,"openapi":"/api-reference/rest-api.yaml get /users/{user_id}/entitlements","href":"/api-reference/entitlements/retrieve-entitlements"},{"title":"Grant an entitlement","deprecated":null,"version":null,"openapi":"/api-reference/rest-api.yaml post /users/{user_id}/entitlements","href":"/api-reference/entitlements/grant-an-entitlement"},{"title":"Revoke an entitlement","deprecated":null,"version":null,"openapi":"/api-reference/rest-api.yaml delete /users/{user_id}/entitlements/{id}","href":"/api-reference/entitlements/revoke-an-entitlement"}]},{"group":"Purchases","pages":[{"title":"Create a purchase","deprecated":null,"version":null,"openapi":"/api-reference/rest-api.yaml post /users/{user_id}/purchases","href":"/api-reference/purchases/create-a-purchase"}]},{"group":"Products","pages":[{"title":"Get products","deprecated":null,"version":null,"openapi":"/api-reference/rest-api.yaml get /products/{id}","href":"/api-reference/products/get-products"},{"title":"List products","deprecated":null,"version":null,"openapi":"/api-reference/rest-api.yaml get /products","href":"/api-reference/products/list-products"},{"title":"Create a product","deprecated":null,"version":null,"openapi":"/api-reference/rest-api.yaml post /products","href":"/api-reference/products/create-a-product"},{"title":"Update a product","deprecated":null,"version":null,"openapi":"/api-reference/rest-api.yaml put /products/{uid}","href":"/api-reference/products/update-a-product"},{"title":"Delete a product","deprecated":null,"version":null,"openapi":"/api-reference/rest-api.yaml delete /products/{uid}","href":"/api-reference/products/delete-a-product"},{"title":"Patch a product","deprecated":null,"version":null,"openapi":"/api-reference/rest-api.yaml patch /products/{uid}","href":"/api-reference/products/patch-a-product"}]}]}]}]},{"tab":"Changelog","icon":"clock-rotate-left","pages":[{"title":"Changelog","href":"/changelog"}]}]},"basePath":"","title":"Create a segment - Qonversion","buildId":"dpl_9VVk5y1P8k1ATeJguVngy9Q3cmbD","deploymentId":"dpl_9VVk5y1P8k1ATeJguVngy9Q3cmbD","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-DX1Meug0.js","utils-B_OMIQVC.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-ChxhRPMa.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-CuKvD8Iv.js","snippetPresets-C5d7p2hp.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-CfHcE8m4.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-C1zZV314.js","shallow-CmQhqCJn.js","getApiPlaygroundDisplay-YRo9s1O7.js","CodeSnippet-RN1MTdfk.js","CodeSnippets-DKLPHxJA.js","Page-BAvA99GL.js","getPastedJson-bz0M41mU.js","icon-CsmhpPrv.js","MethodPill-CNGsVE77.js","DuplicateIcon-DilfU_Z2.js","createIcon-BdsYzQck.js","DynamicMarkdown-CbqEDjbV.js","SectionHeading-O6hXpFCN.js","axios-vUo_bRtp.js","Markdown-nKm-uidQ.js","clsx-ClVdStUn.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-CIQkMg3R.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-ImrFS4Fy.js"]}