Localytics Campaigns And Audience API (2.0.0)

Download OpenAPI specification:

Localytics is an enterprise-grade mobile intelligence platform for real-time analytics, personalized marketing, and customer lifecycle optimization.

  • Campaign Functionality - The platform supports comprehensive campaign creation and management through this API, enabling flexible configuration of goal, scheduling, and target audience.

    • Enables full campaign scheduling with A/B testing via multiple creatives, control-group weights, and advanced scheduling and delivery controls.

    • Upload creative assets (HTML/Javascript/CSS assets) via API for the supporting channels (In-App, Inbox)

    • Associate creatives with campaigns using standard formatting options from dashboard.

    • Supported channels: Push, Unified Push (one Android app and one iOS app), and In-App Messaging

Push Campaigns

Requests relating to push-channel campaigns

Create a new push campaign with the given parameters. Note that campaigns with `active` status will be sent to end users upon the configured schedule with no further confirmation.

Authorizations:
BasicAuth
path Parameters
org_id
required
integer

The organization id found in your Dashboard containing your app.

app_id
required
string

The App Key which will receive this message, which can be found under the settings page of your Dashboard.

Request Body schema: application/json
required

Provide the campaign details name, status, conversion attributes, goal, creative_attributes, audiences target_rules, schedule details etc

name
required
string

Give any campaign name.

status
required
string
Enum: "active" "draft"
goal
required
string
Enum: "activate" "drive_behavior" "nurture" "monetize" "reengage" "notify"
object (conversion_event_params)

Optional object for campaign performance tracking based upon whether receiving users later trigger this event. If undefined, then this campaign will disable conversion tracking.

required
object or object or object
required
object or object or object or object (Schedule)
required
object (CreativesAttributes)

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "status": "active",
  • "goal": "activate",
  • "conversion_event": {
    },
  • "audiences": {
    },
  • "schedule": {
    },
  • "creatives": {}
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "status": "active",
  • "goal": "activate",
  • "conversion_event": {
    },
  • "audiences": {
    },
  • "schedule": {
    },
  • "creatives": {
    }
}

Get the push campaign's audience, creatives, schedule details.

Authorizations:
BasicAuth
path Parameters
org_id
required
integer

organization id

app_id
required
string
campaign_id
required
integer

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "status": "active",
  • "goal": "activate",
  • "conversion_event": {
    },
  • "audiences": {
    },
  • "schedule": {
    },
  • "creatives": {
    }
}

Delete the push campaign.

Authorizations:
BasicAuth
path Parameters
org_id
required
integer

organization id

app_id
required
string
campaign_id
required
integer

Responses

Edit a existing campaign with the given parameters. Note that campaigns with `active` status will be sent to end users upon the configured schedule with no further confirmation.

Authorizations:
BasicAuth
path Parameters
org_id
required
integer

The organization id found in your Dashboard containing your app.

app_id
required
string

The App Key which will receive this message, which can be found under the settings page of your Dashboard.

campaign_id
required
integer

Campaign id

Request Body schema: application/json

Provide the campaign details name, status, conversion attributes, goal, creative_attributes, audiences target_rules, schedule details etc.

name
required
string

Give any campaign name.

status
required
string
Enum: "active" "draft"
goal
required
string
Enum: "activate" "drive_behavior" "nurture" "monetize" "reengage" "notify"
object (conversion_event_params)

Optional object for campaign performance tracking based upon whether receiving users later trigger this event. If undefined, then this campaign will disable conversion tracking.

required
object or object or object
required
object or object or object or object (Schedule)
required
object (CreativesAttributes)

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "status": "active",
  • "goal": "activate",
  • "conversion_event": {
    },
  • "audiences": {
    },
  • "schedule": {
    },
  • "creatives": {}
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "status": "active",
  • "goal": "activate",
  • "conversion_event": {
    },
  • "audiences": {
    },
  • "schedule": {
    },
  • "creatives": {
    }
}

Archive the push campaign.

Authorizations:
BasicAuth
path Parameters
org_id
required
integer

organization id

app_id
required
string
campaign_id
required
integer

Responses

Unified Push Campaigns

One campaign for an Android app and an iOS app. The JSON body is the campaign object itself, the same as single-app push. Name, goal, status, link_creatives, and schedule are shared. Each app supplies its own audience, conversion event, and creatives.

Create one unified push campaign for exactly one Android app and one iOS app. Campaigns with `active` status follow the shared schedule with no further confirmation.

Authorizations:
BasicAuth
path Parameters
org_id
required
integer

The organization id found in your Dashboard containing your apps.

app_ids
required
string
Example: 797c89535bfa29a436057a8-278bfc2c-b93c-11e5-cc8d-00d0fea82624,3b7e52f773bb1b0c75e3b64-90530cfa-12fa-11e7-f702-00e020c62c7d

Comma-separated Android app id and iOS app id, for example {android_app_id},{ios_app_id}. Both apps must belong to org_id. The two app_id values in the body must be this same pair.

Request Body schema: application/json
required

Shared campaign fields plus an apps array of length 2. Do not wrap the body in push_campaign.

name
required
string
status
required
string
Enum: "active" "draft"
goal
required
string
Enum: "activate" "drive_behavior" "nurture" "monetize" "reengage" "notify"
link_creatives
required
boolean

true copies push_title, push_message, attachment_url, and ll_deep_link_url across both apps for each creative letter. false allows independent creatives, including different counts. false cannot be changed back to true.

required
object or object or object or object (Schedule)
required
Array of objects (UnifiedPushAppParams) = 2 items

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "status": "active",
  • "goal": "activate",
  • "link_creatives": true,
  • "schedule": {
    },
  • "apps": [
    ]
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "org_id": 0,
  • "name": "string",
  • "goal": "activate",
  • "status": "active",
  • "link_creatives": true,
  • "schedule": {
    },
  • "apps": [
    ]
}

Get the unified push campaign.

Authorizations:
BasicAuth
path Parameters
org_id
required
integer

The organization id found in your Dashboard containing your apps.

app_ids
required
string
Example: 797c89535bfa29a436057a8-278bfc2c-b93c-11e5-cc8d-00d0fea82624,3b7e52f773bb1b0c75e3b64-90530cfa-12fa-11e7-f702-00e020c62c7d

Comma-separated Android app id and iOS app id, for example {android_app_id},{ios_app_id}. Both apps must belong to org_id. The two app_id values in the body must be this same pair.

campaign_id
required
integer

Unified campaign id returned by create.

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "org_id": 0,
  • "name": "string",
  • "goal": "activate",
  • "status": "active",
  • "link_creatives": true,
  • "schedule": {
    },
  • "apps": [
    ]
}

Replace the unified campaign. The body has the same shape as create. link_creatives cannot be turned back on after it has been set to false. Setting status to draft while the campaign is active deactivates both apps.

Authorizations:
BasicAuth
path Parameters
org_id
required
integer

The organization id found in your Dashboard containing your apps.

app_ids
required
string
Example: 797c89535bfa29a436057a8-278bfc2c-b93c-11e5-cc8d-00d0fea82624,3b7e52f773bb1b0c75e3b64-90530cfa-12fa-11e7-f702-00e020c62c7d

Comma-separated Android app id and iOS app id, for example {android_app_id},{ios_app_id}. Both apps must belong to org_id. The two app_id values in the body must be this same pair.

campaign_id
required
integer

Unified campaign id returned by create.

Request Body schema: application/json
required
name
required
string
status
required
string
Enum: "active" "draft"
goal
required
string
Enum: "activate" "drive_behavior" "nurture" "monetize" "reengage" "notify"
link_creatives
required
boolean

true copies push_title, push_message, attachment_url, and ll_deep_link_url across both apps for each creative letter. false allows independent creatives, including different counts. false cannot be changed back to true.

required
object or object or object or object (Schedule)
required
Array of objects (UnifiedPushAppParams) = 2 items

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "status": "active",
  • "goal": "activate",
  • "link_creatives": true,
  • "schedule": {
    },
  • "apps": [
    ]
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "org_id": 0,
  • "name": "string",
  • "goal": "activate",
  • "status": "active",
  • "link_creatives": true,
  • "schedule": {
    },
  • "apps": [
    ]
}

Delete the unified campaign and both app campaigns.

Authorizations:
BasicAuth
path Parameters
org_id
required
integer

The organization id found in your Dashboard containing your apps.

app_ids
required
string
Example: 797c89535bfa29a436057a8-278bfc2c-b93c-11e5-cc8d-00d0fea82624,3b7e52f773bb1b0c75e3b64-90530cfa-12fa-11e7-f702-00e020c62c7d

Comma-separated Android app id and iOS app id, for example {android_app_id},{ios_app_id}. Both apps must belong to org_id. The two app_id values in the body must be this same pair.

campaign_id
required
integer

Unified campaign id returned by create.

Responses

Archive the unified campaign and both app campaigns.

Authorizations:
BasicAuth
path Parameters
org_id
required
integer

The organization id found in your Dashboard containing your apps.

app_ids
required
string
Example: 797c89535bfa29a436057a8-278bfc2c-b93c-11e5-cc8d-00d0fea82624,3b7e52f773bb1b0c75e3b64-90530cfa-12fa-11e7-f702-00e020c62c7d

Comma-separated Android app id and iOS app id, for example {android_app_id},{ios_app_id}. Both apps must belong to org_id. The two app_id values in the body must be this same pair.

campaign_id
required
integer

Unified campaign id returned by create.

Responses

Inapp Campaigns

Requests relating to inapp-channel campaigns

Create a new in-app campaign with the given parameters. Note that campaigns with `active` status will be sent to end users upon the configured schedule with no further confirmation.

Authorizations:
BasicAuth
path Parameters
org_id
required
integer

The organization id found in your Dashboard containing your app.

app_id
required
string

The App Key which will receive this message, which can be found under the settings page of your Dashboard.

Request Body schema: multipart/form-data
required

Provide the campaign details name, status, conversion attributes, goal, creative_attributes, audiences target_rules, schedule details etc

data
required
string

JSON string of the in-app campaign payload. When parsed, the JSON must match the schema InAppCampaignData (see components/schemas/InAppCampaignData).

file_phone_1
string <binary>

Zip/HTML file for phone creative for creative 1

file_tablet_1
string <binary>

Zip/HTML file for tablet creative creative 1

file_phone_2
string <binary>

Zip/HTML for phone creative 2 and so on

file_tablet_2
string <binary>

Zip/HTML for tablet creative 2 and so on

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "status": "active",
  • "goal": "activate",
  • "conversion_event": {
    },
  • "audiences": {
    },
  • "schedule": {
    },
  • "creatives": {
    }
}

Get the Inapp campaign's audience, creatives, schedule details.

Authorizations:
BasicAuth
path Parameters
org_id
required
integer

organization id

app_id
required
string
campaign_id
required
integer

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "status": "active",
  • "goal": "activate",
  • "conversion_event": {
    },
  • "audiences": {
    },
  • "schedule": {
    },
  • "creatives": {
    }
}

Delete the inapp campaign.

Authorizations:
BasicAuth
path Parameters
org_id
required
integer

organization id

app_id
required
string
campaign_id
required
integer

Responses

Edit a existing campaign with the given parameters. Note that campaigns with `active` status will be sent to end users upon the configured schedule with no further confirmation.

Authorizations:
BasicAuth
path Parameters
org_id
required
integer

The organization id found in your Dashboard containing your app.

app_id
required
string

The App Key which will receive this message, which can be found under the settings page of your Dashboard.

campaign_id
required
integer

Campaign id

Request Body schema: multipart/form-data

Provide the campaign details name, status, conversion attributes, goal, creative_attributes, audiences target_rules, schedule details, creative files etc.

data
required
string

JSON string of the in-app campaign payload. When parsed, the JSON must match the schema InAppCampaignData (see components/schemas/InAppCampaignData).

file_phone_1
string <binary>

Zip/HTML file for phone creative for creative 1

file_tablet_1
string <binary>

Zip/HTML file for tablet creative creative 1

file_phone_2
string <binary>

Zip/HTML for phone creative 2 and so on

file_tablet_2
string <binary>

Zip/HTML for tablet creative 2 and so on

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "status": "active",
  • "goal": "activate",
  • "conversion_event": {
    },
  • "audiences": {
    },
  • "schedule": {
    },
  • "creatives": {
    }
}

Archive the inapp campaign.

Authorizations:
BasicAuth
path Parameters
org_id
required
integer

organization id

app_id
required
string
campaign_id
required
integer

Responses

Audiences

Requests relating to audiences

Create a new audience with the given definition.

Authorizations:
BasicAuth
path Parameters
org_id
required
integer

The organization id found in your Dashboard containing your app.

app_id
required
string

The App Key which will receive this message, which can be found under the settings page of your Dashboard.

Request Body schema: application/json
required

Provide the definition rules with behavior and profile conditions.

name
required
string
required
object or object

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "target_rules": {
    }
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "created_at": "string",
  • "target_rules": {
    },
  • "segmentation_count": {
    }
}

Retrieve all audiences for a given app_id

Returns the transformed audience list including profile rules, behavior rules, and segmentation counts.

Authorizations:
BasicAuth
path Parameters
org_id
required
integer

The organization id found in your Dashboard containing your app.

app_id
required
string

The App Key which will receive this message, which can be found under the settings page of your Dashboard.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Calculate size for a single audience id.

Authorizations:
BasicAuth
path Parameters
org_id
required
integer

The organization id found in your Dashboard containing your app.

app_id
required
string

The App Key which will receive this message, which can be found under the settings page of your Dashboard.

audience_id
required
integer

Responses

Response samples

Content type
application/json
{
  • "segmentation_id": 0,
  • "user_count": 0,
  • "has_push": 0,
  • "seen_last_thirty": 0,
  • "last_calculated_on": "2025-11-26T10:34:18Z"
}

Retrieve a specific audience

Returns segmentation metrics and the audience's targeting rules for the given audience ID. Includes counts such as total users, users with push tokens, and users seen in the last 30 days.

Authorizations:
BasicAuth
path Parameters
org_id
required
integer

The organization id found in your Dashboard containing your app.

app_id
required
string

The App Key which will receive this message, which can be found under the settings page of your Dashboard.

audience_id
required
integer

Audience id

Responses

Response samples

Content type
application/json
{
  • "segmentation_id": "string",
  • "user_count": 0,
  • "has_push": 0,
  • "seen_last_thirty": 0,
  • "updated_at": "2019-08-24T14:15:22Z",
  • "target_rules": {
    }
}

Edit a existing audience with the given definition or name.

Authorizations:
BasicAuth
path Parameters
org_id
required
integer

The organization id found in your Dashboard containing your app.

app_id
required
string

The App Key which will receive this message, which can be found under the settings page of your Dashboard.

audience_id
required
integer

Audience id

Request Body schema: application/json

Provide the definition rules with behavior and profile conditions or name.

name
required
string
required
object or object

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "target_rules": {
    }
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "created_at": "string",
  • "target_rules": {
    },
  • "segmentation_count": {
    }
}

Delete the audience.

Authorizations:
BasicAuth
path Parameters
org_id
required
integer

organization id

app_id
required
string
audience_id
required
integer

Audience id

Responses

Campaigns

Requests relating to all channel campaigns

Fetch campaigns (with filters/sort)

Returns a list of campaigns filtered by the given query parameters

Authorizations:
BasicAuth
path Parameters
org_id
required
integer

The organization id found in your Dashboard containing your app.

app_id
required
string

app id value

query Parameters
channel
string
Enum: "push" "in-app" "inbox" "places"

Comma-separated values if multiple channels. Optional filter parameter.

status
string
Enum: "scheduled" "draft" "active" "inactive" "expired" "sent" "test"

Comma-separated values if multiple campaign statuses

sort_by
string
Enum: "created_at" "name"

Column to sort by

sort_order
string
Enum: "asc" "desc"

Order of sorting

per_page
integer

Number of records per API call (100 by default)

recurring
integer
Enum: 0 1 2 3

0: none and both, 1: recurring, 2: only one-time, 3: either recurring OR one-time

is_archived
integer
Enum: 0 1

0: unarchived, 1: archived

page_number
integer

Page number for pagination

Responses

Response samples

Content type
application/json
{
  • "app_id": "string",
  • "records_count": 0,
  • "total_records": 0,
  • "campaigns": [
    ]
}

Search campaigns by keyword

Fetches campaigns by name or ID using a required key param

Authorizations:
BasicAuth
path Parameters
org_id
required
integer

The organization id found in your Dashboard containing your app.

app_id
required
string

app id value

query Parameters
key
required
string

Key to search by name or campaign ID

channel
string
Enum: "push" "in-app" "inbox" "places"

Comma-separated values if multiple channels. Optional filter parameter.

status
string
Enum: "scheduled" "draft" "active" "inactive" "expired" "sent" "test" "error"

Comma-separated values if multiple campaign statuses

sort_by
string
Enum: "created_at" "name"

Column to sort by

sort_order
string
Enum: "asc" "desc"

Order of sorting

per_page
integer

Number of records per API call (100 by default)

recurring
integer
Enum: 0 1 2 3

0: none and both, 1: recurring, 2: only one-time, 3: either recurring OR one-time

is_archived
integer
Enum: 0 1

0: unarchived, 1: archived

page_number
integer

Page number for pagination

Responses

Response samples

Content type
application/json
{
  • "app_id": "string",
  • "records_count": 0,
  • "total_records": 0,
  • "campaigns": [
    ]
}