/i/cohorts/add

Create new cohort

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

Create new cohort with provided steps and returns cohort id

Steps are objects describing conditions user must meet to enter the cohort.
Each step must contain:

  • event - event key to define which event user should have or should have not done
  • type - type of action, which is a string of "did" or "didnot" do event
  • period - amount of last days to check, "1days", "2days", "3days", "ndays", or "all" for all time
  • query - JSON encoded mongodb string to query drill documents, same as drill query

You may use countly internal events as event keys too, such as:

  • [CLY]_session for sessions
  • [CLY]_crash for crahses
  • [CLY]_view for views
  • [CLY]_action for actions
  • [CLY]_push_action for actions performed on push notifications
Query Params
string

API_KEY of user, with permission to access this app

string

ID of the app for which to query

string
required

Cohort name

string
required

JSON encoded array of objects describing cohort steps

string

(optional) name of callback function for JSONP output

Response

Language
LoadingLoading…
Response
Choose an example:
application/json