Amplitude

App · Analytics · 20 actions

Send events and user properties to Amplitude, query your product metrics, and annotate the charts.

Actions

ActionWhat it does
Create annotationMark a date on every Amplitude chart with a label, so a release, an outage or a campaign shows up next to its effect on the numbers.
Delete annotationRemove a chart annotation for good.
Get active usersCount active or new users per day, week or month, optionally broken down by a property.
Get annotationRead one chart annotation by its id: its label, details, dates, category and the chart it belongs to.
Get average session lengthRead the average length of a session, in seconds, for each day in the window.
Get average sessions per userRead how many sessions the average user starts each day.
Get event segmentationCount how often an event happens over time - unique users, total events, share of daily active users, or average per user - optionally broken down by a property.
Get funnel analysisMeasure how many users get from one event to the next through a sequence of steps, and where they drop off.
Get real-time active usersRead how many users are active right now, minute by minute, with yesterday alongside for comparison.
Get retention analysisMeasure how many users come back after a starting action, day by day, week by week or month by month.
Get revenue lifetime valueRead revenue per user over their lifetime: average revenue per user, per paying user, total revenue, or the number of paying users.
Get session length distributionRead how session lengths are spread across buckets - how many sessions lasted 0-60 seconds, 60-120, and so on.
Get user compositionSee how the user base splits across one property - which countries, which platforms, which app versions - with a count for each value in the window.
List annotationsList the project's chart annotations, optionally narrowed to one category, one chart, or a date range.
List eventsList every event type in the project, with how many times each has been seen and whether it is hidden or deleted.
Search usersFind a user in Amplitude by their Amplitude ID, Device ID, User ID, or the start of a User ID.
Send eventRecord one event in Amplitude for a user or a device, with any event and user properties you want attached, and optionally the revenue it represents.
Send eventsRecord many events at once, up to 2,000 in one call.
Set user propertiesUpdate what Amplitude knows about a person without recording an event: set properties, set them only if they are not already there, add to a number, or clear them.
Update annotationChange an existing chart annotation - its label, details, dates, category or chart.

Create annotation

Mark a date on every Amplitude chart with a label, so a release, an outage or a campaign shows up next to its effect on the numbers. Point it at one chart, or leave it on all of them.

Inputs

LabellabeltextRequired
The short text shown on the chart.
DatestartdateRequired
The day the annotation marks.
End dateenddate
Leave empty for a single day, or set it to mark a period.
Detailsdetailstext
Longer text shown when someone opens the annotation.
Categorycategorytext
Name of the annotation category to file it under, such as Releases. Leave empty for none.
Chartchart_idtext
Id of a single chart to attach it to - the last part of the chart's URL. Leave empty to show it on every chart.

Outputs

annotationobject
annotation_idnumber
The new annotation's id
statustext
Status of the action execution ("success" on success).
Example output
{
  "annotation": {
    "category": {
      "id": 12,
      "name": "Releases"
    },
    "chart_id": null,
    "details": "Shipped to 100% of traffic",
    "end": null,
    "id": 4821,
    "label": "Pricing page redesign",
    "start": "2026-09-01"
  },
  "annotation_id": 4821,
  "status": "success"
}

Delete annotation

Remove a chart annotation for good. Takes the annotation's numeric id.

Inputs

Annotationannotation_idnumberRequired
The annotation's numeric id. Use List annotations to find one.

Outputs

annotation_idnumber
The annotation that was deleted
deletedtrue/false
True once it is gone
statustext
Status of the action execution ("success" on success).
Example output
{
  "annotation_id": 4821,
  "deleted": true,
  "status": "success"
}

Get active users

Count active or new users per day, week or month, optionally broken down by a property. The headline number behind DAU, WAU and MAU.

Inputs

Fromstart_datedate
First day to include. Leave both dates empty to read the last 30 days.
Toend_datedate
Last day to include. Leave both dates empty to read the last 30 days.
Countmetrictext
Active users or new users. Defaults to active.One of: active (Active users), new (New users).
Count byintervaltext
How finely to bucket the result over time. Defaults to daily.One of: 1 (Daily), 7 (Weekly), 30 (Monthly).
Break down bygroup_bytext
Name of a property to split the result by, such as country or platform. Prefix a custom user property with 'gp:'. Leave empty for one combined series.

Outputs

dataobject
endtext
Last day read, as YYYYMMDD
starttext
First day read, as YYYYMMDD
statustext
Status of the action execution ("success" on success).
Example output
{
  "data": {
    "series": [
      [
        128,
        141
      ]
    ],
    "seriesMeta": [
      {
        "segmentIndex": 0
      }
    ],
    "xValues": [
      "2026-08-06",
      "2026-08-07"
    ]
  },
  "end": "20260904",
  "start": "20260806",
  "status": "success"
}

Get annotation

Read one chart annotation by its id: its label, details, dates, category and the chart it belongs to.

Inputs

Annotationannotation_idnumberRequired
The annotation's numeric id. Use List annotations to find one.

Outputs

annotationobject
annotation_idnumber
The annotation's id
statustext
Status of the action execution ("success" on success).
Example output
{
  "annotation": {
    "category": {
      "id": 12,
      "name": "Releases"
    },
    "chart_id": null,
    "details": "Shipped to 100% of traffic",
    "end": null,
    "id": 4821,
    "label": "Pricing page redesign",
    "start": "2026-09-01"
  },
  "annotation_id": 4821,
  "status": "success"
}

Get average session length

Read the average length of a session, in seconds, for each day in the window. Use it to see whether a change made people stay longer.

Inputs

Fromstart_datedate
First day to include. Leave both dates empty to read the last 30 days.
Toend_datedate
Last day to include. Leave both dates empty to read the last 30 days.

Outputs

dataobject
endtext
Last day read, as YYYYMMDD
starttext
First day read, as YYYYMMDD
statustext
Status of the action execution ("success" on success).
Example output
{
  "data": {
    "series": [
      [
        128,
        141
      ]
    ],
    "seriesMeta": [
      {
        "segmentIndex": 0
      }
    ],
    "xValues": [
      "2026-08-06",
      "2026-08-07"
    ]
  },
  "end": "20260904",
  "start": "20260806",
  "status": "success"
}

Get average sessions per user

Read how many sessions the average user starts each day. Use it alongside session length to tell 'people come back more often' from 'people stay longer'.

Inputs

Fromstart_datedate
First day to include. Leave both dates empty to read the last 30 days.
Toend_datedate
Last day to include. Leave both dates empty to read the last 30 days.

Outputs

dataobject
endtext
Last day read, as YYYYMMDD
starttext
First day read, as YYYYMMDD
statustext
Status of the action execution ("success" on success).
Example output
{
  "data": {
    "series": [
      [
        128,
        141
      ]
    ],
    "seriesMeta": [
      {
        "segmentIndex": 0
      }
    ],
    "xValues": [
      "2026-08-06",
      "2026-08-07"
    ]
  },
  "end": "20260904",
  "start": "20260806",
  "status": "success"
}

Get event segmentation

Count how often an event happens over time - unique users, total events, share of daily active users, or average per user - optionally broken down by a property. This is Amplitude's Event Segmentation chart as data.

Inputs

Eventevent_typetextRequired
The event to measure. Pick one of the project's events, or use [Amplitude] Any Active Event to count every event.
Fromstart_datedate
First day to include. Leave both dates empty to read the last 30 days.
Toend_datedate
Last day to include. Leave both dates empty to read the last 30 days.
Measuremetrictext
What to count. Defaults to unique users.One of: uniques (Unique users), totals (Total events), pct_dau (Percent of daily active users), average (Average events per user).
Which usersuser_typetext
Count all active users, or only users new in the window.One of: active (All active users), new (New users only).
Count byintervaltext
How finely to bucket the result over time. Defaults to daily. Amplitude will not spread real-time or hourly buckets over a long range, so picking one of those shortens the default window to 3 days (real-time) or 9 days (hourly).One of: -300000 (Real-time (5 minutes)), -3600000 (Hourly), 1 (Daily), 7 (Weekly), 30 (Monthly).
Break down bygroup_bytext
Name of a property to split the result by, such as country or platform. Prefix a custom user property with 'gp:'. Leave empty for one combined series.
How many breakdown valueslimitnumber
How many 'Break down by' values to return. Ignored when nothing is broken down. Defaults to 100.From 1 to 1000. Default: 100.

Outputs

dataobject
endtext
Last day read, as YYYYMMDD
event_typetext
The event that was measured
starttext
First day read, as YYYYMMDD
statustext
Status of the action execution ("success" on success).
Example output
{
  "data": {
    "series": [
      [
        128,
        141
      ]
    ],
    "seriesMeta": [
      {
        "segmentIndex": 0
      }
    ],
    "xValues": [
      "2026-08-06",
      "2026-08-07"
    ]
  },
  "end": "20260904",
  "event_type": "Invoice Paid",
  "start": "20260806",
  "status": "success"
}

Get funnel analysis

Measure how many users get from one event to the next through a sequence of steps, and where they drop off. Returns the conversion rate and user count at each step, plus how long the median and average user took to get there.

Inputs

StepseventslistRequired
The events that make up the funnel, in order. At least two. Use List events to find the exact names.
Fromstart_datedate
First day to include. Leave both dates empty to read the last 30 days.
Toend_datedate
Last day to include. Leave both dates empty to read the last 30 days.
Steps must happenmodetext
How strictly to require the order. Defaults to in this order.One of: ordered (In this order), unordered (In any order), sequential (In this order with nothing in between).
Which usersuser_typetext
Count all active users, or only users new in the window.One of: active (All active users), new (New users only).
Count byintervaltext
How finely to bucket the result over time. Defaults to daily. Amplitude will not spread real-time or hourly buckets over a long range, so picking one of those shortens the default window to 3 days (real-time) or 9 days (hourly).One of: -300000 (Real-time (5 minutes)), -3600000 (Hourly), 1 (Daily), 7 (Weekly), 30 (Monthly).
Break down bygroup_bytext
Name of a property to split the result by, such as country or platform. Prefix a custom user property with 'gp:'. Leave empty for one combined series.
Conversion window (seconds)conversion_window_secondsnumber
How long a user has to finish the funnel. Defaults to 2592000 (30 days).At least 1.
How many breakdown valueslimitnumber
How many 'Break down by' values to return. Ignored when nothing is broken down. Defaults to 100.From 1 to 1000. Default: 100.

Outputs

countnumber
Segments returned
endtext
Last day read, as YYYYMMDD
segmentslist
starttext
First day read, as YYYYMMDD
statustext
Status of the action execution ("success" on success).
stepslist
The funnel's events, in order
Example output
{
  "count": 1,
  "end": "20260904",
  "segments": [
    {
      "avgTransTimes": [
        0,
        2175406
      ],
      "cumulative": [
        1.0,
        0.42
      ],
      "cumulativeRaw": [
        980,
        412
      ],
      "events": [
        "Sign Up",
        "Invoice Paid"
      ],
      "medianTransTimes": [
        0,
        166444
      ],
      "meta": {
        "segmentIndex": 0
      },
      "stepByStep": [
        1.0,
        0.42
      ]
    }
  ],
  "start": "20260806",
  "status": "success",
  "steps": [
    "Sign Up",
    "Invoice Paid"
  ]
}

Get real-time active users

Read how many users are active right now, minute by minute, with yesterday alongside for comparison. Takes no date range - Amplitude always reports the last two days.

Inputs

None.

Outputs

dataobject
statustext
Status of the action execution ("success" on success).
Example output
{
  "data": {
    "series": [
      [
        41,
        38
      ],
      [
        37,
        40
      ]
    ],
    "seriesLabels": [
      "Today",
      "Yesterday"
    ],
    "xValues": [
      "09:00",
      "09:05"
    ]
  },
  "status": "success"
}

Get retention analysis

Measure how many users come back after a starting action, day by day, week by week or month by month. Defaults to new users returning for anything at all, which is the standard retention curve.

Inputs

Started withstart_eventtext
The action that puts a user in the cohort. Defaults to [Amplitude] New User.
Came back forreturn_eventtext
What counts as coming back. Defaults to [Amplitude] Any Event.
Fromstart_datedate
First day to include. Leave both dates empty to read the last 30 days.
Toend_datedate
Last day to include. Leave both dates empty to read the last 30 days.
Count a return asretention_modetext
How to decide a user was retained. Defaults to N-day.One of: nday (N-day (came back on exactly that day)), rolling (Rolling (came back on that day or later)), bracket (Bracket (custom day ranges)), nday_or_before (N-day or before (came back by that day)).
Day rangesbracketstext
Only for bracket mode: the day ranges to group returns into, such as [[0,4],[4,8]].
Count byintervaltext
How finely to bucket the result over time. Defaults to daily.One of: 1 (Daily), 7 (Weekly), 30 (Monthly).
Break down bygroup_bytext
Name of a property to split the result by, such as country or platform. Prefix a custom user property with 'gp:'. Leave empty for one combined series.

Outputs

dataobject
endtext
Last day read, as YYYYMMDD
return_eventtext
What counted as coming back
starttext
First day read, as YYYYMMDD
start_eventtext
The action that defined the cohort
statustext
Status of the action execution ("success" on success).
Example output
{
  "data": {
    "series": [
      {
        "combined": [
          {
            "count": 128,
            "incomplete": false,
            "outof": 128
          },
          {
            "count": 71,
            "incomplete": false,
            "outof": 128
          }
        ],
        "dates": [
          "Aug 6",
          "Aug 7"
        ],
        "values": {
          "Aug 6": [
            {
              "count": 128,
              "incomplete": false,
              "outof": 128
            },
            {
              "count": 71,
              "incomplete": false,
              "outof": 128
            }
          ]
        }
      }
    ],
    "seriesMeta": [
      {
        "eventIndex": 0,
        "segmentIndex": 0
      }
    ]
  },
  "end": "20260904",
  "return_event": "_all",
  "start": "20260806",
  "start_event": "_new",
  "status": "success"
}

Get revenue lifetime value

Read revenue per user over their lifetime: average revenue per user, per paying user, total revenue, or the number of paying users. Needs revenue on your events to return anything.

Inputs

Fromstart_datedate
First day to include. Leave both dates empty to read the last 30 days.
Toend_datedate
Last day to include. Leave both dates empty to read the last 30 days.
Measuremetrictext
Which revenue figure to read. Defaults to ARPU.One of: 0 (ARPU - average revenue per user), 1 (ARPPU - average revenue per paying user), 2 (Total revenue), 3 (Paying users).
Count byintervaltext
How finely to bucket the result over time. Defaults to daily.One of: 1 (Daily), 7 (Weekly), 30 (Monthly).
Break down bygroup_bytext
Name of a property to split the result by, such as country or platform. Prefix a custom user property with 'gp:'. Leave empty for one combined series.

Outputs

dataobject
endtext
Last day read, as YYYYMMDD
starttext
First day read, as YYYYMMDD
statustext
Status of the action execution ("success" on success).
Example output
{
  "data": {
    "series": [
      [
        128,
        141
      ]
    ],
    "seriesMeta": [
      {
        "segmentIndex": 0
      }
    ],
    "xValues": [
      "2026-08-06",
      "2026-08-07"
    ]
  },
  "end": "20260904",
  "start": "20260806",
  "status": "success"
}

Get session length distribution

Read how session lengths are spread across buckets - how many sessions lasted 0-60 seconds, 60-120, and so on. Set the bucket unit and size, or leave them empty for Amplitude's own.

Inputs

Fromstart_datedate
First day to include. Leave both dates empty to read the last 30 days.
Toend_datedate
Last day to include. Leave both dates empty to read the last 30 days.
Bucket unitbin_time_unittext
What unit the buckets are measured in.One of: seconds, minutes, hours.
Shortest bucketbin_minnumber
Where the buckets start, in the unit above.At least 0.
Longest bucketbin_maxnumber
Where the buckets stop, in the unit above.At least 0.
Bucket sizebin_sizenumber
How wide each bucket is, in the unit above.At least 1.

Outputs

dataobject
endtext
Last day read, as YYYYMMDD
starttext
First day read, as YYYYMMDD
statustext
Status of the action execution ("success" on success).
Example output
{
  "data": {
    "series": [
      [
        0,
        120408,
        2261,
        6984
      ]
    ],
    "xValues": [
      "0s-60s",
      "60s-120s",
      "120s-180s",
      "180s-240s"
    ]
  },
  "end": "20260904",
  "start": "20260806",
  "status": "success"
}

Get user composition

See how the user base splits across one property - which countries, which platforms, which app versions - with a count for each value in the window.

Inputs

Split byuser_propertytextRequired
Which user property to break the user base down by. Pick a built-in, or type a custom user property as 'gp:your_property'.
Fromstart_datedate
First day to include. Leave both dates empty to read the last 30 days.
Toend_datedate
Last day to include. Leave both dates empty to read the last 30 days.

Outputs

dataobject
endtext
Last day read, as YYYYMMDD
starttext
First day read, as YYYYMMDD
statustext
Status of the action execution ("success" on success).
user_propertytext
The property the users were split by
Example output
{
  "data": {
    "series": [
      [
        69643,
        47419,
        38087
      ]
    ],
    "seriesLabels": [
      "country"
    ],
    "xValues": [
      "United States",
      "Germany",
      "(none)"
    ]
  },
  "end": "20260904",
  "start": "20260806",
  "status": "success",
  "user_property": "country"
}

List annotations

List the project's chart annotations, optionally narrowed to one category, one chart, or a date range.

Inputs

Categorycategorytext
Only annotations filed under this category name.
Chartchart_idtext
Only annotations attached to this chart id.
Fromstart_datedate
First day to include. Give both dates or neither; leave both empty for all of them.
Toend_datedate
Last day to include. Give both dates or neither; leave both empty for all of them.

Outputs

annotationslist
countnumber
Annotations returned
statustext
Status of the action execution ("success" on success).
Example output
{
  "annotations": [
    {
      "category": {
        "id": 12,
        "name": "Releases"
      },
      "chart_id": null,
      "details": "Shipped to 100% of traffic",
      "end": null,
      "id": 4821,
      "label": "Pricing page redesign",
      "start": "2026-09-01"
    }
  ],
  "count": 1,
  "status": "success"
}

List events

List every event type in the project, with how many times each has been seen and whether it is hidden or deleted. This is where to find the exact spelling the query actions want.

Inputs

None.

Outputs

countnumber
Event types returned
eventslist
statustext
Status of the action execution ("success" on success).
Example output
{
  "count": 2,
  "events": [
    {
      "deleted": false,
      "display": "Invoice Paid",
      "flow_hidden": false,
      "hidden": false,
      "non_active": false,
      "totals": 48213,
      "value": "Invoice Paid"
    },
    {
      "deleted": false,
      "display": "Sign Up",
      "flow_hidden": false,
      "hidden": false,
      "non_active": false,
      "totals": 9804,
      "value": "Sign Up"
    }
  ],
  "status": "success"
}

Search users

Find a user in Amplitude by their Amplitude ID, Device ID, User ID, or the start of a User ID. Returns every match with its Amplitude ID. No match is an empty list, not an error.

Inputs

Search forusertextRequired
An Amplitude ID, Device ID, User ID, or the first part of a User ID.

Outputs

countnumber
Users matched
match_typetext
Which kind of id Amplitude matched on
matcheslist
statustext
Status of the action execution ("success" on success).
Example output
{
  "count": 1,
  "match_type": "match_user_or_device_id",
  "matches": [
    {
      "amplitude_id": 480851277,
      "user_id": "user-10428"
    }
  ],
  "status": "success"
}

Send event

Record one event in Amplitude for a user or a device, with any event and user properties you want attached, and optionally the revenue it represents. Use this to get whatever a workflow does into your product analytics.

Inputs

Event nameevent_typetextRequired
What happened, as you want it to appear in Amplitude - for example 'Invoice Paid'. A new name creates a new event type.
User IDuser_idtext
Your own id for this person, at least 5 characters - Amplitude rejects shorter ones. Give this or a Device ID.
Device IDdevice_idtext
Id of the device the event came from, at least 5 characters. Give this or a User ID.
Event propertiesevent_propertiesobject
Details of this occurrence, as name/value pairs.
User propertiesuser_propertiesobject
Properties to set on the user at the same time, as name/value pairs.
When it happenedtimedate and time
When the event happened. Leave empty to use the moment Amplitude receives it.
Deduplication keyinsert_idtext
A unique id for this event. Amplitude ignores a repeat of the same key within 7 days, which makes a retried step safe.
Platformplatformtext
Where the event came from, such as Web or iOS.
App versionapp_versiontext
Version of your app that produced the event.
Countrycountrytext
Country to attribute the event to.
Citycitytext
City to attribute the event to.
Revenuerevenuenumber
Revenue this event represents. Amplitude uses price times quantity when this is empty.
Pricepricenumber
Price of one unit sold.
Quantityquantitynumber
How many units were sold.At least 0.
Product IDproduct_idtext
Identifier of the product involved.
Revenue typerevenue_typetext
How to classify it, such as purchase or refund.

Outputs

events_ingestednumber
How many events Amplitude stored (1 on success)
receiptobject
statustext
Status of the action execution ("success" on success).
Example output
{
  "events_ingested": 1,
  "receipt": {
    "code": 200,
    "events_ingested": 1,
    "payload_size_bytes": 214,
    "server_upload_time": 1788528000000
  },
  "status": "success"
}

Send events

Record many events at once, up to 2,000 in one call. Each entry is a full event object - the same fields as Send event. Use this to backfill a batch of activity a step has just produced instead of sending them one at a time.

Inputs

EventseventslistRequired
The events to send. Each needs an 'event_type' and either a 'user_id' or a 'device_id'.

Outputs

events_ingestednumber
How many events Amplitude stored
events_sentnumber
How many events were sent
receiptobject
statustext
Status of the action execution ("success" on success).
Example output
{
  "events_ingested": 2,
  "events_sent": 2,
  "receipt": {
    "code": 200,
    "events_ingested": 2,
    "payload_size_bytes": 402,
    "server_upload_time": 1788528000000
  },
  "status": "success"
}

Set user properties

Update what Amplitude knows about a person without recording an event: set properties, set them only if they are not already there, add to a number, or clear them. Use it to keep plan, role or lifecycle stage current on the user.

Inputs

User IDuser_idtext
Your own id for this person, at least 5 characters - Amplitude rejects shorter ones. Give this or a Device ID.
Device IDdevice_idtext
Id of the device the event came from, at least 5 characters. Give this or a User ID.
Setset_propertiesobject
Properties to set, overwriting whatever is there.
Set if missingset_once_propertiesobject
Properties to set only the first time, such as the date someone signed up.
Add toadd_propertiesobject
Numeric properties to increment by the given amount. Use a negative number to decrement.
Clearunset_propertieslist
Names of properties to remove from the user.

Outputs

device_idtext
operationslist
Which property operations were applied
receiptobject
Amplitude's raw reply
statustext
Status of the action execution ("success" on success).
user_idtext
Example output
{
  "device_id": null,
  "operations": [
    "$set",
    "$setOnce"
  ],
  "receipt": {
    "code": 200,
    "message": "success"
  },
  "status": "success",
  "user_id": "user-10428"
}

Update annotation

Change an existing chart annotation - its label, details, dates, category or chart. Anything left empty stays as it is.

Inputs

Annotationannotation_idnumberRequired
The annotation's numeric id. Use List annotations to find one.
Labellabeltext
New label. Leave empty to keep it as it is.
Datestartdate
New date. Leave empty to keep it as it is.
End dateenddate
New end date. Leave empty to keep it as it is.
Detailsdetailstext
New details. Leave empty to keep them as they are.
Categorycategorytext
New category name. Leave empty to keep it as it is.
Chartchart_idtext
New chart id. Leave empty to keep it as it is.

Outputs

annotationobject
annotation_idnumber
The annotation's id
statustext
Status of the action execution ("success" on success).
Example output
{
  "annotation": {
    "category": {
      "id": 12,
      "name": "Releases"
    },
    "chart_id": null,
    "details": "Shipped to 100% of traffic",
    "end": null,
    "id": 4821,
    "label": "Pricing page redesign",
    "start": "2026-09-01"
  },
  "annotation_id": 4821,
  "status": "success"
}

On this page