Create a campaign
Create a campaign in DRAFT. Creating never sends — POST /api/v1/campaigns/{id}/send is the only operation that puts mail on the wire — so a campaign can be built up and reviewed before it costs anything.
The from address is checked against this project's verified domains before the campaign is written, so a campaign never exists with a sender it cannot use.
segment_id is required when audience_type is SEGMENT; audience_condition is required when it is FILTERED. Both answer 422 when missing.
audience_condition is checked when the campaign is written: a filter on a field contacts cannot be filtered on, or an operator that field does not have, answers 400 naming it. A list is not a filter field — to mail a list, send audience_type: "LIST" with a top-level list_id.
Requires the campaigns:write scope — Create, edit, and organize your campaigns.
Request
- Base URL: https://api.sendly.now
- URL: https://api.sendly.now/api/v1/campaigns
- Auth: one of:
- HTTP bearer
- API key in cookie better-auth.session_token
- OAuth 2 (authorization code, authorization URL https://app.sendly.now/api/auth/oauth2/authorize, token URL https://app.sendly.now/api/auth/oauth2/token, scopes: campaigns:write)
Headers
Replay-safety key (24h TTL). Reuse it only to retry the identical request.
Request body
Response
Campaign created
Changes
No recorded changes to this operation across all 1 revision of this API.