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:

Request Headers

Authentication details are required to access the API. Ensure you include the necessary tokens or credentials in your request headers.

Header NameTypeDescriptionExampleRequired?
api-keyStringAPI key for authentication41a1de35948f915f64907ced9eed4f00Yes

Request Body

All necessary parameters should be passed in the request body in JSON format.

ParameterData TypeDescriptionRequired?
channelArray of StringList of channels to filter the campaigns. For example: EmailNo
campaign_statesArray of StringList of campaign states to filter. Available options: draft, active, scheduled, running, sent, and suspended.No
campaign_idsArray of IntegerList of campaign IDs to be filtered as part of responseNo
page_sizeIntegerNumber of campaigns to be sent per list API responseYes
page_noIntegerPage number indicates the the page sequence for the responseYes

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 CodeDescription
400The request parameters are invalid.
401Authentication failed due to an invalid API key.
500An error occurred on the server side.