Create List Group
Call this endpoint as a POST request to create a campaign with the details that you have provided in the body.
Endpoint
Method | URL |
---|---|
POST | https://[Your URL]/api/3.0/campaigns/create |
Request Body
{
“campaign_name”: “Campaign name”,
“campaign_type”: “standard”,
“campaign_status”: “active”
}
Properties
Property | Description | Data type | Required |
---|---|---|---|
name | The name of the campaign to be created | string | Yes |
campaign_type | Type of campaign being created, it can be standard or ab (split test) | string | yes |
campaign_status | Status of the campaign (active/paused/composing) | string | no |
Example Request
–header ‘Content-Type: application/json’ \
–header ‘Authorization: Basic ‘ \
–data ‘{
“campaign_name”: “Campaign name”,
“campaign_type”: “standard”,
“campaign_status”: “active”
}’
Response
Status code | Explanation |
---|---|
200 Created | The request was successfully processed |
401 Unauthorized | Invalid/Missing authorization credentials |
Example Responses
Campaign successfully created [200]
{
“data”: {
“campaign_id”: “15”,
“campaign_hash”: “Z5KwPDGog8VrdbUP”,
“campaign_enterprise_id”: “1”,
“campaign_customer_id”: “1”,
“campaign_user_id”: “1”,
“campaign_unfiltered_list_ids”: “”,
“campaign_filter_id”: “0”,
“campaign_import_id”: “0”,
“campaign_type”: “standard”,
“campaign_name”: “Final Test Campaign 1”,
“campaign_create_date”: “1739947900”,
“campaign_launch_date”: “0”,
“campaign_valid_days”: “”,
“campaign_send_between_start”: “00:00 AM”,
“campaign_send_between_end”: “00:00 AM”,
“campaign_start_action”: “subscribe”,
“campaign_start_date”: “0”,
“campaign_start_processed”: “no”,
“campaign_from_name”: “”,
“campaign_from_email”: “”,
“campaign_reply_email”: “”,
“campaign_send_to”: “new”,
“campaign_status”: “composing”,
“campaign_ab_status”: “saved”,
“campaign_is_scheduled”: “no”,
“campaign_schedule_date”: “0”,
“campaign_anniversary_field”: “”
},
“status”: “success”,
“message”: “Campaign added successfully”
}
Code 401
Delete Campaign
Call this endpoint using a DELETE request to delete a campaign with the ID you’ve provided.
Endpoint
Method | URL |
---|---|
POST | [Your URL]/api//3.0/campaigns/delete |
Request Body
{
“campaign_id”: id
}
Properties
Property | Description | Data type | Required |
---|---|---|---|
id | The id of the campaign you want to delete | int | Yes |
Example Request
–header ‘Content-Type: application/json’ \
–header ‘Authorization: Basic ‘,
–data ‘{
“campaign_id”: id,
}
Response
Status code | Explanation |
---|---|
200 No Content | The request was successfully processed |
404 Not Found | The campaign with the provided ID was not found |
401 Unauthorized | Invalid/Missing authorization credentials |
Example Responses
Deleted Successful [200]
{
“status”: “success”,
“message”: “Campaign deleted successfully”
}
Invalid/Missing authorization credentials [401 Unauthorized]
401 status code.
404 Page Not Found
Update Campaign
Call this endpoint using a PUT request to update a campaign.
Endpoint
Method | URL |
---|---|
PUT | [Your URL]/api/ 3.0/campaigns/update |
Request Body
{
“campaign_name”: “Campaign name”,
“campaign_type”: “standard”,
“campaign_status”: “active”
}
Properties
Property | Description | Data type | Required |
---|---|---|---|
name | The updated name of the campaign to be created | string | Yes |
campaign_type | The updated type of campaign being created, it can be standard or ab (split test) | string | yes |
campaign_status | Updated status of the campaign (active/paused/composing) | string | no |
Example Request
–header ‘Content-Type: application/json’ \
–header ‘Authorization: Basic ‘ \
–data ‘ {
“campaign_id”: 10,
“campaign_name”: “Test 2 Campaign”
}’
Response
Status code | Explanation |
---|---|
200 Ok | Campaign was updated successfully |
401 Unauthorized | The provided authorization credentials are incorrect |
404 Not Found | The campaign with the provided ID was not found |
Example Responses
Successfully updated campaign [200 OK]
{
“data”: {
“campaign_id”: “10”,
“campaign_hash”: “uBYNsgQKsTZ3ByZX”,
“campaign_enterprise_id”: “1”,
“campaign_customer_id”: “1”,
“campaign_user_id”: “1”,
“campaign_unfiltered_list_ids”: “”,
“campaign_filter_id”: “0”,
“campaign_import_id”: “0”,
“campaign_type”: “standard”,
“campaign_name”: “Test 3 Campaign”,
“campaign_create_date”: “1737986334”,
“campaign_launch_date”: “0”,
“campaign_valid_days”: “”,
“campaign_send_between_start”: “00:00 AM”,
“campaign_send_between_end”: “00:00 AM”,
“campaign_start_action”: “subscribe”,
“campaign_start_date”: “0”,
“campaign_start_processed”: “no”,
“campaign_from_name”: “”,
“campaign_from_email”: “”,
“campaign_reply_email”: “”,
“campaign_send_to”: “new”,
“campaign_status”: “active”,
“campaign_ab_status”: “saved”,
“campaign_is_scheduled”: “no”,
“campaign_schedule_date”: “0”,
“campaign_anniversary_field”: “”
},
“status”: “success”,
“message”: “Campaign updated successfully”
}}
401 status code
Not found [404 Not found]
404 Page Not Found
Get Single Campaign
Call this endpoint as a GET request to retrieve the campaign with the ID that you have provided in the URL.
Endpoint
Method | URL | Parameters |
---|---|---|
GET | [Your URL]/api/3.0/campaigns/:id | [id] – ID of the requested campaign |
Example Request
curl –location ‘ [Your URL]/3.0/campaigns/:id’ \
–header ‘Authorization: Basic
Response
Status code | Explanation |
---|---|
200 Ok | Request was processed successfully |
401 Unauthorized | The provided authorization credentials are incorrect |
404 Not Found | The campaign with the provided ID was not found |
Example Responses
{
“data”: {
“campaign_id”: “10”,
“campaign_hash”: “uBYNsgQKsTZ3ByZX”,
“campaign_enterprise_id”: “1”,
“campaign_customer_id”: “1”,
“campaign_user_id”: “1”,
“campaign_unfiltered_list_ids”: “”,
“campaign_filter_id”: “0”,
“campaign_import_id”: “0”,
“campaign_type”: “standard”,
“campaign_name”: “Test 3 Campaign”,
“campaign_create_date”: “1737986334”,
“campaign_launch_date”: “0”,
“campaign_valid_days”: “”,
“campaign_send_between_start”: “00:00 AM”,
“campaign_send_between_end”: “00:00 AM”,
“campaign_start_action”: “subscribe”,
“campaign_start_date”: “0”,
“campaign_start_processed”: “no”,
“campaign_from_name”: “”,
“campaign_from_email”: “”,
“campaign_reply_email”: “”,
“campaign_send_to”: “new”,
“campaign_status”: “active”,
“campaign_ab_status”: “saved”,
“campaign_is_scheduled”: “no”,
“campaign_schedule_date”: “0”,
“campaign_anniversary_field”: “”
},
“status”: “success”
}
Not found [404 Not Found]
404 Page Not Found
401 status code
Get List Groups
Call this endpoint as a GET request to get a list of campaigns associated with your account.
Endpoint
Method | URL |
---|---|
GET | [Your URL]/api/3.0/campaigns |
Example Request
curl –location ‘[Your URL]/api/3.0/campaigns’ \
–header ‘Authorization: Basic ‘
Response
Status code | Explanation |
---|---|
200 Ok | campaigns retrieved successfully |
401 Unauthorized | The provided authorization credentials are incorrect |
Example Responses
Successful response with contents [200 OK]
{
“data”: [
{
“campaign_name”: “Test 3 Campaign”,
“campaign_status”: “active”,
“campaign_type”: “standard”
},
{
“campaign_name”: “Test Campaign”,
“campaign_status”: “active”,
“campaign_type”: “standard”
},
{
“campaign_name”: “Final Test Campaign”,
“campaign_status”: “active”,
“campaign_type”: “standard”
},
{
“campaign_name”: “Campaign Test”,
“campaign_status”: “active”,
“campaign_type”: “standard”
}
],
“status”: “success”
}
Successful response with no contents [200 OK]
{
“data”: []
}
Invalid/Missing authorization credentials [401 Unauthorized]
401 status code