Everything an AI agent can do with the Amplitude API.

A reference guide for building AI agents: every method, how to authenticate, and the permissions each one needs.

Endpoints25
AuthenticationAPI key + secret
Last updated23 June 2026
Orientation

How the Amplitude API works.

The Amplitude API is how an app or AI agent works with a product analytics project: sending events, querying analytics such as segmentation, funnels, and retention, exporting the raw event stream, and managing cohorts and the event taxonomy. Access is granted through a per-project API key, often paired with a secret key, and that credential is all-or-nothing for the project rather than scoped to a specific action. Amplitude does not pin one shared API version, and each area is addressed and evolves on its own path.

25Endpoints
7Capability groups
16Read
9Write
0Permissions
Authentication
Amplitude uses different credentials for different jobs. Sending events authenticates with the project API key alone, placed in the request body. Reading analytics, exporting raw data, and editing the taxonomy authenticate with HTTP Basic auth, the API key as the username and the secret key as the password. The User Profile API uses the secret key in an Authorization: Api-Key header. The MCP server uses OAuth 2.0 and inherits the signed-in user's permissions. Every credential is scoped to a single project.
Permissions
The first-party APIs have no per-endpoint scopes. A project API key and secret pair is all-or-nothing for that project, so any holder can call every analytics, export, cohort, and taxonomy endpoint, including raw user-level event export and single-user lookups. The boundary is the project the key belongs to, not the action. Only the MCP route is permission-aware, inheriting the OAuth user's existing Amplitude access.
Versioning
Amplitude does not date or pin one API version the way some products do. Each API is addressed by its own path, and the version segment in that path, such as /api/2, /api/3, or /api/5, belongs to that specific endpoint. An integration pins to the documented path for the endpoint it calls, and different APIs move independently.
Data model
Amplitude is built around events tied to a user_id or device_id, enriched with event and user properties. Events flow in through the ingestion endpoints; the analytics APIs compute metrics like segmentation, funnels, and retention over them; the Export API returns the raw event stream; cohorts group users by behavior; and the taxonomy APIs define the event and property tracking plan. Hosts differ by job, ingestion at api2.amplitude.com and queries at amplitude.com, with separate EU hosts for data residency.
Connect & authenticate

Connection & authentication methods.

How an app or AI agent connects to Amplitude determines what it can reach. There is a route for sending events, a route for querying analytics and managing the data taxonomy, and a hosted server that exposes Amplitude tools to agents, and each is governed by the credential behind it.

Ways to connect

Ingestion API

The ingestion endpoints take JSON event payloads at https://api2.amplitude.com (api.eu.amplitude.com for the EU region) and return a status. A call authenticates with the project API key placed in the request body. HTTP V2 handles real-time uploads, the batch endpoint handles higher volume, and identify and groupidentify update user and group properties.

Best forSending events and property updates into Amplitude.
Governed byThe project API key in the request body.
Docs ↗

Dashboard REST and data APIs

The query, export, cohort, and taxonomy APIs answer at https://amplitude.com (analytics.eu.amplitude.com for the EU region), except the User Profile API at https://profile-api.amplitude.com. Most authenticate with HTTP Basic auth using the project API key and secret key. The User Profile API instead uses an Authorization: Api-Key header carrying the secret key.

Best forReading analytics, exporting data, and editing the taxonomy.
Governed byThe project API key and secret key.
Docs ↗

MCP server

A hosted Model Context Protocol server at https://mcp.amplitude.com/mcp (https://mcp.eu.amplitude.com/mcp for the EU region) exposes Amplitude tools to AI agents. It authenticates with OAuth 2.0 and respects the signed-in user's existing Amplitude permissions, so an agent reaches only the projects and data that user can see. Tools cover ad-hoc segmentation, funnels, and retention, reading and editing charts, dashboards, notebooks, experiments, cohorts, and metrics, taxonomy management, and Session Replay search. It is not an event-ingestion endpoint.

Best forConnecting an AI agent to Amplitude through MCP.
Governed byThe OAuth grant and the signed-in user's Amplitude permissions.
Docs ↗
Authentication

Project API key

The ingestion endpoints authenticate with the project API key alone, passed in the request body. The key identifies which project events land in, and it is enough on its own to write events and property updates. It does not read analytics or raw data.

TokenProject API key (in the request body)
Best forSending events and property updates.
Docs ↗

API key and secret (Basic auth)

The analytics, export, cohort, and taxonomy APIs authenticate with the project API key as the username and the secret key as the password, over HTTP Basic auth. The pair is scoped to one project and carries no per-endpoint permissions, so any holder can call every endpoint in that project, including raw user-level export.

TokenAPI key and secret key pair
Best forReading analytics, exporting data, and editing taxonomy.
Docs ↗

Secret key (Api-Key header)

The User Profile API authenticates with the project secret key in an Authorization: Api-Key header, rather than Basic auth. It reads one user's computed profile at low latency and is not available in the EU data region.

TokenSecret key in an Authorization header
Best forLow-latency reads of a single user's profile.
Docs ↗

OAuth 2.0 (MCP)

The MCP server uses OAuth 2.0 with Amplitude, so an agent acts as a signed-in user and inherits that user's existing project and data permissions rather than holding a static key.

TokenOAuth access token
Best forConnecting an agent through the MCP server.
Docs ↗
Capability map

What an AI agent can do in Amplitude.

The Amplitude API is split into areas an agent can act on, like sending events, querying analytics such as segmentation, funnels, and retention, exporting raw data, managing cohorts, and editing the event taxonomy. Each area has its own credential and its own reach, and some return raw user-level data.

Endpoint reference

Every Amplitude API method.

Filter by method, access, or permission, or search any path. Select a row for version detail, rate limits, the related webhook event, and the source.

MethodEndpointWhat it doesAccessPermissionVersion

Event ingestion

Send events into a project and update user and group properties.4

Authenticates with the project API key in the request body; one of user_id or device_id and event_type are required. Host api2.amplitude.com (api.eu.amplitude.com for EU).

Acts onevent
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitThrottles a device or user over ~30 events/second average; 429 when exceeded.

Same project API key in the body as HTTP V2; accepts up to 2,000 events and a 20 MB payload, with higher per-device throughput than HTTP V2.

Acts onevent
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitUp to 1,000 events/second per device or user ID; 500,000 events per rolling 24 hours per device or user.

Project API key in the body. Host api2.amplitude.com (api.eu.amplitude.com for EU).

Acts onuser property
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitAn individual user is limited to 1,800 user-property updates per hour.

Project API key in the body. Updates affect only subsequent events, not historical data. Host api2.amplitude.com.

Acts ongroup property
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Analytics (Dashboard REST)

Query computed analytics like active users, segmentation, funnels, retention, and revenue.8

Basic auth with API key and secret. Host amplitude.com (analytics.eu.amplitude.com for EU). Draws from the hourly cost budget.

Acts onactive users
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Basic auth with API key and secret.

Acts onevent type
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Basic auth with API key and secret. Query cost is the number of events plus 4 per group-by.

Acts onsegmentation
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitCost: number of events + 4 per group-by, against the 108,000-per-hour budget.

Basic auth with API key and secret. Query cost is (number of events x 2) plus 4 per group-by.

Acts onfunnel
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitCost: (number of events x 2) + 4 per group-by.

Basic auth with API key and secret. Query cost is a flat 8.

Acts onretention
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitCost: 8 per query.

Basic auth with API key and secret.

Acts onactive users
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Basic auth with API key and secret.

Acts onrevenue
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Basic auth with API key and secret.

Acts onchart
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

User lookup

Find a user and read a single user's event history and profile.2

Basic auth with API key and secret. User Activity and Search allow 10 concurrent requests rather than the default 5.

Acts onuser
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Basic auth with API key and secret. Returns individual user-level events.

Acts onuser
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Raw data export

Export the raw event stream for a time range as zipped JSON.1

Basic auth with API key and secret. start and end are hours in YYYYMMDDTHH; up to 365 days per call and a 4 GB size limit, returning 400 if exceeded. Host amplitude.com.

Acts onevent
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Behavioral cohorts

List cohorts, download a cohort's membership, and upload or update a cohort.4

Basic auth with API key and secret.

Acts oncohort
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitCohort endpoints allow 60 requests per 10 minutes per project, 4 in parallel.

Basic auth with API key and secret. Returns a request_id to poll, then download. A cohort can hold up to 2 million users.

Acts oncohort
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Basic auth with API key and secret.

Acts oncohort
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Basic auth with API key and secret.

Acts oncohort
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Taxonomy

Define and manage event types, event properties, and user properties in the tracking plan.5

Basic auth with API key and secret. A GET costs 1 against the taxonomy budget.

Acts onevent type
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitGET cost 1; period budget 7,200 per hour, 4 concurrent.

Basic auth with API key and secret. A POST costs 2 against the taxonomy budget.

Acts onevent type
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitPOST cost 2.

Basic auth with API key and secret. A PUT costs 2 against the taxonomy budget.

Acts onevent type
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitPUT cost 2.

Basic auth with API key and secret.

Acts onevent property
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitGET cost 1.

Basic auth with API key and secret. A POST costs 2 against the taxonomy budget.

Acts onuser property
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitPOST cost 2.

User Profile

Read a single user's computed profile, properties, recommendations, and cohort membership at low latency.1

Authenticates with the project secret key in an 'Authorization: Api-Key ' header, not Basic auth. Host profile-api.amplitude.com. Not available in the EU data region.

Acts onuser profile
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitAn org is limited to 600 requests per minute across all endpoints.
No endpoints match those filters.
Webhooks

Webhook events.

Amplitude does not publish a standard outbound webhook in these APIs. Its ingestion endpoints are request and response only, so an integration sends events and reads back a status rather than receiving pushed notifications.

EventWhat it signalsTriggered by
No events match that search.
Rate limits & pagination

Rate limits, pagination & request size.

Amplitude limits ingestion by throughput per device or user, and limits the analytics and export APIs by a cost model where each query draws from an hourly budget and a small number of queries can run at once.

Request rate

Amplitude limits ingestion and queries with two different models. Ingestion is throttled per device or user: HTTP V2 averages about 30 events per second for a single device or user and returns 429 over that, the batch endpoint allows up to 1,000 events per second and 500,000 per rolling 24 hours per device or user, and a user is capped at 1,800 property updates per hour. The analytics Dashboard REST API uses a cost budget instead: 108,000 cost units per hour with at most 5 concurrent queries, 10 for User Activity and Search, where each query's cost is days times conditions times a per-query-type cost, so event segmentation costs the number of events plus 4 per group-by, funnels cost the number of events times 2 plus 4 per group-by, and retention costs 8. The taxonomy API has its own budget of 7,200 cost per hour with 4 concurrent, and the cohort API allows 60 requests per 10 minutes per project. The User Profile API allows 600 requests per minute across an org.

Pagination

The analytics APIs return a computed result set for the requested window rather than paging through rows, so the date range and the chosen interval bound the response. The Export API is bounded by time instead of pages: a single call covers at most 365 days and 4 GB, and a larger pull is split into smaller windows. The cohort download is asynchronous: a request returns a request_id that is polled until the file is ready to download.

Request size

HTTP V2 requests must stay under 1 MB with fewer than 2,000 events, and the batch endpoint allows up to 20 MB and 2,000 events, returning 413 when exceeded. Within a payload a string value may be up to 1,024 characters and nested objects may not exceed 40 layers. The Export API returns at most 4 GB per call, returning 400 above that, and exported data is available within about 2 hours of ingestion. A cohort can hold up to 2 million users.

Errors

Status codes & error handling.

The status codes an agent should handle, and what to do about each.

StatusCodeMeaningWhat to do
400Invalid requestThe request was malformed: bad JSON, a missing required field, an invalid field value, or a request that exceeds a documented limit such as the Export API's 4 GB cap.Read the error body, correct the payload or narrow the query, and resend.
403ForbiddenThe request was blocked, for example by Amplitude's web application firewall or because it came from a sanctioned region.Confirm the credential and the source of the request, and contact Amplitude if a legitimate request is blocked.
404Not FoundThere is no data for the requested window, for example an Export API call over an empty time range.Confirm the time range holds data and that ingestion has had time to process it.
413Payload Too LargeThe request body exceeds the size limit, 1 MB for HTTP V2 and 20 MB for the batch endpoint.Split the events across smaller requests and resend.
429Too Many RequestsA throughput limit was hit for a device or user on ingestion, or a query exceeded the analytics cost budget or concurrency limit.Back off and retry with exponential backoff, smooth the request rate, and dedupe events with insert_id.
500Server ErrorAmplitude encountered an error handling the request, which can also appear as 502 or 504.Retry with backoff, and use insert_id so a retry does not duplicate events.
503Service UnavailableThe request failed because of an internal Amplitude issue.Retry with backoff once the service recovers.
Versioning & freshness

Version history.

Amplitude does not date or pin a single API version. Each API is addressed by its own path, and the path segment carries the version of that specific endpoint.

Version history

What changed, and when

Latest versionCurrent
CurrentCurrent version
Path-versioned, no single pinned API version

Amplitude does not publish one dated, account-wide API version. Each API is addressed by its own path, and the version segment in that path belongs to the specific endpoint: ingestion at /2/httpapi, /batch, /identify, and /groupidentify; the Dashboard REST API at /api/2; cohorts spanning /api/3 and /api/5; taxonomy at /api/2/taxonomy; and the User Profile API at /v1/userprofile. An integration pins to the documented path for the endpoint it uses, and the APIs evolve independently rather than on one shared version timeline.

What changed
  • Ingestion endpoints addressed by path: /2/httpapi, /batch, /identify, /groupidentify.
  • Dashboard REST analytics under /api/2; cohorts under /api/3 and /api/5.
  • Taxonomy under /api/2/taxonomy; User Profile under /v1/userprofile.
  • First-party MCP server available with OAuth 2.0 for AI-agent access.

Each API moves independently; pin to the documented path for the endpoint in use.

Amplitude API docs ↗
Questions

Amplitude API, answered.

What's the difference between the API key and the secret key?+
The API key identifies a project and is enough on its own to send events through the ingestion endpoints, where it goes in the request body. The secret key is the password half of the credential the analytics, export, cohort, and taxonomy APIs need, sent with the API key over HTTP Basic auth. The User Profile API uses the secret key in an Authorization: Api-Key header. Both keys are per-project, and the secret key should never be exposed in client code.
HTTP V2 or the Batch Event Upload API, which should I use?+
HTTP V2 is the default for real-time, server-side event uploads, capped at 1 MB and fewer than 2,000 events per request. The batch endpoint suits higher-volume backfills and migrations: it accepts up to 20 MB and 2,000 events per request and allows much higher per-device throughput, up to 1,000 events per second. The batch endpoint also expects Content-Type application/json and the plural events key. Both deduplicate with insert_id.
Why does my analytics query return 429 when I am under the request rate?+
The Dashboard REST API limits by cost, not by request count. There is a budget of 108,000 cost units per hour and at most 5 concurrent queries, 10 for User Activity and Search. Each query's cost is the number of days times the number of conditions times a per-query-type cost, so a wide date range or many group-by conditions can exhaust the budget quickly. Narrow the window, reduce conditions, and limit concurrency.
How do I export raw events rather than computed metrics?+
The Export API returns the raw event stream for an hour range as a zipped archive of JSON files, one event per line, authenticated with the API key and secret over Basic auth. A single call covers at most 365 days and 4 GB and returns 400 above that, and data is available within about 2 hours of ingestion. For very large pulls, split the window or use a continuous export to cloud storage instead.
Does Amplitude send webhooks when something happens?+
These first-party APIs do not publish a standard outbound webhook for analytics events. The ingestion endpoints are request and response only: an integration sends events and reads back a status code rather than receiving pushed notifications. To learn about activity, an integration queries the analytics or export APIs, or uses Amplitude's separate event-streaming and destination features.
Does Amplitude have an official MCP server for AI agents?+
Yes. Amplitude publishes a hosted Model Context Protocol server at mcp.amplitude.com/mcp, with an EU host at mcp.eu.amplitude.com/mcp. It authenticates with OAuth 2.0 and respects the signed-in user's existing Amplitude permissions, exposing tools for ad-hoc segmentation, funnels, and retention, reading and editing charts, dashboards, notebooks, experiments, cohorts, and metrics, taxonomy management, and Session Replay search. It is not an event-ingestion endpoint.
How do I work with cohorts through the API?+
The Behavioral Cohorts API lists discoverable cohorts, downloads a cohort's membership, and uploads or updates a cohort. A download is asynchronous: a request returns a request_id, which is polled until the file is ready, then downloaded. Uploading creates or replaces a cohort by a list of IDs, and the membership endpoint adds or removes IDs incrementally. A cohort can hold up to 2 million users, and the API allows 60 requests per 10 minutes per project.
Related

More analytics API guides for agents

What is Bollard AI?

Control what every AI agent can do in Amplitude.

Bollard AI sits between a team's AI agents and Amplitude. Grant each agent exactly the access it needs, read or write, area by area, and every call is checked and logged.

  • Set read, write, or full access per agent, never a shared Amplitude key and secret.
  • Denied by default, so an agent reaches only what has been explicitly allowed.
  • Every call recorded in plain English: who, what, where, and the decision.
Amplitude
Analytics Agent
Run segmentation and funnels ActionOffReadFull use
Send events ActionOffReadFull use
Taxonomy (events and properties) ResourceOffReadFull use
Raw event export ResourceOffReadFull use
Per-agent access, set in Bollard AI, not in Amplitude