Skip to main content

Create Campaign

Create an email campaign in draft status. It stays editable until it is sent or scheduled. Recipients come from the contact lists, tags and segments you attach. When it is ready, call POST /email/campaigns/:id/send to send or schedule it.

Endpoint​

POST /email/campaigns

Returns: 201 Created

Prerequisites​

Verified Domain Required

The from must belong to a verified domain. Verify it in the Arsel Dashboard under Email > Domains by adding DNS records (SPF, DKIM, DMARC). Campaigns from unverified domains are rejected at send time.

Headers​

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

Body Parameters​

All parameters are optional. Fill in details later with 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; see List Domains.
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; see List Segments.
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.

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 $ARSEL_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": 422,
"name": "validation_error",
"message": "from must be an email"
}

Related: Update a campaign · List campaigns · Send a campaign