REST API
Campaign CRUD, run history, and the send endpoint (queues delivery like “Send now” in the app).
/api/v1/campaignsLists campaigns for the user.
Authentication: Authorization: Bearer with your Mailofly API key
curl -sS -X GET "https://www.mailofly.com/api/v1/campaigns" \
-H "Accept: application/json" \
-H "Authorization: Bearer mf_live_your_key_here"Requests use https://www.mailofly.com
Response
Try it sends the request through this app to https://www.mailofly.com (no browser CORS issues).
Click Try it to run the example against the live API.
Example responses
{ "data": [ … ] }/api/v1/campaignsschedule_type: manual | scheduled_once | recurring | recurring_new_contacts. For scheduled_once set scheduled_at (ISO 8601). For recurring set recurrence_interval (≥1) and recurrence_unit: day | week | month.
Authentication: Authorization: Bearer with your Mailofly API key
Request body
{
"title": "April newsletter",
"description": "Internal note",
"segment_id": "uuid",
"template_id": "uuid",
"schedule_type": "manual"
}curl -sS -X POST "https://www.mailofly.com/api/v1/campaigns" \
-H "Accept: application/json" \
-H "Authorization: Bearer mf_live_your_key_here" \
-H "Content-Type: application/json" \
-d '{"title":"April newsletter","segment_id":"uuid","template_id":"uuid","schedule_type":"manual"}'Requests use https://www.mailofly.com
Response
Try it sends the request through this app to https://www.mailofly.com (no browser CORS issues).
Click Try it to run the example against the live API.
Example responses
{ "data": { … } }/api/v1/campaigns/{id}Fetch one campaign.
Authentication: Authorization: Bearer with your Mailofly API key
Path parameters
| Field | Type | Description |
|---|---|---|
| id | uuid | Campaign id. |
curl -sS -X GET "https://www.mailofly.com/api/v1/campaigns/00000000-0000-0000-0000-000000000001" \
-H "Accept: application/json" \
-H "Authorization: Bearer mf_live_your_key_here"Requests use https://www.mailofly.com
Response
Try it sends the request through this app to https://www.mailofly.com (no browser CORS issues).
Click Try it to run the example against the live API.
Example responses
{ "data": { … } }/api/v1/campaigns/{id}Partial update.
Authentication: Authorization: Bearer with your Mailofly API key
Path parameters
| Field | Type | Description |
|---|---|---|
| id | uuid | Campaign id. |
Request body
{ "title": "Renamed" }curl -sS -X PATCH "https://www.mailofly.com/api/v1/campaigns/00000000-0000-0000-0000-000000000001" \
-H "Accept: application/json" \
-H "Authorization: Bearer mf_live_your_key_here" \
-H "Content-Type: application/json" \
-d '{"title":"Renamed"}'Requests use https://www.mailofly.com
Response
Try it sends the request through this app to https://www.mailofly.com (no browser CORS issues).
Click Try it to run the example against the live API.
Example responses
{ "data": { … } }/api/v1/campaigns/{id}Deletes the campaign.
Authentication: Authorization: Bearer with your Mailofly API key
Path parameters
| Field | Type | Description |
|---|---|---|
| id | uuid | Campaign id. |
curl -sS -X DELETE "https://www.mailofly.com/api/v1/campaigns/00000000-0000-0000-0000-000000000001" \
-H "Accept: application/json" \
-H "Authorization: Bearer mf_live_your_key_here"Requests use https://www.mailofly.com
Response
Try it sends the request through this app to https://www.mailofly.com (no browser CORS issues).
Click Try it to run the example against the live API.
Example responses
{ "ok": true }/api/v1/campaigns/{id}/runsRuns for the campaign, newest first. Items include aggregate counts from mail logs: total, sent, failed, pending, etc.
Authentication: Authorization: Bearer with your Mailofly API key
Path parameters
| Field | Type | Description |
|---|---|---|
| id | uuid | Campaign id. |
curl -sS -X GET "https://www.mailofly.com/api/v1/campaigns/00000000-0000-0000-0000-000000000001/runs" \
-H "Accept: application/json" \
-H "Authorization: Bearer mf_live_your_key_here"Requests use https://www.mailofly.com
Response
Try it sends the request through this app to https://www.mailofly.com (no browser CORS issues).
Click Try it to run the example against the live API.
Example responses
{ "data": [ … ] }/api/v1/campaigns/{id}/sendQueues delivery to the segment audience. Requires segment and template. JSON aliases: sendNow, senderAccountIds. Omit sender_account_ids for default account selection.
Authentication: Authorization: Bearer with your Mailofly API key
Path parameters
| Field | Type | Description |
|---|---|---|
| id | uuid | Campaign id. |
Request body
{
"send_now": true,
"sender_account_ids": ["00000000-0000-0000-0000-000000000002"]
}curl -sS -X POST "https://www.mailofly.com/api/v1/campaigns/00000000-0000-0000-0000-000000000001/send" \
-H "Accept: application/json" \
-H "Authorization: Bearer mf_live_your_key_here" \
-H "Content-Type: application/json" \
-d '{"send_now":true,"sender_account_ids":["00000000-0000-0000-0000-000000000002"]}'Requests use https://www.mailofly.com
Response
Try it sends the request through this app to https://www.mailofly.com (no browser CORS issues).
Click Try it to run the example against the live API.
Example responses
{ "ok": true, "campaign_id": "…", "contacts_messaged": 10 }