Create a custom user segment based on filter rules. Available on all plans, limited by your plan’s maxCustomSegments quota.
After creation, segment membership is computed asynchronously. The segment will be available immediately but member counts may take a few moments to populate.
{
"success": false,
"error": "Validation error: filters.rules must contain at least 1 element(s)"
}
{
"success": false,
"error": "Your plan allows up to 5 custom segments (currently using 5). Please upgrade to create more, or contact [email protected]."
}
{
"success": false,
"error": "Validation error: filters.rules must contain at least 1 element(s)"
}
{
"success": false,
"error": "Your plan allows up to 5 custom segments (currently using 5). Please upgrade to create more, or contact [email protected]."
}
{
"success": true,
"error": "<string>"
}
{"docsConfig":{"theme":"maple","$schema":"https://mintlify.com/docs.json","name":"Greenflash","description":"Greenflash helps teams turn AI products into self-improving growth engines with automatic analysis, testing, and optimization.","colors":{"primary":"#B9F90F","light":"#B9F90F","dark":"#04452B"},"logo":{"light":"https://mintcdn.com/greenflash/dolPuTTMnm2vInVv/public/greenflash_logo.png?fit=max\u0026auto=format\u0026n=dolPuTTMnm2vInVv\u0026q=85\u0026s=5b0635308575d5082ba3214adf289bfa","dark":"https://mintcdn.com/greenflash/dolPuTTMnm2vInVv/public/greenflash_logo_dark_mode.png?fit=max\u0026auto=format\u0026n=dolPuTTMnm2vInVv\u0026q=85\u0026s=c2f8c735e19145c5f28c6d2e8e7fc15e"},"favicon":"https://mintcdn.com/greenflash/dolPuTTMnm2vInVv/public/favicon.png?fit=max\u0026auto=format\u0026n=dolPuTTMnm2vInVv\u0026q=85\u0026s=e5be8a182ccdcdc5f885953aa830a2c3","api":{"openapi":"https://www.greenflash.ai/api/openapi","playground":{"display":"interactive"},"examples":{"languages":["curl","python","javascript","go","java","php"],"prefill":false}},"background":{"decoration":"gradient","color":{"light":"#F5F1E8","dark":"#1A1A1A"}},"navbar":{"links":[{"icon":"shield-check","href":"https://greenflash.instatus.com","label":"Status"},{"icon":"github","href":"https://github.com/greenflash-ai","label":"GitHub"},{"icon":"mail","href":"mailto:[email protected]","label":"Support"}]},"seo":{"metatags":{"charset":"UTF-8","viewport":"width=device-width, initial-scale=1.0","description":"Greenflash documentation for adapting your AI agents to the real world. Guides, API reference, SDKs, and agent prompts.","keywords":"AI optimization, LLM analytics, AI product insights, autonomous optimization, AI testing, Greenflash","author":"Greenflash","robots":"index, follow","googlebot":"index, follow","theme-color":"#B9F90F","color-scheme":"light dark","refresh":"30","rating":"general","revisit-after":"7 days","language":"en","referrer":"origin-when-cross-origin","reply-to":"[email protected]","distribution":"global","coverage":"Worldwide","category":"Technology","application-name":"Greenflash","og:title":"Greenflash Docs","og:type":"website","og:url":"https://www.greenflash.ai","og:image":"https://www.greenflash.ai/og-image.png","og:description":"Adapt your AI agents to the real world — documentation and API reference.","og:site_name":"Greenflash","og:locale":"en_US"}},"fonts":{"heading":{"family":"Satoshi","weight":500,"source":"fonts/Satoshi-Variable.woff2","format":"woff2"},"body":{"family":"Satoshi","weight":400,"source":"fonts/Satoshi-Variable.woff2","format":"woff2"}},"icons":{"library":"lucide"},"styling":{"eyebrows":"breadcrumbs","codeblocks":{"theme":{"light":"github-light","dark":"vesper"}},"latex":false},"errors":{"404":{"redirect":true}},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"greenflash","hasAudioNarration":false,"actualSubdomain":"greenflash","customDomains":["docs.greenflash.ai"],"gitSource":{"type":"github","owner":"greenflash-ai","repo":"greenflash","deployBranch":"main","contentDirectory":"apps/docs","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6a6796e2c8fbf89454757a3f","collectionId":"0c4a7e67-954a-426f-b337-17a26d582bb8","schemaVersion":"v2","latestBuiltDeploymentHistoryId":"6a6796e2c8fbf89454757a3f"},"feedback":{"thumbs":true},"entitlements":{},"buildId":"6a6796e2c8fbf89454757a3f:success","clientVersion":"0.0.3964","searchFilterCounts":[{"language":"default","tag":"API Reference","count":35},{"language":"default","tag":"Guides","count":22},{"language":"default","tag":"Integrations","count":8},{"language":"default","tag":"Agent Prompts","count":8},{"language":"default","tag":"Analytics","count":7},{"language":"default","tag":"Users","count":7},{"language":"default","tag":"Prompts","count":5},{"language":"default","tag":"Features","count":4},{"language":"default","tag":"Getting Started","count":4},{"language":"default","tag":"Interactions","count":4}]},"assistantConfig":{},"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":"editor-v7-file-tree","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":"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":"pause-universal-search-reconcile","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":"per-site-search-delta","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":"editor-private-page-search","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":"editor-nav-generations","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":"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":"byok-sep-25","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":"editor-agent-model-picker","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","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}],"isAtlas":false,"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":"/* cyrillic-ext */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrodmgPn.woff2) format('woff2');\n unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;\n}\n/* cyrillic */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrMdmgPn.woff2) format('woff2');\n unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;\n}\n/* symbols2 */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFg08vz7ehw.woff2) format('woff2');\n unicode-range: U+2000-2001, U+2004-2008, U+200A, U+23B8-23BD, U+2500-259F;\n}\n/* vietnamese */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrgdmgPn.woff2) format('woff2');\n unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;\n}\n/* latin-ext */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrkdmgPn.woff2) format('woff2');\n unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;\n}\n/* latin */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrcdmg.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n}\n/* cyrillic-ext */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrodmgPn.woff2) format('woff2');\n unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;\n}\n/* cyrillic */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrMdmgPn.woff2) format('woff2');\n unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;\n}\n/* symbols2 */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFg08vz7ehw.woff2) format('woff2');\n unicode-range: U+2000-2001, U+2004-2008, U+200A, U+23B8-23BD, U+2500-259F;\n}\n/* vietnamese */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrgdmgPn.woff2) format('woff2');\n unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;\n}\n/* latin-ext */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrkdmgPn.woff2) format('woff2');\n unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;\n}\n/* latin */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrcdmg.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n}\n/* cyrillic-ext */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 600;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrodmgPn.woff2) format('woff2');\n unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;\n}\n/* cyrillic */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 600;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrMdmgPn.woff2) format('woff2');\n unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;\n}\n/* symbols2 */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 600;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFg08vz7ehw.woff2) format('woff2');\n unicode-range: U+2000-2001, U+2004-2008, U+200A, U+23B8-23BD, U+2500-259F;\n}\n/* vietnamese */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 600;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrgdmgPn.woff2) format('woff2');\n unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;\n}\n/* latin-ext */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 600;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrkdmgPn.woff2) format('woff2');\n unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;\n}\n/* latin */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 600;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrcdmg.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n}\ncode,kbd,pre,samp{font-family:'Geist Mono',ui-monospace,SFMono-Regular,Menlo,monospace}:root{--gf-primary:#B9F90F;--gf-forest:#04452B;--gf-paper-light:#F5F1E8;--gf-paper-dark:#1A1A1A;--gf-ink-light:#1A1A1A;--gf-ink-dark:#EDE4D2;--gf-rule-light:rgb(26 26 26 / 0.18);--gf-rule-dark:rgb(237 228 210 / 0.18);--gf-glow-dark:0 0 8px rgba(185, 249, 15, 0.55), 0 0 18px rgba(185, 249, 15, 0.25);--gf-glow-light:0 0 8px rgba(4, 69, 43, 0.25), 0 0 18px rgba(4, 69, 43, 0.12);--gf-glow-button-dark:0 0 14px rgba(185, 249, 15, 0.55), 0 0 36px rgba(185, 249, 15, 0.30);--gf-glow-button-light:0 0 10px rgba(185, 249, 15, 0.40), 0 0 28px rgba(185, 249, 15, 0.20);--radius:0.5rem;--api-h1:1.55rem;--api-h2:1.15rem;--api-h3:1.0rem;--api-body:0.94rem}html.dark body::before{content:\"\";position:fixed;inset:0;pointer-events:none;z-index:0;background:radial-gradient(1000px 420px at 18% -10%,rgba(137,170,20,.1),transparent 70%),radial-gradient(900px 380px at 85% -8%,rgba(185,249,15,.07),transparent 65%),radial-gradient(1000px 600px at 50% 100%,rgba(100,130,20,.05),transparent 80%);filter:saturate(110%) brightness(98%)}body>*{position:relative;z-index:1}.openapi,.openapi-endpoint,.openapi-operation{font-size:var(--api-body);line-height:1.55;font-feature-settings:\"tnum\" 1,\"ss01\" 1}.openapi .prose h1{font-size:var(--api-h1);line-height:1.25;letter-spacing:-.01em}.openapi .prose h2,.openapi-endpoint h2,.openapi-operation h2{font-size:var(--api-h2)!important;line-height:1.35;letter-spacing:-.005em}.openapi .prose h3,.openapi-endpoint h3,.openapi-operation h3{font-size:var(--api-h3)!important;line-height:1.35}.openapi .prose li,.openapi .prose p{font-size:var(--api-body);line-height:1.55}.openapi [class*=code] h4,.openapi [role=tablist] button{font-size:.9rem}.navbar .primary a,.navbar .primary button{border-radius:999px;font-weight:600;background-color:var(--gf-primary);color:#1a1a1a;box-shadow:var(--gf-glow-button-light);transition:filter .15s ease,box-shadow .15s ease}.navbar .primary a:hover,.navbar .primary button:hover{filter:brightness(1.05);box-shadow:0 0 14px rgba(185,249,15,.55),0 0 36px rgba(185,249,15,.3)}html.dark .navbar .primary a,html.dark .navbar .primary button{background-color:var(--gf-primary);color:#1a1a1a;box-shadow:var(--gf-glow-button-dark)}html.dark .navbar .primary a:hover,html.dark .navbar .primary button:hover{filter:brightness(1.05);box-shadow:0 0 18px rgba(185,249,15,.6),0 0 48px rgba(185,249,15,.35)}.copy-all-container{margin:2rem 0;padding:1rem;border:2px dashed rgba(4,69,43,.35);border-radius:var(--radius);background:0 0;display:flex;align-items:center;justify-content:space-between;gap:1rem;flex-wrap:wrap;transition:all .2s ease}.copy-all-container:hover{border-color:rgba(4,69,43,.55);background:rgba(4,69,43,.03)}.copy-all-content{flex:1;min-width:200px}.copy-all-title{font-size:.875rem;font-weight:600;margin-bottom:.25rem;text-transform:uppercase;letter-spacing:.03em;opacity:.9}.copy-all-description{font-size:.8rem;opacity:.6;font-family:'Geist Mono',ui-monospace,monospace}.copy-all-button,.sign-up-cta{border-radius:var(--radius);background:0 0}.copy-all-button{padding:.625rem 1rem;font-size:.8rem;font-weight:600;border:1.5px solid rgba(4,69,43,.45);cursor:pointer;transition:all .15s ease;min-width:120px;color:var(--gf-forest);font-family:'Geist Mono',ui-monospace,monospace;text-transform:uppercase;letter-spacing:.05em}.copy-all-button.copied{background:rgba(16,185,129,.1);color:#10b981;border-color:#10b981}.copy-all-button:hover{background:rgba(4,69,43,.06);border-color:var(--gf-forest)}html.dark .copy-all-container{border-color:rgba(185,249,15,.25)}html.dark .copy-all-container:hover{border-color:rgba(185,249,15,.45);background:rgba(185,249,15,.04)}html.dark .copy-all-button{border-color:rgba(185,249,15,.5);color:var(--gf-primary)}html.dark .copy-all-button:hover{background:rgba(185,249,15,.12);border-color:var(--gf-primary)}.sign-up-cta{margin:2.5rem 0;padding:2rem;border:1px solid var(--gf-rule-light);display:flex;align-items:center;justify-content:space-between;gap:2rem;flex-wrap:wrap;transition:all .3s ease;position:relative;overflow:hidden}.sign-up-cta:hover{border-color:rgba(26,26,26,.32)}.sign-up-content{flex:1;min-width:240px}.sign-up-description{font-size:1rem;line-height:1.6;opacity:.9;font-weight:500}.sign-up-button,a.sign-up-button{display:inline-flex;align-items:center;gap:.625rem;padding:1rem 2rem;font-size:1rem;font-weight:700;border-radius:var(--radius);text-decoration:none!important;cursor:pointer;transition:all .2s ease;background:var(--gf-primary)!important;color:#1a1a1a!important;box-shadow:var(--gf-glow-button-dark),0 2px 4px rgba(0,0,0,.1);white-space:nowrap;border:0}.sign-up-button span,.sign-up-button svg,a.sign-up-button span,a.sign-up-button svg{color:#1a1a1a!important;stroke:#1a1a1a!important}.sign-up-button:hover{transform:translateY(-2px);box-shadow:0 0 18px rgba(185,249,15,.6),0 0 48px rgba(185,249,15,.35),0 4px 10px rgba(0,0,0,.15);filter:brightness(1.04)}.sign-up-button:active{transform:translateY(0)}.sign-up-arrow{transition:transform .2s ease}.sign-up-button:hover .sign-up-arrow{transform:translateX(4px)}html.dark .prose img,html.dark .sign-up-cta{border-color:var(--gf-rule-dark)}html.dark .sign-up-cta:hover{border-color:rgba(237,228,210,.32)}html:not(.dark){--primary:4 69 43;--primary-light:4 69 43}html:not(.dark) .prose a{color:var(--gf-forest)}html:not(.dark) .prose a:hover{color:color-mix(in oklab,var(--gf-forest) 85%,black)}.gf-eyebrow{font-family:'Geist Mono',ui-monospace,monospace;text-transform:uppercase;letter-spacing:.08em;font-size:.72rem;color:color-mix(in oklab,currentColor 70%,transparent)}.gf-rule{border:0;border-top:1px solid var(--gf-rule-light);margin:2rem 0}html.dark .gf-rule{border-top-color:var(--gf-rule-dark)}.prose img,.prose table,[data-callout-type],[data-component-part=accordion-content],[data-component-part=card-content-container],[data-component-part=card-content]{border-radius:var(--radius)!important}:has(>[data-component-part=card-content-container]){border:1px solid var(--gf-rule-light)!important;border-radius:var(--radius)!important;background:0 0!important;background-color:transparent!important;box-shadow:none!important;transition:border-color .2s ease!important}html.dark :has(>[data-component-part=card-content-container]){border-color:var(--gf-rule-dark)!important}:has(>[data-component-part=card-content-container]):hover{border-color:rgba(26,26,26,.32)!important;transform:none!important}html.dark :has(>[data-component-part=card-content-container]):hover{border-color:rgba(237,228,210,.32)!important}[data-component-part=card-content-container],[data-component-part=card-content]{border:0!important;background:0 0!important;background-color:transparent!important;box-shadow:none!important;border-radius:0!important}[data-component-part=card-title]{font-family:'Satoshi',ui-sans-serif,system-ui,sans-serif!important;font-weight:600!important;letter-spacing:-.01em!important;border-top:0!important;padding-top:0!important;margin-top:1rem!important}[data-component-part=card-title]::before{content:none!important;display:none!important}[data-component-part=card-icon]{color:var(--gf-forest)!important;stroke:var(--gf-forest)!important}html.dark [data-component-part=card-icon]{color:var(--gf-primary)!important;stroke:var(--gf-primary)!important}[data-component-part=card-icon] svg[style*=mask-image]{background-color:var(--gf-forest)!important}html.dark [data-component-part=card-icon] svg[style*=mask-image]{background-color:var(--gf-primary)!important}[data-callout-type],html body [data-component-part=code-block-root]{border:1px solid var(--gf-rule-light)!important;box-shadow:none!important}[data-callout-type]{background:0 0!important;padding:1rem 1.125rem!important;position:relative}html.dark [data-callout-type]{border-color:var(--gf-rule-dark)!important}[data-callout-type=note]{border-left:3px solid var(--gf-forest)!important}[data-callout-type=tip]{border-left:3px solid var(--gf-primary)!important}[data-callout-type=info]{border-left:3px solid #5a8fb8!important}[data-callout-type=warning]{border-left:3px solid #c68a2e!important}[data-callout-type=danger],[data-callout-type=error]{border-left:3px solid #b23f2a!important}[data-callout-type=check]{border-left:3px solid var(--gf-primary)!important}html.dark .prose blockquote,html.dark [data-callout-type=note]{border-left-color:var(--gf-primary)!important}html.dark [data-callout-type=info]{border-left-color:#7bafd4!important}[data-callout-type] [data-component-part=callout-icon]{color:currentColor!important;opacity:.7}.code-block,.code-group{border-radius:0!important;padding:0!important}html body [data-component-part=code-block-root]{border-radius:var(--radius)!important;background:var(--gf-paper-light)!important;background-color:var(--gf-paper-light)!important;outline:0!important;overflow:auto!important}html.dark body [data-component-part=code-block-root]{border-color:var(--gf-rule-dark)!important;background:var(--gf-paper-dark)!important;background-color:var(--gf-paper-dark)!important}.code-block,.code-block *,.code-group,.code-group *,.prose pre,[data-component-part=code-block-root] *,html body [data-component-part=code-group-tab-content]{border:0!important;background:0 0!important;background-color:transparent!important;box-shadow:none!important}.code-block [data-fade-overlay],.code-group [data-fade-overlay]{display:none!important}.code-block *,.code-group *,.prose pre,[data-component-part=code-block-root] *{border-radius:0!important;outline:0!important}.code-block pre,.code-group pre,[data-component-part=code-block-root] pre{margin:0!important}.code-block [data-component-part=code-block-header]{border:0!important;padding-bottom:.5rem!important;font-family:'Geist Mono',ui-monospace,monospace!important;font-size:.72rem!important;letter-spacing:.06em!important;text-transform:uppercase!important}.code-group [data-component-part=code-group-tab-bar]{border:0!important;padding-bottom:.5rem!important}.code-group [role=tab]{font-family:'Geist Mono',ui-monospace,monospace!important;font-size:.72rem!important;letter-spacing:.06em!important;text-transform:uppercase!important;font-weight:600!important}.code-group [role=tab][aria-selected=true],.code-group [role=tab][data-state=active],.tab-container [data-component-part=tab-button][data-active=true]{border-bottom:2px solid var(--gf-forest)!important;color:var(--gf-forest)!important}html.dark .code-group [role=tab][aria-selected=true],html.dark .code-group [role=tab][data-state=active],html.dark .tab-container [data-component-part=tab-button][data-active=true]{border-bottom-color:var(--gf-primary)!important;color:var(--gf-primary)!important}[data-component-part=code-block-root] button,button[aria-label=\"Copy the contents from the code block\"]{background:0 0!important;border:0!important;box-shadow:none!important;border-radius:4px!important;color:rgb(26 26 26/.5)!important;transition:color .15s ease,background .15s ease!important}html.dark [data-component-part=code-block-root] button,html.dark button[aria-label=\"Copy the contents from the code block\"]{color:rgb(237 228 210/.5)!important}[data-component-part=code-block-root] button:hover,button[aria-label=\"Copy the contents from the code block\"]:hover{color:var(--gf-forest)!important;background:rgba(4,69,43,.06)!important}html.dark [data-component-part=code-block-root] button:hover,html.dark button[aria-label=\"Copy the contents from the code block\"]:hover{color:var(--gf-primary)!important;background:rgba(185,249,15,.08)!important}[data-component-part=code-block-root] button svg,button[aria-label=\"Copy the contents from the code block\"] svg{stroke:currentColor!important;color:currentColor!important}.prose :not(pre)>code{background:0 0!important;border:1px solid var(--gf-rule-light)!important;border-radius:4px!important;padding:.05rem .35rem!important;font-size:.88em!important;font-weight:500!important}html.dark .prose :not(pre)>code{border-color:var(--gf-rule-dark)!important}.prose :not(pre)>code::after,.prose :not(pre)>code::before{content:\"\"!important}[data-component-part=step-number]{font-family:'Geist Mono',ui-monospace,monospace!important;font-weight:600!important;border-radius:50%!important;background:0 0!important;border:1px solid var(--gf-rule-light)!important;color:var(--gf-forest)!important}html.dark [data-component-part=step-number]{border-color:var(--gf-rule-dark)!important;color:var(--gf-primary)!important}[data-component-part=step-line]{background:var(--gf-rule-light)!important}html.dark [data-component-part=step-line]{background:var(--gf-rule-dark)!important}.tab-container,.tab-container *{background:0 0!important;box-shadow:none!important}.tab-container{border:1px solid var(--gf-rule-light)!important;border-radius:var(--radius)!important;overflow:hidden!important}html.dark .prose table,html.dark .tab-container,html.dark details.accordion{border-color:var(--gf-rule-dark)!important}.tab-container *{border:0!important;border-radius:0!important}.tab-container [data-component-part=tabs-list]{border-bottom:1px solid var(--gf-rule-light)!important;margin:0!important;padding:0 .75rem!important;display:flex!important;gap:0!important}html.dark .prose thead,html.dark .tab-container [data-component-part=tabs-list]{border-bottom-color:var(--gf-rule-dark)!important}.tab-container [data-component-part=tab-button]{font-family:'Geist Mono',ui-monospace,monospace!important;font-size:.72rem!important;letter-spacing:.06em!important;text-transform:uppercase!important;font-weight:600!important;padding:.625rem .875rem!important;border-bottom:2px solid transparent!important;transition:color .15s ease,border-color .15s ease!important}.tab-container [data-component-part=tab-button]:not([data-active=true]):hover{color:var(--gf-forest)!important}html.dark .tab-container [data-component-part=tab-button]:not([data-active=true]):hover{color:var(--gf-primary)!important}.tab-container [role=tabpanel]{padding:1rem 1.125rem!important}details.accordion{border:1px solid var(--gf-rule-light)!important;border-radius:var(--radius)!important;background:0 0!important;background-color:transparent!important;margin-bottom:.75rem!important;box-shadow:none!important;overflow:hidden!important}details.accordion[open]{border-color:rgba(26,26,26,.28)!important}html.dark details.accordion[open]{border-color:rgba(237,228,210,.28)!important}details.accordion>summary[data-component-part=accordion-button]{padding:1rem 1.25rem!important;background:0 0!important}details.accordion>summary[data-component-part=accordion-button]:hover{background:rgba(26,26,26,.03)!important}html.dark details.accordion>summary[data-component-part=accordion-button]:hover{background:rgba(237,228,210,.03)!important}[data-component-part=accordion-content]{border:0!important;border-top:1px solid var(--gf-rule-light)!important;background:0 0!important;padding:1rem 1.25rem 1.25rem!important}html.dark .prose hr,html.dark [data-component-part=accordion-content]{border-top-color:var(--gf-rule-dark)!important}.prose h1{letter-spacing:-.02em!important;font-weight:600!important}.prose h2:not(.not-prose):not([data-component-part]){letter-spacing:-.015em!important;font-weight:600!important;margin-top:3rem!important;padding-top:1.5rem!important;border-top:1px solid var(--gf-rule-light);position:relative}html.dark .prose h2:not(.not-prose):not([data-component-part]){border-top-color:var(--gf-rule-dark)}.prose h2:not(.not-prose):not([data-component-part])::before{content:\"§\";position:absolute;top:1.5rem;left:-1.5rem;font-family:'Geist Mono',ui-monospace,monospace;font-size:.72rem;letter-spacing:.06em;color:var(--gf-forest);opacity:.55;line-height:1.6}html.dark .prose h2:not(.not-prose):not([data-component-part])::before{color:var(--gf-primary)}@media (max-width:900px){.prose h2:not(.not-prose):not([data-component-part])::before{display:none}}.prose hr+h2:not(.not-prose):not([data-component-part]){border-top:0!important;padding-top:0!important;margin-top:1.5rem!important}.prose hr+h2:not(.not-prose):not([data-component-part])::before{top:0!important}.prose h3{letter-spacing:-.01em!important;font-weight:600!important;margin-top:2rem!important}.prose table{display:table!important;table-layout:auto!important;border-collapse:collapse!important;border-spacing:0!important;font-feature-settings:\"tnum\" 1!important;border:1px solid var(--gf-rule-light)!important;width:100%!important;overflow:visible!important;margin-top:1.5rem!important;margin-bottom:1.5rem!important}.prose thead{background:0 0!important;border-bottom:1px solid var(--gf-rule-light)!important}.prose td,.prose th{padding:.75rem 1rem!important;border:0!important;vertical-align:top!important}.prose td:first-child,.prose th:first-child{padding-inline-start:1rem!important}.prose td:last-child,.prose th:last-child{padding-inline-end:1rem!important}.prose th{font-family:'Geist Mono',ui-monospace,monospace!important;font-size:.72rem!important;text-transform:uppercase!important;letter-spacing:.06em!important;font-weight:600!important;text-align:left!important;color:var(--gf-forest)!important}html.dark #pagination a:hover svg,html.dark .prose th{color:var(--gf-primary)!important}.prose tbody tr{border-bottom:0!important;border-top:1px solid rgb(26 26 26/.08)!important}html.dark .prose tbody tr{border-top-color:rgb(237 228 210/.08)!important}.prose tbody tr:first-child{border-top:0!important}.prose blockquote{border-left:2px solid var(--gf-forest)!important;font-style:italic!important;padding-left:1rem!important;font-weight:400!important}.prose hr{border:0!important;border-top:1px solid var(--gf-rule-light)!important;margin:3rem 0!important}[data-component-part=field-info-pill],[data-component-part=field-required-pill]{font-family:'Geist Mono',ui-monospace,monospace!important;font-size:.66rem!important;text-transform:uppercase!important;letter-spacing:.06em!important;border-radius:4px!important;padding:.1rem .4rem!important;border:1px solid var(--gf-rule-light)!important;background:0 0!important}html.dark #pagination>a [class*=rounded-xl],html.dark #pagination>a>div,html.dark [data-component-part=field-info-pill],html.dark [data-component-part=field-required-pill]{border-color:var(--gf-rule-dark)!important}[data-component-part=field-required-pill]{color:#b23f2a!important;border-color:rgba(178,63,42,.45)!important}.prose img{border:1px solid var(--gf-rule-light);background:0 0}#pagination,#sidebar [data-active=true]>a,.prose blockquote{background:0 0!important}#pagination{background-color:transparent!important;border:0!important;border-radius:0!important;padding:0!important;gap:1rem;margin-top:3rem}#pagination>a:first-child:not(:only-child){background:0 0!important;border:0!important;padding:.5rem 1rem!important}#pagination>a [class*=rounded-xl],#pagination>a>div{background:0 0!important;background-color:transparent!important;border:1px solid var(--gf-rule-light)!important;border-radius:var(--radius)!important;box-shadow:none!important;transition:border-color .2s ease!important}#pagination>a:hover [class*=rounded-xl],#pagination>a:hover>div{border-color:rgba(26,26,26,.32)!important}html.dark #pagination>a:hover [class*=rounded-xl],html.dark #pagination>a:hover>div{border-color:rgba(237,228,210,.32)!important}#pagination .w-px{background:var(--gf-rule-light)!important;background-color:var(--gf-rule-light)!important}html.dark #pagination .w-px{background:var(--gf-rule-dark)!important;background-color:var(--gf-rule-dark)!important}#pagination svg{color:rgb(26 26 26/.4)!important;stroke:currentColor!important}html.dark #pagination svg{color:rgb(237 228 210/.4)!important}#pagination a:hover svg{color:var(--gf-forest)!important}#pagination span{font-family:'Satoshi',ui-sans-serif,system-ui,sans-serif!important;letter-spacing:-.005em!important}::selection{background:rgba(185,249,15,.35);color:#1a1a1a}html.dark ::selection{background:rgba(185,249,15,.4);color:#1a1a1a}"}],"page":{"pagePath":"api-reference/segments/create-segment","slug":"/api-reference/segments/create-segment","pageMetadata":{"title":"Create Segment","description":"Create a custom user segment based on filter rules. Available on all plans, limited by your plan's `maxCustomSegments` quota.\n\nAfter creation, segment membership is computed asynchronously. The segment will be available immediately but member counts may take a few moments to populate.","deprecated":null,"version":null,"openapi":"https://www.greenflash.ai/api/openapi post /segments","href":"/api-reference/segments/create-segment","autogeneratedByOpenApi":true},"description":{"compiledSource":"\"use strict\";\nconst {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n code: \"code\",\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_Fragment, {\n children: [_jsxs(_components.p, {\n children: [\"Create a custom user segment based on filter rules. Available on all plans, limited by your plan’s \", _jsx(_components.code, {\n children: \"maxCustomSegments\"\n }), \" quota.\"]\n }), \"\\n\", _jsx(_components.p, {\n children: \"After creation, segment membership is computed asynchronously. The segment will be available immediately but member counts may take a few moments to populate.\"\n })]\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","dark":"vesper"}},"config":{},"pageMetadata":{"title":"Create Segment","description":"Create a custom user segment based on filter rules. Available on all plans, limited by your plan's `maxCustomSegments` quota.\n\nAfter creation, segment membership is computed asynchronously. The segment will be available immediately but member counts may take a few moments to populate.","deprecated":null,"version":null,"openapi":"https://www.greenflash.ai/api/openapi post /segments","href":"/api-reference/segments/create-segment","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":["/_mintlify/custom/greenflash/e12aded5578464ea/bin/build-docs.js","/_mintlify/custom/greenflash/9f34244d85f5aa39/bin/environments.js"],"openApiReferenceData":{"operation":{"summary":"Create Segment","tags":["Segments"],"description":"Create a custom user segment based on filter rules. Available on all plans, limited by your plan's `maxCustomSegments` quota.\n\nAfter creation, segment membership is computed asynchronously. The segment will be available immediately but member counts may take a few moments to populate.","security":["23753fa0-fe78-45e9-a288-08b264d92ee2"],"requestBody":"47e02d80-625c-4230-9f61-99ac55104701","responses":{"201":"f3e80e95-16c1-47dd-8502-5b896d328c23","400":"6ff81a02-9b05-48d9-be98-5db7d43f3e30","403":"d489769c-9b07-46ca-b972-43944b4312bc","500":"3621a577-d9ac-4256-b3a9-844a9d58dad8"},"x-codeSamples":[{"lang":"JavaScript","source":"import Greenflash from 'greenflash';\n\nconst client = new Greenflash({\n apiKey: process.env['GREENFLASH_API_KEY'], // This is the default and can be omitted\n});\n\nconst createSegmentResponse = await client.segments.create({\n filters: {\n rules: [\n {\n type: 'analysis',\n field: 'commercialIntent',\n operator: 'gte',\n value: 0.6,\n },\n {\n type: 'property',\n key: 'plan',\n operator: 'eq',\n value: 'enterprise',\n },\n ],\n },\n description: 'Users with high commercial intent from the enterprise plan',\n icon: 'Users',\n name: 'High-Intent Enterprise Users',\n});\n\nconsole.log(createSegmentResponse.id);"},{"lang":"Python","source":"import os\nfrom greenflash import Greenflash\n\nclient = Greenflash(\n api_key=os.environ.get(\"GREENFLASH_API_KEY\"), # This is the default and can be omitted\n)\ncreate_segment_response = client.segments.create(\n filters={\n \"rules\": [{\n \"type\": \"analysis\",\n \"field\": \"commercialIntent\",\n \"operator\": \"gte\",\n \"value\": 0.6,\n }, {\n \"type\": \"property\",\n \"key\": \"plan\",\n \"operator\": \"eq\",\n \"value\": \"enterprise\",\n }]\n },\n description=\"Users with high commercial intent from the enterprise plan\",\n icon=\"Users\",\n name=\"High-Intent Enterprise Users\",\n)\nprint(create_segment_response.id)"}],"method":"post","type":"path","servers":["097eb6d1-dd03-4f97-a542-201a4090b3da"],"path":"/segments","baseUrlOptions":["https://www.greenflash.ai/api/v1"],"title":"Create Segment","codeSamples":[{"lang":"JavaScript","source":"import Greenflash from 'greenflash';\n\nconst client = new Greenflash({\n apiKey: process.env['GREENFLASH_API_KEY'], // This is the default and can be omitted\n});\n\nconst createSegmentResponse = await client.segments.create({\n filters: {\n rules: [\n {\n type: 'analysis',\n field: 'commercialIntent',\n operator: 'gte',\n value: 0.6,\n },\n {\n type: 'property',\n key: 'plan',\n operator: 'eq',\n value: 'enterprise',\n },\n ],\n },\n description: 'Users with high commercial intent from the enterprise plan',\n icon: 'Users',\n name: 'High-Intent Enterprise Users',\n});\n\nconsole.log(createSegmentResponse.id);"},{"lang":"Python","source":"import os\nfrom greenflash import Greenflash\n\nclient = Greenflash(\n api_key=os.environ.get(\"GREENFLASH_API_KEY\"), # This is the default and can be omitted\n)\ncreate_segment_response = client.segments.create(\n filters={\n \"rules\": [{\n \"type\": \"analysis\",\n \"field\": \"commercialIntent\",\n \"operator\": \"gte\",\n \"value\": 0.6,\n }, {\n \"type\": \"property\",\n \"key\": \"plan\",\n \"operator\": \"eq\",\n \"value\": \"enterprise\",\n }]\n },\n description=\"Users with high commercial intent from the enterprise plan\",\n icon=\"Users\",\n name=\"High-Intent Enterprise Users\",\n)\nprint(create_segment_response.id)"}],"requestExampleLanguages":["bash","python","javascript","go","java","php"],"requiredOnlyExamples":false,"requestExampleType":"codeSamples","responseExampleType":"generated"},"dependencies":{"parameters":{},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"filters":{"type":"object","properties":{"rules":{"type":"array","items":{"oneOf":[{"type":"object","description":"A filter rule defining segment membership criteria.","required":["type","field","operator","value"],"properties":{"type":{"type":"string","enum":["analysis"],"description":"Rule based on conversation analysis metrics.","isRequired":true,"uniqueKey":"filters.rules.items.[INDEX].oneOf.0.type","typeLabel":"enum\u003cstring>"},"field":{"type":"string","enum":["sentiment","frustration","struggle","commercialIntent","cqi","rating"],"description":"The analysis metric to filter on.","isRequired":true,"uniqueKey":"filters.rules.items.[INDEX].oneOf.0.field","typeLabel":"enum\u003cstring>"},"operator":{"type":"string","enum":["gt","lt","eq","gte","lte"],"description":"Comparison operator.","isRequired":true,"uniqueKey":"filters.rules.items.[INDEX].oneOf.0.operator","typeLabel":"enum\u003cstring>"},"value":{"type":"number","description":"Threshold value for the metric (0-1 scale for most metrics).","isRequired":true,"uniqueKey":"filters.rules.items.[INDEX].oneOf.0.value","typeLabel":"number"}},"uniqueKey":"filters.rules.items.[INDEX].oneOf.0","typeLabel":"object"},{"type":"object","description":"A filter rule defining segment membership criteria.","required":["type","field","value"],"properties":{"type":{"type":"string","enum":["analysis_flag"],"description":"Rule based on detected flags.","isRequired":true,"uniqueKey":"filters.rules.items.[INDEX].oneOf.1.type","typeLabel":"enum\u003cstring>"},"field":{"type":"string","enum":["jailbreakDetected","hallucinationDetected","userToxicityDetected","modelToxicityDetected","userBiasDetected","modelBiasDetected","missingCapabilityDetected"],"description":"The flag to filter on.","isRequired":true,"uniqueKey":"filters.rules.items.[INDEX].oneOf.1.field","typeLabel":"enum\u003cstring>"},"value":{"type":"boolean","description":"Whether the flag should be true or false.","isRequired":true,"uniqueKey":"filters.rules.items.[INDEX].oneOf.1.value","typeLabel":"boolean"}},"uniqueKey":"filters.rules.items.[INDEX].oneOf.1","typeLabel":"object"},{"type":"object","description":"A filter rule defining segment membership criteria.","required":["type","key","operator","value"],"properties":{"type":{"type":"string","enum":["property"],"description":"Rule based on user properties.","isRequired":true,"uniqueKey":"filters.rules.items.[INDEX].oneOf.2.type","typeLabel":"enum\u003cstring>"},"key":{"type":"string","pattern":"^[\\w.-]+$","description":"The property key (alphanumeric, dots, hyphens, underscores).","isRequired":true,"uniqueKey":"filters.rules.items.[INDEX].oneOf.2.key","typeLabel":"string"},"operator":{"type":"string","enum":["eq","neq","contains","gt","lt"],"description":"Comparison operator.","isRequired":true,"uniqueKey":"filters.rules.items.[INDEX].oneOf.2.operator","typeLabel":"enum\u003cstring>"},"value":{"oneOf":[{"type":"string","description":"Value to compare against.","isRequired":true,"uniqueKey":"filters.rules.items.[INDEX].oneOf.2.value.oneOf.0","typeLabel":"string"},{"type":"number","description":"Value to compare against.","isRequired":true,"uniqueKey":"filters.rules.items.[INDEX].oneOf.2.value.oneOf.1","typeLabel":"number"},{"type":"boolean","description":"Value to compare against.","isRequired":true,"uniqueKey":"filters.rules.items.[INDEX].oneOf.2.value.oneOf.2","typeLabel":"boolean"}],"isRequired":true,"uniqueKey":"filters.rules.items.[INDEX].oneOf.2.value","typeLabel":"string | number | boolean"}},"uniqueKey":"filters.rules.items.[INDEX].oneOf.2","typeLabel":"object"},{"type":"object","description":"A filter rule defining segment membership criteria.","required":["type","key","operator","value"],"properties":{"type":{"type":"string","enum":["conversation_property"],"description":"Rule based on conversation-level properties.","isRequired":true,"uniqueKey":"filters.rules.items.[INDEX].oneOf.3.type","typeLabel":"enum\u003cstring>"},"key":{"type":"string","pattern":"^[\\w.-]+$","description":"The conversation property key.","isRequired":true,"uniqueKey":"filters.rules.items.[INDEX].oneOf.3.key","typeLabel":"string"},"operator":{"type":"string","enum":["eq","neq","contains","gt","lt"],"description":"Comparison operator.","isRequired":true,"uniqueKey":"filters.rules.items.[INDEX].oneOf.3.operator","typeLabel":"enum\u003cstring>"},"value":{"oneOf":[{"type":"string","description":"Value to compare against.","isRequired":true,"uniqueKey":"filters.rules.items.[INDEX].oneOf.3.value.oneOf.0","typeLabel":"string"},{"type":"number","description":"Value to compare against.","isRequired":true,"uniqueKey":"filters.rules.items.[INDEX].oneOf.3.value.oneOf.1","typeLabel":"number"},{"type":"boolean","description":"Value to compare against.","isRequired":true,"uniqueKey":"filters.rules.items.[INDEX].oneOf.3.value.oneOf.2","typeLabel":"boolean"}],"isRequired":true,"uniqueKey":"filters.rules.items.[INDEX].oneOf.3.value","typeLabel":"string | number | boolean"}},"uniqueKey":"filters.rules.items.[INDEX].oneOf.3","typeLabel":"object"},{"type":"object","description":"A filter rule defining segment membership criteria.","required":["type","operator","value"],"properties":{"type":{"type":"string","enum":["conversation_count"],"description":"Rule based on number of conversations.","isRequired":true,"uniqueKey":"filters.rules.items.[INDEX].oneOf.4.type","typeLabel":"enum\u003cstring>"},"operator":{"type":"string","enum":["gte","lte"],"description":"Comparison operator.","isRequired":true,"uniqueKey":"filters.rules.items.[INDEX].oneOf.4.operator","typeLabel":"enum\u003cstring>"},"value":{"type":"integer","minimum":0,"description":"Conversation count threshold.","isRequired":true,"uniqueKey":"filters.rules.items.[INDEX].oneOf.4.value","typeLabel":"integer"}},"uniqueKey":"filters.rules.items.[INDEX].oneOf.4","typeLabel":"object"},{"type":"object","description":"A filter rule defining segment membership criteria.","required":["type","operator","value"],"properties":{"type":{"type":"string","enum":["last_seen"],"description":"Rule based on when the user was last active.","isRequired":true,"uniqueKey":"filters.rules.items.[INDEX].oneOf.5.type","typeLabel":"enum\u003cstring>"},"operator":{"type":"string","enum":["within","before"],"description":"Time comparison operator.","isRequired":true,"uniqueKey":"filters.rules.items.[INDEX].oneOf.5.operator","typeLabel":"enum\u003cstring>"},"value":{"type":"string","pattern":"^\\d+(d|h|m)$","description":"Time duration (e.g. \"7d\", \"24h\", \"30m\").","isRequired":true,"uniqueKey":"filters.rules.items.[INDEX].oneOf.5.value","typeLabel":"string"}},"uniqueKey":"filters.rules.items.[INDEX].oneOf.5","typeLabel":"object"}],"uniqueKey":"filters.rules.items.[INDEX]","typeLabel":"object"},"minItems":1,"description":"Array of filter rules. At least one rule is required.","isRequired":true,"uniqueKey":"filters.rules","typeLabel":"object[]"},"productIds":{"type":"array","items":{"type":"string","format":"uuid","uniqueKey":"filters.productIds.items.[INDEX]","typeLabel":"string\u003cuuid>"},"description":"Scope the segment to specific product IDs.","uniqueKey":"filters.productIds","typeLabel":"string\u003cuuid>[]"},"dateRange":{"type":"object","properties":{"preset":{"type":"string","enum":["7d","30d","90d","all"],"description":"Preset date range.","uniqueKey":"filters.dateRange.preset","typeLabel":"enum\u003cstring>"},"from":{"type":"string","description":"Start date (ISO 8601).","uniqueKey":"filters.dateRange.from","typeLabel":"string"},"to":{"type":"string","description":"End date (ISO 8601).","uniqueKey":"filters.dateRange.to","typeLabel":"string"}},"description":"Optional date range filter.","uniqueKey":"filters.dateRange","typeLabel":"object"}},"required":["rules"],"description":"Filter configuration defining segment membership.","isRequired":true,"uniqueKey":"filters","typeLabel":"object"},"name":{"type":"string","maxLength":255,"description":"Segment name. If omitted, an auto-generated name will be assigned.","uniqueKey":"name","typeLabel":"string"},"description":{"type":"string","description":"A description of the segment purpose.","uniqueKey":"description","typeLabel":"string"},"icon":{"type":"string","maxLength":50,"description":"Icon identifier for the segment (e.g. \"Users\", \"Tag\").","uniqueKey":"icon","typeLabel":"string"}},"required":["filters"],"uniqueKey":"","typeLabel":"object"},"example":{"name":"High-Intent Enterprise Users","description":"Users with high commercial intent from the enterprise plan","icon":"Users","filters":{"rules":[{"type":"analysis","field":"commercialIntent","operator":"gte","value":0.6},{"type":"property","key":"plan","operator":"eq","value":"enterprise"}]}},"examples":{"Example":{"title":"Example","value":{"name":"High-Intent Enterprise Users","description":"Users with high commercial intent from the enterprise plan","icon":"Users","filters":{"rules":[{"type":"analysis","field":"commercialIntent","operator":"gte","value":0.6},{"type":"property","key":"plan","operator":"eq","value":"enterprise"}]}}}},"exampleType":"examples"}},"exampleType":"examples"},"responses":{"f3e80e95-16c1-47dd-8502-5b896d328c23":{"description":"Segment created successfully","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The created segment ID.","isRequired":true,"uniqueKey":"id","typeLabel":"string\u003cuuid>"},"name":{"type":"string","description":"The segment name.","isRequired":true,"uniqueKey":"name","typeLabel":"string"},"type":{"type":"string","enum":["custom"],"description":"Always \"custom\" for API-created segments.","isRequired":true,"uniqueKey":"type","typeLabel":"enum\u003cstring>"},"description":{"oneOf":[{"type":"string","description":"Segment description.","isRequired":true,"uniqueKey":"description.oneOf.0","typeLabel":"string"},{"type":"null","description":"Segment description.","isRequired":true,"uniqueKey":"description.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"description","typeLabel":"string | null"},"icon":{"oneOf":[{"type":"string","description":"Icon identifier.","isRequired":true,"uniqueKey":"icon.oneOf.0","typeLabel":"string"},{"type":"null","description":"Icon identifier.","isRequired":true,"uniqueKey":"icon.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"icon","typeLabel":"string | null"},"filters":{"type":"object","additionalProperties":{"oneOf":[{}],"uniqueKey":"filters.additionalProperties","typeLabel":"any"},"description":"The filter configuration.","isRequired":true,"uniqueKey":"filters","typeLabel":"object"},"createdAt":{"type":"string","format":"date-time","description":"When the segment was created.","isRequired":true,"uniqueKey":"createdAt","typeLabel":"string\u003cdate-time>"},"updatedAt":{"type":"string","format":"date-time","description":"When the segment was last updated.","isRequired":true,"uniqueKey":"updatedAt","typeLabel":"string\u003cdate-time>"}},"required":["id","name","type","description","icon","filters","createdAt","updatedAt"],"uniqueKey":"","typeLabel":"object"},"example":{"id":"423e4567-e89b-12d3-a456-426614174003","name":"High-Intent Enterprise Users","type":"custom","description":"Users with high commercial intent from the enterprise plan","icon":"Users","filters":{"rules":[{"type":"analysis","field":"commercialIntent","operator":"gte","value":0.6},{"type":"property","key":"plan","operator":"eq","value":"enterprise"}]},"createdAt":"2026-03-25T14:30:00.000Z","updatedAt":"2026-03-25T14:30:00.000Z"},"examples":{"Example":{"title":"Example","value":{"id":"423e4567-e89b-12d3-a456-426614174003","name":"High-Intent Enterprise Users","type":"custom","description":"Users with high commercial intent from the enterprise plan","icon":"Users","filters":{"rules":[{"type":"analysis","field":"commercialIntent","operator":"gte","value":0.6},{"type":"property","key":"plan","operator":"eq","value":"enterprise"}]},"createdAt":"2026-03-25T14:30:00.000Z","updatedAt":"2026-03-25T14:30:00.000Z"}}},"exampleType":"examples"}},"exampleType":"examples"},"6ff81a02-9b05-48d9-be98-5db7d43f3e30":{"description":"Bad request - validation error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Whether the API call was successful (false for errors).","uniqueKey":"success","typeLabel":"boolean"},"error":{"type":"string","description":"Error message describing what went wrong.","uniqueKey":"error","typeLabel":"string"}},"description":"Error response for create segment operations.","uniqueKey":"","typeLabel":"object"},"example":{"success":false,"error":"Validation error: filters.rules must contain at least 1 element(s)"},"examples":{"Example":{"title":"Example","value":{"success":false,"error":"Validation error: filters.rules must contain at least 1 element(s)"}}},"exampleType":"examples"}},"exampleType":"examples"},"d489769c-9b07-46ca-b972-43944b4312bc":{"description":"Segment limit reached","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Whether the API call was successful (false for errors).","uniqueKey":"success","typeLabel":"boolean"},"error":{"type":"string","description":"Error message describing what went wrong.","uniqueKey":"error","typeLabel":"string"}},"description":"Error response for create segment operations.","uniqueKey":"","typeLabel":"object"},"example":{"success":false,"error":"Your plan allows up to 5 custom segments (currently using 5). Please upgrade to create more, or contact [email protected]."},"examples":{"Example":{"title":"Example","value":{"success":false,"error":"Your plan allows up to 5 custom segments (currently using 5). Please upgrade to create more, or contact [email protected]."}}},"exampleType":"examples"}},"exampleType":"examples"},"3621a577-d9ac-4256-b3a9-844a9d58dad8":{"description":"Server error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Whether the API call was successful (false for errors).","uniqueKey":"success","typeLabel":"boolean"},"error":{"type":"string","description":"Error message describing what went wrong.","uniqueKey":"error","typeLabel":"string"}},"description":"Error response for create segment operations.","uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"success":true,"error":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"23753fa0-fe78-45e9-a288-08b264d92ee2":{"bearerAuth":{"type":"http","scheme":"bearer","scopes":[]}}},"servers":{"097eb6d1-dd03-4f97-a542-201a4090b3da":{"url":"https://www.greenflash.ai/api/v1","description":"Greenflash API v1"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","scopes":[]},"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":"bearerAuth","name":"Authorization"}],"title":"bearerAuth"}]},"originalFileLocation":"https://www.greenflash.ai/api/openapi"},"subdomain":"greenflash","siteName":"Greenflash","title":"Greenflash Docs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-05-01T17:14:10.639Z","originalFileLocation":"api-reference/segments/create-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=\"Create a custom user segment based on filter rules. Available on all plans, limited by your plan\u0026#x27;s maxCustomSegments quota. After creation, segment membership is computed asynchronously. The segment will be available immediately but member counts may take a few moments to populate.\">\u003cmeta data-mint-head name=\"keywords\" content=\"AI optimization, LLM analytics, AI product insights, autonomous optimization, AI testing, Greenflash\">\u003cmeta data-mint-head name=\"application-name\" content=\"Greenflash\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003cmeta data-mint-head name=\"robots\" content=\"index, follow\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/greenflash/bGG_mKOfYzCHPtaQ/_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/greenflash/bGG_mKOfYzCHPtaQ/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/greenflash/bGG_mKOfYzCHPtaQ/_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/greenflash/bGG_mKOfYzCHPtaQ/_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/greenflash/bGG_mKOfYzCHPtaQ/_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/greenflash/bGG_mKOfYzCHPtaQ/_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/greenflash/bGG_mKOfYzCHPtaQ/_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/greenflash/bGG_mKOfYzCHPtaQ/_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/greenflash/bGG_mKOfYzCHPtaQ/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Greenflash Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"Adapt your AI agents to the real world — documentation and API reference.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Greenflash\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.greenflash.ai/api-reference/segments/create-segment\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://www.greenflash.ai/og-image.png\">\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=\"Greenflash Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Adapt your AI agents to the real world — documentation and API reference.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://www.greenflash.ai/og-image.png\">\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/greenflash/bGG_mKOfYzCHPtaQ/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Greenflash\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#B9F90F\">\u003cmeta data-mint-head name=\"og:locale\" content=\"en_US\">\u003cmeta data-mint-head name=\"charset\" content=\"UTF-8\">\u003cmeta data-mint-head name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\u003cmeta data-mint-head name=\"author\" content=\"Greenflash\">\u003cmeta data-mint-head name=\"googlebot\" content=\"index, follow\">\u003cmeta data-mint-head name=\"theme-color\" content=\"#B9F90F\">\u003cmeta data-mint-head name=\"color-scheme\" content=\"light dark\">\u003cmeta data-mint-head name=\"refresh\" content=\"30\">\u003cmeta data-mint-head name=\"rating\" content=\"general\">\u003cmeta data-mint-head name=\"revisit-after\" content=\"7 days\">\u003cmeta data-mint-head name=\"language\" content=\"en\">\u003cmeta data-mint-head name=\"referrer\" content=\"origin-when-cross-origin\">\u003cmeta data-mint-head name=\"reply-to\" content=\"[email protected]\">\u003cmeta data-mint-head name=\"distribution\" content=\"global\">\u003cmeta data-mint-head name=\"coverage\" content=\"Worldwide\">\u003cmeta data-mint-head name=\"category\" content=\"Technology\">\u003cmeta data-mint-head name=\"application-name\" content=\"Greenflash\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.greenflash.ai/api-reference/segments/create-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-segment.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.greenflash.ai/#organization\",\"name\":\"Greenflash\",\"url\":\"https://docs.greenflash.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/greenflash/dolPuTTMnm2vInVv/public/greenflash_logo.png?fit=max\u0026auto=format\u0026n=dolPuTTMnm2vInVv\u0026q=85\u0026s=5b0635308575d5082ba3214adf289bfa\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.greenflash.ai#website\",\"name\":\"Greenflash\",\"url\":\"https://docs.greenflash.ai\",\"publisher\":{\"@id\":\"https://docs.greenflash.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.greenflash.ai/api-reference/segments/create-segment#webpage\",\"url\":\"https://docs.greenflash.ai/api-reference/segments/create-segment\",\"name\":\"Create Segment\",\"description\":\"Create a custom user segment based on filter rules. Available on all plans, limited by your plan's maxCustomSegments quota. After creation, segment membership is computed asynchronously. The segment will be available immediately but member counts may take a few moments to populate.\",\"dateModified\":\"2026-05-01T17:14:10.639Z\",\"isPartOf\":{\"@id\":\"https://docs.greenflash.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.greenflash.ai/api-reference/segments/create-segment#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.greenflash.ai/api-reference/segments/create-segment#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Segments\",\"item\":\"https://docs.greenflash.ai/api-reference/segments/list-segments\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create Segment\",\"item\":\"https://docs.greenflash.ai/api-reference/segments/create-segment\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.greenflash.ai/api-reference/segments/create-segment#apireference\",\"headline\":\"Create Segment\",\"name\":\"Create Segment\",\"description\":\"Create a custom user segment based on filter rules. Available on all plans, limited by your plan's maxCustomSegments quota. After creation, segment membership is computed asynchronously. The segment will be available immediately but member counts may take a few moments to populate.\",\"url\":\"https://docs.greenflash.ai/api-reference/segments/create-segment\",\"mainEntityOfPage\":{\"@id\":\"https://docs.greenflash.ai/api-reference/segments/create-segment#webpage\"},\"image\":\"https://www.greenflash.ai/og-image.png\",\"dateModified\":\"2026-05-01T17:14:10.639Z\",\"publisher\":{\"@id\":\"https://docs.greenflash.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.greenflash.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Greenflash\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Greenflash","nav":{"global":null,"tabs":[{"tab":"Guides","icon":"heart-handshake","pages":[{"title":"Guides","href":"/intro/quickstart"}]},{"tab":"API Reference","icon":"library-big","groups":[{"group":"Interactions","pages":[{"title":"Capture Interactions and Messages","deprecated":null,"version":null,"openapi":"https://www.greenflash.ai/api/openapi post /messages","href":"/api-reference/interactions/capture-interactions-and-messages"},{"title":"Capture User Feedback and Ratings","deprecated":null,"version":null,"openapi":"https://www.greenflash.ai/api/openapi post /ratings","href":"/api-reference/interactions/capture-user-feedback-and-ratings"},{"title":"List Interactions","deprecated":null,"version":null,"openapi":"https://www.greenflash.ai/api/openapi get /interactions","href":"/api-reference/interactions/list-interactions"},{"title":"Get Interaction Detail","deprecated":null,"version":null,"openapi":"https://www.greenflash.ai/api/openapi get /interactions/{interactionId}","href":"/api-reference/interactions/get-interaction-detail"}]},{"group":"Analytics","pages":[{"title":"Get Interaction Analytics","deprecated":null,"version":null,"openapi":"https://www.greenflash.ai/api/openapi get /interactions/{interactionId}/analytics","href":"/api-reference/analytics/get-interaction-analytics"},{"title":"Get Model Analytics","deprecated":null,"version":null,"openapi":"https://www.greenflash.ai/api/openapi get /models/{modelId}/analytics","href":"/api-reference/analytics/get-model-analytics"},{"title":"Get Product Analytics","deprecated":null,"version":null,"openapi":"https://www.greenflash.ai/api/openapi get /products/{productId}/analytics","href":"/api-reference/analytics/get-product-analytics"},{"title":"Get Prompt Analytics","deprecated":null,"version":null,"openapi":"https://www.greenflash.ai/api/openapi get /prompts/{id}/analytics","href":"/api-reference/analytics/get-prompt-analytics"},{"title":"Get Segment Analytics","deprecated":null,"version":null,"openapi":"https://www.greenflash.ai/api/openapi get /segments/{segmentId}/analytics","href":"/api-reference/analytics/get-segment-analytics"},{"title":"Get Organization Analytics","deprecated":null,"version":null,"openapi":"https://www.greenflash.ai/api/openapi get /organizations/{organizationId}/analytics","href":"/api-reference/analytics/get-organization-analytics"},{"title":"Get User Analytics","deprecated":null,"version":null,"openapi":"https://www.greenflash.ai/api/openapi get /users/{userId}/analytics","href":"/api-reference/analytics/get-user-analytics"}]},{"group":"Chat","pages":[{"title":"Stream Chat","deprecated":null,"version":null,"openapi":"https://www.greenflash.ai/api/openapi post /chat","href":"/api-reference/chat/stream-chat"}]},{"group":"Business Events","pages":[{"title":"Create an event","deprecated":null,"version":null,"openapi":"https://www.greenflash.ai/api/openapi post /events","href":"/api-reference/business-events/create-an-event"}]},{"group":"Inbox","pages":[{"title":"List Inbox Items","deprecated":null,"version":null,"openapi":"https://www.greenflash.ai/api/openapi get /inbox","href":"/api-reference/inbox/list-inbox-items"},{"title":"Get Inbox Item","deprecated":null,"version":null,"openapi":"https://www.greenflash.ai/api/openapi get /inbox/{conversationId}","href":"/api-reference/inbox/get-inbox-item"}]},{"group":"Models","pages":[{"title":"List Models","deprecated":null,"version":null,"openapi":"https://www.greenflash.ai/api/openapi get /models","href":"/api-reference/models/list-models"},{"title":"Get Model","deprecated":null,"version":null,"openapi":"https://www.greenflash.ai/api/openapi get /models/{modelId}","href":"/api-reference/models/get-model"}]},{"group":"Products","pages":[{"title":"List Products","deprecated":null,"version":null,"openapi":"https://www.greenflash.ai/api/openapi get /products","href":"/api-reference/products/list-products"},{"title":"Get Product","deprecated":null,"version":null,"openapi":"https://www.greenflash.ai/api/openapi get /products/{productId}","href":"/api-reference/products/get-product"},{"title":"Update product context based on user feedback","deprecated":null,"version":null,"openapi":"https://www.greenflash.ai/api/openapi patch /products/{productId}/context","href":"/api-reference/products/update-product-context-based-on-user-feedback"}]},{"group":"Prompts","pages":[{"title":"Get Prompt","deprecated":null,"version":null,"openapi":"https://www.greenflash.ai/api/openapi get /prompts/{id}","href":"/api-reference/prompts/get-prompt"},{"title":"Update Prompt","deprecated":null,"version":null,"openapi":"https://www.greenflash.ai/api/openapi put /prompts/{id}","href":"/api-reference/prompts/update-prompt"},{"title":"Archive Prompt","deprecated":null,"version":null,"openapi":"https://www.greenflash.ai/api/openapi delete /prompts/{id}","href":"/api-reference/prompts/archive-prompt"},{"title":"List Prompts","deprecated":null,"version":null,"openapi":"https://www.greenflash.ai/api/openapi get /prompts","href":"/api-reference/prompts/list-prompts"},{"title":"Create Prompt","deprecated":null,"version":null,"openapi":"https://www.greenflash.ai/api/openapi post /prompts","href":"/api-reference/prompts/create-prompt"}]},{"group":"Segments","pages":[{"title":"List Segments","description":"List all segments in your workspace. Returns summary data including member counts. Supports pagination.","deprecated":null,"version":null,"openapi":"https://www.greenflash.ai/api/openapi get /segments","href":"/api-reference/segments/list-segments"},{"title":"Create Segment","deprecated":null,"version":null,"openapi":"https://www.greenflash.ai/api/openapi post /segments","href":"/api-reference/segments/create-segment"},{"title":"Get Segment","description":"Get detailed information about a specific segment, including its filter configuration, description, and metadata. Accepts either a UUID or a preset ID for system segments.","deprecated":null,"version":null,"openapi":"https://www.greenflash.ai/api/openapi get /segments/{segmentId}","href":"/api-reference/segments/get-segment"}]},{"group":"Users","pages":[{"title":"List Organizations","deprecated":null,"version":null,"openapi":"https://www.greenflash.ai/api/openapi get /organizations","href":"/api-reference/users/list-organizations"},{"title":"Create or Update an Organization","deprecated":null,"version":null,"openapi":"https://www.greenflash.ai/api/openapi post /organizations","href":"/api-reference/users/create-or-update-an-organization"},{"title":"Update Organization","deprecated":null,"version":null,"openapi":"https://www.greenflash.ai/api/openapi put /organizations/{organizationId}","href":"/api-reference/users/update-organization"},{"title":"List Users","deprecated":null,"version":null,"openapi":"https://www.greenflash.ai/api/openapi get /users","href":"/api-reference/users/list-users"},{"title":"Create or Update User Profile","deprecated":null,"version":null,"openapi":"https://www.greenflash.ai/api/openapi post /users","href":"/api-reference/users/create-or-update-user-profile"},{"title":"Update User Profile","deprecated":null,"version":null,"openapi":"https://www.greenflash.ai/api/openapi put /users/{userId}","href":"/api-reference/users/update-user-profile"},{"title":"Get User Segments","deprecated":null,"version":null,"openapi":"https://www.greenflash.ai/api/openapi get /users/{userId}/segments","href":"/api-reference/users/get-user-segments"}]}]},{"tab":"SDKs","icon":"book-open","pages":[{"title":"SDKs","href":"/sdks/typescript"}]},{"tab":"Agent Prompts","icon":"sparkles","pages":[{"title":"Agent Prompts","href":"/prompts/sdk-integration-python"}]},{"tab":"Changelog","icon":"rocket","pages":[{"title":"Changelog","href":"/changelog"}]}]},"title":"Greenflash Docs","buildId":"dpl_HcHmUS6i3UwswnTHJUEdcTtwfdTQ","deploymentId":"dpl_HcHmUS6i3UwswnTHJUEdcTtwfdTQ","dynamics":["c2aa737661","b0f84f53ff","a9bb46feb3","2b790eda92"],"chunks":["OpenApiReferenceProvider-BRm_l__d.js","utils-f1l1Oc-G.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-BlhqDhJO.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-DHCB7rsC.js","snippetPresets-CYXLx6Hv.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","Page-kQh739Uz.js","ApiExamples-B78P2dEq.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-C4YLPVAh.js","shallow-vlLnTDkQ.js","getApiPlaygroundDisplay-D_98hhvf.js","CodeSnippet-DtnZHGqq.js","CodeSnippets-CLFb8KJt.js","getPastedJson-Cq-zlbnU.js","icon-sN3t983t.js","MethodPill-P_YQ2s09.js","DuplicateIcon-BVzyNsGJ.js","createIcon-B3jqgqC6.js","DynamicMarkdown-Crwq6WG_.js","SectionHeading-C7pGS2Bb.js","axios-vUo_bRtp.js","Markdown-BuPH8yuW.js","clsx-CCOYKgaU.js","lib--scc4DXi.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-BnkC_6oA.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-BM4S31-f.js"]}