Skip to main content
POST
Register a Funnels Query

Authorizations

Authorization
string
header
required

Authentication is done via Basic Auth. This requires a base64-encoded string of your credentials in the format username:password.

  • Username: Use your MoEngage workspace ID (also known as the App ID). You can find it in the MoEngage dashboard at Settings > Account > APIs > Workspace ID (earlier app id).
  • Password: Use your Data API Key, which you can find in the MoEngage dashboard at Settings > Account > APIs.

For more information, see Authentication.

Body

application/json

Request body for registering a Funnels analysis query.

type
enum<string>
required

The analysis type. Must be funnel for this endpoint.

Available options:
funnel
events
object[]
required

The ordered steps of the funnel. Include 2 to 10 steps. Each step defines the event and attribute conditions a user must satisfy to be counted at that step.

Required array length: 2 - 10 elements
funnel_type
enum<string>
required

The kind of funnel to compute — user_funnel (standard conversion), event_time_to_convert (time-to-convert distribution between two steps), or user_frequency (frequency distribution of repeated actions between two steps).

Available options:
user_funnel,
event_time_to_convert,
user_frequency
timerange
object
required

The time window the analysis runs over.

version
string

Payload schema version.

Example:

"2.0"

segmentation
object[]

Segments used to scope the analysis to a subset of users. Include up to 5 segments. To analyze all users, pass a single segment with the All Users custom segment.

Maximum array length: 5
grouped_by
object[]

Attributes to split the funnel by. Include up to 3.

Maximum array length: 3
grouped_by_meta
object

Metadata for the grouped_by attributes.

holding_attributes
object[]

Attributes held constant across funnel steps. Include up to 3.

Maximum array length: 3
holding_attributes_meta
object

Metadata for the holding_attributes.

funnel_window
integer

The conversion window in seconds within which users must complete the funnel.

Example:

86400

funnel_window_multiplier
integer

Multiplier applied to the funnel window.

Example:

86400

strict_order
boolean

Whether steps must be performed in the exact order defined.

Example:

false

distribution
object

Distribution configuration for event_time_to_convert and user_frequency funnels. When using custom buckets, include at most 25 buckets. Pass an empty object for a standard funnel.

countType
string

Whether metrics are returned as absolute counts or percentages, such as number.

Example:

"number"

showConversionEventOnly
boolean

Whether to return only the conversion event's metrics.

Example:

false

chart_type
string

Visual representation of the result, such as line, bar, or column.

Example:

"column"

comparison_timerange
object

A second time range to compare against. Time comparison is supported only on line, bar, and column charts, and cannot be combined with custom-segment comparison (2 or more segments). Pass an empty object for no comparison.

granularity
enum<string>

Time bucket for the series — h (hour), d (day), w (week), m (month), or e (entire range). When hourly, the time range must not exceed 31 days.

Available options:
h,
d,
w,
m,
e
Example:

"e"

chart_plot_type
string

Plot scale for the chart, such as linear.

Example:

"linear"

Response

Query registered. Poll status and fetch results with data.request_id.

Acknowledgement that a query was registered. Use data.request_id to poll status and fetch results.

response_id
string

A unique identifier for the response, useful for correlating logs and support requests.

Example:

"fc803857-632e-4bf0-8df1-fbc2bdeedb66"

type
string

The analysis type echoed back for the registered query.

data
object