Skip to main content
POST
Generate a campaign

Authorizations

Authorization
string
header
required

Access token issued by auth.signIn. Expires; refresh it with auth.refresh.

Headers

Idempotency-Key
string

Makes this call safe to retry. The first response is recorded against the key; a repeat of the same request returns it with Idempotency-Replayed: true instead of repeating the side effect. Reusing a key for a different request body is rejected with conflict. Only a successful response is recorded, so a failed attempt stays retryable with the same key.

Required string length: 1 - 255
Pattern: ^[\x21-\x7e]+$

Body

application/json
objective
string
required
Required string length: 10 - 600
segmentId
string
required
Minimum string length: 1
channel
enum<string>
required
Available options:
sms,
email,
push
tone
enum<string>
required
Available options:
professional,
friendly,
urgent,
promotional
language
enum<string>
default:en
Available options:
en,
fr
includeDiscount
boolean
default:false

Response

OK

id
string
required
Minimum string length: 1
title
string
required
Minimum string length: 1
message
string
required
Minimum string length: 1
callToAction
string
required
Minimum string length: 1
segmentId
string
required
Minimum string length: 1
segmentName
string
required
Minimum string length: 1
channel
enum<string>
required
Available options:
sms,
email,
push
tone
enum<string>
required
Available options:
professional,
friendly,
urgent,
promotional
status
enum<string>
required
Available options:
draft,
ready,
sent
objective
string
required
Minimum string length: 1
generatedAt
string
required
Minimum string length: 1
Last modified on October 6, 2026