Creates a draft campaign. Give the content as html_content (optionally with the editor’s json_content) or as a template_id, whose HTML is copied onto the campaign. Every list, segment, topic and template must belong to your team. The sender domain is checked when the campaign is sent, not here; language override senders are checked here and must use a verified sending domain. Send or schedule the draft with the send and schedule endpoints. Requires the campaigns:write scope. Not available to sandbox keys.
Supply Idempotency-Key to retry safely after a timeout. Keys are scoped to your team and retained for 24 hours, as for POST /emails. Repeating the same key with the same payload returns the originally created campaign with 201 and an Idempotency-Replayed: true header instead of creating another draft; the same key with a different payload, or while the first request is still running, returns 409. A request that fails (for example with 422) does not use up its key. If the original campaign has since been deleted, the key creates a new one. Requests without this header always create a new draft.
Creates a draft campaign from html_content or a template_id. Send it with send a campaign now or schedule a campaign. Requires the campaigns:write scope. Not available to sandbox keys.
Email HTML. Merge tags such as {{first_name}} are filled from contact properties. Cannot be combined with template_id; required when json_content is given.
Who receives the campaign. Lists and segments are combined (a contact in any of them receives it); topic_id further limits recipients to contacts subscribed to that topic. With no lists or segments, every subscribed contact receives it.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/schema.json","name":"Lettr","colors":{"primary":"#EC104B","light":"#F04070","dark":"#D00E43"},"logo":{"light":"https://mintcdn.com/lettr/w6cQMnBCGTvjJ4__/logo/light.svg?fit=max\u0026auto=format\u0026n=w6cQMnBCGTvjJ4__\u0026q=85\u0026s=2cad5a94a80e61999cf9feaeac06e9c6","dark":"https://mintcdn.com/lettr/w6cQMnBCGTvjJ4__/logo/dark.svg?fit=max\u0026auto=format\u0026n=w6cQMnBCGTvjJ4__\u0026q=85\u0026s=2d94948c6f2c26d1375758ec890ccd4b","href":"/introduction"},"favicon":"https://mintcdn.com/lettr/MeT4pWpyRN-RhvgL/favicon.svg?fit=max\u0026auto=format\u0026n=MeT4pWpyRN-RhvgL\u0026q=85\u0026s=800c7fba1be1e2324447ed3b67ef0a48","api":{},"appearance":{"default":"dark"},"navbar":{"links":[{"href":"https://status.lettr.com/","label":"Status"},{"href":"https://lettr.com/support","label":"Support"}],"primary":{"type":"button","label":"Dashboard","href":"https://app.lettr.com"}},"footer":{"socials":{"x":"https://x.com/lettr_com","linkedin":"https://www.linkedin.com/company/lettr-com","github":"https://github.com/lettr-com"}},"fonts":{"heading":{"family":"Manrope","weight":400},"body":{"family":"Manrope"}},"integrations":{"ga4":{"measurementId":"G-GMH8JTRY9Q"},"posthog":{"apiKey":"phc_67BYz5Uv0uoiydQyaN3OyeK9OPx6LjmFDFvF0mNaTy9","apiHost":"https://eu.i.posthog.com","sessionRecording":true}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity"],"display":"header"},"styling":{"latex":true},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"lettr","hasAudioNarration":false,"actualSubdomain":"lettr","customDomains":["docs.lettr.com"],"gitSource":{"type":"github","owner":"lettr-com","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"feedback":{"edits":true,"thumbs":true,"issues":true},"entitlements":{},"buildId":"6ae891273630049289fee76e","clientVersion":"0.0.4124","searchFilterCounts":[{"language":"default","tag":"Documentation","count":186},{"language":"default","tag":"Learn","count":110},{"language":"default","tag":"Knowledge Base","count":87},{"language":"default","tag":"API Reference","count":72},{"language":"default","tag":"Quickstart","count":68},{"language":"default","tag":"DNS Guides","count":19},{"language":"default","tag":"Templates","count":18},{"language":"default","tag":"Domains","count":16},{"language":"default","tag":"Email Fundamentals","count":15},{"language":"default","tag":"Troubleshooting","count":15}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"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":true},"customCss":[{"filePath":"style.css","content":":root{--rounded: 0px;--rounded-sm: 0px;--rounded-md: 0px;--rounded-lg: 0px;--rounded-xl: 0px;--rounded-2xl: 0px;--rounded-3xl: 0px;--rounded-search: 0px;--c15t-radius-sm: 0px;--c15t-radius-md: 0px;--c15t-radius-lg: 0px;--cdt-radius: 0px;--accordion-radius: 0px;--button-border-radius: 0px;--consent-banner-border-radius: 0px;--consent-dialog-card-radius: 0px;--consent-widget-radius: 0px;--consent-widget-accordion-radius: 0px;--frame-placeholder-border-radius: 0px;--scrollbar-track-radius: 0px;--scrollbar-thumb-radius: 0px;--scrollbar-corner-radius: 0px}*,*::before,*::after,::backdrop,::file-selector-button{border-radius:0!important}[class~=\"rounded-full\"],[class~=\"rounded-full!\"]{border-radius:9999px!important}.prose :where(ul>li)::before,.prose-sm :where(ul>li)::before,.latex-style ul>li::before{border-radius:50%!important}.sdk-list{--sdk-fg: rgb(24 14 19);--sdk-muted: rgb(24 14 19 / 0.55);--sdk-line: rgb(60 20 35 / 0.1);--sdk-hover: rgb(236 16 75 / 0.035);--sdk-code-bg: rgb(60 20 35 / 0.035);--sdk-code-line: rgb(60 20 35 / 0.12);--sdk-accent: #d00e43;--sdk-ease: cubic-bezier(0.22, 1, 0.36, 1);margin:1.25rem 0 2.5rem;border-top:1px solid var(--sdk-line)}.dark .sdk-list{--sdk-fg: rgb(250 242 245);--sdk-muted: rgb(250 242 245 / 0.5);--sdk-line: rgb(255 225 235 / 0.09);--sdk-hover: rgb(240 64 112 / 0.05);--sdk-code-bg: rgb(255 225 235 / 0.035);--sdk-code-line: rgb(255 225 235 / 0.1);--sdk-accent: #f04070}.sdk-row{position:relative;display:grid;grid-template-columns:1.25rem 8.75rem minmax(0, 1fr) 1rem;align-items:center;column-gap:1rem;padding:0.875rem 0.75rem;border-bottom:1px solid var(--sdk-line);transition:background-color 180ms var(--sdk-ease)}.sdk-row:hover{background-color:var(--sdk-hover)}.sdk-row:has(.sdk-row__name:focus-visible){outline:2px solid var(--sdk-accent);outline-offset:-2px}.sdk-row__logo{display:flex;align-items:center;justify-content:center;color:var(--sdk-muted);transition:color 180ms var(--sdk-ease)}.sdk-row__logo svg,.sdk-row__logo span{background-color:currentColor!important}.sdk-row:hover .sdk-row__logo{color:var(--sdk-fg)}.sdk-row__name{position:static!important;z-index:auto!important;font-size:0.9375rem;font-weight:600;letter-spacing:-0.005em;color:var(--sdk-fg);text-decoration:none;white-space:nowrap}.sdk-row__name:focus-visible{outline:none}.sdk-row__name::after{content:\"\";position:absolute;inset:0}.sdk-row__install{position:relative;z-index:1;justify-self:start;display:inline-flex;align-items:center;gap:0.625rem;max-width:100%;min-width:0;padding:0.3125rem 0.5rem 0.3125rem 0.625rem;border:1px solid var(--sdk-code-line);background:var(--sdk-code-bg);color:var(--sdk-fg);cursor:pointer;transition:border-color 180ms var(--sdk-ease)}.sdk-row__install:hover{border-color:var(--sdk-accent)}.sdk-row__install:focus-visible{outline:2px solid var(--sdk-accent);outline-offset:2px}.sdk-row__install code{padding:0!important;border:0!important;background:none!important;color:inherit!important;overflow:hidden;font-size:0.8125rem;line-height:1.4;text-overflow:ellipsis;white-space:nowrap}.sdk-row__copy{display:flex;flex-shrink:0;color:var(--sdk-muted);transition:color 180ms var(--sdk-ease)}.sdk-row__install:hover .sdk-row__copy,.sdk-row__copy[data-copied=\"true\"]{color:var(--sdk-accent)}.sdk-row__arrow{color:var(--sdk-muted);transition:transform 220ms var(--sdk-ease),\n color 180ms var(--sdk-ease)}.sdk-row:hover .sdk-row__arrow{color:var(--sdk-accent);transform:translate(2px, -2px)}.sdk-row__sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}.sdk-list--inline{margin:0 0 1.25rem}:has(+.sdk-list--inline){margin-bottom:0.625rem!important}@media (max-width: 640px){.sdk-row{grid-template-columns:1.25rem minmax(0, 1fr) 1rem;row-gap:0.625rem;padding:0.875rem 0.5rem}.sdk-row__install{grid-row:2;grid-column:2 / 4;justify-self:stretch;justify-content:space-between;min-height:2.75rem;padding-block:0.5rem;text-align:left}.sdk-row__install code{white-space:normal;overflow-wrap:anywhere}}@media (prefers-reduced-motion: reduce){.sdk-row,.sdk-row__logo,.sdk-row__install,.sdk-row__copy,.sdk-row__arrow{transition:none}.sdk-row:hover .sdk-row__arrow{transform:none}}.whitespace-pre-wrap>pre.shiki,.whitespace-pre-wrap>pre.shiki code{white-space:pre-wrap!important;overflow-wrap:anywhere}"}],"page":{"pagePath":"api-reference/campaigns/create-a-campaign","slug":"/api-reference/campaigns/create-a-campaign","pageMetadata":{"title":"Create a campaign","openapi":"POST /campaigns","description":"Creates a draft campaign. Give the content as `html_content` (optionally with the editor's `json_content`) or as a `template_id`, whose HTML is copied onto the campaign. Every list, segment, topic and template must belong to your team. The sender domain is checked when the campaign is sent, not here; language override senders are checked here and must use a verified sending domain. Send or schedule the draft with the send and schedule endpoints. Requires the `campaigns:write` scope. Not available to sandbox keys.\n\nSupply `Idempotency-Key` to retry safely after a timeout. Keys are scoped to your team and retained for 24 hours, as for `POST /emails`. Repeating the same key with the same payload returns the originally created campaign with `201` and an `Idempotency-Replayed: true` header instead of creating another draft; the same key with a different payload, or while the first request is still running, returns 409. A request that fails (for example with 422) does not use up its key. If the original campaign has since been deleted, the key creates a new one. Requests without this header always create a new draft.","href":"/api-reference/campaigns/create-a-campaign"},"description":{"compiledSource":"\"use strict\";\nconst {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n code: \"code\",\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_Fragment, {\n children: [_jsxs(_components.p, {\n children: [\"Creates a draft campaign. Give the content as \", _jsx(_components.code, {\n children: \"html_content\"\n }), \" (optionally with the editor’s \", _jsx(_components.code, {\n children: \"json_content\"\n }), \") or as a \", _jsx(_components.code, {\n children: \"template_id\"\n }), \", whose HTML is copied onto the campaign. Every list, segment, topic and template must belong to your team. The sender domain is checked when the campaign is sent, not here; language override senders are checked here and must use a verified sending domain. Send or schedule the draft with the send and schedule endpoints. Requires the \", _jsx(_components.code, {\n children: \"campaigns:write\"\n }), \" scope. Not available to sandbox keys.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Supply \", _jsx(_components.code, {\n children: \"Idempotency-Key\"\n }), \" to retry safely after a timeout. Keys are scoped to your team and retained for 24 hours, as for \", _jsx(_components.code, {\n children: \"POST /emails\"\n }), \". Repeating the same key with the same payload returns the originally created campaign with \", _jsx(_components.code, {\n children: \"201\"\n }), \" and an \", _jsx(_components.code, {\n children: \"Idempotency-Replayed: true\"\n }), \" header instead of creating another draft; the same key with a different payload, or while the first request is still running, returns 409. A request that fails (for example with 422) does not use up its key. If the original campaign has since been deleted, the key creates a new one. Requests without this header always create a new draft.\"]\n })]\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,..._provideComponents(),...props.components};return _jsxs(_components.p,{children:[`Creates a draft campaign from `,_jsx(_components.code,{children:`html_content`}),` or a `,_jsx(_components.code,{children:`template_id`}),`. Send it with `,_jsx(_components.a,{href:`/api-reference/campaigns/send-a-campaign-now`,children:`send a campaign now`}),` or `,_jsx(_components.a,{href:`/api-reference/campaigns/schedule-a-campaign`,children:`schedule a campaign`}),`. Requires the `,_jsx(_components.code,{children:`campaigns:write`}),` scope. Not available to sandbox keys.`]})}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 a campaign","openapi":"POST /campaigns","description":"Creates a draft campaign. Give the content as `html_content` (optionally with the editor's `json_content`) or as a `template_id`, whose HTML is copied onto the campaign. Every list, segment, topic and template must belong to your team. The sender domain is checked when the campaign is sent, not here; language override senders are checked here and must use a verified sending domain. Send or schedule the draft with the send and schedule endpoints. Requires the `campaigns:write` scope. Not available to sandbox keys.\n\nSupply `Idempotency-Key` to retry safely after a timeout. Keys are scoped to your team and retained for 24 hours, as for `POST /emails`. Repeating the same key with the same payload returns the originally created campaign with `201` and an `Idempotency-Replayed: true` header instead of creating another draft; the same key with a different payload, or while the first request is still running, returns 409. A request that fails (for example with 422) does not use up its key. If the original campaign has since been deleted, the key creates a new one. Requests without this header always create a new draft.","href":"/api-reference/campaigns/create-a-campaign"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"operationId":"createCampaign","summary":"Create a campaign","description":"Creates a draft campaign. Give the content as `html_content` (optionally with the editor's `json_content`) or as a `template_id`, whose HTML is copied onto the campaign. Every list, segment, topic and template must belong to your team. The sender domain is checked when the campaign is sent, not here; language override senders are checked here and must use a verified sending domain. Send or schedule the draft with the send and schedule endpoints. Requires the `campaigns:write` scope. Not available to sandbox keys.\n\nSupply `Idempotency-Key` to retry safely after a timeout. Keys are scoped to your team and retained for 24 hours, as for `POST /emails`. Repeating the same key with the same payload returns the originally created campaign with `201` and an `Idempotency-Replayed: true` header instead of creating another draft; the same key with a different payload, or while the first request is still running, returns 409. A request that fails (for example with 422) does not use up its key. If the original campaign has since been deleted, the key creates a new one. Requests without this header always create a new draft.","tags":["Campaigns"],"security":["1f04ee35-22d0-4b1c-8160-b108944fd182"],"parameters":["f7c5b8b1-3da0-4a54-a0c8-4c2660690025"],"requestBody":"0aa34c34-6938-4d05-94d8-af2275c54812","responses":{"201":"c235c574-6a20-415d-a99c-db4242c14a45","401":"2bac0011-814b-48cb-a11a-6f7fe543b61e","403":"dc888ff9-b71e-49dd-b9ee-d3d78853f0a5","409":"43cc4a93-5e55-4ba6-8ad7-67731c3a2513","422":"a0600eeb-9eb3-4c2f-a77f-9cd959170a06","500":"dcb1a2ec-7306-42de-927f-d1f05424970a","503":"a75c2e7b-800c-4fee-b843-f1804a4e5c55"},"method":"post","type":"path","servers":["3a9a6297-5f46-49ab-955a-fb22c45ca41c"],"path":"/campaigns","baseUrlOptions":["https://app.lettr.com/api"],"title":"Create a campaign","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{"f7c5b8b1-3da0-4a54-a0c8-4c2660690025":{"name":"Idempotency-Key","in":"header","required":false,"description":"A unique key for one logical campaign creation. Reuse it with the same payload when retrying. Keys are scoped to your team and retained for 24 hours.","schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[A-Za-z0-9._-]{1,255}$","isRequired":false,"description":"A unique key for one logical campaign creation. Reuse it with the same payload when retrying. Keys are scoped to your team and retained for 24 hours.","uniqueKey":"","typeLabel":"string"},"example":"october-newsletter-draft"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":255,"description":"Campaign name. Required unless `subject` is given, in which case the subject is used.","example":"October newsletter","uniqueKey":"name","typeLabel":"string"},"subject":{"oneOf":[{"type":"string","maxLength":998,"example":"News for October","uniqueKey":"subject.oneOf.0","typeLabel":"string"},{"type":"null","maxLength":998,"example":"News for October","uniqueKey":"subject.oneOf.1","typeLabel":"null"}],"uniqueKey":"subject","typeLabel":"string | null"},"from_email":{"oneOf":[{"type":"string","format":"email","maxLength":255,"example":"news@example.com","uniqueKey":"from_email.oneOf.0","typeLabel":"string\u003cemail>"},{"type":"null","format":"email","maxLength":255,"example":"news@example.com","uniqueKey":"from_email.oneOf.1","typeLabel":"null"}],"uniqueKey":"from_email","typeLabel":"string\u003cemail> | null"},"from_name":{"oneOf":[{"type":"string","maxLength":255,"example":"Example","uniqueKey":"from_name.oneOf.0","typeLabel":"string"},{"type":"null","maxLength":255,"example":"Example","uniqueKey":"from_name.oneOf.1","typeLabel":"null"}],"uniqueKey":"from_name","typeLabel":"string | null"},"reply_to":{"oneOf":[{"type":"string","format":"email","maxLength":255,"uniqueKey":"reply_to.oneOf.0","typeLabel":"string\u003cemail>"},{"type":"null","format":"email","maxLength":255,"uniqueKey":"reply_to.oneOf.1","typeLabel":"null"}],"uniqueKey":"reply_to","typeLabel":"string\u003cemail> | null"},"html_content":{"oneOf":[{"type":"string","description":"Email HTML. Merge tags such as `{{first_name}}` are filled from contact properties. Cannot be combined with `template_id`; required when `json_content` is given.","example":"\u003cp>Hello {{first_name}}\u003c/p>","uniqueKey":"html_content.oneOf.0","typeLabel":"string"},{"type":"null","description":"Email HTML. Merge tags such as `{{first_name}}` are filled from contact properties. Cannot be combined with `template_id`; required when `json_content` is given.","example":"\u003cp>Hello {{first_name}}\u003c/p>","uniqueKey":"html_content.oneOf.1","typeLabel":"null"}],"uniqueKey":"html_content","typeLabel":"string | null"},"json_content":{"oneOf":[{"type":"object","additionalProperties":true,"description":"Editor JSON stored next to `html_content` so the campaign can be opened in the editor.","uniqueKey":"json_content.oneOf.0","typeLabel":"object"},{"type":"null","additionalProperties":true,"description":"Editor JSON stored next to `html_content` so the campaign can be opened in the editor.","uniqueKey":"json_content.oneOf.1","typeLabel":"null"}],"uniqueKey":"json_content","typeLabel":"object | null"},"template_id":{"oneOf":[{"type":"integer","description":"Template from one of your projects. Its HTML is copied onto the campaign. Cannot be combined with `html_content`.","uniqueKey":"template_id.oneOf.0","typeLabel":"integer"},{"type":"null","description":"Template from one of your projects. Its HTML is copied onto the campaign. Cannot be combined with `html_content`.","uniqueKey":"template_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"template_id","typeLabel":"integer | null"},"audience_config":{"oneOf":[{"type":"object","description":"Who receives the campaign. Lists and segments are combined (a contact in any of them receives it); `topic_id` further limits recipients to contacts subscribed to that topic. With no lists or segments, every subscribed contact receives it.","additionalProperties":false,"properties":{"all_contacts":{"oneOf":[{"type":"boolean","uniqueKey":"audience_config.oneOf.0.all_contacts.oneOf.0","typeLabel":"boolean"},{"type":"null","uniqueKey":"audience_config.oneOf.0.all_contacts.oneOf.1","typeLabel":"null"}],"uniqueKey":"audience_config.oneOf.0.all_contacts","typeLabel":"boolean | null"},"list_ids":{"oneOf":[{"type":"array","items":{"type":"string","uniqueKey":"audience_config.oneOf.0.list_ids.oneOf.0.items.[INDEX]","typeLabel":"string"},"uniqueKey":"audience_config.oneOf.0.list_ids.oneOf.0","typeLabel":"string[]"},{"type":"null","items":{"type":"string"},"uniqueKey":"audience_config.oneOf.0.list_ids.oneOf.1","typeLabel":"null"}],"uniqueKey":"audience_config.oneOf.0.list_ids","typeLabel":"string[] | null"},"segment_ids":{"oneOf":[{"type":"array","items":{"type":"string","uniqueKey":"audience_config.oneOf.0.segment_ids.oneOf.0.items.[INDEX]","typeLabel":"string"},"uniqueKey":"audience_config.oneOf.0.segment_ids.oneOf.0","typeLabel":"string[]"},{"type":"null","items":{"type":"string"},"uniqueKey":"audience_config.oneOf.0.segment_ids.oneOf.1","typeLabel":"null"}],"uniqueKey":"audience_config.oneOf.0.segment_ids","typeLabel":"string[] | null"},"topic_id":{"oneOf":[{"type":"string","uniqueKey":"audience_config.oneOf.0.topic_id.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"audience_config.oneOf.0.topic_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"audience_config.oneOf.0.topic_id","typeLabel":"string | null"}},"uniqueKey":"audience_config.oneOf.0","typeLabel":"object"},{"type":"null","description":"Who receives the campaign. Lists and segments are combined (a contact in any of them receives it); `topic_id` further limits recipients to contacts subscribed to that topic. With no lists or segments, every subscribed contact receives it.","additionalProperties":false,"properties":{"all_contacts":{"oneOf":[{"type":"boolean"},{"type":"null"}]},"list_ids":{"oneOf":[{"type":"array","items":{"type":"string"}},{"type":"null","items":{"type":"string"}}]},"segment_ids":{"oneOf":[{"type":"array","items":{"type":"string"}},{"type":"null","items":{"type":"string"}}]},"topic_id":{"oneOf":[{"type":"string"},{"type":"null"}]}},"uniqueKey":"audience_config.oneOf.1","typeLabel":"null"}],"uniqueKey":"audience_config","typeLabel":"object | null"},"language_overrides":{"oneOf":[{"type":"object","description":"Per-language sender and subject overrides, keyed by language code.","additionalProperties":{"type":"object","properties":{"subject":{"oneOf":[{"type":"string","maxLength":998,"uniqueKey":"language_overrides.oneOf.0.additionalProperties.subject.oneOf.0","typeLabel":"string"},{"type":"null","maxLength":998,"uniqueKey":"language_overrides.oneOf.0.additionalProperties.subject.oneOf.1","typeLabel":"null"}],"uniqueKey":"language_overrides.oneOf.0.additionalProperties.subject","typeLabel":"string | null"},"from_email":{"oneOf":[{"type":"string","format":"email","maxLength":255,"uniqueKey":"language_overrides.oneOf.0.additionalProperties.from_email.oneOf.0","typeLabel":"string\u003cemail>"},{"type":"null","format":"email","maxLength":255,"uniqueKey":"language_overrides.oneOf.0.additionalProperties.from_email.oneOf.1","typeLabel":"null"}],"uniqueKey":"language_overrides.oneOf.0.additionalProperties.from_email","typeLabel":"string\u003cemail> | null"},"from_email_domain":{"oneOf":[{"type":"string","maxLength":253,"description":"Verified sending domain to send this language from, keeping the local part of `from_email`.","uniqueKey":"language_overrides.oneOf.0.additionalProperties.from_email_domain.oneOf.0","typeLabel":"string"},{"type":"null","maxLength":253,"description":"Verified sending domain to send this language from, keeping the local part of `from_email`.","uniqueKey":"language_overrides.oneOf.0.additionalProperties.from_email_domain.oneOf.1","typeLabel":"null"}],"uniqueKey":"language_overrides.oneOf.0.additionalProperties.from_email_domain","typeLabel":"string | null"},"from_name":{"oneOf":[{"type":"string","maxLength":255,"uniqueKey":"language_overrides.oneOf.0.additionalProperties.from_name.oneOf.0","typeLabel":"string"},{"type":"null","maxLength":255,"uniqueKey":"language_overrides.oneOf.0.additionalProperties.from_name.oneOf.1","typeLabel":"null"}],"uniqueKey":"language_overrides.oneOf.0.additionalProperties.from_name","typeLabel":"string | null"},"reply_to":{"oneOf":[{"type":"string","format":"email","maxLength":255,"uniqueKey":"language_overrides.oneOf.0.additionalProperties.reply_to.oneOf.0","typeLabel":"string\u003cemail>"},{"type":"null","format":"email","maxLength":255,"uniqueKey":"language_overrides.oneOf.0.additionalProperties.reply_to.oneOf.1","typeLabel":"null"}],"uniqueKey":"language_overrides.oneOf.0.additionalProperties.reply_to","typeLabel":"string\u003cemail> | null"}},"uniqueKey":"language_overrides.oneOf.0.additionalProperties","typeLabel":"object"},"uniqueKey":"language_overrides.oneOf.0","typeLabel":"object"},{"type":"null","description":"Per-language sender and subject overrides, keyed by language code.","additionalProperties":{"type":"object","properties":{"subject":{"oneOf":[{"type":"string","maxLength":998,"uniqueKey":"language_overrides.oneOf.1.additionalProperties.subject.oneOf.0","typeLabel":"string"},{"type":"null","maxLength":998,"uniqueKey":"language_overrides.oneOf.1.additionalProperties.subject.oneOf.1","typeLabel":"null"}],"uniqueKey":"language_overrides.oneOf.1.additionalProperties.subject","typeLabel":"string | null"},"from_email":{"oneOf":[{"type":"string","format":"email","maxLength":255,"uniqueKey":"language_overrides.oneOf.1.additionalProperties.from_email.oneOf.0","typeLabel":"string\u003cemail>"},{"type":"null","format":"email","maxLength":255,"uniqueKey":"language_overrides.oneOf.1.additionalProperties.from_email.oneOf.1","typeLabel":"null"}],"uniqueKey":"language_overrides.oneOf.1.additionalProperties.from_email","typeLabel":"string\u003cemail> | null"},"from_email_domain":{"oneOf":[{"type":"string","maxLength":253,"description":"Verified sending domain to send this language from, keeping the local part of `from_email`.","uniqueKey":"language_overrides.oneOf.1.additionalProperties.from_email_domain.oneOf.0","typeLabel":"string"},{"type":"null","maxLength":253,"description":"Verified sending domain to send this language from, keeping the local part of `from_email`.","uniqueKey":"language_overrides.oneOf.1.additionalProperties.from_email_domain.oneOf.1","typeLabel":"null"}],"uniqueKey":"language_overrides.oneOf.1.additionalProperties.from_email_domain","typeLabel":"string | null"},"from_name":{"oneOf":[{"type":"string","maxLength":255,"uniqueKey":"language_overrides.oneOf.1.additionalProperties.from_name.oneOf.0","typeLabel":"string"},{"type":"null","maxLength":255,"uniqueKey":"language_overrides.oneOf.1.additionalProperties.from_name.oneOf.1","typeLabel":"null"}],"uniqueKey":"language_overrides.oneOf.1.additionalProperties.from_name","typeLabel":"string | null"},"reply_to":{"oneOf":[{"type":"string","format":"email","maxLength":255,"uniqueKey":"language_overrides.oneOf.1.additionalProperties.reply_to.oneOf.0","typeLabel":"string\u003cemail>"},{"type":"null","format":"email","maxLength":255,"uniqueKey":"language_overrides.oneOf.1.additionalProperties.reply_to.oneOf.1","typeLabel":"null"}],"uniqueKey":"language_overrides.oneOf.1.additionalProperties.reply_to","typeLabel":"string\u003cemail> | null"}},"uniqueKey":"language_overrides.oneOf.1.additionalProperties","typeLabel":"object"},"uniqueKey":"language_overrides.oneOf.1","typeLabel":"null"}],"uniqueKey":"language_overrides","typeLabel":"object | null"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"name":"October newsletter","subject":"News for October","from_email":"news@example.com","from_name":"Example","reply_to":"jsmith@example.com","html_content":"\u003cp>Hello {{first_name}}\u003c/p>","json_content":{},"template_id":123,"audience_config":{"all_contacts":true,"list_ids":["\u003cstring>"],"segment_ids":["\u003cstring>"],"topic_id":"\u003cstring>"},"language_overrides":{}}}},"exampleType":"generated"}},"exampleType":"generated"},"responses":{"c235c574-6a20-415d-a99c-db4242c14a45":{"description":"Campaign created successfully. A replay of an earlier request with the same `Idempotency-Key` returns the campaign that request created.","headers":{"Idempotency-Replayed":{"description":"Present with value true when the campaign was created by an earlier request with the same Idempotency-Key.","schema":{"type":"string","enum":["true"]}}},"content":{"application/json":{"schema":{"type":"object","required":["message","data"],"properties":{"message":{"type":"string","example":"Campaign created successfully.","isRequired":true,"uniqueKey":"message","typeLabel":"string"},"data":{"type":"object","description":"Full campaign representation including rendered HTML content.","required":["id","name","status","sent_count","created_at","stats"],"properties":{"id":{"type":"string","format":"uuid","example":"0193e6a8-1f3a-7c2a-b9e2-1aa1d2e5d3f0","isRequired":true,"uniqueKey":"data.id","typeLabel":"string\u003cuuid>"},"name":{"type":"string","example":"Spring Sale","isRequired":true,"uniqueKey":"data.name","typeLabel":"string"},"status":{"type":"string","enum":["draft","scheduled","preparing","in_review","sending","sent","failed"],"example":"sent","isRequired":true,"uniqueKey":"data.status","typeLabel":"enum\u003cstring>"},"sent_count":{"type":"integer","minimum":0,"example":124,"isRequired":true,"uniqueKey":"data.sent_count","typeLabel":"integer"},"created_at":{"type":"string","format":"date-time","example":"2026-05-01T09:00:00+00:00","isRequired":true,"uniqueKey":"data.created_at","typeLabel":"string\u003cdate-time>"},"stats":{"type":"object","description":"Aggregated engagement statistics for a campaign.","required":["injections","deliveries","bounces","spam_complaints","opens","unique_opens","clicks","unique_clicks","unsubscribes"],"properties":{"injections":{"type":"integer","minimum":0,"example":0,"isRequired":true,"uniqueKey":"data.stats.injections","typeLabel":"integer"},"deliveries":{"type":"integer","minimum":0,"example":0,"isRequired":true,"uniqueKey":"data.stats.deliveries","typeLabel":"integer"},"bounces":{"type":"integer","minimum":0,"example":0,"isRequired":true,"uniqueKey":"data.stats.bounces","typeLabel":"integer"},"spam_complaints":{"type":"integer","minimum":0,"example":0,"isRequired":true,"uniqueKey":"data.stats.spam_complaints","typeLabel":"integer"},"opens":{"type":"integer","minimum":0,"example":0,"isRequired":true,"uniqueKey":"data.stats.opens","typeLabel":"integer"},"unique_opens":{"type":"integer","minimum":0,"example":0,"isRequired":true,"uniqueKey":"data.stats.unique_opens","typeLabel":"integer"},"clicks":{"type":"integer","minimum":0,"example":0,"isRequired":true,"uniqueKey":"data.stats.clicks","typeLabel":"integer"},"unique_clicks":{"type":"integer","minimum":0,"example":0,"isRequired":true,"uniqueKey":"data.stats.unique_clicks","typeLabel":"integer"},"unsubscribes":{"type":"integer","minimum":0,"example":0,"isRequired":true,"uniqueKey":"data.stats.unsubscribes","typeLabel":"integer"}},"isRequired":true,"uniqueKey":"data.stats","typeLabel":"object"},"subject":{"oneOf":[{"type":"string","description":"Email subject line","uniqueKey":"data.subject.oneOf.0","typeLabel":"string"},{"type":"null","description":"Email subject line","uniqueKey":"data.subject.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.subject","typeLabel":"string | null"},"from_email":{"oneOf":[{"type":"string","description":"Sender email address","format":"email","uniqueKey":"data.from_email.oneOf.0","typeLabel":"string\u003cemail>"},{"type":"null","description":"Sender email address","format":"email","uniqueKey":"data.from_email.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.from_email","typeLabel":"string\u003cemail> | null"},"from_name":{"oneOf":[{"type":"string","description":"Sender display name","uniqueKey":"data.from_name.oneOf.0","typeLabel":"string"},{"type":"null","description":"Sender display name","uniqueKey":"data.from_name.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.from_name","typeLabel":"string | null"},"reply_to":{"oneOf":[{"type":"string","description":"Reply-to address","format":"email","uniqueKey":"data.reply_to.oneOf.0","typeLabel":"string\u003cemail>"},{"type":"null","description":"Reply-to address","format":"email","uniqueKey":"data.reply_to.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.reply_to","typeLabel":"string\u003cemail> | null"},"scheduled_at":{"oneOf":[{"type":"string","description":"Scheduled delivery time (ISO 8601)","format":"date-time","uniqueKey":"data.scheduled_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","description":"Scheduled delivery time (ISO 8601)","format":"date-time","uniqueKey":"data.scheduled_at.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.scheduled_at","typeLabel":"string\u003cdate-time> | null"},"total_recipients":{"oneOf":[{"type":"integer","description":"Total recipients resolved for the send","uniqueKey":"data.total_recipients.oneOf.0","typeLabel":"integer"},{"type":"null","description":"Total recipients resolved for the send","uniqueKey":"data.total_recipients.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.total_recipients","typeLabel":"integer | null"},"sent_at":{"oneOf":[{"type":"string","description":"When the campaign finished sending (ISO 8601)","format":"date-time","uniqueKey":"data.sent_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","description":"When the campaign finished sending (ISO 8601)","format":"date-time","uniqueKey":"data.sent_at.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.sent_at","typeLabel":"string\u003cdate-time> | null"},"audience_config":{"oneOf":[{"type":"object","description":"Who receives the campaign, or null when no audience has been set. With no lists or segments, every subscribed contact (of the topic, when set) receives it.","required":["all_contacts","list_ids","segment_ids","topic_id"],"properties":{"all_contacts":{"type":"boolean","isRequired":true,"uniqueKey":"data.audience_config.oneOf.0.all_contacts","typeLabel":"boolean"},"list_ids":{"type":"array","items":{"type":"string","uniqueKey":"data.audience_config.oneOf.0.list_ids.items.[INDEX]","typeLabel":"string"},"isRequired":true,"uniqueKey":"data.audience_config.oneOf.0.list_ids","typeLabel":"string[]"},"segment_ids":{"type":"array","items":{"type":"string","uniqueKey":"data.audience_config.oneOf.0.segment_ids.items.[INDEX]","typeLabel":"string"},"isRequired":true,"uniqueKey":"data.audience_config.oneOf.0.segment_ids","typeLabel":"string[]"},"topic_id":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"data.audience_config.oneOf.0.topic_id.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"data.audience_config.oneOf.0.topic_id.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.audience_config.oneOf.0.topic_id","typeLabel":"string | null"}},"uniqueKey":"data.audience_config.oneOf.0","typeLabel":"object"},{"type":"null","description":"Who receives the campaign, or null when no audience has been set. With no lists or segments, every subscribed contact (of the topic, when set) receives it.","required":["all_contacts","list_ids","segment_ids","topic_id"],"properties":{"all_contacts":{"type":"boolean"},"list_ids":{"type":"array","items":{"type":"string"}},"segment_ids":{"type":"array","items":{"type":"string"}},"topic_id":{"oneOf":[{"type":"string"},{"type":"null"}]}},"uniqueKey":"data.audience_config.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.audience_config","typeLabel":"object | null"},"template_id":{"oneOf":[{"type":"integer","description":"Template the campaign content was copied from, or null when the content was given directly","uniqueKey":"data.template_id.oneOf.0","typeLabel":"integer"},{"type":"null","description":"Template the campaign content was copied from, or null when the content was given directly","uniqueKey":"data.template_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.template_id","typeLabel":"integer | null"},"html_content":{"oneOf":[{"type":"string","description":"Rendered HTML content of the campaign email","uniqueKey":"data.html_content.oneOf.0","typeLabel":"string"},{"type":"null","description":"Rendered HTML content of the campaign email","uniqueKey":"data.html_content.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.html_content","typeLabel":"string | null"},"language_overrides":{"type":"object","description":"Per-language subject and sender overrides for a multi-language template, keyed by the template's language key. Absent fields fall back to the campaign's primary values.","additionalProperties":{"type":"object","properties":{"subject":{"oneOf":[{"type":"string","uniqueKey":"data.language_overrides.additionalProperties.subject.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"data.language_overrides.additionalProperties.subject.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.language_overrides.additionalProperties.subject","typeLabel":"string | null"},"from_email":{"oneOf":[{"type":"string","format":"email","uniqueKey":"data.language_overrides.additionalProperties.from_email.oneOf.0","typeLabel":"string\u003cemail>"},{"type":"null","format":"email","uniqueKey":"data.language_overrides.additionalProperties.from_email.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.language_overrides.additionalProperties.from_email","typeLabel":"string\u003cemail> | null"},"from_name":{"oneOf":[{"type":"string","uniqueKey":"data.language_overrides.additionalProperties.from_name.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"data.language_overrides.additionalProperties.from_name.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.language_overrides.additionalProperties.from_name","typeLabel":"string | null"},"reply_to":{"oneOf":[{"type":"string","format":"email","uniqueKey":"data.language_overrides.additionalProperties.reply_to.oneOf.0","typeLabel":"string\u003cemail>"},{"type":"null","format":"email","uniqueKey":"data.language_overrides.additionalProperties.reply_to.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.language_overrides.additionalProperties.reply_to","typeLabel":"string\u003cemail> | null"}},"uniqueKey":"data.language_overrides.additionalProperties","typeLabel":"object"},"uniqueKey":"data.language_overrides","typeLabel":"object"},"json_content":{"oneOf":[{"type":"object","additionalProperties":true,"description":"Editor JSON stored next to the HTML content, or null when the campaign has none","uniqueKey":"data.json_content.oneOf.0","typeLabel":"object"},{"type":"null","additionalProperties":true,"description":"Editor JSON stored next to the HTML content, or null when the campaign has none","uniqueKey":"data.json_content.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.json_content","typeLabel":"object | null"}},"isRequired":true,"uniqueKey":"data","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"message":"Campaign created successfully.","data":{"id":"0193e6a8-1f3a-7c2a-b9e2-1aa1d2e5d3f0","name":"Spring Sale","status":"sent","sent_count":124,"created_at":"2026-05-01T09:00:00+00:00","stats":{"injections":0,"deliveries":0,"bounces":0,"spam_complaints":0,"opens":0,"unique_opens":0,"clicks":0,"unique_clicks":0,"unsubscribes":0},"subject":"\u003cstring>","from_email":"jsmith@example.com","from_name":"\u003cstring>","reply_to":"jsmith@example.com","scheduled_at":"2023-11-07T05:31:56Z","total_recipients":123,"sent_at":"2023-11-07T05:31:56Z","audience_config":{"all_contacts":true,"list_ids":["\u003cstring>"],"segment_ids":["\u003cstring>"],"topic_id":"\u003cstring>"},"template_id":123,"html_content":"\u003cstring>","language_overrides":{},"json_content":{}}}}},"exampleType":"generated"}},"exampleType":"generated"},"2bac0011-814b-48cb-a11a-6f7fe543b61e":{"description":"Unauthorized - Missing or invalid API key","content":{"application/json":{"schema":{"type":"object","required":["message"],"description":"Error response for authentication failures (401).","properties":{"message":{"type":"string","description":"Human-readable error message","example":"API key is required.","isRequired":true,"uniqueKey":"message","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"missing_key":{"title":"missing_key","value":{"message":"API key is required."}},"invalid_key":{"title":"invalid_key","value":{"message":"Invalid API key."}}},"exampleType":"examples"}},"exampleType":"examples"},"dc888ff9-b71e-49dd-b9ee-d3d78853f0a5":{"description":"Forbidden - the API key lacks the required scope, or a campaign sender (`from_email`, or a language override's `from_email` / `from_email_domain`) uses a domain outside the key's allowed sender domains","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"description":"Error response for non-validation errors (400, 409, 500, 502).","properties":{"message":{"type":"string","description":"Human-readable error message","example":"The sender domain could not be determined from the email address.","isRequired":true,"uniqueKey":"message","typeLabel":"string"},"error_code":{"type":"string","description":"Error codes returned by the API.\n\n| Code | HTTP Status | Description |\n|------|-------------|-------------|\n| `validation_error` | 422 | Request validation failed. Check the `errors` object for field-specific messages. |\n| `invalid_domain` | 400 | The sender domain could not be determined from the email address. |\n| `unconfigured_domain` | 400 | The sender domain is not configured or approved for sending. |\n| `send_error` | 400, 500 | General error during email send preparation or domain registration. |\n| `retrieval_error` | 400, 500 | Failed to retrieve resources (e.g., sandbox key without associated user, upstream error). |\n| `internal_error` | 500 | An unexpected error on our side. The `message` names what failed; retry later. |\n| `transmission_failed` | 502 | Email transmission to the upstream provider failed. |\n| `resource_already_exists` | 409 | The resource (e.g., domain) already exists. |\n| `not_found` | 404 | The specified resource was not found. |\n| `template_not_found` | 404 | The specified template, project, or template version was not found. |\n| `insufficient_scope` | 403 | The API key does not have the required scope for this endpoint. |\n| `domain_not_allowed` | 403 | The sender domain is not in the API key's allowed sender domains. |\n| `schedule_cancellation_failed` | 409, 500 | The scheduled email can no longer be cancelled (already sent, already cancelled, or being injected right now), or the cancellation itself failed. |\n| `quota_exceeded` | 429 | Monthly sending quota exceeded. Upgrade your plan to continue sending. |\n| `daily_quota_exceeded` | 429 | Daily sending quota exceeded. Try again tomorrow. |\n| `campaign_not_sendable` | 422 | The campaign cannot be sent in its current state (not a draft, or missing subject/sender/content). |\n| `campaign_not_scheduled` | 422 | The campaign is not scheduled, so it cannot be unscheduled. |","enum":["validation_error","idempotency_key_conflict","idempotency_in_progress","invalid_domain","unconfigured_domain","send_error","retrieval_error","internal_error","transmission_failed","resource_already_exists","not_found","template_not_found","insufficient_scope","domain_not_allowed","schedule_cancellation_failed","quota_exceeded","daily_quota_exceeded","campaign_not_sendable","campaign_not_scheduled"],"example":"invalid_domain","isRequired":true,"uniqueKey":"error_code","typeLabel":"enum\u003cstring>"}},"uniqueKey":"","typeLabel":"object"},"examples":{"insufficient_scope":{"title":"insufficient_scope","value":{"message":"Your API key does not have the required permissions for this action.","error_code":"insufficient_scope"}},"domain_not_allowed":{"title":"domain_not_allowed","value":{"message":"The sender domain is not allowed for this API key.","error_code":"domain_not_allowed"}}},"exampleType":"examples"}},"exampleType":"examples"},"43cc4a93-5e55-4ba6-8ad7-67731c3a2513":{"description":"Idempotency conflict: the key was used with a different payload, or the request that first used it is still creating the campaign.","headers":{"Retry-After":{"description":"Present for idempotency_in_progress. Retry with the same key after this many seconds.","schema":{"type":"integer","example":1}}},"content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"description":"Error response for non-validation errors (400, 409, 500, 502).","properties":{"message":{"type":"string","description":"Human-readable error message","example":"The sender domain could not be determined from the email address.","isRequired":true,"uniqueKey":"message","typeLabel":"string"},"error_code":{"type":"string","description":"Error codes returned by the API.\n\n| Code | HTTP Status | Description |\n|------|-------------|-------------|\n| `validation_error` | 422 | Request validation failed. Check the `errors` object for field-specific messages. |\n| `invalid_domain` | 400 | The sender domain could not be determined from the email address. |\n| `unconfigured_domain` | 400 | The sender domain is not configured or approved for sending. |\n| `send_error` | 400, 500 | General error during email send preparation or domain registration. |\n| `retrieval_error` | 400, 500 | Failed to retrieve resources (e.g., sandbox key without associated user, upstream error). |\n| `internal_error` | 500 | An unexpected error on our side. The `message` names what failed; retry later. |\n| `transmission_failed` | 502 | Email transmission to the upstream provider failed. |\n| `resource_already_exists` | 409 | The resource (e.g., domain) already exists. |\n| `not_found` | 404 | The specified resource was not found. |\n| `template_not_found` | 404 | The specified template, project, or template version was not found. |\n| `insufficient_scope` | 403 | The API key does not have the required scope for this endpoint. |\n| `domain_not_allowed` | 403 | The sender domain is not in the API key's allowed sender domains. |\n| `schedule_cancellation_failed` | 409, 500 | The scheduled email can no longer be cancelled (already sent, already cancelled, or being injected right now), or the cancellation itself failed. |\n| `quota_exceeded` | 429 | Monthly sending quota exceeded. Upgrade your plan to continue sending. |\n| `daily_quota_exceeded` | 429 | Daily sending quota exceeded. Try again tomorrow. |\n| `campaign_not_sendable` | 422 | The campaign cannot be sent in its current state (not a draft, or missing subject/sender/content). |\n| `campaign_not_scheduled` | 422 | The campaign is not scheduled, so it cannot be unscheduled. |","enum":["validation_error","idempotency_key_conflict","idempotency_in_progress","invalid_domain","unconfigured_domain","send_error","retrieval_error","internal_error","transmission_failed","resource_already_exists","not_found","template_not_found","insufficient_scope","domain_not_allowed","schedule_cancellation_failed","quota_exceeded","daily_quota_exceeded","campaign_not_sendable","campaign_not_scheduled"],"example":"invalid_domain","isRequired":true,"uniqueKey":"error_code","typeLabel":"enum\u003cstring>"}},"uniqueKey":"","typeLabel":"object"},"examples":{"conflict":{"title":"conflict","value":{"message":"This Idempotency-Key was already used with a different request payload.","error_code":"idempotency_key_conflict"}},"in_progress":{"title":"in_progress","value":{"message":"A request with this Idempotency-Key is still processing. Retry with the same key.","error_code":"idempotency_in_progress"}}},"exampleType":"examples"}},"exampleType":"examples"},"a0600eeb-9eb3-4c2f-a77f-9cd959170a06":{"description":"Validation error. Also returned when a list, segment, topic or template is not in your team, when both `html_content` and `template_id` are given, when a language override sender uses an unverified domain, or when `Idempotency-Key` is malformed.","content":{"application/json":{"schema":{"type":"object","required":["message","error_code","errors"],"properties":{"message":{"type":"string","description":"Human-readable error message","example":"Validation failed.","isRequired":true,"uniqueKey":"message","typeLabel":"string"},"error_code":{"type":"string","description":"Error code (always `validation_error` for 422 responses)","const":"validation_error","example":"validation_error","isRequired":true,"uniqueKey":"error_code","typeLabel":"string"},"errors":{"type":"object","description":"Field-specific validation errors","additionalProperties":{"type":"array","items":{"type":"string","uniqueKey":"errors.additionalProperties.items.[INDEX]","typeLabel":"string"},"uniqueKey":"errors.additionalProperties","typeLabel":"string[]"},"example":{"from":["The sender email address is required."],"to":["At least one recipient email address is required."]},"isRequired":true,"uniqueKey":"errors","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"message":"Validation failed.","error_code":"validation_error","errors":{"from":["The sender email address is required."],"to":["At least one recipient email address is required."]}}}},"exampleType":"generated"}},"exampleType":"generated"},"dcb1a2ec-7306-42de-927f-d1f05424970a":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"description":"Error response for non-validation errors (400, 409, 500, 502).","properties":{"message":{"type":"string","description":"Human-readable error message","example":"The sender domain could not be determined from the email address.","isRequired":true,"uniqueKey":"message","typeLabel":"string"},"error_code":{"type":"string","description":"Error codes returned by the API.\n\n| Code | HTTP Status | Description |\n|------|-------------|-------------|\n| `validation_error` | 422 | Request validation failed. Check the `errors` object for field-specific messages. |\n| `invalid_domain` | 400 | The sender domain could not be determined from the email address. |\n| `unconfigured_domain` | 400 | The sender domain is not configured or approved for sending. |\n| `send_error` | 400, 500 | General error during email send preparation or domain registration. |\n| `retrieval_error` | 400, 500 | Failed to retrieve resources (e.g., sandbox key without associated user, upstream error). |\n| `internal_error` | 500 | An unexpected error on our side. The `message` names what failed; retry later. |\n| `transmission_failed` | 502 | Email transmission to the upstream provider failed. |\n| `resource_already_exists` | 409 | The resource (e.g., domain) already exists. |\n| `not_found` | 404 | The specified resource was not found. |\n| `template_not_found` | 404 | The specified template, project, or template version was not found. |\n| `insufficient_scope` | 403 | The API key does not have the required scope for this endpoint. |\n| `domain_not_allowed` | 403 | The sender domain is not in the API key's allowed sender domains. |\n| `schedule_cancellation_failed` | 409, 500 | The scheduled email can no longer be cancelled (already sent, already cancelled, or being injected right now), or the cancellation itself failed. |\n| `quota_exceeded` | 429 | Monthly sending quota exceeded. Upgrade your plan to continue sending. |\n| `daily_quota_exceeded` | 429 | Daily sending quota exceeded. Try again tomorrow. |\n| `campaign_not_sendable` | 422 | The campaign cannot be sent in its current state (not a draft, or missing subject/sender/content). |\n| `campaign_not_scheduled` | 422 | The campaign is not scheduled, so it cannot be unscheduled. |","enum":["validation_error","idempotency_key_conflict","idempotency_in_progress","invalid_domain","unconfigured_domain","send_error","retrieval_error","internal_error","transmission_failed","resource_already_exists","not_found","template_not_found","insufficient_scope","domain_not_allowed","schedule_cancellation_failed","quota_exceeded","daily_quota_exceeded","campaign_not_sendable","campaign_not_scheduled"],"example":"invalid_domain","isRequired":true,"uniqueKey":"error_code","typeLabel":"enum\u003cstring>"}},"uniqueKey":"","typeLabel":"object"},"example":{"message":"An unexpected error occurred. Please try again later.","error_code":"send_error"},"examples":{"Example":{"title":"Example","value":{"message":"An unexpected error occurred. Please try again later.","error_code":"send_error"}}},"exampleType":"examples"}},"exampleType":"examples"},"a75c2e7b-800c-4fee-b843-f1804a4e5c55":{"description":"Service unavailable - the API key could not be verified, so the request was not processed. This does not mean the key is invalid; retry after the delay given in the Retry-After header.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer","example":5}}},"content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"description":"Error response for non-validation errors (400, 409, 500, 502).","properties":{"message":{"type":"string","description":"Human-readable error message","example":"The sender domain could not be determined from the email address.","isRequired":true,"uniqueKey":"message","typeLabel":"string"},"error_code":{"type":"string","description":"Error codes returned by the API.\n\n| Code | HTTP Status | Description |\n|------|-------------|-------------|\n| `validation_error` | 422 | Request validation failed. Check the `errors` object for field-specific messages. |\n| `invalid_domain` | 400 | The sender domain could not be determined from the email address. |\n| `unconfigured_domain` | 400 | The sender domain is not configured or approved for sending. |\n| `send_error` | 400, 500 | General error during email send preparation or domain registration. |\n| `retrieval_error` | 400, 500 | Failed to retrieve resources (e.g., sandbox key without associated user, upstream error). |\n| `internal_error` | 500 | An unexpected error on our side. The `message` names what failed; retry later. |\n| `transmission_failed` | 502 | Email transmission to the upstream provider failed. |\n| `resource_already_exists` | 409 | The resource (e.g., domain) already exists. |\n| `not_found` | 404 | The specified resource was not found. |\n| `template_not_found` | 404 | The specified template, project, or template version was not found. |\n| `insufficient_scope` | 403 | The API key does not have the required scope for this endpoint. |\n| `domain_not_allowed` | 403 | The sender domain is not in the API key's allowed sender domains. |\n| `schedule_cancellation_failed` | 409, 500 | The scheduled email can no longer be cancelled (already sent, already cancelled, or being injected right now), or the cancellation itself failed. |\n| `quota_exceeded` | 429 | Monthly sending quota exceeded. Upgrade your plan to continue sending. |\n| `daily_quota_exceeded` | 429 | Daily sending quota exceeded. Try again tomorrow. |\n| `campaign_not_sendable` | 422 | The campaign cannot be sent in its current state (not a draft, or missing subject/sender/content). |\n| `campaign_not_scheduled` | 422 | The campaign is not scheduled, so it cannot be unscheduled. |","enum":["validation_error","idempotency_key_conflict","idempotency_in_progress","invalid_domain","unconfigured_domain","send_error","retrieval_error","internal_error","transmission_failed","resource_already_exists","not_found","template_not_found","insufficient_scope","domain_not_allowed","schedule_cancellation_failed","quota_exceeded","daily_quota_exceeded","campaign_not_sendable","campaign_not_scheduled"],"example":"invalid_domain","isRequired":true,"uniqueKey":"error_code","typeLabel":"enum\u003cstring>"}},"uniqueKey":"","typeLabel":"object"},"example":{"message":"Unable to verify your API key right now. Please retry shortly.","error_code":"auth_unavailable"},"examples":{"Example":{"title":"Example","value":{"message":"Unable to verify your API key right now. Please retry shortly.","error_code":"auth_unavailable"}}},"exampleType":"examples"}},"exampleType":"examples"}},"security":{"1f04ee35-22d0-4b1c-8160-b108944fd182":{"bearerAuth":{"type":"http","scheme":"bearer","description":"API key for authentication","scopes":[],"schemeName":"bearerAuth"}}},"servers":{"3a9a6297-5f46-49ab-955a-fb22c45ca41c":{"url":"https://app.lettr.com/api","description":"Production"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","description":"API key for authentication","scopes":[],"schemeName":"bearerAuth"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"API key for authentication","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"bearerAuth","name":"Authorization"}],"title":"bearerAuth"}]},"originalFileLocation":"openapi.json"},"subdomain":"lettr","siteName":"Lettr","title":"Create a campaign - Lettr","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-02T13:33:43.935Z","originalFileLocation":"api-reference/campaigns/create-a-campaign.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=\"dark\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Creates a draft campaign. Give the content as html_content (optionally with the editor\u0026#x27;s json_content) or as a template_id, whose HTML is copied onto the campaign. Every list, segment, topic and template must belong to your team. The sender domain is checked when the campaign is sent, not here; language override senders are checked here and must use a verified sending domain. Send or schedule the draft with the send and schedule endpoints. Requires the campaigns:write scope. Not available to sandbox keys. Supply Idempotency-Key to retry safely after a timeout. Keys are scoped to your team and retained for 24 hours, as for POST /emails. Repeating the same key with the same payload returns the originally created campaign with 201 and an Idempotency-Replayed: true header instead of creating another draft; the same key with a different payload, or while the first request is still running, returns 409. A request that fails (for example with 422) does not use up its key. If the original campaign has since been deleted, the key creates a new one. Requests without this header always create a new draft.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Lettr\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/lettr/dSsCtMUFma4ICJBo/_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/lettr/dSsCtMUFma4ICJBo/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/lettr/dSsCtMUFma4ICJBo/_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/lettr/dSsCtMUFma4ICJBo/_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/lettr/dSsCtMUFma4ICJBo/_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/lettr/dSsCtMUFma4ICJBo/_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/lettr/dSsCtMUFma4ICJBo/_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/lettr/dSsCtMUFma4ICJBo/_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/lettr/dSsCtMUFma4ICJBo/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Create a campaign - Lettr\">\u003cmeta data-mint-head property=\"og:description\" content=\"Creates a draft campaign. Give the content as html_content (optionally with the editor\u0026#x27;s json_content) or as a template_id, whose HTML is copied onto the campaign. Every list, segment, topic and template must belong to your team. The sender domain is checked when the campaign is sent, not here; language override senders are checked here and must use a verified sending domain. Send or schedule the draft with the send and schedule endpoints. Requires the campaigns:write scope. Not available to sandbox keys. Supply Idempotency-Key to retry safely after a timeout. Keys are scoped to your team and retained for 24 hours, as for POST /emails. Repeating the same key with the same payload returns the originally created campaign with 201 and an Idempotency-Replayed: true header instead of creating another draft; the same key with a different payload, or while the first request is still running, returns 409. A request that fails (for example with 422) does not use up its key. If the original campaign has since been deleted, the key creates a new one. Requests without this header always create a new draft.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Lettr\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.lettr.com/api-reference/campaigns/create-a-campaign\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://lettr.mintlify.site/_mintlify/api/og/v2?division=Campaigns\u0026amp;title=Create+a+campaign\u0026amp;description=Creates+a+draft+campaign.+Give+the+content+as+%60html_content%60+%28optionally+with+the+editor%27s+%60json_content%60%29+or+as+a+%60template_id%60%2C+whose+HTML+is+copied+onto+the+\u0026amp;theme=6d36e4ae9c92b67d8136c8c1\u0026amp;signature=36951a2c03cffe0af051fc8e9bffdb4f7ae08fa7912c0ee38f81d55ccd997532\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Create a campaign - Lettr\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Creates a draft campaign. Give the content as html_content (optionally with the editor\u0026#x27;s json_content) or as a template_id, whose HTML is copied onto the campaign. Every list, segment, topic and template must belong to your team. The sender domain is checked when the campaign is sent, not here; language override senders are checked here and must use a verified sending domain. Send or schedule the draft with the send and schedule endpoints. Requires the campaigns:write scope. Not available to sandbox keys. Supply Idempotency-Key to retry safely after a timeout. Keys are scoped to your team and retained for 24 hours, as for POST /emails. Repeating the same key with the same payload returns the originally created campaign with 201 and an Idempotency-Replayed: true header instead of creating another draft; the same key with a different payload, or while the first request is still running, returns 409. A request that fails (for example with 422) does not use up its key. If the original campaign has since been deleted, the key creates a new one. Requests without this header always create a new draft.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://lettr.mintlify.site/_mintlify/api/og/v2?division=Campaigns\u0026amp;title=Create+a+campaign\u0026amp;description=Creates+a+draft+campaign.+Give+the+content+as+%60html_content%60+%28optionally+with+the+editor%27s+%60json_content%60%29+or+as+a+%60template_id%60%2C+whose+HTML+is+copied+onto+the+\u0026amp;theme=6d36e4ae9c92b67d8136c8c1\u0026amp;signature=36951a2c03cffe0af051fc8e9bffdb4f7ae08fa7912c0ee38f81d55ccd997532\">\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/lettr/dSsCtMUFma4ICJBo/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Lettr\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#EC104B\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.lettr.com/api-reference/campaigns/create-a-campaign\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/campaigns/create-a-campaign.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.lettr.com/#organization\",\"name\":\"Lettr\",\"url\":\"https://docs.lettr.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/lettr/w6cQMnBCGTvjJ4__/logo/light.svg?fit=max\u0026auto=format\u0026n=w6cQMnBCGTvjJ4__\u0026q=85\u0026s=2cad5a94a80e61999cf9feaeac06e9c6\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.lettr.com#website\",\"name\":\"Lettr\",\"url\":\"https://docs.lettr.com\",\"publisher\":{\"@id\":\"https://docs.lettr.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.lettr.com/api-reference/campaigns/create-a-campaign#webpage\",\"url\":\"https://docs.lettr.com/api-reference/campaigns/create-a-campaign\",\"name\":\"Create a campaign\",\"description\":\"Creates a draft campaign. Give the content as html_content (optionally with the editor's json_content) or as a template_id, whose HTML is copied onto the campaign. Every list, segment, topic and template must belong to your team. The sender domain is checked when the campaign is sent, not here; language override senders are checked here and must use a verified sending domain. Send or schedule the draft with the send and schedule endpoints. Requires the campaigns:write scope. Not available to sandbox keys. Supply Idempotency-Key to retry safely after a timeout. Keys are scoped to your team and retained for 24 hours, as for POST /emails. Repeating the same key with the same payload returns the originally created campaign with 201 and an Idempotency-Replayed: true header instead of creating another draft; the same key with a different payload, or while the first request is still running, returns 409. A request that fails (for example with 422) does not use up its key. If the original campaign has since been deleted, the key creates a new one. Requests without this header always create a new draft.\",\"dateModified\":\"2026-11-02T13:33:43.935Z\",\"isPartOf\":{\"@id\":\"https://docs.lettr.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.lettr.com/api-reference/campaigns/create-a-campaign#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.lettr.com/api-reference/campaigns/create-a-campaign#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Lettr\",\"item\":\"https://docs.lettr.com\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create a campaign\",\"item\":\"https://docs.lettr.com/api-reference/campaigns/create-a-campaign\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.lettr.com/api-reference/campaigns/create-a-campaign#apireference\",\"headline\":\"Create a campaign\",\"name\":\"Create a campaign\",\"description\":\"Creates a draft campaign. Give the content as html_content (optionally with the editor's json_content) or as a template_id, whose HTML is copied onto the campaign. Every list, segment, topic and template must belong to your team. The sender domain is checked when the campaign is sent, not here; language override senders are checked here and must use a verified sending domain. Send or schedule the draft with the send and schedule endpoints. Requires the campaigns:write scope. Not available to sandbox keys. Supply Idempotency-Key to retry safely after a timeout. Keys are scoped to your team and retained for 24 hours, as for POST /emails. Repeating the same key with the same payload returns the originally created campaign with 201 and an Idempotency-Replayed: true header instead of creating another draft; the same key with a different payload, or while the first request is still running, returns 409. A request that fails (for example with 422) does not use up its key. If the original campaign has since been deleted, the key creates a new one. Requests without this header always create a new draft.\",\"url\":\"https://docs.lettr.com/api-reference/campaigns/create-a-campaign\",\"mainEntityOfPage\":{\"@id\":\"https://docs.lettr.com/api-reference/campaigns/create-a-campaign#webpage\"},\"dateModified\":\"2026-11-02T13:33:43.935Z\",\"publisher\":{\"@id\":\"https://docs.lettr.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.lettr.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Lettr\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Lettr\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/campaigns/create-a-campaign.md","siteName":"Lettr","nav":{"global":null,"tabs":[{"tab":"Documentation","pages":[{"title":"Documentation","href":"/introduction"}]},{"tab":"API Reference","groups":[{"group":"API Reference","pages":[{"title":"Introduction","href":"/api-reference/introduction"},{"title":"Rate Limit","href":"/api-reference/rate-limit"}]},{"group":"Emails","pages":[{"title":"Send Email","openapi":"POST /emails","href":"/api-reference/emails/send-email"},{"title":"Get Email Detail","openapi":"GET /emails/{requestId}","href":"/api-reference/emails/get-email-detail"},{"title":"List Email Events","openapi":"GET /emails/events","href":"/api-reference/emails/list-email-events"}]},{"group":"Scheduled Emails","pages":[{"title":"Schedule Email","openapi":"POST /emails/scheduled","href":"/api-reference/emails/schedule-email"},{"title":"List Scheduled Emails","openapi":"GET /emails/scheduled","href":"/api-reference/emails/list-scheduled-emails"},{"title":"Get Scheduled Email","openapi":"GET /emails/scheduled/{transmissionId}","href":"/api-reference/emails/get-scheduled-email"},{"title":"Cancel Scheduled Email","openapi":"DELETE /emails/scheduled/{transmissionId}","href":"/api-reference/emails/cancel-scheduled-email"}]},{"group":"Domains","pages":[{"title":"List Domains","openapi":"GET /domains","href":"/api-reference/domains/list-domains"},{"title":"Create Domain","openapi":"POST /domains","href":"/api-reference/domains/create-domain"},{"title":"Get Domain","openapi":"GET /domains/{domain}","href":"/api-reference/domains/get-domain"},{"title":"Delete Domain","openapi":"DELETE /domains/{domain}","href":"/api-reference/domains/delete-domain"},{"title":"Verify Domain","openapi":"POST /domains/{domain}/verify","href":"/api-reference/domains/verify-domain"}]},{"group":"Templates","pages":[{"title":"List Templates","openapi":"GET /templates","href":"/api-reference/templates/list-templates"},{"title":"Create Template","openapi":"POST /templates","href":"/api-reference/templates/create-template"},{"title":"Get Template","openapi":"GET /templates/{slug}","href":"/api-reference/templates/get-template"},{"title":"Update Template","openapi":"PUT /templates/{slug}","href":"/api-reference/templates/update-template"},{"title":"Delete Template","openapi":"DELETE /templates/{slug}","href":"/api-reference/templates/delete-template"},{"title":"Get Merge Tags","openapi":"GET /templates/{slug}/merge-tags","href":"/api-reference/templates/get-merge-tags"},{"title":"List Folders","openapi":"GET /folders","href":"/api-reference/templates/list-folders"}]},{"group":"Webhooks","pages":[{"title":"List Webhooks","openapi":"GET /webhooks","href":"/api-reference/webhooks/list-webhooks"},{"title":"Create Webhook","openapi":"POST /webhooks","href":"/api-reference/webhooks/create-webhook"},{"title":"Get Webhook","openapi":"GET /webhooks/{webhookId}","href":"/api-reference/webhooks/get-webhook"},{"title":"Update Webhook","openapi":"PUT /webhooks/{webhookId}","href":"/api-reference/webhooks/update-webhook"},{"title":"Delete Webhook","openapi":"DELETE /webhooks/{webhookId}","href":"/api-reference/webhooks/delete-webhook"}]},{"group":"System","pages":[{"title":"Health Check","openapi":"GET /health","href":"/api-reference/system/health-check"},{"title":"Auth Check","openapi":"GET /auth/check","description":"Validate the provided API key and return associated team information. Use this endpoint to verify API key validity in client libraries.","href":"/api-reference/system/auth-check"}]},{"group":"Campaigns","pages":[{"title":"Create a campaign","openapi":"POST /campaigns","href":"/api-reference/campaigns/create-a-campaign"},{"title":"List campaigns","openapi":"GET /campaigns","description":"Returns a paginated list of campaigns for the authenticated team, each with embedded engagement stats. Requires the `campaigns:read` scope.","href":"/api-reference/campaigns/list-campaigns"},{"title":"Show a campaign","openapi":"GET /campaigns/{campaignId}","href":"/api-reference/campaigns/show-a-campaign"},{"title":"List campaign engagement events","openapi":"GET /campaigns/{campaignId}/events","href":"/api-reference/campaigns/list-campaign-engagement-events"},{"title":"Send a campaign now","openapi":"POST /campaigns/{campaignId}/send","href":"/api-reference/campaigns/send-a-campaign-now"},{"title":"Schedule a campaign","openapi":"POST /campaigns/{campaignId}/schedule","href":"/api-reference/campaigns/schedule-a-campaign"},{"title":"Unschedule a campaign","openapi":"POST /campaigns/{campaignId}/unschedule","href":"/api-reference/campaigns/unschedule-a-campaign"}]},{"group":"Audience Lists","pages":[{"title":"List audience lists","openapi":"GET /audience/lists","href":"/api-reference/audience/list-audience-lists"},{"title":"Create an audience list","openapi":"POST /audience/lists","href":"/api-reference/audience/create-an-audience-list"},{"title":"Bulk delete audience lists","openapi":"DELETE /audience/lists/bulk","href":"/api-reference/audience/bulk-delete-audience-lists"},{"title":"Show an audience list","openapi":"GET /audience/lists/{listId}","href":"/api-reference/audience/show-an-audience-list"},{"title":"Update an audience list","openapi":"PATCH /audience/lists/{listId}","href":"/api-reference/audience/update-an-audience-list"},{"title":"Delete an audience list","openapi":"DELETE /audience/lists/{listId}","href":"/api-reference/audience/delete-an-audience-list"}]},{"group":"Audience Contacts","pages":[{"title":"List audience contacts","openapi":"GET /audience/contacts","href":"/api-reference/audience/list-audience-contacts"},{"title":"Create a contact","openapi":"POST /audience/contacts","href":"/api-reference/audience/create-a-contact"},{"title":"Bulk create contacts","openapi":"POST /audience/contacts/bulk","href":"/api-reference/audience/bulk-create-contacts"},{"title":"Bulk attach contacts to lists","openapi":"POST /audience/contacts/lists/bulk","href":"/api-reference/audience/bulk-attach-contacts-to-lists"},{"title":"Bulk detach contacts from lists","openapi":"DELETE /audience/contacts/lists/bulk","href":"/api-reference/audience/bulk-detach-contacts-from-lists"},{"title":"Bulk subscribe contacts to topics","openapi":"POST /audience/contacts/topics/bulk","href":"/api-reference/audience/bulk-subscribe-contacts-to-topics"},{"title":"Bulk unsubscribe contacts from topics","openapi":"DELETE /audience/contacts/topics/bulk","href":"/api-reference/audience/bulk-unsubscribe-contacts-from-topics"},{"title":"Show a contact","openapi":"GET /audience/contacts/{contactId}","href":"/api-reference/audience/show-a-contact"},{"title":"Update a contact","openapi":"PATCH /audience/contacts/{contactId}","href":"/api-reference/audience/update-a-contact"},{"title":"Delete a contact","openapi":"DELETE /audience/contacts/{contactId}","href":"/api-reference/audience/delete-a-contact"},{"title":"Attach contact to list","openapi":"POST /audience/contacts/{contactId}/lists/{listId}","href":"/api-reference/audience/attach-contact-to-list"},{"title":"Detach contact from list","openapi":"DELETE /audience/contacts/{contactId}/lists/{listId}","href":"/api-reference/audience/detach-contact-from-list"},{"title":"Subscribe contact to topic","openapi":"POST /audience/contacts/{contactId}/topics/{topicId}","href":"/api-reference/audience/subscribe-contact-to-topic"},{"title":"Unsubscribe contact from topic","openapi":"DELETE /audience/contacts/{contactId}/topics/{topicId}","href":"/api-reference/audience/unsubscribe-contact-from-topic"}]},{"group":"Audience Topics","pages":[{"title":"List audience topics","openapi":"GET /audience/topics","href":"/api-reference/audience/list-audience-topics"},{"title":"Create a topic","openapi":"POST /audience/topics","href":"/api-reference/audience/create-a-topic"},{"title":"Show a topic","openapi":"GET /audience/topics/{topicId}","href":"/api-reference/audience/show-a-topic"},{"title":"Update a topic","openapi":"PATCH /audience/topics/{topicId}","href":"/api-reference/audience/update-a-topic"},{"title":"Delete a topic","openapi":"DELETE /audience/topics/{topicId}","href":"/api-reference/audience/delete-a-topic"}]},{"group":"Audience Properties","pages":[{"title":"List audience properties","openapi":"GET /audience/properties","href":"/api-reference/audience/list-audience-properties"},{"title":"Create a property","openapi":"POST /audience/properties","href":"/api-reference/audience/create-a-property"},{"title":"Show a property","openapi":"GET /audience/properties/{propertyId}","href":"/api-reference/audience/show-a-property"},{"title":"Update a property","openapi":"PATCH /audience/properties/{propertyId}","href":"/api-reference/audience/update-a-property"},{"title":"Delete a property","openapi":"DELETE /audience/properties/{propertyId}","href":"/api-reference/audience/delete-a-property"}]},{"group":"Audience Segments","pages":[{"title":"List audience segments","openapi":"GET /audience/segments","href":"/api-reference/audience/list-audience-segments"},{"title":"Create a segment","openapi":"POST /audience/segments","href":"/api-reference/audience/create-a-segment"},{"title":"Show a segment","openapi":"GET /audience/segments/{segmentId}","href":"/api-reference/audience/show-a-segment"},{"title":"Update a segment","openapi":"PATCH /audience/segments/{segmentId}","href":"/api-reference/audience/update-a-segment"},{"title":"Delete a segment","openapi":"DELETE /audience/segments/{segmentId}","href":"/api-reference/audience/delete-a-segment"}]}]},{"tab":"Knowledge Base","pages":[{"title":"Knowledge Base","href":"/knowledge-base/introduction"}]}]},"basePath":"","title":"Create a campaign - Lettr","buildId":"dpl_8hoxaqFTU7hTr6A2fUraxAyjuiZo","deploymentId":"dpl_8hoxaqFTU7hTr6A2fUraxAyjuiZo","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-CDiBsYGW.js","utils-KF9rPlmF.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-C26urKTX.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-BdjmJAC1.js","snippetPresets-3IpDBjt3.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","conditional-requirements-CFM0id0Q.js","ApiExamples-D4x_2vvo.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-BIWdc5Pa.js","shallow-LQqfiMNd.js","getApiPlaygroundDisplay-DryzlOZG.js","CodeSnippet-tcJujU4r.js","CodeSnippets-BHp0nVLL.js","Page-1CZdsdAn.js","getPastedJson-DU-1ayUv.js","icon-CZK2hPr4.js","MethodPill-DOaqmTFC.js","DuplicateIcon-B5-nUxxl.js","createIcon-CDP_U77G.js","DynamicMarkdown-GHvayGOn.js","SectionHeading-BYvpkmUD.js","axios-vUo_bRtp.js","Markdown-uxhlayGT.js","clsx-B35qUV0p.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-BvrGG8gU.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-CAf0yVYe.js"]}