Hello, I've been trying to get the retention using a starting event and return event.
The cURL that i'm using (excluded the auth header):
https://amplitude.com/api/2/retention?se=\{"event_type":"ce:notification_open_event"\}&re=\{"event_type":"Start%20Session"\}&start=20210412&end=20210415
notification_open_event is a custom event and i'm trying to use the amplitude default event Start Session as well.
the cURL keeps returning 400: Bad Request (Unable to create definition from arguments)
the documentation (https://developers.amplitude.com/docs/dashboard-rest-api#retention-analysis) states that “Full event for the start action. Supports two "event_type" values: "_new" for new users, and "_active" for all users.”. Can it be a custom event as well? If not, what would be an alternative to do the same but with a custom event
Thanks!
Hi
Looks like you're already on your way to making this REST API call so great work thus far! You are able to use custom events as you've described, but the return event would not actually be queried with "Start%20Session". This event is created with the event type = "session_start" so your query should just alter this string to work appropriately!
It should look a little like this:
https://amplitude.com/api/2/retention?se=\{"event_type":"ce:notification_open_event"\}&re=\{"event_type":"session_start"\}&start=20210412&end=20210415
Hope this helps!
Reply
Welcome to the Amplitude Community!
If you don't have an Amplitude account, you can create an Amplitude Starter account for free and enjoy direct access to the Community via SSO. Create an Amplitude account. You can also create a Guest account below!
If you're a current customer, select the domain you use to sign in with Amplitude.
analytics.amplitude.com analytics.eu.amplitude.comWelcome to the Amplitude Community!
If you don't have an Amplitude account, you can create an Amplitude Starter account for free and enjoy direct access to the Community via SSO. Create an Amplitude account. Want to sign up as a guest? Create a Community account.
If you're a current customer, select the domain you use to sign in with Amplitude.
analytics.amplitude.com analytics.eu.amplitude.comEnter your E-mail address. We'll send you an e-mail with instructions to reset your password.