> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mavera.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Amplitude

> 4 production-ready jobs — demographic persona calibration, user journey mapping, behavioral cohort focus groups, and revenue-driven pricing validation

Amplitude holds your product's behavioral intelligence — user composition, activity timelines, cohort comparisons, and revenue metrics. These four jobs pull that data through Mavera's surfaces (Custom Personas, Mave Agent, Focus Groups) so your personas reflect real demographics, your journey maps are grounded in actual paths, and your pricing decisions are informed by synthetic audience reactions.

***

## API Reference Card

| Detail          | Value                                    |
| --------------- | ---------------------------------------- |
| **Base URL**    | `https://amplitude.com/api/2`            |
| **Auth**        | HTTP Basic Auth (`API_KEY:SECRET_KEY`)   |
| **Rate limits** | 10 concurrent requests; 360 queries/hour |
| **Mavera base** | `https://app.mavera.io/api/v1`           |
| **Mavera auth** | `Authorization: Bearer mvra_live_...`    |

<Info>
  All examples use three environment variables: `AMPLITUDE_API_KEY`, `AMPLITUDE_SECRET_KEY`, and `MAVERA_API_KEY`. Python examples use `requests` with Basic Auth; JavaScript examples use `fetch` with a Base64-encoded `Authorization` header.
</Info>

***

## Prerequisites

<Steps>
  <Step title="Amplitude project with data">You need an active Amplitude project with at least 30 days of tracked events and user properties. Find your project in Amplitude → Settings → Projects.</Step>
  <Step title="API credentials">Create API keys in Amplitude → Settings → Projects → your project → General. Copy the **API Key** and **Secret Key**.</Step>
  <Step title="Mavera API key">Get your key from [Mavera dashboard](https://app.mavera.io/settings/api-keys).</Step>

  <Step title="Environment variables">
    ```bash theme={"dark"}
    export AMPLITUDE_API_KEY="your-amplitude-api-key"
    export AMPLITUDE_SECRET_KEY="your-amplitude-secret-key"
    export MAVERA_API_KEY="mvra_live_xxxxx"
    ```
  </Step>
</Steps>

***

## Jobs

| # | Job                                                                                      | Amplitude Data         | Mavera Surface  | Output                                                 |
| - | ---------------------------------------------------------------------------------------- | ---------------------- | --------------- | ------------------------------------------------------ |
| 1 | [User Composition → Persona Calibration](/integrations/amplitude/persona-calibration)    | /api/2/composition     | Custom Personas | Demographics-calibrated persona set                    |
| 2 | [User Activity Timeline → Journey Mapping](/integrations/amplitude/journey-mapping)      | /api/2/useractivity    | Mave Agent      | Journey maps with conversion paths and friction points |
| 3 | [Behavioral Cohort → Focus Group](/integrations/amplitude/behavioral-cohort-focus-group) | Cohort behavioral data | Focus Groups    | Experience difference insights across cohorts          |
| 4 | [Revenue Analysis → Pricing Focus Group](/integrations/amplitude/pricing-focus-group)    | Revenue metrics + ARPU | Focus Groups    | Willingness-to-pay validation with Slider + NPS        |

***

## Rate Limits & Production Notes

| Amplitude Endpoint                               | Limit                           | Strategy                                                 |
| ------------------------------------------------ | ------------------------------- | -------------------------------------------------------- |
| Dashboard REST APIs (composition, funnels, etc.) | 360 queries/hour; 10 concurrent | Queue queries; respect `Retry-After` header on 429       |
| User Activity (`/api/2/useractivity`)            | Same pool as Dashboard APIs     | 1s delay between user lookups; batch efficiently         |
| Revenue API (`/api/2/revenue/day`)               | Same pool                       | Cache daily; revenue data rarely needs real-time refresh |

<Warning>
  Amplitude's **360 queries/hour** limit is shared across all Dashboard REST API endpoints. If you run all 4 jobs sequentially with the sample sizes shown, you'll use approximately 50 queries. Spread large user-activity sampling across multiple hours.
</Warning>

**Production checklist:**

| Concern              | Recommendation                                                                                                                                      |
| -------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| API key rotation     | Rotate API keys quarterly in Amplitude → Settings → Projects. Secret keys cannot be recovered — store them in a secrets manager.                    |
| Date format          | Amplitude uses `YYYYMMDD` (no dashes). Passing ISO dates (`2026-02-15`) returns 400 errors.                                                         |
| EU data residency    | If your Amplitude project is EU-based, use `https://analytics.eu.amplitude.com/api/2` instead of `https://amplitude.com/api/2`.                     |
| User Activity volume | Each user lookup returns up to 1,000 events. For users with more, paginate using the `offset` parameter.                                            |
| Mavera credits       | Monitor at [Dashboard](https://app.mavera.io/settings/usage). Focus Groups with 3 personas × 5 questions consume more credits than Mave chat calls. |
| Caching              | Cache composition and revenue data locally — they update daily at most. User activity data is suitable for weekly re-pulls.                         |

***

## What's Next

<CardGroup cols={2}>
  <Card title="All Integrations" icon="plug" href="/integrations">
    50+ API integrations with full code
  </Card>

  <Card title="Amplitude API Docs" icon="wave-square" href="https://www.docs.developers.amplitude.com/analytics/apis/dashboard-rest-api/">
    Official Amplitude Dashboard REST API reference
  </Card>

  <Card title="Personas API" icon="users" href="/api-reference/personas">
    Full reference for POST /api/v1/personas
  </Card>

  <Card title="Focus Groups API" icon="comments" href="/api-reference/focus-groups">
    Full reference for POST /api/v1/focus-groups
  </Card>

  <Card title="Mave Agent" icon="brain" href="/api-reference/mave">
    Full reference for POST /api/v1/mave/chat
  </Card>
</CardGroup>
