# Amplitude

Query Amplitude product analytics: events, segmentation, funnels, cohorts. Exposes **19 actions** covering the full API surface
the agent needs - read and write.

## What it can do

| Method | What it does |
| --- | --- |
| `amplitude_list_projects` | List all projects in the workspace - GET /projects. |
| `amplitude_get_project` | Get project details - GET /projects/&#123;project_id&#125;. |
| `amplitude_create_project` | Create a new project - POST /projects. |
| `amplitude_update_project` | Update a project - PUT /projects/&#123;project_id&#125;. |
| `amplitude_delete_project` | Delete a project - DELETE /projects/&#123;project_id&#125;. |
| `amplitude_list_cohorts` | List all cohorts in a project - GET /projects/&#123;project_id&#125;/cohorts. |
| `amplitude_get_cohort` | Get cohort details - GET /projects/&#123;project_id&#125;/cohorts/&#123;cohort_id&#125;. |
| `amplitude_create_cohort` | Create a new cohort - POST /projects/&#123;project_id&#125;/cohorts. |
| `amplitude_delete_cohort` | Delete a cohort - DELETE /projects/&#123;project_id&#125;/cohorts/&#123;cohort_id&#125;. |
| `amplitude_export_events` | Export events for analysis - GET /projects/&#123;project_id&#125;/export. |
| `amplitude_user_search` | Look up a specific user and their properties - GET /projects/&#123;project_id&#125;/users. |
| `amplitude_user_active` | Get active user count - GET /projects/&#123;project_id&#125;/active_users. |
| `amplitude_group_search` | Look up a group (e.g., company/organization) - GET /projects/&#123;project_id&#125;/groups. |
| `amplitude_list_charts` | List dashboard charts - GET /projects/&#123;project_id&#125;/charts. |
| `amplitude_get_chart` | Get chart details - GET /projects/&#123;project_id&#125;/charts/&#123;chart_id&#125;. |
| `amplitude_create_chart` | Create a dashboard chart - POST /projects/&#123;project_id&#125;/charts. |
| `amplitude_get_event_segmentation` | Get event segmentation data - GET /projects/&#123;project_id&#125;/events/&#123;event_type&#125;. |
| `amplitude_get_user_composition` | Get user composition by property - GET /projects/&#123;project_id&#125;/users/composition. |
| `amplitude_get_funnel_analysis` | Analyze a funnel (multi-step conversion flow) - GET /projects/&#123;project_id&#125;/funnels. |

## How to get credentials

This connector uses an **API key / token**. Create one in the provider
dashboard, then paste it into FlyMyAI:

- **`AMPLITUDE_API_KEY`** - Amplitude - Settings - Projects - API key. (https://app.amplitude.com/)
- **`AMPLITUDE_SECRET_KEY`** - Same Project settings page.

## Fields to fill in FlyMyAI

| FlyMyAI field | Where it comes from |
| --- | --- |
| `AMPLITUDE_API_KEY` | Amplitude - Settings - Projects - API key. |
| `AMPLITUDE_SECRET_KEY` | Same Project settings page. |

## Troubleshooting

- **`401 Unauthorized` / `403 Forbidden`** - the token is wrong, expired, or missing a required scope - regenerate it.
- **`429 Too Many Requests`** - you hit the provider rate limit; retry after a short backoff.
- **Unexpected `4xx` on writes** - double-check required fields; the agent confirms before write actions.

## Links

- [Amplitude API documentation](https://developers.amplitude.com/docs)
