Skip to main content

List Campaigns

Retrieve a paginated list of SMS campaigns for your organization. Supports filtering by status and case-insensitive search on campaign name. Results are returned newest first using cursor-based pagination.

Endpoint

GET /sms/campaigns

Returns: 200 OK

Headers

HeaderValueRequired
AuthorizationBearer <your-api-key>Yes

Query Parameters

ParameterTypeRequiredDescription
limitnumberNoNumber of results per page. Min 1, max 100. Default 20.
afterstringNoCursor for the next page — returns campaigns after this campaign ID (exclusive). Mutually exclusive with before.
beforestringNoCursor for the previous page — returns campaigns before this campaign ID (exclusive). Mutually exclusive with after.
searchstringNoCase-insensitive substring match on name.
statusstringNoFilter by campaign status. One of: Draft, Scheduled, Queued, Sending, Sent, Paused, Failed, Cancelled.

Response

{
"object": "list",
"has_more": false,
"data": [
{
"id": "0192a1b2-c3d4-7e5f-9000-abcdef123456",
"name": "Summer Sale 2026",
"description": "Sale announcement to KSA list",
"content": "Acme Store: 50% off everything this weekend! Shop now: {{link}}",
"from": "ACME",
"country": "SA",
"status": "Sent",
"num_segments": 1,
"scheduled_at": null,
"sent_at": "2026-04-27T09:00:00.000Z",
"created_at": "2026-04-27T12:00:00.000Z",
"updated_at": "2026-04-27T12:00:00.000Z"
}
]
}

Response Fields

FieldTypeDescription
objectstringAlways "list". Identifies this response as a paginated list.
has_morebooleantrue if more pages exist after this one. Use the last item's id as the after cursor to fetch the next page.
dataobject[]Array of campaign objects. See Get a campaign for the full field list.

Examples

curl "https://api.arsel.sa/v1/sms/campaigns?limit=10&status=Sent" \
-H "Authorization: Bearer be_your_api_key"

Error Responses

{
"status_code": 401,
"name": "unauthorized",
"message": "Invalid or missing API key"
}