Amplitude
Learn how to use Amplitude with Composio
Overview
Enum
AMPLITUDE
Description
Amplitude Inc. is an American publicly trading company that develops digital analytics software.
Authentication Details
BASIC
Actions
AMPLITUDE_RETENTION_ANALYSIS
This is the basic request format with all parameters.
Action Parameters
Action Response
AMPLITUDE_DELETE_EVENT_PROPERTY
Deletes an event property.
Action Parameters
Action Response
AMPLITUDE_DELETE_EVENT_TYPE
Delete an event type.
Action Parameters
Action Response
AMPLITUDE_SESSION_LENGTH_DISTRIBUTION
Retrieves session length data from the amplitude analytics platform. this endpoint provides insights into the duration of user sessions, which is crucial for understanding user engagement and interaction patterns with your application or website. the session length is calculated as the difference between the maximum and minimum client event times within a session. use this endpoint when you need to analyze user engagement trends, identify patterns in session durations, or optimize your application’s user experience based on typical session lengths. note that this endpoint returns aggregate data and does not provide individual user session information for privacy reasons. the data returned may be subject to amplitude’s data processing delays, typically up to 30 minutes for real-time data.
Action Parameters
Action Response
AMPLITUDE_GET_GROUPS
Get all groups in an amplitude organization.
Action Parameters
Action Response
AMPLITUDE_GET_MULTIPLE_RECOMMENDATIONS_COPY
this feature is available in accounts with amplitude recommend. retrieves multiple recommendations for a user.
Action Parameters
Action Response
AMPLITUDE_GET_EVENTS_LIST
Get the list of events with the current week’s totals, uniques, and % dau.
Action Parameters
Action Response
AMPLITUDE_EVENT_SEGMENTATION_CHART
This is the basic request format for the event segmentation api, including all available parameters.
Action Parameters
Action Response
AMPLITUDE_UPDATE_EVENT_PROPERTY
Updates an event property.
Action Parameters
Action Response
AMPLITUDE_USER_UPDATE
put
updates an existing user with the given id within amplitude. the id must be a valid email, and the user must have been previously invited to amplitude. if the active
schema field is set to false
on the request body, the user will be removed from the organization and all access is lost. if this action is taken on a pending user (i.e. invite has been sent but has not yet accepted the invite), the invitation is revoked.
Action Parameters
Action Response
AMPLITUDE_GET_ALL_GLOBAL_CHART_ANNOTATIONS
Gets all global chart annotations in a project.
Action Parameters
Action Response
AMPLITUDE_GET_EVENT_PROPERTY
Gets an event property.
Action Parameters
Action Response
AMPLITUDE_GET_ALL_EVENT_CATEGORIES
Get all event categories in your project.
Action Parameters
Action Response
AMPLITUDE_GET_ALL_USER_PROPERTIES
Retrieves all user properties in your account. this call doesn’t have any required parameters.
Action Parameters
Action Response
AMPLITUDE_UPDATE_LOOKUP_TABLE
Update a lookup table, by name.
Action Parameters
Action Response
AMPLITUDE_REVENUE_LTV
Get the lifetime value of new users.
Action Parameters
Action Response
AMPLITUDE_IDENTIFY_API_CALL_EXAMPLE
The identify user endpoint is used to associate specific traits or properties with a user in amplitude’s analytics platform. it allows you to update or set user properties, which are crucial for segmentation, cohort analysis, and personalized tracking. this endpoint should be called when a user’s properties change or when you want to enrich your user profiles with additional data. it’s particularly useful for updating user information after sign-up, after a user completes their profile, or when their status changes (e.g., becoming a premium user). the endpoint accepts a json object with user properties, allowing for flexible and comprehensive user identification. however, it’s important to note that this endpoint does not track events; it’s solely for updating user properties. for optimal use, it should be called sparingly and only when user properties change to avoid unnecessary api calls.
Action Parameters
Action Response
AMPLITUDE_GET_ALL_COHORTS
Get all discoverable cohorts for an app. the id
returned for each cohort is used to get a single cohort. each cohort object has this schema: json { "lastcomputed": timestamp, "owners": string[], "description": string, "definition": `{ cohort definition_}`, "published": boolean, "archived": boolean, "name": string, "appid": string, "lastmod": timestamp, "type": string, "id": string, "size": integer }
Action Parameters
Action Response
AMPLITUDE_DELETE_A_TABLE
Delete a lookup table, by name.
Action Parameters
Action Response
AMPLITUDE_GET_AN_EVENT_TYPE
Get a single event type, by name.
Action Parameters
Action Response
AMPLITUDE_DELETE_USER
Deletes the amplitude user with the given id. the id must be a valid email, and the user must have been previously invited to amplitude. if this action is taken on a pending user (an invited user that hasn’t accepted the invitation), the invitation is revoked.
Action Parameters
Action Response
AMPLITUDE_BATCH_EVENT_UPLOAD
The batchevents endpoint allows you to send multiple events to amplitude in a single api call. this endpoint is ideal for efficiently transmitting a large number of events, reducing the number of individual api requests. use this when you need to log multiple user actions or system events simultaneously, such as during offline data syncing or bulk historical data imports. the endpoint processes events in the order they are provided in the array. note that while this method is more efficient for large numbers of events, it may introduce a slight delay in processing compared to real-time, individual event submissions.
Action Parameters
Action Response
AMPLITUDE_AVERAGE_SESSION_LENGTH
Get the average session length (in seconds) for each day in the specified date range. ## returns | attribute | description | | --- | --- | | series | an array with one element which is itself an array that contains the average session length for each day. | | seriesmeta | an array of labels with one for each segment. | | segmentindex | this represents the index of the segment, referring to its position in the right module of the chart control panel. | | xvalues | an array of (string) dates formatted like “yyyy-mm-dd” with one for each in the specified date range. |
Action Parameters
Action Response
AMPLITUDE_GET_GROUP_BY_ID
Get a group by id.
Action Parameters
Action Response
AMPLITUDE_UPDATE_MEMBERSHIP
Updates the membership of a specified cohort in amplitude by adding or removing user ids. this endpoint allows for bulk operations, enabling you to efficiently manage large cohorts. use this when you need to modify cohort compositions based on user behavior, segmentation changes, or data updates. the endpoint supports both adding and removing users in a single request, and can handle user ids or user names. it’s particularly useful for maintaining dynamic cohorts that change frequently based on user actions or attributes. note that this endpoint modifies existing cohorts and does not create new ones. exercise caution when using this endpoint, as it directly affects your analytics segmentation.
Action Parameters
Action Response
AMPLITUDE_GET_USER_BY_ID
Gets a user by id.
Action Parameters
Action Response
AMPLITUDE_GET_THAT_SHOWS_LIMITS_OF_GET_PARAM_LENGTH
This endpoint demonstrates the maximum length limitations for get request parameters.
Action Parameters
Action Response
AMPLITUDE_GET_AN_EVENT_CATEGORY
Get the id of an event category in your project.
Action Parameters
Action Response
AMPLITUDE_UNMAPPING_REQUEST
Unmaps a user id to any associated global id. you can unmap a single user id per json mapping object.
Action Parameters
Action Response
AMPLITUDE_GET_A_SINGLE_COHORT
Get a discoverable cohort using its cohort id
. this is phase one in the download a cohort operation. the request id
returned in the response is used to poll export status.
Action Parameters
Action Response
AMPLITUDE_GET_ALL_LOOKUP_TABLES_COPY
Retrieves a list of lookup tables in the project.
Action Parameters
Action Response
AMPLITUDE_POST_DELETION_REQUEST_JSON
The deleteusers endpoint allows you to programmatically delete user data from amplitude using the user privacy api. this endpoint is crucial for maintaining user privacy and complying with data protection regulations. it enables the deletion of user data based on either amplitude ids or user ids, with options to ignore invalid ids and extend the deletion across the entire organization. the endpoint should be used when you need to remove specific user data from your amplitude analytics, either due to user requests or internal data management policies. it’s important to note that this operation is irreversible, so it should be used with caution. the endpoint has a limit of 100 ids per request, so for larger deletions, multiple api calls may be necessary.
Action Parameters
Action Response
AMPLITUDE_ANDROID_ATTRIBUTION
See the documentation of ios attribution for full details.
Action Parameters
Action Response
AMPLITUDE_UPDATE_AN_EVENT_CATEGORY
Update an event category.
Action Parameters
Action Response
AMPLITUDE_UPDATE_USER_PROPERTY
Update a user property.
Action Parameters
Action Response
AMPLITUDE_GET_REQUEST_STATUS
Retrieves a request’s status. ## response body | name | description | | --- | --- | | requestid
| integer. the id of the request. | | userid
| string. the user id of the user to request data for. | | amplitudeid
| integer. the amplitude id of the user to request data for. | | startdate
| date. the start date for the data request. | | enddate
| the end date for the data request. | | status
| staging: not started submitted: in progress done: job completed successfully and urls populated failed: job failed, may need to retry | | failreason
| string. if the job failed, contains information about the failure. | | urls
| array of strings. a list of dowload urls for the data. | | expires
| data. the date that the output download links expire. |
Action Parameters
Action Response
AMPLITUDE_HTTP_API_IDENTIFY
Use event type = \$identify
to send user properties as an event. \$identify
is a function within the http that essentially functions like the identify api. using \$identify
saves you requests, because you don’t have to make separate requests to the identify api to update user properties before sending event data.
Action Parameters
Action Response
AMPLITUDE_GET_RESULTS_FROM_EXISTING_CHART
Get json results from any existing (saved) chart via chart id.
Action Parameters
Action Response
AMPLITUDE_GET_USER
Search for a user with a specified amplitude id, device id, user id, or user id prefix. exceeding the request limits results in 429 errors.
Action Parameters
Action Response
AMPLITUDE_REAL_TIME_ACTIVE_USERS
Get active user numbers with minute granularity for the last two days.
Action Parameters
Action Response
AMPLITUDE_GET_COHORT_STATUS
Poll the request status. this is the second phase in a cohort download operation.
Action Parameters
Action Response
AMPLITUDE_FUNNEL_ANALYSIS
This is the basic request format for the funnel analysis api, including all available parameters.
Action Parameters
Action Response
AMPLITUDE_GET_DELETION_REQUESTS
The deleteusers endpoint is used to initiate the deletion of user data from amplitude in compliance with privacy regulations like gdpr and ccpa. it allows you to submit a list of up to 100 user ids or amplitude ids for deletion. this endpoint should be used when you need to remove all data associated with specific users from your amplitude analytics. it’s important to note that this process is irreversible, so use it with caution. the endpoint doesn’t immediately delete the data but initiates a deletion job, which may take some time to complete. it’s recommended to use this endpoint as part of your user data management workflow, especially when handling user account deletions or responding to data subject requests.
Action Parameters
Action Response
AMPLITUDE_GET_A_SINGLE_LOOKUP_TABLE
Get a single lookup table by name.
Action Parameters
Action Response
AMPLITUDE_GET_EXPORT
The exporteventdata endpoint allows you to retrieve event data from your amplitude project for a specified time range. this get request exports user interaction events, providing valuable insights into user behavior and app usage patterns. use this endpoint when you need to analyze historical event data, generate custom reports, or integrate amplitude data with other analytics tools. the exported data is typically delayed by at least 2 hours from real-time to ensure data consistency. note that this endpoint may have usage limits based on your amplitude plan, and large data requests might require multiple calls with pagination.
Action Parameters
Action Response
AMPLITUDE_DELETE_USER_PROPERTY
Deletes a single user property, by name.
Action Parameters
Action Response
AMPLITUDE_DELETE_DELETION_REQUEST
Removes the specified id from a deletion job.
Action Parameters
Action Response
AMPLITUDE_UPDATE_GROUP
Update a group.
Action Parameters
Action Response
AMPLITUDE_DELETE_GROUP
This deletes group
Action Parameters
Action Response
AMPLITUDE_GET_OUTPUT_FILE
Download a returned output file. the download link is valid for two days. most clients used to send api requests automatically download the data from the s3 link. if your api client doesn’t automatically download the file from the link, access it manually using your org api key as the username and your org secret key as the password.
Action Parameters
Action Response
AMPLITUDE_COHORT_DOWNLOAD
For small cohorts, the response body contains cohort data. for large cohorts, the data must be downloaded. if the cohort is large, the response redirects with a 302 response code to a pre-signed amazon s3 download url. the download url is valid for one minute, and should be accessed immediately. the api request link (https://amplitude.com/api/5/cohorts/request/:requestid/file) is valid for seven days. during the seven days, you can make the same request repeatedly to get a new s3 download link. each s3 link is valid only for one minute. most clients used to send api requests automatically download the data from the s3 link. if your api client doesn’t automatically download the cohort from the s3 link, you have one minute access it manually.
Action Parameters
Action Response
AMPLITUDE_GET_USER_PROPERTY
Retrieves a single user property, by name.
Action Parameters
Action Response
AMPLITUDE_USER_ACTIVITY
This is the basic get request format and all parameters.
Action Parameters
Action Response
AMPLITUDE_UPLOAD_IDS
The upload cohort endpoint allows you to create or update a cohort in amplitude by uploading a list of user ids. this powerful feature enables precise user segmentation for targeted analysis and personalization. use this endpoint when you need to define a specific group of users based on known ids, such as after an offline analysis or when integrating external data sources. the cohort can be used for various analytics purposes within amplitude, including funnel analysis, retention studies, and behavioral comparisons. note that this endpoint replaces the entire cohort if it already exists, so include all desired user ids in each upload. the cohort size is limited to 100 million users, and there are rate limits on cohort creation and updates.
Action Parameters
Action Response
AMPLITUDE_GET_USERS
Gets a list of users within amplitude for that organization. this includes both pending and joined users, and supports pagination and filtering. see scim filter syntax for help with the filter parameter.
Action Parameters
Action Response
AMPLITUDE_UPDATE_AN_EVENT_TYPE
Update an event type.
Action Parameters
Action Response
AMPLITUDE_CUSTOM_PERIOD
Retrieve delivery metrics summary for event streaming within a specified time period. this endpoint provides statistics about event delivery performance including success rates, latency, and error counts
Action Parameters
Action Response
AMPLITUDE_USER_COMPOSITION
Get user composition data based on specified properties
Action Parameters
Action Response
AMPLITUDE_AVERAGE_SESSIONS_PER_USER
Get the average number of sessions per user on each day in the specified date range. ## returns | attribute | description | | --- | --- | | series | an array with one element which is itself an array that contains the (float) average number of sessions per user for each day. | | seriesmeta | an array of labels with one for each segment. | | segmentindex | this represents the index of the segment, referring to its position in the right module of the chart control panel | | xvalues | an array of (string) dates formatted like “yyyy-mm-dd” with one for each in the specified date range |
Action Parameters
Action Response
AMPLITUDE_GET_ALL_EVENT_TYPES
Retrieves all event types in a project. there are no required parameters for this request.
Action Parameters
Action Response
AMPLITUDE_DELETE_AN_EVENT_CATEGORY
Delete an event category.
Action Parameters
Action Response