Arsel sends two kinds of email.
Transactional email is one message triggered by something a specific person did, such as a receipt, a password reset or an OTP. You call POST /email/send with explicit recipient addresses and it goes out immediately.
Campaign email is one message sent to an audience you defined, such as a newsletter or an announcement. You create a campaign, attach lists, tags or segments, then send or schedule it. Arsel resolves recipients from your audience at send time.
Both use the same delivery infrastructure and tracking.
Before your first send
Verify a sending domain. Arsel rejects any from address on an unverified domain, for both transactional and campaign sends. Verification means publishing SPF, DKIM and DMARC records. There are step-by-step guides for Cloudflare, GoDaddy, Namecheap, Route 53 and Hostinger.
Once you are sending, watch your sender reputation. Arsel monitors bounce and complaint rates continuously, and sustained bad rates suspend sending for your organization.
Sending transactional email
curl -X POST "https://api.arsel.sa/v1/email/send" \
-H "Authorization: Bearer $ARSEL_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: order-1042-receipt" \
-d '{
"from": "receipts@yourdomain.com",
"from_name": "My App",
"to": ["customer@example.com"],
"subject": "Your order {{order_id}}",
"template_id": "0192a1b2-c3d4-7e5f-9000-abcdef123456",
"variables": { "order_id": "1042" }
}'
- Exactly one content source. Provide
html,text, ortemplate_id, but not a template alongside inline content.htmlandtexttogether are fine, and produce a multipart message. - 50 recipients per message, counting
to+cc+bcccombined. Larger sends belong in a campaign, or split across calls. 202means queued. PollGET /email/:idfor per-recipient delivery status.- Use an
Idempotency-Key. A timed-out request you retry blindly sends the receipt twice. See Idempotency. - Open and click tracking is message-level for multi-recipient emails. With
cc/bccin play you cannot attribute an open to a specific address.
Full parameter list: Send Email.
Sending a campaign
A campaign has three steps:
- Create —
POST /email/campaigns. Every field is optional, so you can create an empty draft and fill it in later. Recipients come fromlist_ids,tag_idsandsegment_ids, not from an address array. - Update — the campaign stays fully editable while it is
draftorscheduled. - Send —
POST /email/campaigns/:id/send. Omitscheduled_atto send now; include a future ISO 8601 datetime to schedule. Re-send with a newscheduled_atto reschedule, or cancel before it goes.
Status progresses draft → queued → sending → sent, or draft → scheduled → queued → … Poll GET /email/campaigns/:id.
Every marketing campaign must offer an opt-out. Arsel enforces this with the reserved {{unsubscribe_link}} variable. See Unsubscribe compliance.
Templates
Campaigns need a template_id; transactional sends can optionally use one.
| Route | How |
|---|---|
| Build it in the dashboard | The visual editor under Email > Templates |
| Create it via API | POST /templates |
| Copy a starter design | Browse the gallery, then copy it into your own templates in one call |
Templates support {{variable}} placeholders, filled from the variables object on a transactional send or from contact properties on a campaign. Define the properties you want to merge from in the Audience guide.
Sending over SMTP
Point an existing SMTP client at smtp.arsel.sa to send without changing your email code. Messages go through the same pipeline, tracking and analytics as API sends. Listing status and per-recipient tracking still come from the REST API.
See SMTP for connection details and credential management, and SMTP client setup for worked examples across languages and frameworks.
Reference
| Send Email · List · Get | Transactional endpoints |
| Campaigns | Create, update, send, cancel, delete |
| Domains | Register, verify, list, delete sending domains |
| Templates · Gallery | Content |