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
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 ''
Response
| Status code | Explanation |
|---|---|
| 200 Created | The request was successfully processed |
| 401 Unauthorized | Invalid/Missing authorization credentials |
Example Responses
Campaign successfully created [200]
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
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 '
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]
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
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 ' '
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]
}
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
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]
Successful response with no contents [200 OK]
Invalid/Missing authorization credentials [401 Unauthorized]
401 status code