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

password
stringRequired
username
stringRequired

Actions

This is the basic request format with all parameters.

Action Parameters

se
string
re
string
rm
string
rb
string
start
string
end
string
i
string
s
string
g
string

Action Response

data
object
successful
boolean
error

Deletes an event property.

Action Parameters

event__property
stringRequired

Action Response

data
object
successful
boolean
error

Delete an event type.

Action Parameters

event_type
stringRequired

Action Response

data
object
successful
boolean
error

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

start
string
end
string
timeHistogramConfigBinTimeUnit
string
timeHistogramConfigBinMin
string
timeHistogramConfigBinMax
string
timeHistogramConfigBinSize
string

Action Response

data
object
successful
boolean
error

Get all groups in an amplitude organization.

Action Parameters

Action Response

data
object
successful
boolean
error

this feature is available in accounts with amplitude recommend. retrieves multiple recommendations for a user.

Action Parameters

user_id
string
get_recs
string
rec_id
string

Action Response

data
object
successful
boolean
error

Get the list of events with the current week’s totals, uniques, and % dau.

Action Parameters

Action Response

data
object
successful
boolean
error

This is the basic request format for the event segmentation api, including all available parameters.

Action Parameters

e
string
start
string
end
string
i
string
m
string
n
string
s
string
g
string
limit
string
formula
string
rollingWindow
string
rollingAverage
string

Action Response

data
object
successful
boolean
error

Updates an event property.

Action Parameters

event__property
stringRequired

Action Response

data
object
successful
boolean
error

putupdates 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

id
stringRequired

Action Response

data
object
successful
boolean
error

Gets all global chart annotations in a project.

Action Parameters

Action Response

data
object
successful
boolean
error

Gets an event property.

Action Parameters

event_property
string

Action Response

data
object
successful
boolean
error

Get all event categories in your project.

Action Parameters

Action Response

data
object
successful
boolean
error

Retrieves all user properties in your account. this call doesn’t have any required parameters.

Action Parameters

Action Response

data
object
successful
boolean
error

Update a lookup table, by name.

Action Parameters

name
stringRequired
file
string

Action Response

data
object
successful
boolean
error

Get the lifetime value of new users.

Action Parameters

start
string
end
string
m
string
i
string
s
string
g
string

Action Response

data
object
successful
boolean
error

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

data
object
successful
boolean
error

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

includeSyncInfo
string

Action Response

data
object
successful
boolean
error

Delete a lookup table, by name.

Action Parameters

name
stringRequired

Action Response

data
object
successful
boolean
error

Get a single event type, by name.

Action Parameters

event_type
stringRequired

Action Response

data
object
successful
boolean
error

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

id
stringRequired

Action Response

data
object
successful
boolean
error

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

data
object
successful
boolean
error

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

start
string
end
string

Action Response

data
object
successful
boolean
error

Get a group by id.

Action Parameters

id
stringRequired

Action Response

data
object
successful
boolean
error

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

data
object
successful
boolean
error

Gets a user by id.

Action Parameters

id
stringRequired

Action Response

data
object
successful
boolean
error

This endpoint demonstrates the maximum length limitations for get request parameters.

Action Parameters

api_key
string
identification
string

Action Response

data
object
successful
boolean
error

Get the id of an event category in your project.

Action Parameters

category_name
stringRequired

Action Response

data
object
successful
boolean
error

Unmaps a user id to any associated global id. you can unmap a single user id per json mapping object.

Action Parameters

mapping
string
api_key
string

Action Response

data
object
successful
boolean
error

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

props
string
propKeys
string
id
stringRequired

Action Response

data
object
successful
boolean
error

Retrieves a list of lookup tables in the project.

Action Parameters

Action Response

data
object
successful
boolean
error

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

data
object
successful
boolean
error

See the documentation of ios attribution for full details.

Action Parameters

api_key
string
event
string

Action Response

data
object
successful
boolean
error

Update an event category.

Action Parameters

category_id
stringRequired

Action Response

data
object
successful
boolean
error

Update a user property.

Action Parameters

user_property
stringRequired

Action Response

data
object
successful
boolean
error

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

request_id
stringRequired

Action Response

data
object
successful
boolean
error

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

data
object
successful
boolean
error

Get json results from any existing (saved) chart via chart id.

Action Parameters

chart_id
stringRequired

Action Response

data
object
successful
boolean
error

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

user
string

Action Response

data
object
successful
boolean
error

Get active user numbers with minute granularity for the last two days.

Action Parameters

Action Response

data
object
successful
boolean
error

Poll the request status. this is the second phase in a cohort download operation.

Action Parameters

request_id
stringRequired

Action Response

data
object
successful
boolean
error

This is the basic request format for the funnel analysis api, including all available parameters.

Action Parameters

e
string
start
string
end
string
mode
string
n
string
s
string
g
string
cs
string
limit
string

Action Response

data
object
successful
boolean
error

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

start_day
string
end_day
string

Action Response

data
object
successful
boolean
error

Get a single lookup table by name.

Action Parameters

name
stringRequired

Action Response

data
object
successful
boolean
error

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

start
string
end
string

Action Response

data
object
successful
boolean
error

Deletes a single user property, by name.

Action Parameters

user_property
stringRequired

Action Response

data
object
successful
boolean
error

Removes the specified id from a deletion job.

Action Parameters

amplitude_id_or_user_id
stringRequired
date
stringRequired

Action Response

data
object
successful
boolean
error

Update a group.

Action Parameters

id
stringRequired

Action Response

data
object
successful
boolean
error

This deletes group

Action Parameters

id
stringRequired

Action Response

data
object
successful
boolean
error

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

request_id
stringRequired
output_id
stringRequired

Action Response

data
object
successful
boolean
error

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

requestId
stringRequired

Action Response

data
object
successful
boolean
error

Retrieves a single user property, by name.

Action Parameters

user_property
stringRequired

Action Response

data
object
successful
boolean
error

This is the basic get request format and all parameters.

Action Parameters

user
string
offset
string
limit
string

Action Response

data
object
successful
boolean
error

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

data
object
successful
boolean
error

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

startIndex
string
itemsPerPage
string
filter
string

Action Response

data
object
successful
boolean
error

Update an event type.

Action Parameters

event_type
stringRequired

Action Response

data
object
successful
boolean
error

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

sync_id
string
time_period
string
start
string
end
string

Action Response

data
object
successful
boolean
error

Get user composition data based on specified properties

Action Parameters

start
string
end
string
p
string

Action Response

data
object
successful
boolean
error

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

start
string
end
string

Action Response

data
object
successful
boolean
error

Retrieves all event types in a project. there are no required parameters for this request.

Action Parameters

Action Response

data
object
successful
boolean
error

Delete an event category.

Action Parameters

category_id
stringRequired

Action Response

data
object
successful
boolean
error