Skip to main content

API Reference

The Arsel API provides RESTful endpoints for managing contacts, sending transactional and campaign email, SMS, WhatsApp and push, and organizing recipients with lists, tags and segments. All endpoints use JSON request and response bodies.

Base URL​

https://api.arsel.sa/v1

OpenAPI specification​

The whole 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 feed it to a client generator, to work with typed requests and responses instead of hand-written calls.

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 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. Sender names are provisioned by Arsel on your behalf — 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 be sent from 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 rather than these endpoints — delivery and engagement metrics are reported by the SDK on 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 let you trigger automations and conversion reporting from your own product activity. Define an event once, then send occurrences against 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​

Segments are dynamic audiences defined by rules, written as a filter. Create them here or in the dashboard, and target one from a campaign.

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

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 { id } only — use GET /:id to fetch the full record. 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 follow a consistent format across all endpoints. See Errors for details.