Skip to main content

Email

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, or template_id, but not a template alongside inline content. html and text together are fine, and produce a multipart message.
  • 50 recipients per message, counting to + cc + bcc combined. Larger sends belong in a campaign, or split across calls.
  • 202 means queued. Poll GET /email/:id for 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/bcc in play you cannot attribute an open to a specific address.

Full parameter list: Send Email.

Sending a campaign​

A campaign has three steps:

  1. Create — POST /email/campaigns. Every field is optional, so you can create an empty draft and fill it in later. Recipients come from list_ids, tag_ids and segment_ids, not from an address array.
  2. Update — the campaign stays fully editable while it is draft or scheduled.
  3. Send — POST /email/campaigns/:id/send. Omit scheduled_at to send now; include a future ISO 8601 datetime to schedule. Re-send with a new scheduled_at to reschedule, or cancel before it goes.

Status progresses draft → queued → sending → sent, or draft → scheduled → queued → … Poll GET /email/campaigns/:id.

Unsubscribe is enforced

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.

RouteHow
Build it in the dashboardThe visual editor under Email > Templates
Create it via APIPOST /templates
Copy a starter designBrowse 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 · GetTransactional endpoints
CampaignsCreate, update, send, cancel, delete
DomainsRegister, verify, list, delete sending domains
Templates · GalleryContent