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 Messaging
| 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. |
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 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) |
{- "name": "string",
- "status": "active",
- "goal": "activate",
- "conversion_event": {
- "event_name": "string",
- "conversion_attributes": {
- "filters": [
- {
- "dimension_name": "App Version",
- "operator": "is_one_of",
- "value": "string"
}
], - "operator": "and"
}
}, - "audiences": {
- "campaign_type": "everyone",
- "control_group_percent": 5,
- "target_rules": {
- "behavior_profile_operator": "or",
- "targeting_type": "install_id",
- "behavior": {
- "days": 30,
- "behavior_rule_operator": "and",
- "rules": [
- {
- "count": 1,
- "count_operator": "less_than",
- "event_name": "string",
- "rule_type": "not-event",
- "conditions": {
- "filters": [
- {
- "dimension_name": "App Version",
- "operator": "is one of",
- "value": "string"
}
], - "operator": "or"
}, - "neg_time_window": [
- 0,
- 15
]
}
]
}, - "profile": {
- "criteria": [
- {
- "key": "string",
- "scope": "app",
- "date_type": "date",
- "operator": "is defined",
- "values": [
- "string"
]
}
], - "operator": "and"
}
}
}, - "schedule": {
- "begin_immediately": {
- "push_throttle_num_msgs": 0
}, - "on_schedule": {
- "begin_date": "2025-08-26T04:30:00.000Z",
- "starting_time_zone_id": 0,
- "push_throttle_num_msgs": 0
}, - "recurring": {
- "begin_date": "2025-08-26T04:30:00.000Z",
- "end_date": "2025-08-26T04:30:00.000Z",
- "starting_time_zone_id": 0,
- "push_throttle_num_msgs": 0,
- "frequency_attributes": [
- {
- "name": "messages_per_days",
- "days": 0,
- "count": 0,
- "messages_atleast_days_apart": 0
}
], - "intervals": [
- {
- "interval": "weekly",
- "day_of_week": "sunday",
- "on_day": 0
}
]
}, - "optimized": {
- "fallback_time": "2025-08-26T04:30:00.000Z"
}
}, - "creatives": {
- "title": "string",
- "percent": 0,
- "key_values": [
- {
- "key": "string",
- "value": "string"
}
], - "build_attributes": {
- "push_message": "string",
- "push_title": "string",
- "push_subtitle": "string",
- "push_category": "like_dislike",
- "ll_deep_link_url": "yourappname://product/12345?color=red&size=large",
- "sound": "string"
}
}
}{- "id": 0,
- "name": "string",
- "status": "active",
- "goal": "activate",
- "conversion_event": {
- "event_name": "string",
- "conversion_attributes": {
- "filters": [
- {
- "dimension_name": "App Version",
- "operator": "is_one_of",
- "value": "string"
}
], - "operator": "and"
}
}, - "audiences": {
- "campaign_type": "everyone",
- "control_group_percent": 5,
- "target_rules": {
- "behavior_profile_operator": "or",
- "targeting_type": "install_id",
- "behavior": {
- "days": 30,
- "behavior_rule_operator": "and",
- "rules": [
- {
- "count": 1,
- "count_operator": "less_than",
- "event_name": "string",
- "rule_type": "not-event",
- "conditions": {
- "filters": [
- {
- "dimension_name": "App Version",
- "operator": "is one of",
- "value": "string"
}
], - "operator": "or"
}, - "neg_time_window": [
- 0,
- 15
]
}
]
}, - "profile": {
- "criteria": [
- {
- "key": "string",
- "scope": "app",
- "date_type": "date",
- "operator": "is defined",
- "values": [
- "string"
]
}
], - "operator": "and"
}
}
}, - "schedule": {
- "begin_immediately": {
- "push_throttle_num_msgs": 0
}, - "on_schedule": {
- "begin_date": "2025-08-26T04:30:00.000Z",
- "starting_time_zone_id": 0,
- "push_throttle_num_msgs": 0
}, - "recurring": {
- "begin_date": "2025-08-26T04:30:00.000Z",
- "end_date": "2025-08-26T04:30:00.000Z",
- "starting_time_zone_id": 0,
- "push_throttle_num_msgs": 0,
- "frequency_attributes": [
- {
- "name": "messages_per_days",
- "days": 0,
- "count": 0,
- "messages_atleast_days_apart": 0
}
], - "intervals": [
- {
- "interval": "weekly",
- "interval_start": "2025-08-26T04:30:00.000Z",
- "day_of_week": "sunday",
- "on_day": 0
}
]
}, - "optimized": {
- "fallback_time": "2025-08-26T04:30:00.000Z"
}
}, - "creatives": {
- "id": 0,
- "letter": "A",
- "title": "string",
- "percent": 0,
- "key_values": [
- {
- "key": "string",
- "value": "string"
}
], - "build_attributes": {
- "push_message": "string",
- "push_title": "string",
- "push_subtitle": "string",
- "push_category": "like_dislike",
- "ll_deep_link_url": "yourappname://product/12345?color=red&size=large",
- "sound": "string"
}
}
}| org_id required | integer organization id |
| app_id required | string |
| campaign_id required | integer |
{- "id": 0,
- "name": "string",
- "status": "active",
- "goal": "activate",
- "conversion_event": {
- "event_name": "string",
- "conversion_attributes": {
- "filters": [
- {
- "dimension_name": "App Version",
- "operator": "is_one_of",
- "value": "string"
}
], - "operator": "and"
}
}, - "audiences": {
- "campaign_type": "everyone",
- "control_group_percent": 5,
- "target_rules": {
- "behavior_profile_operator": "or",
- "targeting_type": "install_id",
- "behavior": {
- "days": 30,
- "behavior_rule_operator": "and",
- "rules": [
- {
- "count": 1,
- "count_operator": "less_than",
- "event_name": "string",
- "rule_type": "not-event",
- "conditions": {
- "filters": [
- {
- "dimension_name": "App Version",
- "operator": "is one of",
- "value": "string"
}
], - "operator": "or"
}, - "neg_time_window": [
- 0,
- 15
]
}
]
}, - "profile": {
- "criteria": [
- {
- "key": "string",
- "scope": "app",
- "date_type": "date",
- "operator": "is defined",
- "values": [
- "string"
]
}
], - "operator": "and"
}
}
}, - "schedule": {
- "begin_immediately": {
- "push_throttle_num_msgs": 0
}, - "on_schedule": {
- "begin_date": "2025-08-26T04:30:00.000Z",
- "starting_time_zone_id": 0,
- "push_throttle_num_msgs": 0
}, - "recurring": {
- "begin_date": "2025-08-26T04:30:00.000Z",
- "end_date": "2025-08-26T04:30:00.000Z",
- "starting_time_zone_id": 0,
- "push_throttle_num_msgs": 0,
- "frequency_attributes": [
- {
- "name": "messages_per_days",
- "days": 0,
- "count": 0,
- "messages_atleast_days_apart": 0
}
], - "intervals": [
- {
- "interval": "weekly",
- "interval_start": "2025-08-26T04:30:00.000Z",
- "day_of_week": "sunday",
- "on_day": 0
}
]
}, - "optimized": {
- "fallback_time": "2025-08-26T04:30:00.000Z"
}
}, - "creatives": {
- "id": 0,
- "letter": "A",
- "title": "string",
- "percent": 0,
- "key_values": [
- {
- "key": "string",
- "value": "string"
}
], - "build_attributes": {
- "push_message": "string",
- "push_title": "string",
- "push_subtitle": "string",
- "push_category": "like_dislike",
- "ll_deep_link_url": "yourappname://product/12345?color=red&size=large",
- "sound": "string"
}
}
}| 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 |
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 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) |
{- "name": "string",
- "status": "active",
- "goal": "activate",
- "conversion_event": {
- "event_name": "string",
- "conversion_attributes": {
- "filters": [
- {
- "dimension_name": "App Version",
- "operator": "is_one_of",
- "value": "string"
}
], - "operator": "and"
}
}, - "audiences": {
- "campaign_type": "everyone",
- "control_group_percent": 5,
- "target_rules": {
- "behavior_profile_operator": "or",
- "targeting_type": "install_id",
- "behavior": {
- "days": 30,
- "behavior_rule_operator": "and",
- "rules": [
- {
- "count": 1,
- "count_operator": "less_than",
- "event_name": "string",
- "rule_type": "not-event",
- "conditions": {
- "filters": [
- {
- "dimension_name": "App Version",
- "operator": "is one of",
- "value": "string"
}
], - "operator": "or"
}, - "neg_time_window": [
- 0,
- 15
]
}
]
}, - "profile": {
- "criteria": [
- {
- "key": "string",
- "scope": "app",
- "date_type": "date",
- "operator": "is defined",
- "values": [
- "string"
]
}
], - "operator": "and"
}
}
}, - "schedule": {
- "begin_immediately": {
- "push_throttle_num_msgs": 0
}, - "on_schedule": {
- "begin_date": "2025-08-26T04:30:00.000Z",
- "starting_time_zone_id": 0,
- "push_throttle_num_msgs": 0
}, - "recurring": {
- "begin_date": "2025-08-26T04:30:00.000Z",
- "end_date": "2025-08-26T04:30:00.000Z",
- "starting_time_zone_id": 0,
- "push_throttle_num_msgs": 0,
- "frequency_attributes": [
- {
- "name": "messages_per_days",
- "days": 0,
- "count": 0,
- "messages_atleast_days_apart": 0
}
], - "intervals": [
- {
- "interval": "weekly",
- "day_of_week": "sunday",
- "on_day": 0
}
]
}, - "optimized": {
- "fallback_time": "2025-08-26T04:30:00.000Z"
}
}, - "creatives": {
- "title": "string",
- "percent": 0,
- "key_values": [
- {
- "key": "string",
- "value": "string"
}
], - "build_attributes": {
- "push_message": "string",
- "push_title": "string",
- "push_subtitle": "string",
- "push_category": "like_dislike",
- "ll_deep_link_url": "yourappname://product/12345?color=red&size=large",
- "sound": "string"
}
}
}{- "id": 0,
- "name": "string",
- "status": "active",
- "goal": "activate",
- "conversion_event": {
- "event_name": "string",
- "conversion_attributes": {
- "filters": [
- {
- "dimension_name": "App Version",
- "operator": "is_one_of",
- "value": "string"
}
], - "operator": "and"
}
}, - "audiences": {
- "campaign_type": "everyone",
- "control_group_percent": 5,
- "target_rules": {
- "behavior_profile_operator": "or",
- "targeting_type": "install_id",
- "behavior": {
- "days": 30,
- "behavior_rule_operator": "and",
- "rules": [
- {
- "count": 1,
- "count_operator": "less_than",
- "event_name": "string",
- "rule_type": "not-event",
- "conditions": {
- "filters": [
- {
- "dimension_name": "App Version",
- "operator": "is one of",
- "value": "string"
}
], - "operator": "or"
}, - "neg_time_window": [
- 0,
- 15
]
}
]
}, - "profile": {
- "criteria": [
- {
- "key": "string",
- "scope": "app",
- "date_type": "date",
- "operator": "is defined",
- "values": [
- "string"
]
}
], - "operator": "and"
}
}
}, - "schedule": {
- "begin_immediately": {
- "push_throttle_num_msgs": 0
}, - "on_schedule": {
- "begin_date": "2025-08-26T04:30:00.000Z",
- "starting_time_zone_id": 0,
- "push_throttle_num_msgs": 0
}, - "recurring": {
- "begin_date": "2025-08-26T04:30:00.000Z",
- "end_date": "2025-08-26T04:30:00.000Z",
- "starting_time_zone_id": 0,
- "push_throttle_num_msgs": 0,
- "frequency_attributes": [
- {
- "name": "messages_per_days",
- "days": 0,
- "count": 0,
- "messages_atleast_days_apart": 0
}
], - "intervals": [
- {
- "interval": "weekly",
- "interval_start": "2025-08-26T04:30:00.000Z",
- "day_of_week": "sunday",
- "on_day": 0
}
]
}, - "optimized": {
- "fallback_time": "2025-08-26T04:30:00.000Z"
}
}, - "creatives": {
- "id": 0,
- "letter": "A",
- "title": "string",
- "percent": 0,
- "key_values": [
- {
- "key": "string",
- "value": "string"
}
], - "build_attributes": {
- "push_message": "string",
- "push_title": "string",
- "push_subtitle": "string",
- "push_category": "like_dislike",
- "ll_deep_link_url": "yourappname://product/12345?color=red&size=large",
- "sound": "string"
}
}
}| 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. |
Provide the definition rules with behavior and profile conditions.
| name required | string |
required | object or object |
{- "name": "string",
- "target_rules": {
- "behavior_profile_operator": "or",
- "targeting_type": "install_id",
- "behavior": {
- "days": 30,
- "behavior_rule_operator": "and",
- "rules": [
- {
- "count": 1,
- "count_operator": "less_than",
- "event_name": "string",
- "rule_type": "not-event",
- "conditions": {
- "filters": [
- {
- "dimension_name": "App Version",
- "operator": "is one of",
- "value": "string"
}
], - "operator": "or"
}, - "neg_time_window": [
- 0,
- 15
]
}
]
}, - "profile": {
- "criteria": [
- {
- "key": "string",
- "scope": "app",
- "date_type": "date",
- "operator": "is defined",
- "values": [
- "string"
]
}
], - "operator": "and"
}
}
}{- "id": 0,
- "name": "string",
- "created_at": "string",
- "target_rules": {
- "behavior_profile_operator": "or",
- "targeting_type": "install_id",
- "behavior": {
- "days": 30,
- "behavior_rule_operator": "and",
- "rules": [
- {
- "count": 1,
- "count_operator": "less_than",
- "event_name": "string",
- "rule_type": "not-event",
- "conditions": {
- "filters": [
- {
- "dimension_name": "App Version",
- "operator": "is one of",
- "value": "string"
}
], - "operator": "or"
}, - "neg_time_window": [
- 0,
- 15
]
}
]
}, - "profile": {
- "criteria": [
- {
- "key": "string",
- "scope": "app",
- "date_type": "date",
- "operator": "is defined",
- "values": [
- "string"
]
}
], - "operator": "and"
}
}, - "segmentation_count": {
- "user_count": 0,
- "has_push": 0,
- "seen_last_thirty": 0
}
}Returns the transformed audience list including profile rules, behavior rules, and segmentation counts.
| 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. |
[- {
- "id": 0,
- "name": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "deleted_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "target_rules": {
- "profile": {
- "criteria": [
- {
- "key": "string",
- "values": [
- "string"
], - "operator": "is one of"
}
], - "operator": "and"
}, - "behavior": {
- "days": 0,
- "behavior_rule_operator": "and",
- "rules": [
- {
- "count": 0,
- "count_operator": "less_than",
- "event_name": "string",
- "conditions": {
- "filters": [
- {
- "dimension_name": "string",
- "operator": "is one of",
- "value": "string"
}
], - "operator": "and"
}, - "neg_time_window": [
- 0
]
}
]
}, - "behavior_profile_operator": "and",
- "targeting_type": "install_id"
}, - "segmentation_count": {
- "user_count": 0,
- "has_push": 0,
- "seen_last_thirty": 0,
- "updated_at": "2019-08-24T14:15:22Z"
}
}
]| 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 |
{- "segmentation_id": 0,
- "user_count": 0,
- "has_push": 0,
- "seen_last_thirty": 0,
- "last_calculated_on": "2025-11-26T10:34:18Z"
}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.
| 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 |
{- "segmentation_id": "string",
- "user_count": 0,
- "has_push": 0,
- "seen_last_thirty": 0,
- "updated_at": "2019-08-24T14:15:22Z",
- "target_rules": {
- "profile": {
- "criteria": [
- {
- "key": "string",
- "values": [
- "string"
], - "operator": "is one of"
}
], - "operator": "and"
}, - "behavior": {
- "days": 0,
- "behavior_rule_operator": "and",
- "rules": [
- {
- "count": 0,
- "count_operator": "less_than",
- "event_name": "string",
- "conditions": {
- "filters": [
- {
- "dimension_name": "string",
- "operator": "is one of",
- "value": "string"
}
], - "operator": "and"
}, - "neg_time_window": [
- 0
]
}
]
}, - "behavior_profile_operator": "and",
- "targeting_type": "install_id"
}
}| 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 |
Provide the definition rules with behavior and profile conditions or name.
| name required | string |
required | object or object |
{- "name": "string",
- "target_rules": {
- "behavior_profile_operator": "or",
- "targeting_type": "install_id",
- "behavior": {
- "days": 30,
- "behavior_rule_operator": "and",
- "rules": [
- {
- "count": 1,
- "count_operator": "less_than",
- "event_name": "string",
- "rule_type": "not-event",
- "conditions": {
- "filters": [
- {
- "dimension_name": "App Version",
- "operator": "is one of",
- "value": "string"
}
], - "operator": "or"
}, - "neg_time_window": [
- 0,
- 15
]
}
]
}, - "profile": {
- "criteria": [
- {
- "key": "string",
- "scope": "app",
- "date_type": "date",
- "operator": "is defined",
- "values": [
- "string"
]
}
], - "operator": "and"
}
}
}{- "id": 0,
- "name": "string",
- "created_at": "string",
- "target_rules": {
- "behavior_profile_operator": "or",
- "targeting_type": "install_id",
- "behavior": {
- "days": 30,
- "behavior_rule_operator": "and",
- "rules": [
- {
- "count": 1,
- "count_operator": "less_than",
- "event_name": "string",
- "rule_type": "not-event",
- "conditions": {
- "filters": [
- {
- "dimension_name": "App Version",
- "operator": "is one of",
- "value": "string"
}
], - "operator": "or"
}, - "neg_time_window": [
- 0,
- 15
]
}
]
}, - "profile": {
- "criteria": [
- {
- "key": "string",
- "scope": "app",
- "date_type": "date",
- "operator": "is defined",
- "values": [
- "string"
]
}
], - "operator": "and"
}
}, - "segmentation_count": {
- "user_count": 0,
- "has_push": 0,
- "seen_last_thirty": 0
}
}Returns a list of campaigns filtered by the given query parameters
| org_id required | integer The organization id found in your Dashboard containing your app. |
| app_id required | string app id value |
| 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 |
{- "app_id": "string",
- "records_count": 0,
- "total_records": 0,
- "campaigns": [
- {
- "id": 0,
- "name": "string",
- "message_type": "string",
- "platform": "string",
- "send_local_tz": 0,
- "recurring": 0,
- "begin_date": "2019-08-24T14:15:22Z",
- "end_date": "2019-08-24T14:15:22Z",
- "status": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "sends": 0,
- "open_rate": "10.4%"
}
]
}Fetches campaigns by name or ID using a required key param
| org_id required | integer The organization id found in your Dashboard containing your app. |
| app_id required | string app id value |
| 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 |
{- "app_id": "string",
- "records_count": 0,
- "total_records": 0,
- "campaigns": [
- {
- "id": 0,
- "name": "string",
- "message_type": "string",
- "platform": "string",
- "send_local_tz": 0,
- "recurring": 0,
- "begin_date": "2019-08-24T14:15:22Z",
- "end_date": "2019-08-24T14:15:22Z",
- "status": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "sends": 0,
- "open_rate": "10.4%"
}
]
}