Skip to main content

Create Campaign

Create a new email campaign. The campaign is created in Draft status and is fully editable until it is sent or scheduled for delivery. Recipients are configured by attaching contact lists, tags and/or segments to the campaign. Use this endpoint to prepare the campaign, then call POST /email/campaigns/:id/send when you are ready to send or schedule.

Common use cases:

  • A marketing team preparing a weekly newsletter before scheduling it for Monday morning.
  • A SaaS company drafting a product-launch announcement to review before sending.

Endpoint

POST /email/campaigns

Returns: 201 Created

Prerequisites

Verified Domain Required

The from must belong to a verified domain. You can verify your domain in the Arsel Dashboard under Settings > Domains. Domain verification requires adding DNS records (SPF, DKIM, DMARC) to prove ownership. Campaigns from unverified domains will be rejected at send time.

Headers

HeaderValueRequired
AuthorizationBearer <your-api-key>Yes
Content-Typeapplication/jsonYes

Body Parameters

All parameters are optional. You can create an empty campaign and fill in the details later via PATCH /email/campaigns/:id.

ParameterTypeRequiredDescription
namestringNoInternal name for the campaign. Max 100 characters.
subjectstringNoEmail subject line. Supports {{variables}} from contact properties.
preheaderstringNoPreview text shown alongside the subject line in email inboxes.
from_namestringNoDisplay name shown alongside the sender address.
fromstringNoSender email address. Must belong to a verified domain.
reply_tostringNoReply-to email address.
template_idstringNoID of the email template to use. Create one via POST /templates, copy from the gallery, or use the dashboard.
list_idsstring[]NoIDs of contact lists whose contacts should receive the campaign.
tag_idsstring[]NoIDs of tags whose tagged contacts should receive the campaign.
segment_idsstring[]NoIDs of segments whose matching contacts should receive the campaign.
Use a gallery template

Don't have a template_id yet? Copy any starter design from the gallery in one call: see POST /templates/gallery/:id/copy.

Unsubscribe link

Use {{unsubscribe_link}} anywhere in your template HTML to place a per-recipient tracked unsubscribe link. If your template has no unsubscribe element, a footer is appended automatically at send time. Custom external unsubscribe URLs are not supported. See Send Campaign → Unsubscribe Compliance for full details.

Response

{
"id": "0192a1b2-c3d4-7e5f-9000-abcdef123456"
}

Response Fields

FieldTypeDescription
idstringUnique campaign ID. Use this with GET /email/campaigns/:id to fetch the full record, or with POST /email/campaigns/:id/send to send or schedule.

Examples

curl -X POST "https://api.arsel.sa/v1/email/campaigns" \
-H "Authorization: Bearer be_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"name": "Summer Sale 2026",
"subject": "50% Off Everything!",
"preheader": "Limited time offer",
"from_name": "Acme Store",
"from": "marketing@acme.com",
"reply_to": "support@acme.com",
"template_id": "0192a1b2-aaaa-7bbb-8ccc-dddddddddddd",
"list_ids": ["list-uuid-1"]
}'

Error Responses

{
"status_code": 401,
"name": "unauthorized",
"message": "Invalid or missing API key"
}

After creating a campaign, you can: