Skip to main content

API Reference

The Arsel API is a REST API for sending transactional and campaign email, SMS, WhatsApp and push, and for managing contacts, lists, tags and segments. Request and response bodies are JSON.

Base URL​

https://api.arsel.sa/v1

OpenAPI specification​

The API is described by an OpenAPI 3.0 document, served without authentication:

https://api.arsel.sa/v1/openapi.json

Import it into Postman or Insomnia, or generate a typed client from it.

Email Endpoints​

MethodEndpointDescription
POST/email/sendSend a transactional email
GET/emailList sent emails with delivery status
GET/email/:idGet detailed status for a specific email
POST/email/domainsRegister a sending domain and get its DNS records
GET/email/domainsList sending domains and their verification status
GET/email/domains/:idGet a sending domain and its DNS records
POST/email/domains/:id/verifyCheck a domain's DNS records now
DELETE/email/domains/:idDelete a sending domain
Verified Domain Required

All email sending requires a verified domain. Verify your domain with the endpoints above, or in the Arsel Dashboard under Email > Domains, before sending.

Email Campaign Endpoints​

MethodEndpointDescription
POST/email/campaignsCreate an email campaign
GET/email/campaignsList email campaigns
GET/email/campaigns/:idGet an email campaign
PATCH/email/campaigns/:idUpdate an email campaign
DELETE/email/campaigns/:idDelete an email campaign
POST/email/campaigns/:id/sendSend or schedule an email campaign
POST/email/campaigns/:id/cancelCancel an email campaign
GET/email/campaigns/:id/statsGet delivery and engagement stats for an email campaign

SMS Endpoints​

MethodEndpointDescription
POST/sms/sendSend a transactional SMS
GET/smsList sent SMS messages with delivery status
GET/sms/:idGet detailed status for a specific SMS
GET/sms/sendersList approved SMS sender names
Verified Sender Name Required

All SMS sending requires a registered sender name. Arsel provisions sender names for you. Contact support@arsel.sa to register one.

SMS Campaign Endpoints​

MethodEndpointDescription
POST/sms/campaignsCreate an SMS campaign
GET/sms/campaignsList SMS campaigns
GET/sms/campaigns/:idGet an SMS campaign
PATCH/sms/campaigns/:idUpdate an SMS campaign
DELETE/sms/campaigns/:idDelete an SMS campaign
POST/sms/campaigns/:id/sendSend or schedule an SMS campaign
POST/sms/campaigns/:id/cancelCancel an SMS campaign
GET/sms/campaigns/:id/statsGet delivery and engagement stats for an SMS campaign

WhatsApp Endpoints​

WhatsApp messages must use a template Meta has approved. Business-initiated free text is not allowed.

MethodEndpointDescription
POST/whatsapp/sendSend a transactional WhatsApp message
GET/whatsappList transactional WhatsApp messages
GET/whatsapp/:idGet delivery status for a specific message
GET/whatsapp/campaigns/:id/statsGet delivery and engagement stats for a WhatsApp campaign
POST/whatsapp/templatesCreate a template and submit it to Meta
GET/whatsapp/templatesList templates
GET/whatsapp/templates/:idGet a template and its approval status
PATCH/whatsapp/templates/:idEdit a template and resubmit it
DELETE/whatsapp/templates/:idDelete a template

Push Notification Endpoints​

MethodEndpointDescription
POST/push/sendSend a transactional push to one contact
GET/pushList transactional pushes
GET/push/:idGet a transactional push and how many devices it reached
POST/push/devicesRegister a device
POST/push/devices/bulkImport up to 1,000 devices
GET/push/imports/:job_idPoll a device import
POST/push/devices/unregisterRevoke a device
GET/push/contacts/:contact_id/devicesList a contact's devices

Most integrations register devices through a Client SDK, which also reports delivery and engagement metrics from the device.

Push Notification Campaign Endpoints​

MethodEndpointDescription
POST/push/campaignsCreate a push campaign
GET/push/campaignsList push campaigns
GET/push/campaigns/:idGet a push campaign
PATCH/push/campaigns/:idUpdate a push campaign
DELETE/push/campaigns/:idDelete a push campaign
POST/push/campaigns/:id/sendSend or schedule a push campaign
POST/push/campaigns/:id/cancelCancel a push campaign
GET/push/campaigns/:id/statsGet delivery and engagement stats for a push campaign

Event Endpoints​

Custom events trigger automations and conversion reporting from your product activity. Define an event once, then send occurrences of it.

MethodEndpointDescription
POST/eventsDefine a custom event (name + payload schema)
GET/eventsList event definitions
GET/events/:idGet an event definition
PATCH/events/:idUpdate an event definition
DELETE/events/:idDelete an event definition
POST/events/sendSend (ingest) an event for a contact, or a batch of up to 50

Contact Endpoints​

MethodEndpointDescription
POST/contactsCreate a new contact
GET/contactsList contacts, or find one by email, phone or external ID
GET/contacts/:idGet a specific contact
PATCH/contacts/:idUpdate a contact
DELETE/contacts/:idDelete a contact
POST/contacts/bulk-deleteBulk delete up to 1,000 contacts

List Endpoints​

MethodEndpointDescription
POST/listsCreate a contact list
GET/listsList all contact lists
GET/lists/:idGet a specific list
PATCH/lists/:idUpdate a list
DELETE/lists/:idDelete a list
POST/lists/:id/contactsAdd contacts to a list
DELETE/lists/:id/contactsRemove contacts from a list

Tag Endpoints​

MethodEndpointDescription
POST/tagsCreate a tag
GET/tagsList all tags
GET/tags/:idGet a specific tag
PATCH/tags/:idUpdate a tag
DELETE/tags/:idDelete a tag
POST/tags/:id/contactsApply a tag to contacts
DELETE/tags/:id/contactsRemove a tag from contacts

Segment Endpoints​

A segment is a dynamic audience defined by a filter. Campaigns can target it.

MethodEndpointDescription
POST/segmentsCreate a segment
GET/segmentsList all segments
GET/segments/:idGet a specific segment
PATCH/segments/:idUpdate a segment
DELETE/segments/:idDelete a segment
GET/contacts?segment_id=List the contacts in a segment

Automation Endpoints​

An automation is a trigger and the graph of steps a contact goes through after it. It lets contacts in once enabled.

MethodEndpointDescription
POST/automationsCreate an automation
GET/automationsList automations
GET/automations/:idGet an automation with its steps and issues
PATCH/automations/:idRename, replace the steps, enable or disable
DELETE/automations/:idDelete an automation
POST/automations/:id/cloneCopy an automation into a new draft
GET/automations/:id/runsList an automation's runs
GET/automations/:id/runs/:run_idGet a run and the steps it has been through

Custom Template Endpoints​

MethodEndpointDescription
POST/templatesCreate an email template
GET/templatesList templates
GET/templates/:idGet a specific template
PATCH/templates/:idUpdate a template
DELETE/templates/:idDelete a template
MethodEndpointDescription
GET/templates/galleryBrowse the starter-template gallery
GET/templates/gallery/categoriesList gallery filter values
GET/templates/gallery/:idGet a gallery template (with HTML)
POST/templates/gallery/:id/copyCopy a gallery template into your custom templates

Property Endpoints​

MethodEndpointDescription
POST/propertiesCreate a custom property
GET/propertiesList custom properties
GET/properties/:idGet a specific property
PATCH/properties/:idUpdate a property
DELETE/properties/:idDelete a property

Usage Endpoints​

MethodEndpointDescription
GET/usageGet this month's usage against your plan limits

Common Headers​

HeaderValueWhen
AuthorizationBearer <your-api-key>Every request
Content-Typeapplication/jsonRequests with a body
Idempotency-KeyA unique string, max 256 charsOptional, on send endpoints — see Idempotency

Response Conventions​

Sending endpoints return 202 Accepted with the message ID. Use this ID with the status endpoints to track delivery progress.

{
"id": "01957e3a-4b5c-7d8e-9f0a-1b2c3d4e5f6a"
}

Create endpoints return 201 Created. Campaign create endpoints return only { id }; fetch the full record with GET /:id. Other create endpoints return the full created resource.

List endpoints return 200 OK with cursor-paginated results:

{
"object": "list",
"has_more": true,
"data": []
}

See Pagination for cursor parameters (limit, after, before) and walking strategies.

Error responses share one format across all endpoints. See Errors.