Skip to main content
POST

Rate Limit

The rate limits are at the workspace level. A maximum of 5 requests per second, 20 requests per minute, and 250 requests per hour are allowed per workspace.

承認

Authorization
string
header
必須

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). Find it in the MoEngage dashboard at Settings > Account > API keys.
  • Password: Use an API key from Settings > Account > API keys.

Refer to API Key Dashboard for details on creating and managing API keys.

ボディ

application/json

Request body for registering a Funnels analysis query.

version
string
必須

Payload schema version.

例:

"2.0"

type
enum<string>
必須

The analysis type. Must be funnel for this endpoint.

利用可能なオプション:
funnel
events
object[]
必須

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
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
funnel_type
enum<string>
必須

The kind of funnel to compute. The user_ values count unique users and the event_ values count all occurrences — user_funnel and event_funnel (standard conversion), user_time_to_convert and event_time_to_convert (time-to-convert distribution between two steps), and user_frequency and event_frequency (frequency distribution of repeated actions between two steps).

利用可能なオプション:
user_funnel,
event_funnel,
user_time_to_convert,
event_time_to_convert,
user_frequency,
event_frequency
grouped_by
object[]
必須

Event attributes to split the funnel by. Include up to 3. Each item names the attribute to split on.

Maximum array length: 3
例:
grouped_by_meta
object
必須

Describes how each grouped_by attribute is applied across the funnel — for example, to all steps, to the first N steps, or to a specific step. Keys correspond to the attributes in grouped_by. Pass an empty object when grouped_by is empty.

例:
holding_attributes
object[]
必須

Event attributes that must hold the same value across funnel steps, so only users who kept that value are counted as converted. Include up to 3.

Maximum array length: 3
例:
holding_attributes_meta
object
必須

Describes how each holding attribute is applied across the funnel steps. Keys correspond to the attributes in holding_attributes. Pass an empty object when holding_attributes is empty.

例:
funnel_window
integer
必須

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

例:

86400

funnel_window_multiplier
integer
必須

Multiplier applied to the funnel window.

例:

86400

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.

例:
chart_type
enum<string>
必須

Visual representation of the result.

利用可能なオプション:
line,
area,
bar,
column,
euler,
pie
例:

"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.

例:
timerange
object
必須

The time window the analysis runs over.

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.

利用可能なオプション:
h,
d,
w,
m,
e
例:

"e"

strict_order
boolean

Whether steps must be performed in the exact order defined.

例:

false

countType
enum<string>

Whether metrics are returned as absolute counts (number) or as percentages (percentage).

利用可能なオプション:
number,
percentage
例:

"number"

showConversionEventOnly
boolean

Whether to return only the conversion event's metrics.

例:

false

chart_plot_type
enum<string>

Plot scale applied to the chart.

利用可能なオプション:
linear,
logarithmic,
cumulative,
rolling_sum,
rolling_avg,
rolling_window
例:

"linear"

レスポンス

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.

例:

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

type
string

The analysis type echoed back for the registered query.

data
object