API limits

General limitations

  • You may use up to 200 distinct user attribute names per app.
  • You may use up to 500 event names per app.
  • You may use up to 500 state names per app.
  • You may use up to 200 distinct parameter names across all events and states per app.
  • You may have up to 1500 events per session.
  • You may have up to 1500 states per session.
  • By default, apps cannot use the API to send us historical data. Contact us if you need to do so.

Naming rules for events, states, user attributes, and parameters:

  • Length must be greater than 0 and less than 140 characters.
  • Must not start with a period (.) or hyphen (-).
  • Must not end with a forward slash (/).
  • Must not contain commas (,), vertical pipes (|), double quotes ("), tabs, newlines, or return characters.
  • Must not be numeric.
  • Naming rules for variables and message arguments:
  • Dots within names (.) indicate grouping. Objective-C macros use _ instead of .
  • Dots, square brackets, parentheses, and backslashes [].()\ that should appear in the name must be escaped with a leading backslash. Dots used for grouping should not be escaped.

User IDs and device IDs must be at most 400 characters.

Method-specific limits

Method Limitations clientkey

multi: Batches multiple API actions within a single request to the API.  

 

multi (import): Imports a CSV file with API actions to be executed.

Limited to 50 users and/or 500 actions in a single call. All calls in a batch with more than this will be ignored and the server will return a 403 status. Batches multiple API actions within a single request to the API. Each unique user lookup in a request is a billable API call.

 For multi imports, there is a 256MB limit for the CSV. Each unique user lookup in a batch is a billable API call

production

 

development

downloadFile: Redirects to a file from Content Management. Must be the only API method in a batch. production
heartbeat: Indicates that the current session is still in progress, so not to automatically end it. Sessions automatically time out after two hours of inactivity in the open app, or 30 minutes of inactivity if the session was paused first.  production
setDeviceAttributes: Sets attributes for the current device.

 At least one of the following must be set to create/update a device: appVersionsystemNamesystemVersion,
 browserName,  browserVersiondeviceNamedeviceModel
iosPushTokengcmRegistrationId, or webPushSubscription.

production
deleteUser: Permanently removes a user from our database. This does not remove the user's activity from analytics. If you want to bulk delete users, use multi (import mode) or contact your CSM. This method requires your development API clientKey.  development
uploadFile: Uploads up to 16 files or 50 MB at a time to use in the Leanplum content management system. Uploads up to 16 files or 50 MB at a time to use in Leanplum’s filepicker. (Uploads up to 16 files or 50 MB at a time to use in the Leanplum content management system.)  development
deleteAndroidNotificationChannel: Permanently removes an Android notification channel from Leanplum. Cannot delete default channel. To delete the default, mark another channel as default first.  development
exportData: Exports raw data to downloadable files. Data is split into roughly 256 MB files, and is not necessarily ordered. Exports can be made in JSON or CSV format. Data becomes available to export every 2 hours, and only for complete sessions. You cannot export data that has become available more than 60 days ago. You may only export data 24 times per day. Exports with invalid arguments do not count towards this limit.  data export
exportReport: Exports statistics for an A/B test, message, bookmarked report, or user activity in your app (as in the Analytics tab of the dashboard) over a specified period of time. Report data becomes available to export every 2 hours, and only for complete sessions. You may only export report data 100 times per day per app. Exports with invalid arguments do not count towards the limit.  data export
 exportUsers: Exports multiple user IDs. This may be executed up to 10 times successfully per day. data export
 addPostback: Adds a postback rule to be triggered on incoming data. The maximum number of postbacks allowed is three.  data export 

 


Was this article helpful?
Have more questions? Submit a request