Analytics

Retention analysis

Changed on

Return retention for a starting event and a return event over a date range.

get/api/2/retention

Request

  • Base URL
    https://amplitude.com
  • Auth
    HTTP basic

Query parameters

sestring required

Starting event definition.

restring required

Returning event definition.

startstring required
Example:20260801

First date included in the data series, formatted YYYYMMDD.

endstring required
Example:20260831

Last date included in the data series, formatted YYYYMMDD.

rm'bracket' | 'rolling' | 'n'

Retention type: bracket, rolling (unbounded), or n (N-day). Defaults to N-day.

i1 | 7 | 30

Interval: 1 daily, 7 weekly, 30 monthly.

sstring

Segment definitions, as a JSON array of filter condition objects. Repeat the parameter for multiple segments.

gstring

Property to group by, for example platform. Available only with a single segment. Limit: two.

Response

Retention series.

object required

Changes

    • info

      added the media type */* for the response with the status

    • info

      added the media type */* for the response with the status

    • info

      added the media type */* for the response with the status