Get Campaigns


The Get Campaigns API lets you get a list of campaigns created using the API.

Base URL

Here is an example base URL from the account in the India region:


Refer Region for more details.

HTTP Method



Refer Headers for more details.

Body Parameters

The body is uploaded as a JSON payload.
Will return campaigns which have start time between the the date range.

ParameterDescriptionTypeExample Value
fromStart of date range for events needed. Value specified in format YYYYMMDD.int20171201
toEnd of date range for events needed. Value specified in format YYYYMMDD.int20171225

Below is an example payload.

    "from": 20160101,
    "to": 20160101

Example Request

Here is an example cURL request to the Get Campaigns API showing the headers needed to authenticate the request from the account in the India region:

curl -X POST -d '{"from": 20160101,"to": 20160101}' "" \
-H "X-CleverTap-Account-Id: ACCOUNT_ID" \
-H "X-CleverTap-Passcode: PASSCODE" \
-H "Content-Type: application/json"
require 'net/http'
require 'uri'
require 'json'

uri = URI.parse("")
request =
request.content_type = "application/json"
request["X-Clevertap-Account-Id"] = "ACCOUNT_ID"
request["X-Clevertap-Passcode"] = "PASSCODE"
request.body = JSON.dump({
  "from" => 20160101,
  "to" => 20160101

req_options = {
  use_ssl: uri.scheme == "https",

response = Net::HTTP.start(uri.hostname, uri.port, req_options) do |http|
import requests

headers = {
    'X-CleverTap-Account-Id': 'ACCOUNT_ID',
    'X-CleverTap-Passcode': 'PASSCODE',
    'Content-Type': 'application/json',

data = '{"from": 20160101,"to": 20160101}'

response ='', headers=headers, data=data)
$headers = array(
    'X-CleverTap-Account-Id' => 'ACCOUNT_ID',
    'X-CleverTap-Passcode' => 'PASSCODE',
    'Content-Type' => 'application/json'
$data = '{"from": 20160101,"to": 20160101}';
$response = Requests::post('', $headers, $data);
var request = require('request');

var headers = {
    'X-CleverTap-Account-Id': 'ACCOUNT_ID',
    'X-CleverTap-Passcode': 'PASSCODE',
    'Content-Type': 'application/json'

var dataString = '{"from": 20160101,"to": 20160101}';

var options = {
    url: '',
    method: 'POST',
    headers: headers,
    body: dataString

function callback(error, response, body) {
    if (!error && response.statusCode == 200) {

request(options, callback);

Example Response

    "status": "success",
    "targets": [
            "id": 1457429935,
            "name": "My API Campaign",
            "scheduled_on": 201703081508,
            "status": "pending"
            "id": 1457432766,
            "name": "My API Campaign 2",
            "scheduled_on": 201603081556,
            "status": "completed"

For more information on request limit, refer to API Request Limit. To understand the common queries and concerns related to CleverTap APIs, refer to API FAQs.