Get Campaign API
Learn to retrieve specific email campaign with Get Campaign API.
This API allows you to retrieve details of specific email campaigns from the Netcore CE platform. This supports filtering campaigns based on various parameters such as campaign states, IDs, and pagination options.
Good to Know
We have updated this API to include Preheader and Deduplication support.
HTTP Method
This API uses the POST method to fetch existing email campaigns.
API Endpoint
The Get 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/get |
| United States | https://api.netcoresmartech.com/v4/campaign/get |
| Europe | https://apieu.netcoresmartech.com/v4/campaign/get |
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[String] | List of channels to filter the campaigns. | Yes |
campaign_ids | Array[Integer] | The campaign ID to retrieve details for specific campaigns. If not provided, campaign matching other filters are retreived. | No |
Example Request Body
{
"channel": [
"email"
],
"campaign_ids": [
416
]
}
Responses
Newly Added Fields
| Field | Type | Description | Required | Example |
|---|---|---|---|---|
preheader | String | The preheader is the short summary text displayed below the subject line in most email clients. It provides a preview of the email content to improve open rates. Supports personalisation tokens (for example, [FIRSTNAME]). | No (Optional) | "preheader": "Added preheader [FIRSTNAME]" |
deduplication | Object | Controls whether duplicate messages are suppressed when a contact appears multiple times in the audience list. Deduplication only takes effect when the panel's primary key is not set to EMAIL. | No (Optional) | "deduplication": { "enable_deduplication": true } |
enable_deduplication | Boolean | Enables or disables duplicate suppression for campaign sends. | No (Optional) | "enable_deduplication": false / "enable_deduplication": true |
200 OK
Successful response containing the details of the requested campaigns.
Example Response
{
"data": {
"campaign_details": [
{
"tags": [
"apiCampaign"
],
"campaign_id": 416,
"campaign_name": "salesTest1",
"schedule_time": "2024-02-20T09:18:15Z",
"campaign_state": "draft",
"sender_details": {
"sender_name": "Salestest1",
"sender_email": "[email protected]"
},
"content_details": {
"template_id": 132,
"subject_line": "SalesTest1",
"content_source_url": "",
"preheader": "Added preheader [FIRSTNAME]"
},
"audience_details": {
"limit": 100,
"exclude_list": {
"seg_ids": [
"9",
"37"
],
"list_ids": [
"81"
]
},
"include_list": {
"udt_id": 0,
"seg_ids": [
"13",
"25",
"36",
"56"
],
"list_ids": [
"91"
],
"contact_master": false
}
},
"callback_details": {
"body": null,
"header": null,
"method": "",
"endpoint": ""
},
"frequence_capping": {
"enable_frequency_capping": false
},
"deduplication": {
"enable_deduplication": false
},
"created_by_details": {
"time": "2024-02-21T08:13:00Z"
},
"last_modifield_by_details": {
"time": "2024-02-21T08:13:00Z"
}
}
]
},
"message": "All 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 15 days ago
