{
"error": {
"type": "permission_denied",
"code": "missing_scope",
"message": "This API key does not have the required \"write\" scope.",
"param": "scope",
"request_id": "req_07f6cdc3c20249d6afcd90b4"
}
}
Saves conditions as a filter segment, like creating a segment from the filters on the Customers screen. The segment is always up to date: it is evaluated again whenever it is read or used in a send, so customers who spend their cashback (giftback) leave and those who get a new one join. Nothing is sent: the segment only becomes an audience when a person picks it in a campaign. If the name is already taken, Bevits adds a number at the end. Check the count first with POST /v1/segment-builder/preview. Requires an API key with the write scope.
POST
/
v1
/
segments
Create filter segment
curl --request POST \ --url https://api.bevits.com/v1/segments \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "Giftback expiring in 7 days", "description": "Giftback to spend that expires this week, with R$ 500 or more in purchases", "match": "all", "conditions": [ { "kind": "coupon", "status": "has_available", "source": "cashback", "expires_within_days": 7 }, { "kind": "field", "field": "totalSpentInCents", "operator": "gte", "value": 50000 } ]}'
import requests
url = "https://api.bevits.com/v1/segments"
payload = {
"name": "Giftback expiring in 7 days",
"description": "Giftback to spend that expires this week, with R$ 500 or more in purchases",
"match": "all",
"conditions": [
{
"kind": "coupon",
"status": "has_available",
"source": "cashback",
"expires_within_days": 7
},
{
"kind": "field",
"field": "totalSpentInCents",
"operator": "gte",
"value": 50000
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Giftback expiring in 7 days',
description: 'Giftback to spend that expires this week, with R$ 500 or more in purchases',
match: 'all',
conditions: [
{
kind: 'coupon',
status: 'has_available',
source: 'cashback',
expires_within_days: 7
},
{kind: 'field', field: 'totalSpentInCents', operator: 'gte', value: 50000}
]
})
};
fetch('https://api.bevits.com/v1/segments', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
{
"error": {
"type": "permission_denied",
"code": "missing_scope",
"message": "This API key does not have the required \"write\" scope.",
"param": "scope",
"request_id": "req_07f6cdc3c20249d6afcd90b4"
}
}
Unique key for the operation. Repeating the same key with the same body returns the original response instead of running it again.
Body
application/json
name
string
required
Segment name. If it is already taken, Bevits adds a number at the end.
Required string length: 1 - 200
conditions
object[]
required
Conditions from the filter catalog (GET /v1/segment-builder/catalog). Up to 30.
Required array length: 1 - 30 elements
One condition of a filter segment. The same format goes into create, update, and preview and comes back in GET /v1/segments/{segment_id}.
Option 1
Option 2
Option 3
Option 4
Show child attributes
description
string
Maximum string length: 1000
match
enum<string>
all: customers who match every condition. any: customers who match at least one.
Available options:
all,
any
operation_id
string
Optional unique id for this call, such as a UUID. Reuse the same value only to retry the same call: the retry returns the first result instead of creating again. The same value with a different body is rejected with 409.
Required string length: 8 - 128
Response
Segment created.
object
string
required
Allowed value: "segment_write"
segment
object
required
Show child attributes
next_step
string
required
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Bevits","colors":{"primary":"#F97316","light":"#FB923C","dark":"#EA580C"},"logo":{"light":"https://mintcdn.com/bevits/1nYG20dqbMUuey8F/logo/light.svg?fit=max\u0026auto=format\u0026n=1nYG20dqbMUuey8F\u0026q=85\u0026s=e3888ae21616d4de0a83364106aade8c","dark":"https://mintcdn.com/bevits/1nYG20dqbMUuey8F/logo/dark.svg?fit=max\u0026auto=format\u0026n=1nYG20dqbMUuey8F\u0026q=85\u0026s=a4cb0c23c9b869db5134b256820f2dce"},"favicon":"https://mintcdn.com/bevits/1nYG20dqbMUuey8F/favicon.svg?fit=max\u0026auto=format\u0026n=1nYG20dqbMUuey8F\u0026q=85\u0026s=0860c45a6d0cf16a9e741cd3ef465c1b","styling":{"latex":false},"navigation":{"languages":[{"language":"pt-BR","default":true,"navbar":{"links":[{"href":"mailto:hey@bevits.com","label":"Suporte"}],"primary":{"type":"button","label":"Painel","href":"https://app.bevits.com"}},"href":"pt-BR/overview"},{"language":"en","navbar":{"links":[{"href":"mailto:hey@bevits.com","label":"Support"}],"primary":{"type":"button","label":"Dashboard","href":"https://app.bevits.com"}},"href":"en/overview"},{"language":"es","navbar":{"links":[{"href":"mailto:hey@bevits.com","label":"Soporte"}],"primary":{"type":"button","label":"Panel","href":"https://app.bevits.com"}},"href":"es/overview"}]}},"deployment":{"deploymentMetadataValue":{"subdomain":"bevits","hasAudioNarration":false,"actualSubdomain":"bevits","customDomains":["docs.bevits.com"],"gitSource":{"type":"github","owner":"zenvios","repo":"zenvios-monorepo","deployBranch":"main","contentDirectory":"bevits-docs","isPrivate":true,"mountPath":"","label":""},"entitlements":{},"buildId":"6b00e682edb39c90a37ab9ba","clientVersion":"0.0.4270","searchFilterCounts":[{"language":"en","tag":"API","count":60},{"language":"es","tag":"API","count":60},{"language":"pt-BR","tag":"API","count":60},{"language":"en","tag":"Reference","count":53},{"language":"es","tag":"Referencia","count":53},{"language":"pt-BR","tag":"Referência","count":53},{"language":"en","tag":"Documentation","count":20},{"language":"es","tag":"Documentación","count":20},{"language":"pt-BR","tag":"Documentação","count":20},{"language":"en","tag":"Features","count":10},{"language":"es","tag":"Funcionalidades","count":10},{"language":"pt-BR","tag":"Funcionalidades","count":10},{"language":"en","tag":"Sending methods","count":6},{"language":"es","tag":"Métodos de envío","count":6},{"language":"pt-BR","tag":"Métodos de envio","count":6},{"language":"es","tag":"Primeros pasos","count":5},{"language":"pt-BR","tag":"Primeiros passos","count":5},{"language":"en","tag":"Getting started","count":4},{"language":"en","tag":"Integrations","count":3},{"language":"es","tag":"Integraciones","count":3},{"language":"pt-BR","tag":"Integrações","count":3},{"language":"en","tag":"Custom events","count":2},{"language":"es","tag":"Eventos personalizados","count":2},{"language":"pt-BR","tag":"Eventos personalizados","count":2},{"language":"en","tag":"Fundamentals","count":1},{"language":"en","tag":"Changelog","count":1},{"language":"es","tag":"Fundamentos","count":1},{"language":"es","tag":"Changelog","count":1},{"language":"pt-BR","tag":"Fundamentos","count":1},{"language":"pt-BR","tag":"Changelog","count":1}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","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":"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":"site-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"control","enabled":true,"payload":{"type":"string","value":"control"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[]}
{"page":{"pagePath":"en/api-reference/segments/create-filter-segment","slug":"/en/api-reference/segments/create-filter-segment","pageMetadata":{"title":"Create filter segment","description":"Saves conditions as a filter segment, like creating a segment from the filters on the Customers screen. The segment is always up to date: it is evaluated again whenever it is read or used in a send, so customers who spend their cashback (giftback) leave and those who get a new one join. Nothing is sent: the segment only becomes an audience when a person picks it in a campaign. If the name is already taken, Bevits adds a number at the end. Check the count first with POST /v1/segment-builder/preview. Requires an API key with the write scope.","deprecated":null,"version":null,"openapi":"/openapi.en.json post /v1/segments","href":"/en/api-reference/segments/create-filter-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: \"Saves conditions as a filter segment, like creating a segment from the filters on the Customers screen. The segment is always up to date: it is evaluated again whenever it is read or used in a send, so customers who spend their cashback (giftback) leave and those who get a new one join. Nothing is sent: the segment only becomes an audience when a person picks it in a campaign. If the name is already taken, Bevits adds a number at the end. Check the count first with POST /v1/segment-builder/preview. Requires an API key with the write scope.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Create filter segment","description":"Saves conditions as a filter segment, like creating a segment from the filters on the Customers screen. The segment is always up to date: it is evaluated again whenever it is read or used in a send, so customers who spend their cashback (giftback) leave and those who get a new one join. Nothing is sent: the segment only becomes an audience when a person picks it in a campaign. If the name is already taken, Bevits adds a number at the end. Check the count first with POST /v1/segment-builder/preview. Requires an API key with the write scope.","deprecated":null,"version":null,"openapi":"/openapi.en.json post /v1/segments","href":"/en/api-reference/segments/create-filter-segment","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"summary":"Create filter segment","description":"Saves conditions as a filter segment, like creating a segment from the filters on the Customers screen. The segment is always up to date: it is evaluated again whenever it is read or used in a send, so customers who spend their cashback (giftback) leave and those who get a new one join. Nothing is sent: the segment only becomes an audience when a person picks it in a campaign. If the name is already taken, Bevits adds a number at the end. Check the count first with POST /v1/segment-builder/preview. Requires an API key with the write scope.","operationId":"createSegment","tags":["Segments"],"parameters":["00c6afe9-72e0-434d-b82a-d4cde84fd007"],"requestBody":"e9d08d73-a7ba-4663-8e06-4f34972ea525","responses":{"201":"6712fbf2-28ce-4cf4-b7ef-cf5f8d150ced","400":"563d1473-17e3-42de-94c3-c456486a0a8e","401":"083ac9ab-6eac-4c8f-9a63-bd18c6dc3170","403":"0dab0c45-50f8-4d59-867d-ce2cff43cc4c","409":"aacc0dc1-96ed-4fe3-9420-9fbdb2a71183","422":"2e161976-04e9-4462-bad7-b8e786fb3a2c","429":"4da75f35-dd70-4fe5-aeea-baf95ff902ff","500":"f07c3f16-f290-4e21-9893-e0c80218eba6"},"method":"post","type":"path","servers":["7069ccf3-9562-4ac9-9667-21d8c3988907"],"security":["a2b5bdb9-1855-4cd3-a9bc-9478e454e8e4"],"path":"/v1/segments","baseUrlOptions":["https://api.bevits.com"],"title":"Create filter segment","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{"00c6afe9-72e0-434d-b82a-d4cde84fd007":{"name":"Idempotency-Key","in":"header","description":"Unique key for the operation. Repeating the same key with the same body returns the original response instead of running it again.","schema":{"type":"string","description":"Unique key for the operation. Repeating the same key with the same body returns the original response instead of running it again.","uniqueKey":"","typeLabel":"string"}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name","conditions"],"properties":{"name":{"type":"string","minLength":1,"maxLength":200,"description":"Segment name. If it is already taken, Bevits adds a number at the end.","isRequired":true,"uniqueKey":"name","typeLabel":"string"},"conditions":{"type":"array","items":{"oneOf":[{"type":"object","description":"One condition of a filter segment. The same format goes into create, update, and preview and comes back in GET /v1/segments/{segment_id}.","required":["kind","field","operator"],"properties":{"kind":{"type":"string","const":"field","isRequired":true,"uniqueKey":"conditions.items.[INDEX].oneOf.0.kind","typeLabel":"string"},"field":{"type":"string","minLength":1,"maxLength":256,"description":"A customer field (such as totalSpentInCents, lastPurchaseDate, or city) or the ID of a custom attribute (atr_...), from the filter catalog.","isRequired":true,"uniqueKey":"conditions.items.[INDEX].oneOf.0.field","typeLabel":"string"},"operator":{"type":"string","minLength":1,"maxLength":32,"description":"One of the field's operators in the catalog. Text: eq, neq, in, not_in, contains, not_contains, starts_with, is_null, is_not_null. Number: eq, neq, gt, gte, lt, lte. Boolean: eq_true, eq_false, is_null, is_not_null. Date: gt, lt, between.","isRequired":true,"uniqueKey":"conditions.items.[INDEX].oneOf.0.operator","typeLabel":"string"},"value":{"oneOf":[{"type":"string","description":"Leave it out for is_null, is_not_null, eq_true, and eq_false. A list for in and not_in. Money in cents. Dates in ISO 8601 with a timezone.","maxLength":512,"uniqueKey":"conditions.items.[INDEX].oneOf.0.value.oneOf.0","typeLabel":"string"},{"type":"number","description":"Leave it out for is_null, is_not_null, eq_true, and eq_false. A list for in and not_in. Money in cents. Dates in ISO 8601 with a timezone.","uniqueKey":"conditions.items.[INDEX].oneOf.0.value.oneOf.1","typeLabel":"number"},{"type":"boolean","description":"Leave it out for is_null, is_not_null, eq_true, and eq_false. A list for in and not_in. Money in cents. Dates in ISO 8601 with a timezone.","uniqueKey":"conditions.items.[INDEX].oneOf.0.value.oneOf.2","typeLabel":"boolean"},{"type":"array","items":{"type":"string","minLength":1,"maxLength":256,"uniqueKey":"conditions.items.[INDEX].oneOf.0.value.oneOf.3.items.[INDEX]","typeLabel":"string"},"description":"Leave it out for is_null, is_not_null, eq_true, and eq_false. A list for in and not_in. Money in cents. Dates in ISO 8601 with a timezone.","maxItems":500,"minItems":1,"uniqueKey":"conditions.items.[INDEX].oneOf.0.value.oneOf.3","typeLabel":"string[]"}],"uniqueKey":"conditions.items.[INDEX].oneOf.0.value","typeLabel":"string | number | boolean | string[]"},"value_to":{"oneOf":[{"type":"string","description":"End of a between range.","maxLength":64,"uniqueKey":"conditions.items.[INDEX].oneOf.0.value_to.oneOf.0","typeLabel":"string"},{"type":"number","description":"End of a between range.","uniqueKey":"conditions.items.[INDEX].oneOf.0.value_to.oneOf.1","typeLabel":"number"}],"uniqueKey":"conditions.items.[INDEX].oneOf.0.value_to","typeLabel":"string | number"}},"additionalProperties":false,"uniqueKey":"conditions.items.[INDEX].oneOf.0","typeLabel":"object"},{"type":"object","description":"One condition of a filter segment. The same format goes into create, update, and preview and comes back in GET /v1/segments/{segment_id}.","required":["kind","operator","tag_ids"],"properties":{"kind":{"type":"string","const":"tags","isRequired":true,"uniqueKey":"conditions.items.[INDEX].oneOf.1.kind","typeLabel":"string"},"operator":{"type":"string","enum":["has_any","has_all","has_none"],"description":"has_any: has any of the tags. has_all: has all of them. has_none: has none of them, including customers without any tag.","isRequired":true,"uniqueKey":"conditions.items.[INDEX].oneOf.1.operator","typeLabel":"enum\u003cstring>"},"tag_ids":{"type":"array","items":{"type":"string","pattern":"^tag_[A-Za-z0-9_-]+$","uniqueKey":"conditions.items.[INDEX].oneOf.1.tag_ids.items.[INDEX]","typeLabel":"string"},"minItems":1,"maxItems":50,"description":"Tag IDs (tag_...), from GET /v1/tags.","isRequired":true,"uniqueKey":"conditions.items.[INDEX].oneOf.1.tag_ids","typeLabel":"string[]"}},"additionalProperties":false,"uniqueKey":"conditions.items.[INDEX].oneOf.1","typeLabel":"object"},{"type":"object","description":"One condition of a filter segment. The same format goes into create, update, and preview and comes back in GET /v1/segments/{segment_id}.","required":["kind","operator"],"properties":{"kind":{"type":"string","const":"product","isRequired":true,"uniqueKey":"conditions.items.[INDEX].oneOf.2.kind","typeLabel":"string"},"operator":{"type":"string","enum":["has_purchased","has_not_purchased","purchased_in_category"],"isRequired":true,"uniqueKey":"conditions.items.[INDEX].oneOf.2.operator","typeLabel":"enum\u003cstring>"},"product_id":{"type":"string","minLength":1,"maxLength":256,"description":"The store's product ID, as in purchase items. For has_purchased and has_not_purchased.","uniqueKey":"conditions.items.[INDEX].oneOf.2.product_id","typeLabel":"string"},"category":{"type":"string","minLength":1,"maxLength":256,"description":"Product category name. For purchased_in_category.","uniqueKey":"conditions.items.[INDEX].oneOf.2.category","typeLabel":"string"}},"additionalProperties":false,"uniqueKey":"conditions.items.[INDEX].oneOf.2","typeLabel":"object"},{"type":"object","description":"One condition of a filter segment. The same format goes into create, update, and preview and comes back in GET /v1/segments/{segment_id}.","required":["kind","status"],"properties":{"kind":{"type":"string","const":"coupon","isRequired":true,"uniqueKey":"conditions.items.[INDEX].oneOf.3.kind","typeLabel":"string"},"status":{"type":"string","enum":["has_available","has_unused","has_expired_unused","has_used","has_received","has_not_received"],"description":"has_available: has an unused, unexpired coupon, with credit to spend now. has_unused: has a coupon they never used, expired or not. has_expired_unused: let a coupon expire without using it. has_used: used a coupon in a purchase. has_received: received a coupon. has_not_received: never received a coupon.","isRequired":true,"uniqueKey":"conditions.items.[INDEX].oneOf.3.status","typeLabel":"enum\u003cstring>"},"source":{"type":"string","enum":["cashback","any","flows"],"default":"cashback","description":"cashback: coupons generated by a purchase (cashback or giftback, online or in store). any: every coupon Bevits issued to the customer. flows: only the coupons of the automations in flow_ids.","uniqueKey":"conditions.items.[INDEX].oneOf.3.source","typeLabel":"enum\u003cstring>"},"flow_ids":{"type":"array","items":{"type":"string","pattern":"^flw_[A-Za-z0-9_-]+$","uniqueKey":"conditions.items.[INDEX].oneOf.3.flow_ids.items.[INDEX]","typeLabel":"string"},"minItems":1,"maxItems":50,"description":"With source flows: automations that issue coupons, listed in the catalog.","uniqueKey":"conditions.items.[INDEX].oneOf.3.flow_ids","typeLabel":"string[]"},"received_within_days":{"type":"integer","minimum":1,"maximum":3650,"description":"Only coupons issued in the last N days.","uniqueKey":"conditions.items.[INDEX].oneOf.3.received_within_days","typeLabel":"integer"},"expires_within_days":{"type":"integer","minimum":1,"maximum":365,"description":"With has_available: only coupons that expire in the next N days.","uniqueKey":"conditions.items.[INDEX].oneOf.3.expires_within_days","typeLabel":"integer"}},"additionalProperties":false,"uniqueKey":"conditions.items.[INDEX].oneOf.3","typeLabel":"object"}],"uniqueKey":"conditions.items.[INDEX]","typeLabel":"object"},"minItems":1,"maxItems":30,"description":"Conditions from the filter catalog (GET /v1/segment-builder/catalog). Up to 30.","isRequired":true,"uniqueKey":"conditions","typeLabel":"object[]"},"description":{"type":"string","maxLength":1000,"uniqueKey":"description","typeLabel":"string"},"match":{"type":"string","enum":["all","any"],"description":"all: customers who match every condition. any: customers who match at least one.","uniqueKey":"match","typeLabel":"enum\u003cstring>"},"operation_id":{"type":"string","minLength":8,"maxLength":128,"description":"Optional unique id for this call, such as a UUID. Reuse the same value only to retry the same call: the retry returns the first result instead of creating again. The same value with a different body is rejected with 409.","uniqueKey":"operation_id","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"example":{"name":"Giftback expiring in 7 days","description":"Giftback to spend that expires this week, with R$ 500 or more in purchases","match":"all","conditions":[{"kind":"coupon","status":"has_available","source":"cashback","expires_within_days":7},{"kind":"field","field":"totalSpentInCents","operator":"gte","value":50000}]},"examples":{"Example":{"title":"Example","value":{"name":"Giftback expiring in 7 days","description":"Giftback to spend that expires this week, with R$ 500 or more in purchases","match":"all","conditions":[{"kind":"coupon","status":"has_available","source":"cashback","expires_within_days":7},{"kind":"field","field":"totalSpentInCents","operator":"gte","value":50000}]}}},"exampleType":"examples"}},"exampleType":"examples"},"responses":{"6712fbf2-28ce-4cf4-b7ef-cf5f8d150ced":{"description":"Segment created.","content":{"application/json":{"schema":{"type":"object","required":["object","segment","next_step"],"properties":{"object":{"type":"string","const":"segment_write","isRequired":true,"uniqueKey":"object","typeLabel":"string"},"segment":{"type":"object","required":["object","id","created_at","updated_at","html_url"],"properties":{"object":{"type":"string","const":"segment","isRequired":true,"uniqueKey":"segment.object","typeLabel":"string"},"id":{"type":"string","pattern":"^seg_[A-Za-z0-9_-]+$","isRequired":true,"uniqueKey":"segment.id","typeLabel":"string"},"created_at":{"type":"string","format":"date-time","isRequired":true,"uniqueKey":"segment.created_at","typeLabel":"string\u003cdate-time>"},"updated_at":{"type":"string","format":"date-time","isRequired":true,"uniqueKey":"segment.updated_at","typeLabel":"string\u003cdate-time>"},"html_url":{"type":"string","format":"uri","isRequired":true,"uniqueKey":"segment.html_url","typeLabel":"string\u003curi>"},"name":{"type":"string","uniqueKey":"segment.name","typeLabel":"string"},"description":{"type":"string","uniqueKey":"segment.description","typeLabel":"string"},"type":{"type":"string","enum":["static","filters","rfm","campaign_engagement"],"description":"static: customers added by hand. filters: whoever matches the conditions at the moment, plus those added by hand. rfm: kept up to date by Bevits. campaign_engagement: campaign engagement recorded at creation.","uniqueKey":"segment.type","typeLabel":"enum\u003cstring>"},"match":{"type":"string","enum":["all","any"],"description":"all: customers who match every condition. any: customers who match at least one.","uniqueKey":"segment.match","typeLabel":"enum\u003cstring>"},"conditions":{"type":"array","items":{"oneOf":[{"type":"object","description":"One condition of a filter segment. The same format goes into create, update, and preview and comes back in GET /v1/segments/{segment_id}.","required":["kind","field","operator"],"properties":{"kind":{"type":"string","const":"field","isRequired":true,"uniqueKey":"segment.conditions.items.[INDEX].oneOf.0.kind","typeLabel":"string"},"field":{"type":"string","minLength":1,"maxLength":256,"description":"A customer field (such as totalSpentInCents, lastPurchaseDate, or city) or the ID of a custom attribute (atr_...), from the filter catalog.","isRequired":true,"uniqueKey":"segment.conditions.items.[INDEX].oneOf.0.field","typeLabel":"string"},"operator":{"type":"string","minLength":1,"maxLength":32,"description":"One of the field's operators in the catalog. Text: eq, neq, in, not_in, contains, not_contains, starts_with, is_null, is_not_null. Number: eq, neq, gt, gte, lt, lte. Boolean: eq_true, eq_false, is_null, is_not_null. Date: gt, lt, between.","isRequired":true,"uniqueKey":"segment.conditions.items.[INDEX].oneOf.0.operator","typeLabel":"string"},"value":{"oneOf":[{"type":"string","description":"Leave it out for is_null, is_not_null, eq_true, and eq_false. A list for in and not_in. Money in cents. Dates in ISO 8601 with a timezone.","maxLength":512,"uniqueKey":"segment.conditions.items.[INDEX].oneOf.0.value.oneOf.0","typeLabel":"string"},{"type":"number","description":"Leave it out for is_null, is_not_null, eq_true, and eq_false. A list for in and not_in. Money in cents. Dates in ISO 8601 with a timezone.","uniqueKey":"segment.conditions.items.[INDEX].oneOf.0.value.oneOf.1","typeLabel":"number"},{"type":"boolean","description":"Leave it out for is_null, is_not_null, eq_true, and eq_false. A list for in and not_in. Money in cents. Dates in ISO 8601 with a timezone.","uniqueKey":"segment.conditions.items.[INDEX].oneOf.0.value.oneOf.2","typeLabel":"boolean"},{"type":"array","items":{"type":"string","minLength":1,"maxLength":256,"uniqueKey":"segment.conditions.items.[INDEX].oneOf.0.value.oneOf.3.items.[INDEX]","typeLabel":"string"},"description":"Leave it out for is_null, is_not_null, eq_true, and eq_false. A list for in and not_in. Money in cents. Dates in ISO 8601 with a timezone.","maxItems":500,"minItems":1,"uniqueKey":"segment.conditions.items.[INDEX].oneOf.0.value.oneOf.3","typeLabel":"string[]"}],"uniqueKey":"segment.conditions.items.[INDEX].oneOf.0.value","typeLabel":"string | number | boolean | string[]"},"value_to":{"oneOf":[{"type":"string","description":"End of a between range.","maxLength":64,"uniqueKey":"segment.conditions.items.[INDEX].oneOf.0.value_to.oneOf.0","typeLabel":"string"},{"type":"number","description":"End of a between range.","uniqueKey":"segment.conditions.items.[INDEX].oneOf.0.value_to.oneOf.1","typeLabel":"number"}],"uniqueKey":"segment.conditions.items.[INDEX].oneOf.0.value_to","typeLabel":"string | number"}},"additionalProperties":false,"uniqueKey":"segment.conditions.items.[INDEX].oneOf.0","typeLabel":"object"},{"type":"object","description":"One condition of a filter segment. The same format goes into create, update, and preview and comes back in GET /v1/segments/{segment_id}.","required":["kind","operator","tag_ids"],"properties":{"kind":{"type":"string","const":"tags","isRequired":true,"uniqueKey":"segment.conditions.items.[INDEX].oneOf.1.kind","typeLabel":"string"},"operator":{"type":"string","enum":["has_any","has_all","has_none"],"description":"has_any: has any of the tags. has_all: has all of them. has_none: has none of them, including customers without any tag.","isRequired":true,"uniqueKey":"segment.conditions.items.[INDEX].oneOf.1.operator","typeLabel":"enum\u003cstring>"},"tag_ids":{"type":"array","items":{"type":"string","pattern":"^tag_[A-Za-z0-9_-]+$","uniqueKey":"segment.conditions.items.[INDEX].oneOf.1.tag_ids.items.[INDEX]","typeLabel":"string"},"minItems":1,"maxItems":50,"description":"Tag IDs (tag_...), from GET /v1/tags.","isRequired":true,"uniqueKey":"segment.conditions.items.[INDEX].oneOf.1.tag_ids","typeLabel":"string[]"}},"additionalProperties":false,"uniqueKey":"segment.conditions.items.[INDEX].oneOf.1","typeLabel":"object"},{"type":"object","description":"One condition of a filter segment. The same format goes into create, update, and preview and comes back in GET /v1/segments/{segment_id}.","required":["kind","operator"],"properties":{"kind":{"type":"string","const":"product","isRequired":true,"uniqueKey":"segment.conditions.items.[INDEX].oneOf.2.kind","typeLabel":"string"},"operator":{"type":"string","enum":["has_purchased","has_not_purchased","purchased_in_category"],"isRequired":true,"uniqueKey":"segment.conditions.items.[INDEX].oneOf.2.operator","typeLabel":"enum\u003cstring>"},"product_id":{"type":"string","minLength":1,"maxLength":256,"description":"The store's product ID, as in purchase items. For has_purchased and has_not_purchased.","uniqueKey":"segment.conditions.items.[INDEX].oneOf.2.product_id","typeLabel":"string"},"category":{"type":"string","minLength":1,"maxLength":256,"description":"Product category name. For purchased_in_category.","uniqueKey":"segment.conditions.items.[INDEX].oneOf.2.category","typeLabel":"string"}},"additionalProperties":false,"uniqueKey":"segment.conditions.items.[INDEX].oneOf.2","typeLabel":"object"},{"type":"object","description":"One condition of a filter segment. The same format goes into create, update, and preview and comes back in GET /v1/segments/{segment_id}.","required":["kind","status"],"properties":{"kind":{"type":"string","const":"coupon","isRequired":true,"uniqueKey":"segment.conditions.items.[INDEX].oneOf.3.kind","typeLabel":"string"},"status":{"type":"string","enum":["has_available","has_unused","has_expired_unused","has_used","has_received","has_not_received"],"description":"has_available: has an unused, unexpired coupon, with credit to spend now. has_unused: has a coupon they never used, expired or not. has_expired_unused: let a coupon expire without using it. has_used: used a coupon in a purchase. has_received: received a coupon. has_not_received: never received a coupon.","isRequired":true,"uniqueKey":"segment.conditions.items.[INDEX].oneOf.3.status","typeLabel":"enum\u003cstring>"},"source":{"type":"string","enum":["cashback","any","flows"],"default":"cashback","description":"cashback: coupons generated by a purchase (cashback or giftback, online or in store). any: every coupon Bevits issued to the customer. flows: only the coupons of the automations in flow_ids.","uniqueKey":"segment.conditions.items.[INDEX].oneOf.3.source","typeLabel":"enum\u003cstring>"},"flow_ids":{"type":"array","items":{"type":"string","pattern":"^flw_[A-Za-z0-9_-]+$","uniqueKey":"segment.conditions.items.[INDEX].oneOf.3.flow_ids.items.[INDEX]","typeLabel":"string"},"minItems":1,"maxItems":50,"description":"With source flows: automations that issue coupons, listed in the catalog.","uniqueKey":"segment.conditions.items.[INDEX].oneOf.3.flow_ids","typeLabel":"string[]"},"received_within_days":{"type":"integer","minimum":1,"maximum":3650,"description":"Only coupons issued in the last N days.","uniqueKey":"segment.conditions.items.[INDEX].oneOf.3.received_within_days","typeLabel":"integer"},"expires_within_days":{"type":"integer","minimum":1,"maximum":365,"description":"With has_available: only coupons that expire in the next N days.","uniqueKey":"segment.conditions.items.[INDEX].oneOf.3.expires_within_days","typeLabel":"integer"}},"additionalProperties":false,"uniqueKey":"segment.conditions.items.[INDEX].oneOf.3","typeLabel":"object"}],"uniqueKey":"segment.conditions.items.[INDEX]","typeLabel":"object"},"description":"Conditions of a filter segment, in the same format creation and update take.","uniqueKey":"segment.conditions","typeLabel":"object[]"},"customer_count":{"type":"integer","minimum":0,"uniqueKey":"segment.customer_count","typeLabel":"integer"}},"isRequired":true,"uniqueKey":"segment","typeLabel":"object"},"next_step":{"type":"string","isRequired":true,"uniqueKey":"next_step","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"object":"segment_write","segment":{"object":"segment","id":"\u003cstring>","created_at":"2023-11-07T05:31:56Z","updated_at":"2023-11-07T05:31:56Z","html_url":"\u003cstring>","name":"\u003cstring>","description":"\u003cstring>","type":"static","match":"all","conditions":[{"kind":"field","field":"\u003cstring>","operator":"\u003cstring>","value":"\u003cstring>","value_to":"\u003cstring>"}],"customer_count":1},"next_step":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"563d1473-17e3-42de-94c3-c456486a0a8e":{"description":"Missing request body, a body that is not a JSON object, or an invalid route parameter.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["type","message","request_id"],"properties":{"type":{"type":"string","enum":["authentication_error","conflict","internal_error","invalid_request","not_found","permission_denied","rate_limited","validation_error"],"isRequired":true,"uniqueKey":"error.type","typeLabel":"enum\u003cstring>"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"request_id":{"type":"string","pattern":"^req_[a-f0-9]{24}$","isRequired":true,"uniqueKey":"error.request_id","typeLabel":"string"},"code":{"type":"string","description":"Stable, machine-readable reason within type, such as invalid_event_name. Present when the error has a named reason.","uniqueKey":"error.code","typeLabel":"string"},"param":{"type":"string","description":"Full path of the offending field, such as customer.email or events[3].name.","uniqueKey":"error.param","typeLabel":"string"},"suggestion":{"type":"string","description":"A value that would be accepted, when there is an obvious one.","uniqueKey":"error.suggestion","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"type":"authentication_error","message":"\u003cstring>","request_id":"\u003cstring>","code":"\u003cstring>","param":"\u003cstring>","suggestion":"\u003cstring>"}}}},"exampleType":"generated"}},"exampleType":"generated"},"083ac9ab-6eac-4c8f-9a63-bd18c6dc3170":{"description":"Missing, invalid, expired, or revoked API key.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["type","message","request_id"],"properties":{"type":{"type":"string","enum":["authentication_error","conflict","internal_error","invalid_request","not_found","permission_denied","rate_limited","validation_error"],"isRequired":true,"uniqueKey":"error.type","typeLabel":"enum\u003cstring>"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"request_id":{"type":"string","pattern":"^req_[a-f0-9]{24}$","isRequired":true,"uniqueKey":"error.request_id","typeLabel":"string"},"code":{"type":"string","description":"Stable, machine-readable reason within type, such as invalid_event_name. Present when the error has a named reason.","uniqueKey":"error.code","typeLabel":"string"},"param":{"type":"string","description":"Full path of the offending field, such as customer.email or events[3].name.","uniqueKey":"error.param","typeLabel":"string"},"suggestion":{"type":"string","description":"A value that would be accepted, when there is an obvious one.","uniqueKey":"error.suggestion","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"example":{"error":{"type":"authentication_error","message":"Invalid API key.","request_id":"req_07f6cdc3c20249d6afcd90b4"}},"examples":{"Example":{"title":"Example","value":{"error":{"type":"authentication_error","message":"Invalid API key.","request_id":"req_07f6cdc3c20249d6afcd90b4"}}}},"exampleType":"examples"}},"exampleType":"examples"},"0dab0c45-50f8-4d59-867d-ce2cff43cc4c":{"description":"The API key does not have the write scope.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["type","message","request_id"],"properties":{"type":{"type":"string","enum":["authentication_error","conflict","internal_error","invalid_request","not_found","permission_denied","rate_limited","validation_error"],"isRequired":true,"uniqueKey":"error.type","typeLabel":"enum\u003cstring>"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"request_id":{"type":"string","pattern":"^req_[a-f0-9]{24}$","isRequired":true,"uniqueKey":"error.request_id","typeLabel":"string"},"code":{"type":"string","description":"Stable, machine-readable reason within type, such as invalid_event_name. Present when the error has a named reason.","uniqueKey":"error.code","typeLabel":"string"},"param":{"type":"string","description":"Full path of the offending field, such as customer.email or events[3].name.","uniqueKey":"error.param","typeLabel":"string"},"suggestion":{"type":"string","description":"A value that would be accepted, when there is an obvious one.","uniqueKey":"error.suggestion","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"example":{"error":{"type":"permission_denied","code":"missing_scope","message":"This API key does not have the required \"write\" scope.","param":"scope","request_id":"req_07f6cdc3c20249d6afcd90b4"}},"examples":{"Example":{"title":"Example","value":{"error":{"type":"permission_denied","code":"missing_scope","message":"This API key does not have the required \"write\" scope.","param":"scope","request_id":"req_07f6cdc3c20249d6afcd90b4"}}}},"exampleType":"examples"}},"exampleType":"examples"},"aacc0dc1-96ed-4fe3-9420-9fbdb2a71183":{"description":"The Idempotency-Key was already used with a different request body.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["type","message","request_id"],"properties":{"type":{"type":"string","enum":["authentication_error","conflict","internal_error","invalid_request","not_found","permission_denied","rate_limited","validation_error"],"isRequired":true,"uniqueKey":"error.type","typeLabel":"enum\u003cstring>"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"request_id":{"type":"string","pattern":"^req_[a-f0-9]{24}$","isRequired":true,"uniqueKey":"error.request_id","typeLabel":"string"},"code":{"type":"string","description":"Stable, machine-readable reason within type, such as invalid_event_name. Present when the error has a named reason.","uniqueKey":"error.code","typeLabel":"string"},"param":{"type":"string","description":"Full path of the offending field, such as customer.email or events[3].name.","uniqueKey":"error.param","typeLabel":"string"},"suggestion":{"type":"string","description":"A value that would be accepted, when there is an obvious one.","uniqueKey":"error.suggestion","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"type":"authentication_error","message":"\u003cstring>","request_id":"\u003cstring>","code":"\u003cstring>","param":"\u003cstring>","suggestion":"\u003cstring>"}}}},"exampleType":"generated"}},"exampleType":"generated"},"2e161976-04e9-4462-bad7-b8e786fb3a2c":{"description":"A condition or field was rejected, for example an operator that doesn't apply to the field or an RFM segment. The message says what to fix and the valid options, and error.param points to the field.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["type","message","request_id"],"properties":{"type":{"type":"string","enum":["authentication_error","conflict","internal_error","invalid_request","not_found","permission_denied","rate_limited","validation_error"],"isRequired":true,"uniqueKey":"error.type","typeLabel":"enum\u003cstring>"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"request_id":{"type":"string","pattern":"^req_[a-f0-9]{24}$","isRequired":true,"uniqueKey":"error.request_id","typeLabel":"string"},"code":{"type":"string","description":"Stable, machine-readable reason within type, such as invalid_event_name. Present when the error has a named reason.","uniqueKey":"error.code","typeLabel":"string"},"param":{"type":"string","description":"Full path of the offending field, such as customer.email or events[3].name.","uniqueKey":"error.param","typeLabel":"string"},"suggestion":{"type":"string","description":"A value that would be accepted, when there is an obvious one.","uniqueKey":"error.suggestion","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"type":"authentication_error","message":"\u003cstring>","request_id":"\u003cstring>","code":"\u003cstring>","param":"\u003cstring>","suggestion":"\u003cstring>"}}}},"exampleType":"generated"}},"exampleType":"generated"},"4da75f35-dd70-4fe5-aeea-baf95ff902ff":{"description":"Request limit exceeded.","headers":{"Retry-After":{"description":"Seconds before retrying.","schema":{"type":"integer","minimum":1}},"X-RateLimit-Limit":{"description":"Total limit for the current window.","schema":{"type":"integer","example":600}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":599}},"X-RateLimit-Reset":{"description":"UTC instant when the current window ends.","schema":{"type":"string","format":"date-time"}}},"content":{"application/json":{"schema":{"type":"object","required":["retry_after","error"],"properties":{"error":{"type":"object","required":["type","message","request_id"],"properties":{"type":{"type":"string","enum":["authentication_error","conflict","internal_error","invalid_request","not_found","permission_denied","rate_limited","validation_error"],"isRequired":true,"uniqueKey":"error.type","typeLabel":"enum\u003cstring>"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"request_id":{"type":"string","pattern":"^req_[a-f0-9]{24}$","isRequired":true,"uniqueKey":"error.request_id","typeLabel":"string"},"code":{"type":"string","description":"Stable, machine-readable reason within type, such as invalid_event_name. Present when the error has a named reason.","uniqueKey":"error.code","typeLabel":"string"},"param":{"type":"string","description":"Full path of the offending field, such as customer.email or events[3].name.","uniqueKey":"error.param","typeLabel":"string"},"suggestion":{"type":"string","description":"A value that would be accepted, when there is an obvious one.","uniqueKey":"error.suggestion","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"},"retry_after":{"type":"integer","minimum":1,"description":"Seconds before retrying.","isRequired":true,"uniqueKey":"retry_after","typeLabel":"integer"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"type":"authentication_error","message":"\u003cstring>","request_id":"\u003cstring>","code":"\u003cstring>","param":"\u003cstring>","suggestion":"\u003cstring>"},"retry_after":2}}},"exampleType":"generated"}},"exampleType":"generated"},"f07c3f16-f290-4e21-9893-e0c80218eba6":{"description":"Unexpected server error.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["type","message","request_id"],"properties":{"type":{"type":"string","enum":["authentication_error","conflict","internal_error","invalid_request","not_found","permission_denied","rate_limited","validation_error"],"isRequired":true,"uniqueKey":"error.type","typeLabel":"enum\u003cstring>"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"request_id":{"type":"string","pattern":"^req_[a-f0-9]{24}$","isRequired":true,"uniqueKey":"error.request_id","typeLabel":"string"},"code":{"type":"string","description":"Stable, machine-readable reason within type, such as invalid_event_name. Present when the error has a named reason.","uniqueKey":"error.code","typeLabel":"string"},"param":{"type":"string","description":"Full path of the offending field, such as customer.email or events[3].name.","uniqueKey":"error.param","typeLabel":"string"},"suggestion":{"type":"string","description":"A value that would be accepted, when there is an obvious one.","uniqueKey":"error.suggestion","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"type":"authentication_error","message":"\u003cstring>","request_id":"\u003cstring>","code":"\u003cstring>","param":"\u003cstring>","suggestion":"\u003cstring>"}}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"a2b5bdb9-1855-4cd3-a9bc-9478e454e8e4":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"bvt_live_...","description":"API key created in the organization settings.","scopes":[],"schemeName":"bearerAuth"}}},"servers":{"7069ccf3-9562-4ac9-9667-21d8c3988907":{"url":"https://api.bevits.com","description":"Production"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","bearerFormat":"bvt_live_...","description":"API key created in the organization settings.","scopes":[],"schemeName":"bearerAuth"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"API key created in the organization settings.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"bearerAuth","name":"Authorization"}],"title":"bearerAuth"}]},"originalFileLocation":"openapi.en.json"},"subdomain":"bevits","siteName":"Bevits","title":"Create filter segment - Bevits","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{"pt-BR":{"href":"/pt-BR/overview","matchLevel":4},"en":{"href":"/en/api-reference/segments/create-filter-segment","matchLevel":0},"es":{"href":"/es/overview","matchLevel":4}}},"lastModified":"2026-11-21T00:32:10.840Z","originalFileLocation":"en/api-reference/segments/create-filter-segment.mdx","locale":"en"},"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=\"Saves conditions as a filter segment, like creating a segment from the filters on the Customers screen. The segment is always up to date: it is evaluated again whenever it is read or used in a send, so customers who spend their cashback (giftback) leave and those who get a new one join. Nothing is sent: the segment only becomes an audience when a person picks it in a campaign. If the name is already taken, Bevits adds a number at the end. Check the count first with POST /v1/segment-builder/preview. Requires an API key with the write scope.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Bevits\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/bevits/rUFhj4NY5eY9LDUb/_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/bevits/rUFhj4NY5eY9LDUb/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/bevits/rUFhj4NY5eY9LDUb/_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/bevits/rUFhj4NY5eY9LDUb/_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/bevits/rUFhj4NY5eY9LDUb/_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/bevits/rUFhj4NY5eY9LDUb/_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/bevits/rUFhj4NY5eY9LDUb/_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/bevits/rUFhj4NY5eY9LDUb/_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/bevits/rUFhj4NY5eY9LDUb/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Create filter segment - Bevits\">\u003cmeta data-mint-head property=\"og:description\" content=\"Saves conditions as a filter segment, like creating a segment from the filters on the Customers screen. The segment is always up to date: it is evaluated again whenever it is read or used in a send, so customers who spend their cashback (giftback) leave and those who get a new one join. Nothing is sent: the segment only becomes an audience when a person picks it in a campaign. If the name is already taken, Bevits adds a number at the end. Check the count first with POST /v1/segment-builder/preview. Requires an API key with the write scope.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Bevits\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.bevits.com/en/api-reference/segments/create-filter-segment\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://bevits.mintlify.site/_mintlify/api/og/v2?division=Reference\u0026amp;title=Create+filter+segment\u0026amp;description=Saves+conditions+as+a+filter+segment%2C+like+creating+a+segment+from+the+filters+on+the+Customers+screen.+The+segment+is+always+up+to+date%3A+it+is+evaluated+again+\u0026amp;theme=7595054ec12c591f1d286750\u0026amp;signature=747be8cec00bd85362d49541d1ad11b43956f48cd0f7afc16680411708d517f6\">\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 filter segment - Bevits\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Saves conditions as a filter segment, like creating a segment from the filters on the Customers screen. The segment is always up to date: it is evaluated again whenever it is read or used in a send, so customers who spend their cashback (giftback) leave and those who get a new one join. Nothing is sent: the segment only becomes an audience when a person picks it in a campaign. If the name is already taken, Bevits adds a number at the end. Check the count first with POST /v1/segment-builder/preview. Requires an API key with the write scope.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://bevits.mintlify.site/_mintlify/api/og/v2?division=Reference\u0026amp;title=Create+filter+segment\u0026amp;description=Saves+conditions+as+a+filter+segment%2C+like+creating+a+segment+from+the+filters+on+the+Customers+screen.+The+segment+is+always+up+to+date%3A+it+is+evaluated+again+\u0026amp;theme=7595054ec12c591f1d286750\u0026amp;signature=747be8cec00bd85362d49541d1ad11b43956f48cd0f7afc16680411708d517f6\">\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/bevits/rUFhj4NY5eY9LDUb/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Bevits\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#F97316\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.bevits.com/en/api-reference/segments/create-filter-segment\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/en/api-reference/segments/create-filter-segment.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.bevits.com/#organization\",\"name\":\"Bevits\",\"url\":\"https://docs.bevits.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/bevits/1nYG20dqbMUuey8F/logo/light.svg?fit=max\u0026auto=format\u0026n=1nYG20dqbMUuey8F\u0026q=85\u0026s=e3888ae21616d4de0a83364106aade8c\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.bevits.com#website\",\"name\":\"Bevits\",\"url\":\"https://docs.bevits.com\",\"publisher\":{\"@id\":\"https://docs.bevits.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.bevits.com/en/api-reference/segments/create-filter-segment#webpage\",\"url\":\"https://docs.bevits.com/en/api-reference/segments/create-filter-segment\",\"name\":\"Create filter segment\",\"description\":\"Saves conditions as a filter segment, like creating a segment from the filters on the Customers screen. The segment is always up to date: it is evaluated again whenever it is read or used in a send, so customers who spend their cashback (giftback) leave and those who get a new one join. Nothing is sent: the segment only becomes an audience when a person picks it in a campaign. If the name is already taken, Bevits adds a number at the end. Check the count first with POST /v1/segment-builder/preview. Requires an API key with the write scope.\",\"dateModified\":\"2026-11-21T00:32:10.840Z\",\"isPartOf\":{\"@id\":\"https://docs.bevits.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.bevits.com/en/api-reference/segments/create-filter-segment#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.bevits.com/en/api-reference/segments/create-filter-segment#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Reference\",\"item\":\"https://docs.bevits.com/en/api-reference/system/check-availability\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create filter segment\",\"item\":\"https://docs.bevits.com/en/api-reference/segments/create-filter-segment\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.bevits.com/en/api-reference/segments/create-filter-segment#apireference\",\"headline\":\"Create filter segment\",\"name\":\"Create filter segment\",\"description\":\"Saves conditions as a filter segment, like creating a segment from the filters on the Customers screen. The segment is always up to date: it is evaluated again whenever it is read or used in a send, so customers who spend their cashback (giftback) leave and those who get a new one join. Nothing is sent: the segment only becomes an audience when a person picks it in a campaign. If the name is already taken, Bevits adds a number at the end. Check the count first with POST /v1/segment-builder/preview. Requires an API key with the write scope.\",\"url\":\"https://docs.bevits.com/en/api-reference/segments/create-filter-segment\",\"mainEntityOfPage\":{\"@id\":\"https://docs.bevits.com/en/api-reference/segments/create-filter-segment#webpage\"},\"dateModified\":\"2026-11-21T00:32:10.840Z\",\"publisher\":{\"@id\":\"https://docs.bevits.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.bevits.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Bevits\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Bevits\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/en/api-reference/segments/create-filter-segment.md","siteName":"Bevits","nav":{"global":null,"languages":[{"language":"pt-BR","default":true,"navbar":{"links":[{"href":"mailto:hey@bevits.com","label":"Suporte"}],"primary":{"type":"button","label":"Painel","href":"https://app.bevits.com"}},"pages":[{"title":"pt-BR","href":"/pt-BR/overview"}]},{"language":"en","navbar":{"links":[{"href":"mailto:hey@bevits.com","label":"Support"}],"primary":{"type":"button","label":"Dashboard","href":"https://app.bevits.com"}},"tabs":[{"tab":"Documentation","pages":[{"title":"Documentation","href":"/en/overview"}]},{"tab":"API","groups":[{"group":"Getting started","pages":[{"title":"API overview","icon":"brackets-curly","href":"/en/api-reference/overview"},{"title":"Authentication","icon":"key","href":"/en/api-reference/authentication"},{"title":"MCP server","icon":"plug","href":"/en/api-reference/mcp"},{"title":"AI agents","icon":"sparkles","href":"/en/api-reference/ai-agents"}]},{"group":"Fundamentals","pages":[{"title":"Fundamentals","icon":"code","href":"/en/api-reference/fundamentals"}]},{"group":"Custom events","pages":[{"title":"Custom events","icon":"bolt","href":"/en/api-reference/custom-events"},{"title":"Recommended events","icon":"list-check","href":"/en/api-reference/recommended-events"}]},{"group":"Reference","pages":[{"title":"Check availability","deprecated":null,"version":null,"openapi":"/openapi.en.json get /health","href":"/en/api-reference/system/check-availability"},{"title":"Get identity","deprecated":null,"version":null,"openapi":"/openapi.en.json get /v1/me","href":"/en/api-reference/identity/get-identity"},{"title":"List customers","deprecated":null,"version":null,"openapi":"/openapi.en.json get /v1/customers","href":"/en/api-reference/customers/list-customers"},{"title":"Get customer","deprecated":null,"version":null,"openapi":"/openapi.en.json get /v1/customers/{customer_id}","href":"/en/api-reference/customers/get-customer"},{"title":"List customer purchases","deprecated":null,"version":null,"openapi":"/openapi.en.json get /v1/customers/{customer_id}/purchases","href":"/en/api-reference/customers/list-customer-purchases"},{"title":"List segments","deprecated":null,"version":null,"openapi":"/openapi.en.json get /v1/segments","href":"/en/api-reference/segments/list-segments"},{"title":"Get segment","deprecated":null,"version":null,"openapi":"/openapi.en.json get /v1/segments/{segment_id}","href":"/en/api-reference/segments/get-segment"},{"title":"List segment customers","deprecated":null,"version":null,"openapi":"/openapi.en.json get /v1/segments/{segment_id}/customers","href":"/en/api-reference/segments/list-segment-customers"},{"title":"Get segment filter catalog","deprecated":null,"version":null,"openapi":"/openapi.en.json get /v1/segment-builder/catalog","href":"/en/api-reference/segments/get-segment-filter-catalog"},{"title":"Preview segment","description":"Counts and samples the customers who match the conditions right now, without saving anything, and reports how many can be reached on WhatsApp and by email. Errors name each invalid condition with the valid options. Requires an API key with the read scope.","deprecated":null,"version":null,"openapi":"/openapi.en.json post /v1/segment-builder/preview","href":"/en/api-reference/segments/preview-segment"},{"title":"Create filter segment","deprecated":null,"version":null,"openapi":"/openapi.en.json post /v1/segments","href":"/en/api-reference/segments/create-filter-segment"},{"title":"Update segment","description":"Renames a segment, changes its description, or replaces the conditions of a filter segment (type filters). Send the full list of conditions, not just what changed: GET /v1/segments/{segment_id} returns the current conditions. The change applies to every campaign that uses the segment, including scheduled ones. RFM segments are kept up to date by Bevits. Requires an API key with the write scope.","deprecated":null,"version":null,"openapi":"/openapi.en.json post /v1/segments/{segment_id}","href":"/en/api-reference/segments/update-segment"},{"title":"Add customers to a segment","deprecated":null,"version":null,"openapi":"/openapi.en.json post /v1/segments/{segment_id}/customers/add","href":"/en/api-reference/segments/add-customers-to-a-segment"},{"title":"Remove customers from a segment","deprecated":null,"version":null,"openapi":"/openapi.en.json post /v1/segments/{segment_id}/customers/remove","href":"/en/api-reference/segments/remove-customers-from-a-segment"},{"title":"Preview campaign engagement segment","deprecated":null,"version":null,"openapi":"/openapi.en.json get /v1/segments/campaign-engagement/preview","href":"/en/api-reference/segments/preview-campaign-engagement-segment"},{"title":"Create campaign engagement segment","deprecated":null,"version":null,"openapi":"/openapi.en.json post /v1/segments/campaign-engagement","href":"/en/api-reference/segments/create-campaign-engagement-segment"},{"title":"List purchases","deprecated":null,"version":null,"openapi":"/openapi.en.json get /v1/purchases","href":"/en/api-reference/purchases/list-purchases"},{"title":"Aggregate purchases","deprecated":null,"version":null,"openapi":"/openapi.en.json get /v1/purchases/stats","href":"/en/api-reference/purchases/aggregate-purchases"},{"title":"Get purchase","deprecated":null,"version":null,"openapi":"/openapi.en.json get /v1/purchases/{purchase_id}","href":"/en/api-reference/purchases/get-purchase"},{"title":"List tags","deprecated":null,"version":null,"openapi":"/openapi.en.json get /v1/tags","href":"/en/api-reference/crm-data/list-tags"},{"title":"Get tag","deprecated":null,"version":null,"openapi":"/openapi.en.json get /v1/tags/{tag_id}","href":"/en/api-reference/crm-data/get-tag"},{"title":"Create tag","deprecated":null,"version":null,"openapi":"/openapi.en.json post /v1/tags","href":"/en/api-reference/crm-data/create-tag"},{"title":"Add or remove customer tags","deprecated":null,"version":null,"openapi":"/openapi.en.json post /v1/customers/tags","href":"/en/api-reference/customers/add-or-remove-customer-tags"},{"title":"List attributes","deprecated":null,"version":null,"openapi":"/openapi.en.json get /v1/attributes","href":"/en/api-reference/crm-data/list-attributes"},{"title":"List flows","deprecated":null,"version":null,"openapi":"/openapi.en.json get /v1/flows","href":"/en/api-reference/automations/list-flows"},{"title":"Get flow","deprecated":null,"version":null,"openapi":"/openapi.en.json get /v1/flows/{flow_id}","href":"/en/api-reference/automations/get-flow"},{"title":"Get flow metrics","deprecated":null,"version":null,"openapi":"/openapi.en.json get /v1/flows/{flow_id}/metrics","href":"/en/api-reference/automations/get-flow-metrics"},{"title":"Get flow builder catalog","deprecated":null,"version":null,"openapi":"/openapi.en.json get /v1/flow-builder/catalog","href":"/en/api-reference/automations/get-flow-builder-catalog"},{"title":"List message templates","deprecated":null,"version":null,"openapi":"/openapi.en.json get /v1/message-templates","href":"/en/api-reference/automations/list-message-templates"},{"title":"Create flow as a draft","deprecated":null,"version":null,"openapi":"/openapi.en.json post /v1/flows","href":"/en/api-reference/automations/create-flow-as-a-draft"},{"title":"Activate flow","deprecated":null,"version":null,"openapi":"/openapi.en.json post /v1/flows/{flow_id}/activate","href":"/en/api-reference/automations/activate-flow"},{"title":"Get account context","deprecated":null,"version":null,"openapi":"/openapi.en.json get /v1/account-context","href":"/en/api-reference/account-and-brand/get-account-context"},{"title":"Get brand identity","deprecated":null,"version":null,"openapi":"/openapi.en.json get /v1/brand-kit","href":"/en/api-reference/account-and-brand/get-brand-identity"},{"title":"Upload brand image","deprecated":null,"version":null,"openapi":"/openapi.en.json post /v1/brand-assets","href":"/en/api-reference/account-and-brand/upload-brand-image"},{"title":"List recipe deployments","deprecated":null,"version":null,"openapi":"/openapi.en.json get /v1/recipe-deployments","href":"/en/api-reference/recipes/list-recipe-deployments"},{"title":"Create automations from recipes","deprecated":null,"version":null,"openapi":"/openapi.en.json post /v1/recipe-deployments","href":"/en/api-reference/recipes/create-automations-from-recipes"},{"title":"Get recipe deployment","deprecated":null,"version":null,"openapi":"/openapi.en.json get /v1/recipe-deployments/{deployment_id}","href":"/en/api-reference/recipes/get-recipe-deployment"},{"title":"Undo recipe deployment","deprecated":null,"version":null,"openapi":"/openapi.en.json post /v1/recipe-deployments/{deployment_id}/rollback","href":"/en/api-reference/recipes/undo-recipe-deployment"},{"title":"Create email template","deprecated":null,"version":null,"openapi":"/openapi.en.json post /v1/email-templates","href":"/en/api-reference/email-templates/create-email-template"},{"title":"Import HTML email","deprecated":null,"version":null,"openapi":"/openapi.en.json post /v1/email-imports","href":"/en/api-reference/email-templates/import-html-email"},{"title":"Get email import","deprecated":null,"version":null,"openapi":"/openapi.en.json get /v1/email-imports/{email_import_id}","href":"/en/api-reference/email-templates/get-email-import"},{"title":"Apply email import","deprecated":null,"version":null,"openapi":"/openapi.en.json post /v1/email-imports/{email_import_id}/apply","href":"/en/api-reference/email-templates/apply-email-import"},{"title":"List email campaigns","deprecated":null,"version":null,"openapi":"/openapi.en.json get /v1/email-campaigns","href":"/en/api-reference/campaigns/list-email-campaigns"},{"title":"Get email campaign","deprecated":null,"version":null,"openapi":"/openapi.en.json get /v1/email-campaigns/{email_campaign_id}","href":"/en/api-reference/campaigns/get-email-campaign"},{"title":"Create draft email campaign","deprecated":null,"version":null,"openapi":"/openapi.en.json post /v1/email-campaigns","href":"/en/api-reference/campaigns/create-draft-email-campaign"},{"title":"List WhatsApp and SMS campaigns","deprecated":null,"version":null,"openapi":"/openapi.en.json get /v1/template-campaigns","href":"/en/api-reference/campaigns/list-whatsapp-and-sms-campaigns"},{"title":"Get WhatsApp or SMS campaign","deprecated":null,"version":null,"openapi":"/openapi.en.json get /v1/template-campaigns/{template_campaign_id}","href":"/en/api-reference/campaigns/get-whatsapp-or-sms-campaign"},{"title":"Create a WhatsApp Official campaign as a draft","deprecated":null,"version":null,"openapi":"/openapi.en.json post /v1/whatsapp-campaigns","href":"/en/api-reference/campaigns/create-a-whatsapp-official-campaign-as-a-draft"},{"title":"Send event","deprecated":null,"version":null,"openapi":"/openapi.en.json post /v1/events","href":"/en/api-reference/events/send-event"},{"title":"Validate event without storing it","deprecated":null,"version":null,"openapi":"/openapi.en.json post /v1/events/validate","href":"/en/api-reference/events/validate-event-without-storing-it"},{"title":"Send events in bulk","deprecated":null,"version":null,"openapi":"/openapi.en.json post /v1/events/bulk","href":"/en/api-reference/events/send-events-in-bulk"},{"title":"Get event","deprecated":null,"version":null,"openapi":"/openapi.en.json get /v1/events/{event_id}","href":"/en/api-reference/events/get-event"},{"title":"List event types","deprecated":null,"version":null,"openapi":"/openapi.en.json get /v1/event-types","href":"/en/api-reference/events/list-event-types"}]}]},{"tab":"Changelog","pages":[{"title":"Changelog","href":"/en/changelog"}]}]},{"language":"es","navbar":{"links":[{"href":"mailto:hey@bevits.com","label":"Soporte"}],"primary":{"type":"button","label":"Panel","href":"https://app.bevits.com"}},"pages":[{"title":"es","href":"/es/overview"}]}]},"basePath":"","title":"Create filter segment - Bevits","deploymentId":"dpl_DyXGnKeCjZyA3sUdfMJ7FjkdBefg","buildId":"dpl_DyXGnKeCjZyA3sUdfMJ7FjkdBefg","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-CiUHMMOm.js","snippetPresets-BgfXU7Bw.js","utils-DWvOwgy_.js","style-to-object-BY3JEAdk.js","utils-BN7RXSMJ.js","v4-DIgz8zy6.js","addUniqueKeysToSchema-CFw8bq89.js","conditional-requirements-CFM0id0Q.js","cloneDeep-CAwdfOU2.js","_Uint8Array-BJr8e-ZL.js","isObject-FP1Yky1u.js","ApiExamples-XX0UgMZK.js","usePlaygroundInputsStore-DXDFSa1V.js","shallow-CdX5aREi.js","isEqual-CoOaxexF.js","CodeSnippets-Cg2wpzWm.js","CodeSnippet-D_HwgQO_.js","getApiPlaygroundDisplay-CmCoerhe.js","Page-CVJ-f_k1.js","DynamicMarkdown-CQM9Bhbv.js","SectionHeading-DpbrP8nQ.js","icon-BPCgijHy.js","MethodPill-GQ8DuY0c.js","getPastedJson-Cb5mT31m.js","Check2Icon-a7bUI6e8.js","axios-CsQoIw0U.js","Markdown-CX2QY19L.js","AssistantPageLink-CY3bFglh.js","dist-Dl6_zDnT.js","lib-DMeTj1gb.js","lib-B8HbPgcC.js","katex-Dbtb6Wk7.js","html-void-elements-mCSPHezU.js","marked.esm-CZWythHk.js"]}