Export an Amplitude behavioral cohort asynchronously using the Behavioral Cohorts API

domain: amplitude.com · 5 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Authenticate all requests using HTTP Basic Authentication with your Amplitude API key as the username and your secret key as the password.
  2. List available cohorts with GET https://amplitude.com/api/3/cohorts to identify the cohort ID and confirm its size — cohorts over 2 million users cannot be exported via this API and require a cohort sync instead.
  3. Initiate the async export by sending GET https://amplitude.com/api/5/cohorts/request/{cohort_id}; optionally append ?props=1 to include all user properties or ?propKeys=email,plan to include specific ones. The response returns a request_id.
  4. Poll the job status with GET https://amplitude.com/api/5/cohorts/request-status/{request_id} until async_status returns JOB COMPLETED (HTTP 200); a still-running job returns HTTP 202 with JOB INPROGRESS.
  5. Download the cohort file with GET https://amplitude.com/api/5/cohorts/request/{request_id}/file — small cohorts return data inline; large cohorts redirect (HTTP 302) to a pre-signed S3 URL that expires after one minute, so download immediately.

Known gotchas

Related routes

Export records from a REDCap project via the REDCap API including longitudinal event data
project-redcap.org (REDCap API documentation) · 6 steps · unrated
Export Robin space and desk-assignment analytics data as an asynchronous job through the Robin Insights export API.
docs.robinpowered.com · 5 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans