Build SegQL audiences, then create, test, schedule and launch email and SMS campaigns from the ef command-line tool or an AI agent.
The ef CLI can build audiences from a SegQL query and run email and SMS campaigns to them. It calls the same API as the app, so the same permissions, consent rules, suppressions and quiet hours apply. Nothing here can switch them off.
These commands need ef 0.24.0 or later. Check with ef --version. If ef audiences is not listed in ef --help, update with npm i -g @elasticfunnels/cli@latest; if it is still missing after that, the release is not out yet.
Audiences need the analytics permission and the segment permissions. Campaigns need the email permissions, and SMS needs the SMS integration permissions.
Contact details in samples and recipient lists come back masked (j***@g***.com, ***0123) unless your role has See unmasked on the Contact details row (see who sees emails and phone numbers).
ef claude installs two skills for Claude Code: ef-segql (how to write audiences) and ef-campaigns (how to send safely).
Audiences
Write the query in a file, check it, count it, then save it.
ef audiences validate --file skippers.segql # parse and check only, nothing runsef audiences count --file skippers.segql # how many people match now, with a sampleef audiences create --name "Upsell skippers 30d" --file skippers.segqlef audiences listef audiences count 42 # size of a saved audienceef audiences update 42 --file skippers.segql # change the query (recomputes)ef audiences delete 42 --yesef audiences schema # sources, columns, operators and functions
An example query, buyers who skipped every upsell in the last 30 days:
FROM conversions WHERE HAS conversion(type = "purchase" AND sale_type = "main") AND NOT HAS conversion(type = "purchase" AND sale_type IN ("upsell", "downsell", "bump")) WITHIN 30d IDENTIFY BY email
A misspelled column is an error, but a value that does not exist (an event name, a product code) just matches nobody. When count says 0, check the values before you save.
Use IDENTIFY BY email for any audience you plan to email or text.
Audience:--audience <id>, --all-customers, --emails a@example.com,b@example.com, --emails-file list.txt or --crm-entity <id>.
Who is left out:audience-preview shows how many people will receive it and how many are excluded as suppressed (bounced, complained, unsubscribed), without consent (recorded as “no” at opt-in) or duplicates.
Test first: launch refuses until a test was sent. Tests go to one address and never touch the audience.
Confirmation:launch and schedule print the number of people who will receive it and stop. Run them again with --yes to send. In a terminal you can type the confirmation instead.
ef campaigns email get 17 lists anything that still blocks sending, such as a missing sending account or marketing address.
unschedule puts a scheduled campaign back to draft. cancel stops one that is scheduled or sending.
--audience and --exclude take audience ids. --exclude-regions US-FL,US-OK skips those places.
The opt-out footer (“Reply STOP to opt out”) is added to every marketing text. A custom --footer must contain STOP.
The SMS test goes through your SMS provider, so it costs one message.
Quiet hours and the frequency cap from SMS campaigns apply to every send.
Output for scripts and agents
Commands that print data take --json; get always prints JSON. Errors exit with a non-zero code: 2 for a SegQL or validation error, 3 for a permission problem, 4 for a conflict (for example editing a campaign that is no longer a draft), 7 when something is not found.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"ElasticFunnels.io Documentation","colors":{"primary":"#1d4ed8","light":"#1d4ed8","dark":"#1d4ed8"},"logo":{"light":"https://mintcdn.com/elasticfunnels-8a91cd9d/jzZf0Mv_VgYI1MJ-/logo/light.svg?fit=max\u0026auto=format\u0026n=jzZf0Mv_VgYI1MJ-\u0026q=85\u0026s=5a6223a03b81ea40e3701f2ffba293f7","dark":"https://mintcdn.com/elasticfunnels-8a91cd9d/jzZf0Mv_VgYI1MJ-/logo/light.svg?fit=max\u0026auto=format\u0026n=jzZf0Mv_VgYI1MJ-\u0026q=85\u0026s=5a6223a03b81ea40e3701f2ffba293f7"},"favicon":"https://mintcdn.com/elasticfunnels-8a91cd9d/jzZf0Mv_VgYI1MJ-/favicon.svg?fit=max\u0026auto=format\u0026n=jzZf0Mv_VgYI1MJ-\u0026q=85\u0026s=cf7ba5045160c5a44700b757e946db06","navbar":{"links":[{"href":"mailto:support@elasticfunnels.io","label":"Support"}],"primary":{"type":"button","label":"Dashboard","href":"https://app.elasticfunnels.io"}},"footer":{"socials":{"x":"https://x.com/elasticfunnels","linkedin":"https://linkedin.com/company/elasticfunnels"}},"contextual":{"options":["copy","view","chatgpt","claude","cursor"],"display":"header"},"styling":{"latex":true},"navigation":{"global":{"anchors":[{"anchor":"Email Support","icon":"envelope","href":"mailto:support@elasticfunnels.io"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"elasticfunnels-8a91cd9d","hasAudioNarration":false,"actualSubdomain":"elasticfunnels-8a91cd9d","customDomains":["docs.elasticfunnels.io"],"gitSource":{"type":"github","owner":"elasticfunnels","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"entitlements":{},"buildId":"6af6c102993a78013fddfad0","clientVersion":"0.0.4142","searchFilterCounts":[{"language":"default","tag":"Guides","count":243},{"language":"default","tag":"Grow and track","count":86},{"language":"default","tag":"Build","count":57},{"language":"default","tag":"Sell","count":45},{"language":"default","tag":"Developers","count":30},{"language":"default","tag":"Integrations","count":29},{"language":"default","tag":"API Reference","count":26},{"language":"default","tag":"Manage","count":24},{"language":"default","tag":"Merchants","count":22},{"language":"default","tag":"Emails","count":19}]},"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":"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":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"account/cli-audiences-and-campaigns","slug":"/account/cli-audiences-and-campaigns","pageMetadata":{"title":"Audiences and campaigns from the ef CLI","sidebarTitle":"CLI: audiences and campaigns","icon":"terminal","description":"Build SegQL audiences, then create, test, schedule and launch email and SMS campaigns from the ef command-line tool or an AI agent.","href":"/account/cli-audiences-and-campaigns"},"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: \"Build SegQL audiences, then create, test, schedule and launch email and SMS campaigns from the ef command-line tool or an AI agent.\"\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,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Tip}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Tip)_missingMdxReference(`Tip`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`The `,_jsx(_components.code,{children:`ef`}),` CLI can build audiences from a SegQL query and run `,_jsx(_components.a,{href:`/campaigns/email-campaigns`,children:`email`}),` and `,_jsx(_components.a,{href:`/campaigns/sms-campaigns`,children:`SMS campaigns`}),` to them. It calls the same API as the app, so the same permissions, consent rules, suppressions and quiet hours apply. Nothing here can switch them off.`]}),`\n`,_jsx(Heading,{level:`2`,id:`before-you-start`,children:`Before you start`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Connect the CLI to your project: `,_jsx(_components.a,{href:`/account/cli-and-api-keys`,children:`Connect the ef CLI`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`These commands need `,_jsx(_components.code,{children:`ef`}),` 0.24.0 or later. Check with `,_jsx(_components.code,{children:`ef --version`}),`. If `,_jsx(_components.code,{children:`ef audiences`}),` is not listed in `,_jsx(_components.code,{children:`ef --help`}),`, update with `,_jsx(_components.code,{children:`npm i -g @elasticfunnels/cli@latest`}),`; if it is still missing after that, the release is not out yet.`]}),`\n`,_jsx(_components.li,{children:`Audiences need the analytics permission and the segment permissions. Campaigns need the email permissions, and SMS needs the SMS integration permissions.`}),`\n`,_jsxs(_components.li,{children:[`Contact details in samples and recipient lists come back masked (`,_jsx(_components.code,{children:`j***@g***.com`}),`, `,_jsx(_components.code,{children:`***0123`}),`) unless your role has `,_jsx(_components.strong,{children:`See unmasked`}),` on the `,_jsx(_components.strong,{children:`Contact details`}),` row (see `,_jsx(_components.a,{href:`/contacts/overview#who-sees-emails-and-phone-numbers`,children:`who sees emails and phone numbers`}),`).`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`ef claude`}),` installs two skills for Claude Code: `,_jsx(_components.code,{children:`ef-segql`}),` (how to write audiences) and `,_jsx(_components.code,{children:`ef-campaigns`}),` (how to send safely).`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`audiences`,children:`Audiences`}),`\n`,_jsx(_components.p,{children:`Write the query in a file, check it, count it, then save it.`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`8`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`8`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`ef`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` audiences`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` validate`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --file`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` skippers.segql`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # parse and check only, nothing runs`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`ef`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` audiences`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` count`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --file`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` skippers.segql`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # how many people match now, with a sample`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`ef`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` audiences`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` create`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --name`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Upsell skippers 30d\"`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --file`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` skippers.segql`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`ef`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` audiences`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` list`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`ef`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` audiences`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` count`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 42`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # size of a saved audience`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`ef`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` audiences`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` update`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 42`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --file`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` skippers.segql`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # change the query (recomputes)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`ef`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` audiences`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` delete`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 42`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --yes`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`ef`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` audiences`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` schema`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # sources, columns, operators and functions`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`An example query, buyers who skipped every upsell in the last 30 days:`}),`\n`,_jsx(CodeBlock,{numberOfLines:`4`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`4`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`FROM conversions WHERE HAS conversion(type = \"purchase\" AND sale_type = \"main\")`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` AND NOT HAS conversion(type = \"purchase\" AND sale_type IN (\"upsell\", \"downsell\", \"bump\"))`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` WITHIN 30d IDENTIFY BY email`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(Tip,{children:_jsxs(_components.p,{children:[`A misspelled column is an error, but a value that does not exist (an event name, a product code) just matches nobody. When `,_jsx(_components.code,{children:`count`}),` says 0, check the values before you save.`]})}),`\n`,_jsxs(_components.p,{children:[`Use `,_jsx(_components.code,{children:`IDENTIFY BY email`}),` for any audience you plan to email or text.`]}),`\n`,_jsx(Heading,{level:`2`,id:`email-campaigns`,children:`Email campaigns`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`8`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`8`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`ef`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` campaigns`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` email`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` create`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --name`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"October restock\"`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --subject`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Time to restock?\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --from-name`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Acme Health\"`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --from-email`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` hello@example.com`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --audience`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 42`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`ef`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` campaigns`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` email`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` set`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 17`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --html-file`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` email.html`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`ef`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` campaigns`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` email`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` audience-preview`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 17`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`ef`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` campaigns`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` email`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` test`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 17`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --to`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` you@example.com`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`ef`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` campaigns`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` email`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` schedule`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 17`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --at`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 2026-11-03T15:00:00Z`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --yes`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`ef`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` campaigns`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` email`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` launch`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 17`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --yes`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`ef`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` campaigns`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` email`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` stats`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 17`})]}),`\n`]})})}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Audience:`}),` `,_jsx(_components.code,{children:`--audience \u003cid>`}),`, `,_jsx(_components.code,{children:`--all-customers`}),`, `,_jsx(_components.code,{children:`--emails a@example.com,b@example.com`}),`, `,_jsx(_components.code,{children:`--emails-file list.txt`}),` or `,_jsx(_components.code,{children:`--crm-entity \u003cid>`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Who is left out:`}),` `,_jsx(_components.code,{children:`audience-preview`}),` shows how many people will receive it and how many are excluded as suppressed (bounced, complained, unsubscribed), without consent (recorded as “no” at opt-in) or duplicates.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Test first:`}),` launch refuses until a test was sent. Tests go to one address and never touch the audience.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Confirmation:`}),` `,_jsx(_components.code,{children:`launch`}),` and `,_jsx(_components.code,{children:`schedule`}),` print the number of people who will receive it and stop. Run them again with `,_jsx(_components.code,{children:`--yes`}),` to send. In a terminal you can type the confirmation instead.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`ef campaigns email get 17`}),` lists anything that still blocks sending, such as a missing sending account or marketing address.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`unschedule`}),` puts a scheduled campaign back to draft. `,_jsx(_components.code,{children:`cancel`}),` stops one that is scheduled or sending.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`sms-campaigns`,children:`SMS campaigns`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`8`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`8`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`ef`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` campaigns`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` sms`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` create`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --name`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Flash sale\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --body`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Hi {first_name|there}, 20% off today: https://example.com/sale\"`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --audience`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 42`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`ef`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` campaigns`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` sms`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` preview`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 9`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # rendered text, characters, segments`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`ef`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` campaigns`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` sms`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` audience-preview`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 9`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # reachable phones and why others are skipped`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`ef`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` campaigns`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` sms`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` test`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 9`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --phone`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` +14155550123`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`ef`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` campaigns`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` sms`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` launch`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 9`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --yes`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`ef`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` campaigns`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` sms`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` pause`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 9`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`ef`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` campaigns`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` sms`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` stats`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 9`})]}),`\n`]})})}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`--audience`}),` and `,_jsx(_components.code,{children:`--exclude`}),` take audience ids. `,_jsx(_components.code,{children:`--exclude-regions US-FL,US-OK`}),` skips those places.`]}),`\n`,_jsxs(_components.li,{children:[`The opt-out footer (“Reply STOP to opt out”) is added to every marketing text. A custom `,_jsx(_components.code,{children:`--footer`}),` must contain STOP.`]}),`\n`,_jsx(_components.li,{children:`The SMS test goes through your SMS provider, so it costs one message.`}),`\n`,_jsxs(_components.li,{children:[`Quiet hours and the frequency cap from `,_jsx(_components.a,{href:`/campaigns/sms-campaigns`,children:`SMS campaigns`}),` apply to every send.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`output-for-scripts-and-agents`,children:`Output for scripts and agents`}),`\n`,_jsxs(_components.p,{children:[`Commands that print data take `,_jsx(_components.code,{children:`--json`}),`; `,_jsx(_components.code,{children:`get`}),` always prints JSON. Errors exit with a non-zero code: 2 for a SegQL or validation error, 3 for a permission problem, 4 for a conflict (for example editing a campaign that is no longer a draft), 7 when something is not found.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Audiences and campaigns from the ef CLI","sidebarTitle":"CLI: audiences and campaigns","icon":"terminal","description":"Build SegQL audiences, then create, test, schedule and launch email and SMS campaigns from the ef command-line tool or an AI agent.","href":"/account/cli-audiences-and-campaigns"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Before you start","slug":"before-you-start","depth":2,"children":[]},{"title":"Audiences","slug":"audiences","depth":2,"children":[]},{"title":"Email campaigns","slug":"email-campaigns","depth":2,"children":[]},{"title":"SMS campaigns","slug":"sms-campaigns","depth":2,"children":[]},{"title":"Output for scripts and agents","slug":"output-for-scripts-and-agents","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"elasticfunnels-8a91cd9d","siteName":"ElasticFunnels.io Documentation","title":"Audiences and campaigns from the ef CLI - ElasticFunnels.io Documentation","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-23T16:21:03.660Z","originalFileLocation":"account/cli-audiences-and-campaigns.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=\"Build SegQL audiences, then create, test, schedule and launch email and SMS campaigns from the ef command-line tool or an AI agent.\">\u003cmeta data-mint-head name=\"application-name\" content=\"ElasticFunnels.io Documentation\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/elasticfunnels-8a91cd9d/EikUEODxg9MfyvtR/_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/elasticfunnels-8a91cd9d/EikUEODxg9MfyvtR/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/elasticfunnels-8a91cd9d/EikUEODxg9MfyvtR/_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/elasticfunnels-8a91cd9d/EikUEODxg9MfyvtR/_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/elasticfunnels-8a91cd9d/EikUEODxg9MfyvtR/_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/elasticfunnels-8a91cd9d/EikUEODxg9MfyvtR/_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/elasticfunnels-8a91cd9d/EikUEODxg9MfyvtR/_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/elasticfunnels-8a91cd9d/EikUEODxg9MfyvtR/_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/elasticfunnels-8a91cd9d/EikUEODxg9MfyvtR/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Audiences and campaigns from the ef CLI - ElasticFunnels.io Documentation\">\u003cmeta data-mint-head property=\"og:description\" content=\"Build SegQL audiences, then create, test, schedule and launch email and SMS campaigns from the ef command-line tool or an AI agent.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"ElasticFunnels.io Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.elasticfunnels.io/account/cli-audiences-and-campaigns\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://elasticfunnels-8a91cd9d.mintlify.site/_mintlify/api/og/v2?division=Account+and+security\u0026amp;title=Audiences+and+campaigns+from+the+ef+CLI\u0026amp;description=Build+SegQL+audiences%2C+then+create%2C+test%2C+schedule+and+launch+email+and+SMS+campaigns+from+the+ef+command-line+tool+or+an+AI+agent.\u0026amp;theme=7cf2219cdc664aaa8883e8bc\u0026amp;signature=ecb6f98a734adb3c7ac95cfebe5eb5d3aa2f12abbe87fb8f8cbeb4fee659dc75\">\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=\"Audiences and campaigns from the ef CLI - ElasticFunnels.io Documentation\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Build SegQL audiences, then create, test, schedule and launch email and SMS campaigns from the ef command-line tool or an AI agent.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://elasticfunnels-8a91cd9d.mintlify.site/_mintlify/api/og/v2?division=Account+and+security\u0026amp;title=Audiences+and+campaigns+from+the+ef+CLI\u0026amp;description=Build+SegQL+audiences%2C+then+create%2C+test%2C+schedule+and+launch+email+and+SMS+campaigns+from+the+ef+command-line+tool+or+an+AI+agent.\u0026amp;theme=7cf2219cdc664aaa8883e8bc\u0026amp;signature=ecb6f98a734adb3c7ac95cfebe5eb5d3aa2f12abbe87fb8f8cbeb4fee659dc75\">\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/elasticfunnels-8a91cd9d/EikUEODxg9MfyvtR/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"ElasticFunnels.io Documentation\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#1d4ed8\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.elasticfunnels.io/account/cli-audiences-and-campaigns\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/account/cli-audiences-and-campaigns.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.elasticfunnels.io/#organization\",\"name\":\"ElasticFunnels.io Documentation\",\"url\":\"https://docs.elasticfunnels.io\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/elasticfunnels-8a91cd9d/jzZf0Mv_VgYI1MJ-/logo/light.svg?fit=max\u0026auto=format\u0026n=jzZf0Mv_VgYI1MJ-\u0026q=85\u0026s=5a6223a03b81ea40e3701f2ffba293f7\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.elasticfunnels.io#website\",\"name\":\"ElasticFunnels.io Documentation\",\"url\":\"https://docs.elasticfunnels.io\",\"publisher\":{\"@id\":\"https://docs.elasticfunnels.io/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.elasticfunnels.io/account/cli-audiences-and-campaigns#webpage\",\"url\":\"https://docs.elasticfunnels.io/account/cli-audiences-and-campaigns\",\"name\":\"Audiences and campaigns from the ef CLI\",\"description\":\"Build SegQL audiences, then create, test, schedule and launch email and SMS campaigns from the ef command-line tool or an AI agent.\",\"dateModified\":\"2026-10-23T16:21:03.660Z\",\"isPartOf\":{\"@id\":\"https://docs.elasticfunnels.io#website\"},\"breadcrumb\":{\"@id\":\"https://docs.elasticfunnels.io/account/cli-audiences-and-campaigns#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.elasticfunnels.io/account/cli-audiences-and-campaigns#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Manage\",\"item\":\"https://docs.elasticfunnels.io/essentials/brand-actions\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Account and security\",\"item\":\"https://docs.elasticfunnels.io/account/two-factor-authentication\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Audiences and campaigns from the ef CLI\",\"item\":\"https://docs.elasticfunnels.io/account/cli-audiences-and-campaigns\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.elasticfunnels.io/account/cli-audiences-and-campaigns#article\",\"headline\":\"Audiences and campaigns from the ef CLI\",\"name\":\"Audiences and campaigns from the ef CLI\",\"description\":\"Build SegQL audiences, then create, test, schedule and launch email and SMS campaigns from the ef command-line tool or an AI agent.\",\"url\":\"https://docs.elasticfunnels.io/account/cli-audiences-and-campaigns\",\"mainEntityOfPage\":{\"@id\":\"https://docs.elasticfunnels.io/account/cli-audiences-and-campaigns#webpage\"},\"dateModified\":\"2026-10-23T16:21:03.660Z\",\"publisher\":{\"@id\":\"https://docs.elasticfunnels.io/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.elasticfunnels.io#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"ElasticFunnels.io Documentation\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"ElasticFunnels.io Documentation\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/account/cli-audiences-and-campaigns.md","siteName":"ElasticFunnels.io Documentation","nav":{"global":{"anchors":[{"anchor":"Email Support","icon":"envelope","href":"mailto:support@elasticfunnels.io"}]},"tabs":[{"tab":"Guides","groups":[{"group":"Get started","icon":"rocket","pages":[{"title":"Introduction","icon":"house","href":""}]},{"group":"Build","icon":"hammer","pages":[{"group":"Template kits","icon":"swatchbook","pages":[{"title":"Template kits","sidebarTitle":"Overview","icon":"book-open","href":"/template-kits/overview"},{"title":"Apply a kit","icon":"wand-magic-sparkles","href":"/template-kits/apply-a-kit"},{"title":"After applying a kit","sidebarTitle":"After applying","icon":"list-check","href":"/template-kits/after-applying"},{"title":"Kit images","icon":"image","href":"/template-kits/kit-images"},{"title":"Customise a kit with AI","sidebarTitle":"AI customising","icon":"sparkles","href":"/template-kits/ai-customise"},{"title":"Template kit troubleshooting","sidebarTitle":"Troubleshooting","icon":"wrench","href":"/template-kits/troubleshooting"},{"title":"Template kit glossary","sidebarTitle":"Glossary","icon":"book","href":"/template-kits/glossary"}]},{"group":"Pages","icon":"file-lines","pages":[{"title":"Pages Overview","sidebarTitle":"Overview","icon":"book-open","href":"/pages/overview"},{"title":"Create Landing Page","sidebarTitle":"Create a landing page","icon":"file-circle-plus","href":"/pages/create-landing-page"},{"title":"Page Settings","sidebarTitle":"Page settings","icon":"sliders","href":"/pages/page-settings"},{"title":"Wildcard routes","icon":"asterisk","href":"/pages/wildcard-routes"},{"title":"SEO: sitemap.xml, robots.txt and llms.txt","sidebarTitle":"SEO and llms.txt","icon":"magnifying-glass","href":"/pages/seo"},{"title":"Privacy \u0026 consent","icon":"cookie-bite","href":"/pages/privacy-consent"},{"title":"Multilingual sites (i18n)","sidebarTitle":"Multilingual sites","icon":"language","href":"/pages/internationalization"},{"title":"Language prompt and switcher","sidebarTitle":"Language prompt and switcher","icon":"globe","href":"/pages/language-prompt"},{"title":"Rendering pipeline","icon":"gears","href":"/pages/rendering-pipeline"},{"group":"Variants and revisions","icon":"code-branch","pages":[{"title":"Page Variants","sidebarTitle":"Page variants","icon":"clone","href":"/pages/page-variants"},{"title":"Page Revisions","sidebarTitle":"Page revisions","icon":"clock-rotate-left","href":"/pages/page-revisions"},{"title":"Content Visibility Control","sidebarTitle":"Content visibility","icon":"eye","href":"/pages/visitor-based-content"}]},{"group":"Page elements","icon":"shapes","pages":[{"title":"Interactions Panel","sidebarTitle":"Interactions panel","icon":"hand-pointer","href":"/pages/interactions-panel"},{"title":"Containers","icon":"box-open","href":"/pages/containers"},{"title":"Page Variables \u0026 Placeholders","sidebarTitle":"Variables and placeholders","icon":"brackets-curly","href":"/pages/page-variables"}]},{"group":"Store tags","icon":"tags","pages":[{"title":"Order Tag","sidebarTitle":"Order tag","icon":"receipt","href":"/pages/order-tag"},{"title":"Product Item Tag","sidebarTitle":"Product item tag","icon":"tag","href":"/pages/product-item-tag"},{"title":"Collection Item Tag","sidebarTitle":"Collection item tag","icon":"layer-group","href":"/pages/collection-item-tag"},{"title":"Cart","icon":"cart-shopping","href":"/pages/cart"}]}]},{"group":"Funnels","icon":"filter","pages":[{"title":"Create a Funnel","sidebarTitle":"Create a funnel","icon":"circle-plus","href":"/funnels/create-funnel"},{"title":"Trigger Pages","sidebarTitle":"Trigger pages","icon":"file-import","href":"/funnels/trigger-pages"},{"title":"Trigger Rules","sidebarTitle":"Trigger rules","icon":"code-fork","href":"/funnels/trigger-rules"},{"title":"One funnel, one entry page per partner","sidebarTitle":"Partner entry pages","icon":"users","href":"/funnels/partner-entry-pages"},{"title":"Checkout Redirect Behavior","sidebarTitle":"Checkout redirects","icon":"arrow-right-arrow-left","href":"/funnels/checkout-redirect-behavior"}]},{"group":"Page events","icon":"diagram-project","pages":[{"title":"Page Events","sidebarTitle":"Overview","icon":"book-open","href":"/funnels/page-events"},{"title":"Page Events Node Reference","sidebarTitle":"Node reference","icon":"circle-nodes","href":"/funnels/page-events-nodes"},{"group":"Event types","icon":"bolt","pages":[{"title":"Script Rule","sidebarTitle":"Script rule","icon":"scroll","href":"/funnels/script-rule"},{"title":"EF API (window.ef)","icon":"code","href":"/funnels/window-api"},{"title":"Dynamic Content","sidebarTitle":"Dynamic content","icon":"shuffle","href":"/funnels/dynamic-content"},{"title":"Exit Popups","sidebarTitle":"Exit popups","icon":"door-open","href":"/funnels/exit-popups"},{"title":"Popups and interactions from code","sidebarTitle":"Popups from code","icon":"window-restore","href":"/funnels/popups-from-code"}]},{"group":"Routing","icon":"route","pages":[{"title":"Query Parameter Conditions","sidebarTitle":"Query parameters","icon":"link","href":"/funnels/query-parameters"},{"title":"Sequence Nodes","sidebarTitle":"Sequence nodes","icon":"list-ol","href":"/funnels/sequence-nodes"}]}]},{"group":"Quizzes","icon":"circle-question","pages":[{"title":"Build and Publish a Quiz","sidebarTitle":"Build and publish","icon":"hammer","href":"/quizzes/build-and-publish"},{"title":"Quiz Blocks and Answers","sidebarTitle":"Blocks and answers","icon":"cubes","href":"/quizzes/blocks-and-answers"},{"title":"Design a Quiz","sidebarTitle":"Design","icon":"palette","href":"/quizzes/design"},{"title":"Design a Quiz Page Intro","sidebarTitle":"Page intro","icon":"window-maximize","href":"/quizzes/page-intro"}]},{"group":"Forms","icon":"clipboard-list","pages":[{"title":"Lead Capture Forms","sidebarTitle":"Lead capture forms","icon":"user-plus","href":"/forms/lead-capture"},{"title":"Add a form to a page with code","sidebarTitle":"Forms in code","icon":"code","href":"/forms/forms-in-code"},{"title":"Thank You Pages","sidebarTitle":"Thank you pages","icon":"heart","href":"/forms/thank-you-pages"},{"title":"Export Collection Data","sidebarTitle":"Export form data","icon":"file-export","href":"/forms/export-data"}]},{"group":"Members area","icon":"id-card","pages":[{"title":"Members Area","sidebarTitle":"Overview","icon":"book-open","href":"/members-area/overview"},{"title":"Members Login","sidebarTitle":"Members login","icon":"right-to-bracket","href":"/members-area/login"},{"title":"Showing Order Details","sidebarTitle":"Order details","icon":"receipt","href":"/members-area/order-details"},{"title":"Subscription Management Page","sidebarTitle":"Manage subscriptions","icon":"arrows-rotate","href":"/members-area/subscription-management"},{"title":"Customer Care Portal","sidebarTitle":"Customer care portal","icon":"headset","href":"/members-area/customer-care"}]},{"group":"Courses","icon":"graduation-cap","pages":[{"title":"Courses","sidebarTitle":"Overview","icon":"book-open","href":"/courses/overview"},{"title":"Course pages","icon":"chalkboard-user","href":"/courses/student-pages"},{"title":"Courses on your own pages","sidebarTitle":"Courses on your pages","icon":"file-code","href":"/courses/own-pages"},{"title":"Courses — Template Reference","sidebarTitle":"Template reference","icon":"code","href":"/courses/template"}]}]},{"group":"Sell","icon":"cart-shopping","pages":[{"group":"Products","icon":"box","pages":[{"title":"Product Management","sidebarTitle":"Manage products","icon":"boxes-stacked","href":"/products/product-management"},{"title":"Product Folders","sidebarTitle":"Product folders","icon":"folder","href":"/products/product-folders"},{"title":"Product Variants","sidebarTitle":"Variants","icon":"palette","href":"/products/variants"},{"title":"Product Attributes","sidebarTitle":"Attributes","icon":"list","href":"/products/product-attributes"},{"title":"Custom Product Attributes (Legacy)","sidebarTitle":"Custom attributes (legacy)","icon":"box-archive","href":"/products/custom-attributes"},{"title":"Buy Links","sidebarTitle":"Buy links","icon":"link","href":"/products/buy-links"},{"title":"Advanced Purchase Links","sidebarTitle":"Advanced purchase links","icon":"square-share-nodes","href":"/products/advanced-purchase-links"}]},{"group":"Checkouts","icon":"credit-card","pages":[{"title":"How to design a checkout page","sidebarTitle":"Design a checkout page","icon":"pen-ruler","href":"/guides/how-to-design-a-checkout-page"},{"title":"Checkout functionality reference","sidebarTitle":"Checkout reference","icon":"book","href":"/checkouts/checkout-functionality-reference"},{"title":"Package selector","icon":"table-cells-large","href":"/checkouts/package-selector"}]},{"group":"Upsells","icon":"arrow-trend-up","pages":[{"title":"Upsells","icon":"arrow-up-right-dots","href":"/products/upsells"},{"title":"Subscription Upsells","sidebarTitle":"Subscription upsells","icon":"arrows-rotate","href":"/products/subscription-upsells"},{"title":"Upsell Forms (Gift Address and Custom Fields)","href":"/products/upsell-forms"},{"title":"Multi-Product Upsells","href":"/products/multi-product-upsells"}]},{"group":"Merchants","icon":"building-columns","pages":[{"title":"How to set up a new merchant","sidebarTitle":"Set up a merchant","icon":"circle-plus","href":"/guides/how-to-set-up-a-new-merchant"},{"title":"High-Risk Merchants and Merchant Accounts","sidebarTitle":"High-risk merchant accounts","icon":"triangle-exclamation","href":"/merchants/high-risk-and-merchant-accounts"},{"title":"Postback URLs","icon":"arrow-right-arrow-left","href":"/merchants/postback-urls"},{"title":"Test merchant (sandbox)","sidebarTitle":"Test merchant","icon":"vial","href":"/merchants/test-merchant"},{"title":"Test mode and test cards","href":"/merchants/test-mode"},{"group":"Merchant platforms","icon":"store","pages":[{"title":"ClickBank","icon":"store","href":"/merchants/clickbank"},{"title":"BuyGoods","sidebarTitle":"BuyGoods","icon":"store","href":"/merchants/buygoods"},{"title":"Digistore24","icon":"store","href":"/merchants/digistore24"},{"title":"JVZoo","icon":"store","href":"/merchants/jvzoo"},{"title":"Explodely","icon":"store","href":"/merchants/explodely"},{"title":"Shopify Checkout","icon":"shopify","href":"/merchants/shopify-checkout"}]},{"group":"Card gateways (Beta)","icon":"credit-card","pages":[{"title":"Adyen","href":"/merchants/adyen"},{"title":"Airwallex","href":"/merchants/airwallex"},{"title":"Braintree","href":"/merchants/braintree"},{"title":"Checkout.com","href":"/merchants/checkout-com"},{"title":"Cybersource","href":"/merchants/cybersource"},{"title":"Fiserv (Commerce Hub / Payeezy)","href":"/merchants/fiserv-payeezy"},{"title":"Paysafe","href":"/merchants/paysafe"},{"title":"Worldpay","href":"/merchants/worldpay"}]},{"group":"Express checkout","icon":"bolt","pages":[{"title":"Shop Pay","icon":"shopify","href":"/merchants/shop-pay"},{"title":"PayPal","icon":"paypal","href":"/merchants/paypal"},{"title":"Apple Pay and Google Pay","icon":"wallet","href":"/merchants/apple-pay-google-pay"}]}]},{"group":"Subscriptions","icon":"arrows-rotate","pages":[{"title":"Subscriptions Overview","sidebarTitle":"Overview","icon":"book-open","href":"/subscriptions/overview"},{"title":"Subscription Emails \u0026 Dunning","sidebarTitle":"Emails and dunning","icon":"envelope","href":"/subscriptions/emails-and-dunning"},{"title":"Subscription Analytics","sidebarTitle":"Subscription analytics","icon":"chart-line","href":"/subscriptions/analytics"},{"title":"Retention Offers","sidebarTitle":"Retention offers","icon":"hand-holding-heart","href":"/subscriptions/retention-offers"}]},{"group":"Orders and fulfillment","icon":"truck","pages":[{"title":"Fulfillment Integration","sidebarTitle":"Fulfillment","icon":"truck-fast","href":"/integrations/fulfillment"},{"title":"Shopify Order Sync","sidebarTitle":"Shopify order sync","icon":"shopify","href":"/integrations/shopify-order-sync"},{"title":"Sales Tax Integrations","sidebarTitle":"Sales tax","icon":"percent","href":"/integrations/tax"},{"title":"External Call Center Integrations","sidebarTitle":"Call centers","icon":"headset","href":"/integrations/callcenters"},{"title":"Chargeback Management","sidebarTitle":"Chargeback management","icon":"shield-halved","href":"/integrations/chargeback-management"}]}]},{"group":"Grow and track","icon":"chart-line","pages":[{"group":"Analytics","icon":"chart-pie","pages":[{"title":"Custom dashboards and presets","sidebarTitle":"Dashboards and presets","icon":"table-columns","href":"/analytics/custom-dashboards"},{"title":"Conversion Metrics","sidebarTitle":"Conversion metrics","icon":"money-bill-trend-up","href":"/analytics/conversions"},{"title":"Ad Spend Metrics","sidebarTitle":"Ad spend metrics","icon":"sack-dollar","href":"/analytics/ad-spend-metrics"},{"title":"Tracking Metrics","sidebarTitle":"Tracking metrics","icon":"location-crosshairs","href":"/analytics/tracking-metrics"},{"title":"Goals","sidebarTitle":"Goals","icon":"bullseye","href":"/analytics/goals"},{"title":"Video Metrics","sidebarTitle":"Video metrics","icon":"circle-play","href":"/analytics/video-metrics"}]},{"group":"Split testing","icon":"flask","pages":[{"title":"Funnel Split Testing","sidebarTitle":"Funnel split tests","icon":"filter","href":"/funnels/funnel-split-testing"},{"title":"Split Testing","sidebarTitle":"Split test node","icon":"code-branch","href":"/funnels/split-testing"},{"title":"Split Test Analytics","sidebarTitle":"Split test results","icon":"chart-simple","href":"/analytics/split-test"},{"title":"Automation Split Tests","href":"/analytics/automation-split-tests"},{"title":"A/B Testing a Campaign","sidebarTitle":"Campaign A/B tests","icon":"envelope-open-text","href":"/campaigns/ab-testing"}]},{"group":"Campaigns","icon":"bullhorn","pages":[{"title":"CRM, contacts and campaigns from Claude Code","sidebarTitle":"CRM to campaign with Claude Code","icon":"terminal","href":"/guides/crm-contacts-campaigns-claude-code"},{"title":"Email Campaigns","sidebarTitle":"Email campaigns","icon":"envelope","href":"/campaigns/email-campaigns"},{"title":"SMS Campaigns","sidebarTitle":"SMS campaigns","icon":"comment-sms","href":"/campaigns/sms-campaigns"}]},{"group":"Contacts","icon":"address-book","pages":[{"title":"Contacts","href":"/contacts/overview"},{"title":"Merging and duplicates","href":"/contacts/merge-and-duplicates"},{"title":"Importing Contacts","sidebarTitle":"Import contacts","icon":"file-import","href":"/contacts/import"}]},{"group":"Audiences","icon":"users","pages":[{"title":"Audience Actions","sidebarTitle":"Audience actions","icon":"user-check","href":"/analytics/audience-actions"},{"title":"Audiences: identity match rules","href":"/analytics/audience-identity-matches"}]},{"group":"Affiliates","icon":"handshake","pages":[{"title":"Internal affiliates and the affiliate portal","sidebarTitle":"Internal affiliates","icon":"handshake","href":"/affiliates/internal-affiliates"},{"title":"Affiliate Postback URLs","sidebarTitle":"Affiliate postback URLs","icon":"arrow-right-arrow-left","href":"/affiliates/postback-urls"},{"group":"Affiliate portal","icon":"door-open","pages":[{"title":"Affiliate portal","sidebarTitle":"Overview","icon":"door-open","href":"/affiliate-portal/overview"},{"title":"Set up the affiliate portal","sidebarTitle":"Set up the portal","icon":"globe","href":"/affiliate-portal/set-up"},{"title":"Brands on the portal","sidebarTitle":"Brands","icon":"layer-group","href":"/affiliate-portal/brands"},{"title":"Manage portal affiliates","sidebarTitle":"Affiliates","icon":"users","href":"/affiliate-portal/affiliates"},{"title":"Commissions and payouts","sidebarTitle":"Commissions and payouts","icon":"money-check-dollar","href":"/affiliate-portal/payouts"},{"title":"Assets for affiliates","sidebarTitle":"Assets","icon":"photo-film","href":"/affiliate-portal/assets"},{"title":"Brand the portal and its emails","sidebarTitle":"Branding and emails","icon":"palette","href":"/affiliate-portal/branding"},{"title":"Who can manage the affiliate portal","sidebarTitle":"Permissions","icon":"user-shield","href":"/affiliate-portal/permissions"},{"group":"What affiliates see","icon":"eye","pages":[{"title":"Sign-up and sign-in on the portal","sidebarTitle":"Sign-up and sign-in","icon":"right-to-bracket","href":"/affiliate-portal/affiliate-sign-up"},{"title":"Dashboard and reports on the portal","sidebarTitle":"Dashboard and reports","icon":"chart-line","href":"/affiliate-portal/affiliate-dashboard"},{"title":"Tracking links and resources on the portal","sidebarTitle":"Links and resources","icon":"link","href":"/affiliate-portal/affiliate-links"},{"title":"Payouts and payout details on the portal","sidebarTitle":"Payouts","icon":"wallet","href":"/affiliate-portal/affiliate-payouts"},{"title":"Affiliates' own pixels and postbacks","sidebarTitle":"Tracking and postbacks","icon":"satellite-dish","href":"/affiliate-portal/affiliate-tracking"}]}]}]},{"group":"Emails","icon":"envelope","pages":[{"title":"Emails","sidebarTitle":"Overview","icon":"book-open","href":"/emails/overview"},{"title":"Building an email","sidebarTitle":"Build an email","icon":"pen-to-square","href":"/emails/builder"},{"title":"Template Variables","sidebarTitle":"Template variables","icon":"brackets-curly","href":"/emails/template-variables"},{"group":"Sending","icon":"paper-plane","pages":[{"title":"Sending Setup","sidebarTitle":"Sending setup","icon":"gear","href":"/emails/sending-setup"},{"title":"Email Sending Accounts","sidebarTitle":"Sending accounts","icon":"at","href":"/emails/sending-accounts"},{"title":"Delivery Events","sidebarTitle":"Delivery events","icon":"inbox","href":"/emails/delivery-events"},{"title":"Emails Not Sending","sidebarTitle":"Emails not sending","icon":"triangle-exclamation","href":"/emails/troubleshooting"},{"group":"Provider keys","pages":[{"title":"Where to find your Mailgun API key and webhook signing key","sidebarTitle":"Mailgun","href":"/emails/provider-keys/mailgun"},{"title":"Where to find your SendGrid API key and verification key","sidebarTitle":"SendGrid","href":"/emails/provider-keys/sendgrid"},{"title":"Where to find your Amazon SES access key","sidebarTitle":"Amazon SES","href":"/emails/provider-keys/amazon-ses"},{"title":"Where to find your Postmark server API token","sidebarTitle":"Postmark","href":"/emails/provider-keys/postmark"},{"title":"Where to find your Brevo API key","sidebarTitle":"Brevo","href":"/emails/provider-keys/brevo"},{"title":"Where to find your Resend API key and webhook signing secret","sidebarTitle":"Resend","href":"/emails/provider-keys/resend"},{"title":"Where to find your Mailrelay SMTP settings","sidebarTitle":"Mailrelay","href":"/emails/provider-keys/mailrelay"}]}]},{"group":"Automatic emails","icon":"envelopes-bulk","pages":[{"title":"Order Emails","sidebarTitle":"Order emails","icon":"receipt","href":"/emails/order-emails"},{"title":"Subscription Emails","sidebarTitle":"Subscription emails","icon":"arrows-rotate","href":"/emails/subscription-emails"},{"title":"Dunning","icon":"credit-card","href":"/emails/dunning"},{"title":"Course Emails","sidebarTitle":"Course emails","icon":"graduation-cap","href":"/emails/course-emails"},{"title":"Login Emails","sidebarTitle":"Login emails","icon":"key","href":"/emails/login-emails"}]}]},{"group":"Automations","icon":"robot","pages":[{"title":"Use data from earlier steps","sidebarTitle":"Data from earlier steps","icon":"brackets-curly","href":"/automations/variables"},{"title":"Send Email Step","sidebarTitle":"Send email step","icon":"paper-plane","href":"/automations/send-email"},{"title":"Send SMS Step","sidebarTitle":"Send SMS step","icon":"comment-sms","href":"/automations/send-sms"},{"title":"Automation Run History","sidebarTitle":"Run history","icon":"clock-rotate-left","href":"/automations/run-history"}]},{"group":"Integrations","icon":"plug","pages":[{"title":"Connect and remove integrations","sidebarTitle":"Connect integrations","icon":"plug-circle-plus","href":"/integrations/connect"},{"title":"Integration activity, errors and presets","sidebarTitle":"Activity and errors","icon":"heart-pulse","href":"/integrations/integration-health"},{"group":"Ad platforms","icon":"bullhorn","pages":[{"title":"Meta Ads Integration","sidebarTitle":"Meta Ads","icon":"meta","href":"/integrations/meta-ads"},{"title":"Campaigns Management","sidebarTitle":"Campaigns management","icon":"sliders","href":"/integrations/campaigns-management"},{"title":"Google Ads Integration","sidebarTitle":"Google Ads","icon":"google","href":"/integrations/google-ads"},{"title":"Taboola Integration","sidebarTitle":"Taboola","icon":"rectangle-ad","href":"/integrations/taboola"}]},{"group":"Affiliate networks and attribution","icon":"share-nodes","pages":[{"title":"Affiliate Tracking","sidebarTitle":"Affiliate tracking","icon":"handshake","href":"/integrations/affiliate-tracking"},{"title":"Buygoods Integration","sidebarTitle":"BuyGoods","icon":"store","href":"/integrations/buygoods"},{"title":"Clickbank Integration","sidebarTitle":"ClickBank","icon":"store","href":"/integrations/clickbank"},{"title":"JVZoo Integration","sidebarTitle":"JVZoo","icon":"store","href":"/integrations/jvzoo"},{"title":"Everflow Integration","sidebarTitle":"Everflow","icon":"diagram-successor","href":"/integrations/everflow"},{"title":"RedTrack Integration","sidebarTitle":"RedTrack","icon":"location-crosshairs","href":"/integrations/redtrack"}]},{"group":"Email and CRM","icon":"address-book","pages":[{"title":"Email Marketing \u0026 Validation Integrations","sidebarTitle":"Email marketing","icon":"envelope-open-text","href":"/integrations/email-marketing"},{"title":"Maropost Integration","sidebarTitle":"Maropost","icon":"envelope","href":"/integrations/maropost"},{"title":"External CRM Integrations","sidebarTitle":"External CRMs","icon":"address-card","href":"/integrations/crm"}]},{"group":"AI and messaging","icon":"comments","pages":[{"title":"AI Providers (BYO key)","sidebarTitle":"AI providers","icon":"wand-magic-sparkles","href":"/integrations/ai-providers"},{"title":"Twilio Integration","sidebarTitle":"Twilio","icon":"comment-sms","href":"/integrations/twilio"},{"title":"Plivo Integration","sidebarTitle":"Plivo","icon":"comment-sms","href":"/integrations/plivo"},{"title":"Telnyx Integration","sidebarTitle":"Telnyx","icon":"comment-sms","href":"/integrations/telnyx"},{"title":"SMS Compliance","sidebarTitle":"SMS compliance","icon":"shield-check","href":"/settings/sms"},{"group":"SMS provider keys","pages":[{"title":"Where to find your Twilio Account SID and API key","sidebarTitle":"Twilio","href":"/emails/provider-keys/twilio"},{"title":"Where to find your Plivo Auth ID and Auth Token","sidebarTitle":"Plivo","href":"/emails/provider-keys/plivo"},{"title":"Where to find your Telnyx API key and public key","sidebarTitle":"Telnyx","href":"/emails/provider-keys/telnyx"},{"title":"Where to find your SlickText API key","sidebarTitle":"SlickText","href":"/emails/provider-keys/slicktext"}]},{"title":"SlickText Integration","sidebarTitle":"SlickText","icon":"message","href":"/integrations/slicktext"},{"title":"Attentive Integration","sidebarTitle":"Attentive","icon":"message","href":"/integrations/attentive"}]},{"group":"Data and video","icon":"database","pages":[{"title":"Google Analytics Integration","sidebarTitle":"Google Analytics","icon":"chart-line","href":"/integrations/google-analytics"},{"title":"Google Sheets Integration","sidebarTitle":"Google Sheets","icon":"table","href":"/integrations/google-sheets"},{"title":"TrackPlay Video Player","sidebarTitle":"TrackPlay","icon":"circle-play","href":"/integrations/trackplay"}]}]}]},{"group":"Manage","icon":"gear","pages":[{"title":"Brand Actions \u0026 Alerts","sidebarTitle":"Brand actions and alerts","icon":"bell","href":"/essentials/brand-actions"},{"title":"Alerts","sidebarTitle":"Alerts","icon":"triangle-exclamation","href":"/essentials/alerts"},{"group":"Account and security","icon":"shield-halved","pages":[{"title":"Two-factor authentication","icon":"mobile-screen","href":"/account/two-factor-authentication"},{"title":"Passkeys","icon":"fingerprint","href":"/account/passkeys"},{"title":"Connect the ef CLI and create API keys","sidebarTitle":"CLI and API keys","icon":"key","description":"Approve the ef command-line tool from your browser, create scoped API keys, and confirm it's you with a passkey or authenticator code.","href":"/account/cli-and-api-keys"},{"title":"Audiences and campaigns from the ef CLI","sidebarTitle":"CLI: audiences and campaigns","icon":"terminal","href":"/account/cli-audiences-and-campaigns"},{"title":"Multilingual sites from the ef CLI","sidebarTitle":"CLI: multilingual sites","icon":"terminal","description":"Translate pages and components, link language versions, edit the brand dictionary as JSON files, and stop a publish when a translation is stale, from the ef command-line tool or an AI agent.","href":"/account/cli-multilingual-sites"},{"title":"Refer \u0026 Earn","icon":"gift","href":"/account/refer-and-earn"},{"title":"AI credits","icon":"sparkles","href":"/account/ai-credits"}]},{"group":"Team and permissions","icon":"user-shield","pages":[{"title":"Create an organization and verify its domain","sidebarTitle":"Create and verify","icon":"building","href":"/settings/organization-create"},{"title":"Organization settings","sidebarTitle":"Settings","icon":"sliders","href":"/settings/organization-settings"},{"title":"Organization users","sidebarTitle":"Users","icon":"users","href":"/settings/organization-users"},{"title":"Organization roles","sidebarTitle":"Roles","icon":"user-gear","href":"/settings/organization-roles"},{"title":"Organization brands","sidebarTitle":"Brands","icon":"layer-group","href":"/settings/organization-brands"},{"title":"Organization billing","sidebarTitle":"Billing","icon":"credit-card","href":"/settings/organization-billing"},{"title":"When a member has no brand","sidebarTitle":"Member with no brand","icon":"hourglass-half","href":"/settings/organization-no-brand-access"},{"title":"Team setup recipes","sidebarTitle":"Team recipes","icon":"list-check","href":"/settings/organization-recipes"},{"title":"Roles, permissions, and metrics","sidebarTitle":"Roles and permissions","icon":"user-gear","href":"/essentials/roles-permissions-metrics"},{"title":"Permission matrix","icon":"table-cells","href":"/essentials/permission-matrix"},{"title":"Restricted role troubleshooting","icon":"wrench","href":"/essentials/restricted-role-troubleshooting"}]},{"group":"Domains","icon":"globe","pages":[{"title":"Custom Domains \u0026 SSL","sidebarTitle":"Custom domains and SSL","icon":"globe","href":"/domains/custom-domains"},{"title":"Page Customization","sidebarTitle":"Fonts and colors","icon":"paintbrush","href":"/domains/customization"},{"title":"Domain-Level Whitelisting","sidebarTitle":"Domain whitelisting","icon":"list-check","href":"/domains/whitelisting"},{"title":"reCAPTCHA Setup","sidebarTitle":"reCAPTCHA","icon":"robot","href":"/domains/recaptcha-setup"}]}]},{"group":"Developers","icon":"code","pages":[{"group":"Debugging","icon":"bug","pages":[{"title":"Development \u0026 Debugging","sidebarTitle":"Overview","icon":"code","href":"/debugging/overview"},{"title":"Debug Window","sidebarTitle":"Debug window","icon":"bug","href":"/debugging/debug-window"}]},{"group":"Frontend template engine","icon":"brackets-curly","pages":[{"title":"Overview","icon":"book-open","href":"/frontend-template-engine/overview"},{"title":"Syntax","icon":"code","href":"/frontend-template-engine/syntax"},{"group":"Data and bindings","icon":"database","pages":[{"title":"Scope \u0026 Data","icon":"sitemap","href":"/frontend-template-engine/scope-and-data"},{"title":"Bindings \u0026 Events","icon":"link","href":"/frontend-template-engine/bindings-forms-events"},{"title":"Functions","icon":"function","href":"/frontend-template-engine/built-in-functions"}]},{"group":"Store","icon":"cart-shopping","pages":[{"title":"Cart","icon":"cart-shopping","href":"/frontend-template-engine/cart"},{"title":"Checkout","icon":"credit-card","href":"/frontend-template-engine/checkout"}]},{"group":"Advanced","icon":"screwdriver-wrench","pages":[{"title":"Limitations","icon":"triangle-exclamation","href":"/frontend-template-engine/limitations-pitfalls"},{"title":"Debugging","icon":"bug","href":"/frontend-template-engine/debugging"}]}]},{"group":"Backend template engine","icon":"server","pages":[{"title":"Overview","icon":"book-open","href":"/backend-template-engine/overview"},{"title":"Directives","icon":"code","href":"/backend-template-engine/directives"},{"title":"Variables and filters","icon":"filter","href":"/backend-template-engine/variables-and-filters"},{"title":"Products, categories \u0026 shipping (backend)","sidebarTitle":"Products and shipping","icon":"truck","href":"/backend-template-engine/products-and-shipping"}]},{"group":"Backend scripts","icon":"terminal","pages":[{"title":"Backend Scripts","sidebarTitle":"Overview","icon":"book-open","href":"/backend-scripts/overview"},{"title":"Imports","icon":"file-import","href":"/backend-scripts/imports"},{"group":"Reference","icon":"book","pages":[{"title":"Request Context","sidebarTitle":"Request context","icon":"globe","href":"/backend-scripts/context"},{"title":"Actions","icon":"bolt","href":"/backend-scripts/actions"},{"title":"Tags","icon":"tags","href":"/backend-scripts/tags"},{"title":"Data Functions","sidebarTitle":"Data functions","icon":"database","href":"/backend-scripts/data-functions"},{"title":"Schema Validator","sidebarTitle":"Schema validator","icon":"check-double","href":"/backend-scripts/validation"},{"title":"HTTP Requests","sidebarTitle":"HTTP requests","icon":"cloud-arrow-up","href":"/backend-scripts/http"},{"title":"Secrets","sidebarTitle":"Secrets","icon":"key","href":"/backend-scripts/secrets"},{"title":"Cache","icon":"bolt-lightning","href":"/backend-scripts/cache"},{"title":"Queue","icon":"list-ol","href":"/backend-scripts/queue"},{"title":"Storage","icon":"hard-drive","href":"/backend-scripts/storage"}]},{"title":"Examples","icon":"lightbulb","href":"/backend-scripts/examples"}]},{"group":"Custom CRM data","icon":"address-book","pages":[{"title":"CRM Overview","sidebarTitle":"CRM overview","icon":"book-open","href":"/crm/overview"},{"title":"Building Custom Workflows","sidebarTitle":"Custom workflows","icon":"diagram-next","href":"/crm/post-workflow"}]}]}]},{"tab":"API Reference","pages":[{"title":"API Reference","href":"/api-reference/introduction"}]}]},"basePath":"","title":"Audiences and campaigns from the ef CLI - ElasticFunnels.io Documentation","buildId":"dpl_G2Qd45vZZ7MkBiGF9yYx8ZsbbKXX","deploymentId":"dpl_G2Qd45vZZ7MkBiGF9yYx8ZsbbKXX","dynamics":[],"chunks":[]}