List Campaign API
Learn to retrieve a list of email campaign with List Campaign API.
This API allows you to retrieve a list of all email campaigns from the Netcore CE platform. This API supports filtering campaigns based on various parameters such as campaign states, channels, pagination, and sorting options.
HTTP Method
This API uses the POST
method to fetch existing email campaigns.
API Endpoint
The List Campaign API is available across multiple regions; below are the base URLs for different regions:
Region | Base URL |
---|---|
India | https://apiind.netcoresmartech.com/v4/campaign/list |
United States | https://api.netcoresmartech.com/v4/campaign/list |
Europe | https://apieu.netcoresmartech.com/v4/campaign/list |
Request Headers
Authentication details are required to access the API. Ensure you include the necessary tokens or credentials in your request headers.
Header Name | Type | Description | Example | Required? |
---|---|---|---|---|
api-key | String | API key for authentication | 41a1de35948f915f64907ced9eed4f00 | Yes |
Request Body
All necessary parameters should be passed in the request body in JSON format.
Parameter | Data Type | Description | Required? |
---|---|---|---|
channel | Array of String | List of channels to filter the campaigns. For example: Email | No |
campaign_states | Array of String | List of campaign states to filter. Available options: draft, active, scheduled, running, sent, and suspended. | No |
campaign_ids | Array of Integer | List of campaign IDs to be filtered as part of response | No |
page_size | Integer | Number of campaigns to be sent per list API response | Yes |
page_no | Integer | Page number indicates the the page sequence for the response | Yes |
Example Request Body
{
"channel": [
"email"
],
"page_no": 1,
"page_size": 5,
"campaign_ids": [],
"campaign_states": [
"sent",
"draft",
"scheduled",
"running",
"suspended"
]
}
Responses
Success Response: 200 OK
Successful response containing the list of campaigns.
Example Response
{
"data": {
"page_no": 1,
"page_size": 5,
"campaign_details": [
{
"channel": "email",
"campaign_id": "428",
"campaign_name": "EMAIL Test now",
"campaign_state": "suspended",
"created_by_details": {
"time": "2023-10-05T17:04:13Z"
},
"last_modifield_by_details": {
"time": "2023-10-05T17:04:33Z"
}
},
{
"channel": "email",
"campaign_id": "427",
"campaign_name": "2Update campaign name by Jyoti Test1",
"campaign_state": "draft",
"created_by_details": {
"time": "2023-10-05T16:54:08Z"
},
"last_modifield_by_details": {
"time": "2023-10-05T16:58:57Z"
}
},
{
"channel": "email",
"campaign_id": "426",
"campaign_name": "1Update campaign name by Jyoti Test1",
"campaign_state": "sent",
"created_by_details": {
"time": "2023-10-05T16:48:36Z"
},
"last_modifield_by_details": {
"time": "2023-10-05T16:49:38Z"
}
},
{
"channel": "email",
"campaign_id": "417",
"campaign_name": "NewCampaignByMax_1055",
"campaign_state": "suspended",
"created_by_details": {
"time": "2023-10-05T12:56:03Z"
},
"last_modifield_by_details": {
"time": "2023-10-05T16:49:29Z"
}
},
{
"channel": "email",
"campaign_id": "419",
"campaign_name": "NewCampaignByMax_1055",
"campaign_state": "suspended",
"created_by_details": {
"time": "2023-10-05T13:00:42Z"
},
"last_modifield_by_details": {
"time": "2023-10-05T16:49:29Z"
}
}
]
},
"message": "Data retrieved successfully",
"statusCode": 200
}
Error Code
Error Code | Description |
---|---|
400 | The request parameters are invalid. |
401 | Authentication failed due to an invalid API key. |
500 | An error occurred on the server side. |
Updated about 1 month ago