# Amplitude (/integrations/amplitude)





{/* MANUAL-CONTENT-START:intro */}

Use [Amplitude](https://amplitude.com/) to send events, update user and group properties, and query product analytics from a workflow. The HTTP and Dashboard REST APIs use API-key and secret-key authentication.

{/* MANUAL-CONTENT-END */}

## Use the block [#usage-instructions]

Track events, identify users and groups, search for users, query analytics, analyze funnels and retention, and retrieve revenue data.

## Actions [#actions]

### Amplitude Send Event [#amplitude-send-event]

Track an event in Amplitude using the HTTP V2 API.

<ReferenceDetails>
  #### Input [#input]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `apiKey` | string | Yes | Amplitude API Key |
  | `userId` | string | No | User ID (required if no device\_id) |
  | `deviceId` | string | No | Device ID (required if no user\_id) |
  | `eventType` | string | Yes | Name of the event (e.g., "page\_view", "purchase") |
  | `eventProperties` | string | No | JSON object of custom event properties |
  | `userProperties` | string | No | JSON object of user properties to set (supports $set, $setOnce, $add, $append, $unset) |
  | `time` | string | No | Event timestamp in milliseconds since epoch |
  | `sessionId` | string | No | Session start time in milliseconds since epoch |
  | `insertId` | string | No | Unique ID for deduplication (within 7-day window) |
  | `appVersion` | string | No | Application version string |
  | `platform` | string | No | Platform (e.g., "Web", "iOS", "Android") |
  | `country` | string | No | Two-letter country code |
  | `language` | string | No | Language code (e.g., "en") |
  | `ip` | string | No | IP address for geo-location |
  | `price` | string | No | Price of the item purchased |
  | `quantity` | string | No | Quantity of items purchased |
  | `revenue` | string | No | Revenue amount |
  | `productId` | string | No | Product identifier |
  | `revenueType` | string | No | Revenue type (e.g., "purchase", "refund") |
  | `dataResidency` | string | No | Data residency region: "us" (default) or "eu" |

  #### Output [#output]

  | Parameter | Type | Description |
  | - | - | - |
  | `code` | number | Response code (200 for success) |
  | `eventsIngested` | number | Number of events ingested |
  | `payloadSizeBytes` | number | Size of the payload in bytes |
  | `serverUploadTime` | number | Server upload timestamp |
</ReferenceDetails>

### Amplitude Identify User [#amplitude-identify-user]

Set user properties in Amplitude using the Identify API. Supports $set, $setOnce, $add, $append, $unset operations.

<ReferenceDetails>
  #### Input [#input-1]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `apiKey` | string | Yes | Amplitude API Key |
  | `userId` | string | No | User ID (required if no device\_id) |
  | `deviceId` | string | No | Device ID (required if no user\_id) |
  | `userProperties` | string | Yes | JSON object of user properties. Use operations like $set, $setOnce, $add, $append, $unset. |
  | `dataResidency` | string | No | Data residency region: "us" (default) or "eu" |

  #### Output [#output-1]

  | Parameter | Type | Description |
  | - | - | - |
  | `code` | number | HTTP response status code |
  | `message` | string | Response message |
</ReferenceDetails>

### Amplitude Group Identify [#amplitude-group-identify]

Set group-level properties in Amplitude. Supports $set, $setOnce, $add, $append, $unset operations.

<ReferenceDetails>
  #### Input [#input-2]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `apiKey` | string | Yes | Amplitude API Key |
  | `groupType` | string | Yes | Group classification (e.g., "company", "org\_id") |
  | `groupValue` | string | Yes | Specific group identifier (e.g., "Acme Corp") |
  | `groupProperties` | string | Yes | JSON object of group properties. Use operations like $set, $setOnce, $add, $append, $unset. |
  | `dataResidency` | string | No | Data residency region: "us" (default) or "eu" |

  #### Output [#output-2]

  | Parameter | Type | Description |
  | - | - | - |
  | `code` | number | HTTP response status code |
  | `message` | string | Response message |
</ReferenceDetails>

### Amplitude User Search [#amplitude-user-search]

Search for a user by User ID, Device ID, or Amplitude ID using the Dashboard REST API.

<ReferenceDetails>
  #### Input [#input-3]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `apiKey` | string | Yes | Amplitude API Key |
  | `secretKey` | string | Yes | Amplitude Secret Key |
  | `user` | string | Yes | User ID, Device ID, or Amplitude ID to search for |
  | `dataResidency` | string | No | Data residency region: "us" (default) or "eu" |

  #### Output [#output-3]

  | Parameter | Type | Description |
  | - | - | - |
  | `matches` | array | List of matching users |
  | ↳ `amplitudeId` | number | Amplitude internal user ID |
  | ↳ `userId` | string | External user ID |
  | `type` | string | Match type (e.g., match\_user\_or\_device\_id) |
</ReferenceDetails>

### Amplitude User Activity [#amplitude-user-activity]

Get the event stream for a specific user by their Amplitude ID.

<ReferenceDetails>
  #### Input [#input-4]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `apiKey` | string | Yes | Amplitude API Key |
  | `secretKey` | string | Yes | Amplitude Secret Key |
  | `amplitudeId` | string | Yes | Amplitude internal user ID |
  | `offset` | string | No | Offset for pagination (default 0) |
  | `limit` | string | No | Maximum number of events to return (default 1000, max 1000) |
  | `direction` | string | No | Sort direction: "latest" or "earliest" (default: latest) |
  | `dataResidency` | string | No | Data residency region: "us" (default) or "eu" |

  #### Output [#output-4]

  | Parameter | Type | Description |
  | - | - | - |
  | `events` | array | List of user events |
  | ↳ `eventType` | string | Type of event |
  | ↳ `eventTime` | string | Event timestamp |
  | ↳ `eventProperties` | json | Custom event properties |
  | ↳ `userProperties` | json | User properties at event time |
  | ↳ `sessionId` | number | Session ID |
  | ↳ `platform` | string | Platform |
  | ↳ `country` | string | Country |
  | ↳ `city` | string | City |
  | `userData` | json | User metadata |
  | ↳ `userId` | string | External user ID |
  | ↳ `canonicalAmplitudeId` | number | Canonical Amplitude ID |
  | ↳ `numEvents` | number | Total event count |
  | ↳ `numSessions` | number | Total session count |
  | ↳ `platform` | string | Primary platform |
  | ↳ `country` | string | Country |
  | ↳ `firstUsed` | string | Date the user first appeared |
  | ↳ `lastUsed` | string | Date of most recent user activity |
</ReferenceDetails>

### Amplitude User Profile [#amplitude-user-profile]

Get a user profile including properties, cohort memberships, and computed properties. Not available for EU data-residency projects.

<ReferenceDetails>
  #### Input [#input-5]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `secretKey` | string | Yes | Amplitude Secret Key |
  | `userId` | string | No | External user ID (required if no device\_id) |
  | `deviceId` | string | No | Device ID (required if no user\_id) |
  | `getAmpProps` | string | No | Include Amplitude user properties (true/false, default: false) |
  | `getCohortIds` | string | No | Include cohort IDs the user belongs to (true/false, default: false) |
  | `getComputations` | string | No | Include computed user properties (true/false, default: false) |

  #### Output [#output-5]

  | Parameter | Type | Description |
  | - | - | - |
  | `userId` | string | External user ID |
  | `deviceId` | string | Device ID |
  | `ampProps` | json | Amplitude user properties (library, first\_used, last\_used, custom properties) |
  | `cohortIds` | array | List of cohort IDs the user belongs to |
  | `computations` | json | Computed user properties |
</ReferenceDetails>

### Amplitude Event Segmentation [#amplitude-event-segmentation]

Query event analytics data with segmentation. Get event counts, uniques, averages, and more.

<ReferenceDetails>
  #### Input [#input-6]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `apiKey` | string | Yes | Amplitude API Key |
  | `secretKey` | string | Yes | Amplitude Secret Key |
  | `eventType` | string | Yes | Event type name to analyze |
  | `start` | string | Yes | Start date in YYYYMMDD format |
  | `end` | string | Yes | End date in YYYYMMDD format |
  | `metric` | string | No | Metric type: uniques, totals, pct\_dau, average, histogram, sums, value\_avg, or formula (default: uniques) |
  | `interval` | string | No | Time interval: 1 (daily), 7 (weekly), or 30 (monthly) |
  | `groupBy` | string | No | Property name to group by (prefix custom user properties with "gp:") |
  | `groupBy2` | string | No | Second property name to group by (prefix custom user properties with "gp:") |
  | `limit` | string | No | Maximum number of group-by values (max 1000) |
  | `filters` | string | No | JSON array of filter objects applied to the event, e.g. \[\{"subprop\_type":"event","subprop\_key":"city","subprop\_op":"is","subprop\_value":\["San Francisco"]}] |
  | `formula` | string | No | Required when metric is "formula", e.g. "UNIQUES(A)/UNIQUES(B)" |
  | `segment` | string | No | JSON segment definition(s) applied to the query |
  | `dataResidency` | string | No | Data residency region: "us" (default) or "eu" |

  #### Output [#output-6]

  | Parameter | Type | Description |
  | - | - | - |
  | `series` | json | Time-series data arrays indexed by series |
  | `seriesLabels` | array | Labels for each data series |
  | `seriesCollapsed` | json | Collapsed aggregate totals per series |
  | `xValues` | array | Date values for the x-axis |
</ReferenceDetails>

### Amplitude Get Active Users [#amplitude-get-active-users]

Get active or new user counts over a date range from the Dashboard REST API.

<ReferenceDetails>
  #### Input [#input-7]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `apiKey` | string | Yes | Amplitude API Key |
  | `secretKey` | string | Yes | Amplitude Secret Key |
  | `start` | string | Yes | Start date in YYYYMMDD format |
  | `end` | string | Yes | End date in YYYYMMDD format |
  | `metric` | string | No | Metric type: "active" or "new" (default: active) |
  | `interval` | string | No | Time interval: 1 (daily), 7 (weekly), or 30 (monthly) |
  | `groupBy` | string | No | Property name to group by |
  | `segment` | string | No | JSON segment definition(s) applied to the query |
  | `dataResidency` | string | No | Data residency region: "us" (default) or "eu" |

  #### Output [#output-7]

  | Parameter | Type | Description |
  | - | - | - |
  | `series` | json | Array of data series with user counts per time interval |
  | `seriesMeta` | array | Metadata labels for each data series (e.g., segment names) |
  | `xValues` | array | Date values for the x-axis |
</ReferenceDetails>

### Amplitude Real-time Active Users [#amplitude-real-time-active-users]

Get real-time active user counts at 5-minute granularity for the last 2 days.

<ReferenceDetails>
  #### Input [#input-8]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `apiKey` | string | Yes | Amplitude API Key |
  | `secretKey` | string | Yes | Amplitude Secret Key |
  | `dataResidency` | string | No | Data residency region: "us" (default) or "eu" |

  #### Output [#output-8]

  | Parameter | Type | Description |
  | - | - | - |
  | `series` | json | Array of data series with active user counts at 5-minute intervals |
  | `seriesLabels` | array | Labels for each series (e.g., "Today", "Yesterday") |
  | `xValues` | array | Time values for the x-axis (e.g., "15:00", "15:05") |
</ReferenceDetails>

### Amplitude List Events [#amplitude-list-events]

List all event types in the Amplitude project with their weekly totals and unique counts.

<ReferenceDetails>
  #### Input [#input-9]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `apiKey` | string | Yes | Amplitude API Key |
  | `secretKey` | string | Yes | Amplitude Secret Key |
  | `dataResidency` | string | No | Data residency region: "us" (default) or "eu" |

  #### Output [#output-9]

  | Parameter | Type | Description |
  | - | - | - |
  | `events` | array | List of event types in the project |
  | ↳ `value` | string | Event type name |
  | ↳ `displayName` | string | Event display name |
  | ↳ `totals` | number | Weekly total count |
  | ↳ `hidden` | boolean | Whether the event is hidden |
  | ↳ `deleted` | boolean | Whether the event is deleted |
  | ↳ `nonActive` | boolean | Whether the event is excluded from active user calculations |
  | ↳ `flowHidden` | boolean | Whether the event is hidden from user flow charts |
</ReferenceDetails>

### Amplitude Get Revenue [#amplitude-get-revenue]

Get revenue LTV data including ARPU, ARPPU, total revenue, and paying user counts.

<ReferenceDetails>
  #### Input [#input-10]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `apiKey` | string | Yes | Amplitude API Key |
  | `secretKey` | string | Yes | Amplitude Secret Key |
  | `start` | string | Yes | Start date in YYYYMMDD format |
  | `end` | string | Yes | End date in YYYYMMDD format |
  | `metric` | string | No | Metric: 0 (ARPU), 1 (ARPPU), 2 (Total Revenue), 3 (Paying Users) |
  | `interval` | string | No | Time interval: 1 (daily), 7 (weekly), or 30 (monthly) |
  | `groupBy` | string | No | Property name to group by (limit: one) |
  | `segment` | string | No | JSON segment definition(s) applied to the query |
  | `dataResidency` | string | No | Data residency region: "us" (default) or "eu" |

  #### Output [#output-10]

  | Parameter | Type | Description |
  | - | - | - |
  | `series` | array | Revenue data series \[\{dates: \[YYYY-MM-DD], values: \{\<date>: \{r1d..r90d, count, paid, total\_amount}}}] |
  | ↳ `dates` | array | Dates covered by this series |
  | ↳ `values` | json | Per-date metric values keyed by date (r1d..r90d, count, paid, total\_amount) |
  | `seriesLabels` | array | Labels for each data series |
</ReferenceDetails>

### Amplitude Funnels [#amplitude-funnels]

Analyze conversion rates and drop-off between a sequence of events.

<ReferenceDetails>
  #### Input [#input-11]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `apiKey` | string | Yes | Amplitude API Key |
  | `secretKey` | string | Yes | Amplitude Secret Key |
  | `events` | string | Yes | JSON array of event objects, one per funnel step in order, e.g. \[\{"event\_type":"signup"},\{"event\_type":"purchase"}] |
  | `start` | string | Yes | Start date in YYYYMMDD format |
  | `end` | string | Yes | End date in YYYYMMDD format |
  | `mode` | string | No | Funnel ordering: "ordered", "unordered", or "sequential" (default: ordered) |
  | `userType` | string | No | User type: "new" or "active" (default: active) |
  | `interval` | string | No | Time interval: -300000 (real-time), -3600000 (hourly), 1 (daily), 7 (weekly), or 30 (monthly) |
  | `conversionWindowSeconds` | string | No | Conversion window in seconds (default: 2592000, i.e. 30 days) |
  | `groupBy` | string | No | Property to group by (limit: one; prefix custom properties with "gp:") |
  | `limit` | string | No | Maximum number of group-by values (default: 100, max: 1000) |
  | `segment` | string | No | JSON segment definition(s) applied to the query |
  | `dataResidency` | string | No | Data residency region: "us" (default) or "eu" |

  #### Output [#output-11]

  | Parameter | Type | Description |
  | - | - | - |
  | `funnels` | array | Funnel results, one entry per segment |
  | ↳ `stepByStep` | json | Conversion count at each step |
  | ↳ `cumulative` | json | Cumulative conversion percentage at each step |
  | ↳ `cumulativeRaw` | json | Cumulative conversion count at each step |
  | ↳ `medianTransTimes` | json | Median transition time between steps (ms) |
  | ↳ `avgTransTimes` | json | Average transition time between steps (ms) |
  | ↳ `events` | json | Event names for each funnel step |
  | ↳ `dayFunnels` | json | Daily funnel breakdown \{series, xValues} |
</ReferenceDetails>

### Amplitude Retention [#amplitude-retention]

Measure how many users return to perform an action after a starting action.

<ReferenceDetails>
  #### Input [#input-12]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `apiKey` | string | Yes | Amplitude API Key |
  | `secretKey` | string | Yes | Amplitude Secret Key |
  | `startEvent` | string | Yes | JSON starting event object, e.g. \{"event\_type":"\_new"} or \{"event\_type":"\_active"} |
  | `returnEvent` | string | Yes | JSON returning event object, e.g. \{"event\_type":"\_all"} or \{"event\_type":"\_active"} |
  | `start` | string | Yes | Start date in YYYYMMDD format |
  | `end` | string | Yes | End date in YYYYMMDD format |
  | `retentionMode` | string | No | Retention type: "bracket", "rolling", or "n-day" (default: n-day) |
  | `retentionBrackets` | string | No | Required when Retention Mode is "bracket". Day ranges, e.g. \[\[0,4]] |
  | `interval` | string | No | Time interval: 1 (daily), 7 (weekly), or 30 (monthly) |
  | `groupBy` | string | No | Property to group by (limit: one; prefix custom properties with "gp:") |
  | `segment` | string | No | JSON segment definition(s) applied to the query |
  | `dataResidency` | string | No | Data residency region: "us" (default) or "eu" |

  #### Output [#output-12]

  | Parameter | Type | Description |
  | - | - | - |
  | `series` | array | Retention data series \[\{dates, values: \{\<date>: \[\{count, outof, incomplete}]}, combined: \[\{count, outof, incomplete}]}] |
  | ↳ `dates` | array | Cohort dates |
  | ↳ `values` | json | Per-cohort-date retention counts keyed by date |
  | ↳ `combined` | json | Deduplicated aggregate retention across all cohorts |
  | `seriesMeta` | array | Segment/event index metadata for each series entry |
</ReferenceDetails>
