Campaign API Reference
Complete API documentation for managing email campaigns programmatically. Create, update, send, and track your campaigns with ease.
Authentication
All API requests require authentication using a Bearer token in the Authorization header.
Campaign Object
Core data structure for campaigns
id readonly name subject content template_id email_service_id from_name from_email is_open_tracking is_click_tracking sent_count readonly open_count readonly click_count readonly send_to_all tags scheduled_at List Campaigns
Retrieve a paginated list of campaigns
Endpoint
Response Code
200 OKSample Request
GET /api/v1/campaigns HTTP/1.1 Host: sendportal.local Authorization: Bearer 9w2fN7d4F3Banyv7gihYOWJEH6MvtYyZ Accept: application/json
Sample Response
{
"data": [
{
"id": 1,
"name": "name",
"subject": "My Campaign Subject",
"content": "My Email Content",
"status_id": 1,
"template_id": 1,
"email_service_id": 1,
"from_name": "SendPortal",
"from_email": "[email protected]",
"is_open_tracking": true,
"is_click_tracking": true,
"sent_count": 0,
"open_count": 0,
"click_count": 0,
"send_to_all": true,
"tags": [],
"save_as_draft": false,
"scheduled_at": "2020-07-24 08:46:54",
"created_at": "2020-07-24 08:23:38",
"updated_at": "2020-07-24 09:43:42"
}
],
"meta": {
"current_page": 1,
"per_page": 25,
"total": 1
}
} Show Campaign
Get details of a single campaign
Endpoint
Response Code
200 OKCreate Campaign
Create a new campaign
Endpoint
Response Code
201 CreatedRequest Fields
name - string (required) subject - string (required) content - string (required) template_id - int (required) is_open_tracking - bool (optional) tags - array (optional) Send Campaign
Trigger campaign delivery
Endpoint
Response Code
200 OKImportant
Once a campaign is sent, it cannot be recalled. Ensure all content and recipient lists are correct before sending.
Need Help?
Check out our complete documentation or reach out to our support team for assistance with your integration.