Skip to main content
Amplitude logo

Overview

Add Amplitude to any ModuleX agent or workflow. Track events, identify users and groups, search for users, query analytics, and retrieve revenue data from Amplitude via its HTTP V2, Identify, Dashboard REST, and User Profile APIs.
Categories: Analytics & Data · Product Analytics · Marketing · Auth: Amplitude API Key + Secret Key · Actions: 11

Authentication

Amplitude API Key + Secret Key

Authenticate with your Amplitude project’s API Key (used to send events and identify users) and Secret Key (required for the Dashboard REST API and User Profile analytics endpoints).
1

Step 1

Sign in to Amplitude and open the project you want to use.
2

Step 2

Go to Settings -> Projects -> (your project) -> General.
3

Step 3

Copy the ‘API Key’ and the ‘Secret Key’ shown for the project.
4

Step 4

Provide the API Key for event tracking; the Secret Key is also needed for analytics/dashboard queries.

Required Credentials

FieldDescriptionRequiredFormat
API KeyAmplitude project API Key (used for event tracking and Dashboard Basic auth).Yes-
Secret KeyAmplitude project Secret Key (required for Dashboard REST API and User Profile queries).No-

Available Actions

Parameters

event_type
string
required
Name of the event (e.g., “page_view”, “purchase”).
user_id
string
User ID (required if no device_id).
device_id
string
Device ID (required if no user_id).
event_properties
object
Custom event properties as a JSON object.
user_properties
object
User properties to set (supports set,set, setOnce, add,add, append, $unset).
time
integer
Event timestamp in milliseconds since epoch.
session_id
integer
Session start time in milliseconds since epoch (-1 for no session).
insert_id
string
Unique ID for deduplication (within a 7-day window).
app_version
string
Application version string.
platform
string
Platform (e.g., “Web”, “iOS”, “Android”).
country
string
Two-letter country code.
language
string
Language code (e.g., “en”).
ip
string
IP address for geo-location (use “$remote” for request IP).
price
number
Price of the item purchased.
quantity
integer
Quantity of items purchased.
revenue
number
Revenue amount.
product_id
string
Product identifier.
revenue_type
string
Revenue type (e.g., “purchase”, “refund”).

Response

{
  "additionalProperties": false,
  "properties": {
    "success": {
      "title": "Success",
      "type": "boolean"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Error"
    },
    "code": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Code"
    },
    "events_ingested": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Events Ingested"
    },
    "payload_size_bytes": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Payload Size Bytes"
    },
    "server_upload_time": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Server Upload Time"
    }
  },
  "required": [
    "success"
  ],
  "title": "SendEventOutput",
  "type": "object"
}

Parameters

user_properties
object
required
User properties to set. Use operations like set,set, setOnce, add,add, append, $unset.
user_id
string
User ID (required if no device_id).
device_id
string
Device ID (required if no user_id).

Response

{
  "additionalProperties": false,
  "properties": {
    "success": {
      "title": "Success",
      "type": "boolean"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Error"
    },
    "code": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Code"
    },
    "message": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Message"
    }
  },
  "required": [
    "success"
  ],
  "title": "IdentifyUserOutput",
  "type": "object"
}

Parameters

group_type
string
required
Group classification (e.g., “company”, “org_id”).
group_value
string
required
Specific group identifier (e.g., “Acme Corp”).
group_properties
object
required
Group properties as a JSON object. Use operations like set,set, setOnce, add,add, append, $unset.

Response

{
  "additionalProperties": false,
  "properties": {
    "success": {
      "title": "Success",
      "type": "boolean"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Error"
    },
    "code": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Code"
    },
    "message": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Message"
    }
  },
  "required": [
    "success"
  ],
  "title": "GroupIdentifyOutput",
  "type": "object"
}

Parameters

user
string
required
User ID, Device ID, or Amplitude ID to search for.

Response

{
  "$defs": {
    "UserSearchMatch": {
      "additionalProperties": false,
      "description": "A single user-search match entry.",
      "properties": {
        "amplitude_id": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Amplitude Id"
        },
        "user_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "User Id"
        }
      },
      "title": "UserSearchMatch",
      "type": "object"
    }
  },
  "additionalProperties": false,
  "properties": {
    "success": {
      "title": "Success",
      "type": "boolean"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Error"
    },
    "matches": {
      "items": {
        "$ref": "#/$defs/UserSearchMatch"
      },
      "title": "Matches",
      "type": "array"
    },
    "type": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Type"
    }
  },
  "required": [
    "success"
  ],
  "title": "UserSearchOutput",
  "type": "object"
}

Parameters

amplitude_id
string
required
Amplitude internal user ID.
offset
integer
Offset for pagination (default 0).
limit
integer
Maximum number of events to return (default 1000, max 1000).
direction
string
Sort direction: “latest” or “earliest” (default: latest).

Response

{
  "$defs": {
    "UserActivityEvent": {
      "additionalProperties": false,
      "description": "A single event in a user's activity stream.",
      "properties": {
        "event_type": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Event Type"
        },
        "event_time": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Event Time"
        },
        "event_properties": {
          "additionalProperties": true,
          "title": "Event Properties",
          "type": "object"
        },
        "user_properties": {
          "additionalProperties": true,
          "title": "User Properties",
          "type": "object"
        },
        "session_id": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Session Id"
        },
        "platform": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Platform"
        },
        "country": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Country"
        },
        "city": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "City"
        }
      },
      "title": "UserActivityEvent",
      "type": "object"
    },
    "UserData": {
      "additionalProperties": false,
      "description": "User metadata returned alongside an activity stream.",
      "properties": {
        "user_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "User Id"
        },
        "canonical_amplitude_id": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Canonical Amplitude Id"
        },
        "num_events": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Num Events"
        },
        "num_sessions": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Num Sessions"
        },
        "platform": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Platform"
        },
        "country": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Country"
        }
      },
      "title": "UserData",
      "type": "object"
    }
  },
  "additionalProperties": false,
  "properties": {
    "success": {
      "title": "Success",
      "type": "boolean"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Error"
    },
    "events": {
      "items": {
        "$ref": "#/$defs/UserActivityEvent"
      },
      "title": "Events",
      "type": "array"
    },
    "user_data": {
      "anyOf": [
        {
          "$ref": "#/$defs/UserData"
        },
        {
          "type": "null"
        }
      ],
      "default": null
    }
  },
  "required": [
    "success"
  ],
  "title": "UserActivityOutput",
  "type": "object"
}

Parameters

user_id
string
External user ID (required if no device_id).
device_id
string
Device ID (required if no user_id).
get_amp_props
boolean
Include Amplitude user properties (default: false). (Default: false)
get_cohort_ids
boolean
Include cohort IDs the user belongs to (default: false). (Default: false)
get_computations
boolean
Include computed user properties (default: false). (Default: false)

Response

{
  "additionalProperties": false,
  "properties": {
    "success": {
      "title": "Success",
      "type": "boolean"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Error"
    },
    "user_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "User Id"
    },
    "device_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Device Id"
    },
    "amp_props": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Amp Props"
    },
    "cohort_ids": {
      "anyOf": [
        {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Cohort Ids"
    },
    "computations": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Computations"
    }
  },
  "required": [
    "success"
  ],
  "title": "UserProfileOutput",
  "type": "object"
}

Parameters

event_type
string
required
Event type name to analyze.
start
string
required
Start date in YYYYMMDD format.
end
string
required
End date in YYYYMMDD format.
metric
string
Metric type: uniques, totals, pct_dau, average, histogram, sums, value_avg, or formula (default: uniques).
interval
string
Time interval: 1 (daily), 7 (weekly), or 30 (monthly).
group_by
string
Property name to group by (prefix custom user properties with “gp:”).
limit
integer
Maximum number of group-by values (max 1000).

Response

{
  "additionalProperties": false,
  "properties": {
    "success": {
      "title": "Success",
      "type": "boolean"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Error"
    },
    "series": {
      "items": {},
      "title": "Series",
      "type": "array"
    },
    "series_labels": {
      "items": {},
      "title": "Series Labels",
      "type": "array"
    },
    "series_collapsed": {
      "items": {},
      "title": "Series Collapsed",
      "type": "array"
    },
    "x_values": {
      "items": {
        "type": "string"
      },
      "title": "X Values",
      "type": "array"
    }
  },
  "required": [
    "success"
  ],
  "title": "EventSegmentationOutput",
  "type": "object"
}

Parameters

start
string
required
Start date in YYYYMMDD format.
end
string
required
End date in YYYYMMDD format.
metric
string
Metric type: “active” or “new” (default: active).
interval
string
Time interval: 1 (daily), 7 (weekly), or 30 (monthly).

Response

{
  "additionalProperties": false,
  "properties": {
    "success": {
      "title": "Success",
      "type": "boolean"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Error"
    },
    "series": {
      "items": {},
      "title": "Series",
      "type": "array"
    },
    "series_meta": {
      "items": {
        "type": "string"
      },
      "title": "Series Meta",
      "type": "array"
    },
    "x_values": {
      "items": {
        "type": "string"
      },
      "title": "X Values",
      "type": "array"
    }
  },
  "required": [
    "success"
  ],
  "title": "GetActiveUsersOutput",
  "type": "object"
}

Response

{
  "additionalProperties": false,
  "properties": {
    "success": {
      "title": "Success",
      "type": "boolean"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Error"
    },
    "series": {
      "items": {},
      "title": "Series",
      "type": "array"
    },
    "series_labels": {
      "items": {
        "type": "string"
      },
      "title": "Series Labels",
      "type": "array"
    },
    "x_values": {
      "items": {
        "type": "string"
      },
      "title": "X Values",
      "type": "array"
    }
  },
  "required": [
    "success"
  ],
  "title": "RealtimeActiveUsersOutput",
  "type": "object"
}

Response

{
  "$defs": {
    "ProjectEvent": {
      "additionalProperties": false,
      "description": "A single event type listed for the project.",
      "properties": {
        "value": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Value"
        },
        "display_name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Display Name"
        },
        "totals": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Totals"
        },
        "hidden": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Hidden"
        },
        "deleted": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Deleted"
        }
      },
      "title": "ProjectEvent",
      "type": "object"
    }
  },
  "additionalProperties": false,
  "properties": {
    "success": {
      "title": "Success",
      "type": "boolean"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Error"
    },
    "events": {
      "items": {
        "$ref": "#/$defs/ProjectEvent"
      },
      "title": "Events",
      "type": "array"
    }
  },
  "required": [
    "success"
  ],
  "title": "ListEventsOutput",
  "type": "object"
}

Parameters

start
string
required
Start date in YYYYMMDD format.
end
string
required
End date in YYYYMMDD format.
metric
string
Metric: 0 (ARPU), 1 (ARPPU), 2 (Total Revenue), 3 (Paying Users).
interval
string
Time interval: 1 (daily), 7 (weekly), or 30 (monthly).

Response

{
  "additionalProperties": false,
  "properties": {
    "success": {
      "title": "Success",
      "type": "boolean"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Error"
    },
    "series": {
      "items": {},
      "title": "Series",
      "type": "array"
    },
    "series_labels": {
      "items": {
        "type": "string"
      },
      "title": "Series Labels",
      "type": "array"
    },
    "x_values": {
      "items": {
        "type": "string"
      },
      "title": "X Values",
      "type": "array"
    }
  },
  "required": [
    "success"
  ],
  "title": "GetRevenueOutput",
  "type": "object"
}

Limits & Quotas

  • HTTP V2 ingestion: limit uploads to 100 batches/second and 1000 events/second.
  • Dashboard REST API analytics endpoints are subject to per-project rate limits and cost thresholds.
  • user_activity returns at most 1000 events per call (use offset to page).
  • Error model: non-2xx responses (and missing credentials) are returned as success=False + error rather than raising.

Google Analytics

Google Tag Manager

Mixpanel