For AI agents: a documentation index is available at /docs/llms.txt. Append .md to any page URL for markdown, or send Accept: text/markdown.
Get metric
Returns the full saved metric definition including type-specific params,
version, and metadata.
/v1/projects/{project_id}/metrics/{metric_id}Authorizations
Authorizationstringrequiredhttp
Path parameters
project_idstringrequiredAmplitude project identifier, backed by the canonical app ID.
12345pattern: ^[0-9]+$metric_idstringrequiredSaved metric identifier.
min length: 1Response
application/jsondataobjectrequiredShow child attributes
idstringrequiredStable metric identifier.
objectstringrequiredResource-type discriminator. Always metric.
project_idstringrequiredpattern: ^[0-9]+$namestringrequireddescriptionstringnullablemetric_typestringrequiredPublic metric type discriminator (snake_case). See the enum for supported
values.Unsupported or unrecognized metric types are surfaced as unknown. Clients
should treat unknown as "a metric type this API version does not model yet".
uniquestotalsformulaprop_sumprop_avgretentionconversionunknowndefinitiononeOfrequiredType-specific metric definition. The metric_type discriminator selects
the required fields. Aligns with MCP shared-schema capabilities.
objectobjectobjectobjectobjectobjectobjectobjectmetric_typestringrequiredeventobjectevent_typestringrequiredEvent name (e.g. Page View, _active).
filtersobject[][]property_keystringrequiredProperty key to filter on.
operatorstringrequiredFilter operator (matches Amplitude property operators).
valuesstring[]Values to match against.
[]property_typestringProperty namespace for filters, group-bys, and aggregations.
eventusergroupgroup_typestringGroup type for group properties. Empty string for non-group.
group_byobject[]Properties to group by. Required for formula metrics that use property
aggregation functions like PROPSUM(A) or PROPAVG(A).
property_typestringrequiredProperty namespace for filters, group-bys, and aggregations.
eventusergroupvaluestringrequiredProperty name to group by.
group_typestringGroup type for group properties. Empty string for non-group.
count_groupstringWhat to count. User for unique users, Event for event totals.
Usereventsobject[]Event definitions referenced by letter (A, B, C...) in the formula string.
event_typestringrequiredEvent name (e.g. Page View, _active).
filtersobject[][]property_keystringrequiredProperty key to filter on.
operatorstringrequiredFilter operator (matches Amplitude property operators).
valuesstring[]Values to match against.
[]property_typestringProperty namespace for filters, group-bys, and aggregations.
eventusergroupgroup_typestringGroup type for group properties. Empty string for non-group.
group_byobject[]Properties to group by. Required for formula metrics that use property
aggregation functions like PROPSUM(A) or PROPAVG(A).
property_typestringrequiredProperty namespace for filters, group-bys, and aggregations.
eventusergroupvaluestringrequiredProperty name to group by.
group_typestringGroup type for group properties. Empty string for non-group.
formulastringFormula string. Reference events by letter. Functions include
UNIQUES(A), TOTALS(A), PROPSUM(A), PROPAVG(A), PROPMIN(A),
PROPMAX(A), PROPCOUNT(A), PROPCOUNTAVG(A), REVENUETOTAL(A).
aggregation_propertyobjectproperty_typestringrequiredProperty namespace for filters, group-bys, and aggregations.
eventusergroupvaluestringrequiredNumeric property name to aggregate.
group_typestringstart_eventobjectevent_typestringrequiredEvent name (e.g. Page View, _active).
filtersobject[][]property_keystringrequiredProperty key to filter on.
operatorstringrequiredFilter operator (matches Amplitude property operators).
valuesstring[]Values to match against.
[]property_typestringProperty namespace for filters, group-bys, and aggregations.
eventusergroupgroup_typestringGroup type for group properties. Empty string for non-group.
group_byobject[]Properties to group by. Required for formula metrics that use property
aggregation functions like PROPSUM(A) or PROPAVG(A).
property_typestringrequiredProperty namespace for filters, group-bys, and aggregations.
eventusergroupvaluestringrequiredProperty name to group by.
group_typestringGroup type for group properties. Empty string for non-group.
return_eventobjectevent_typestringrequiredEvent name (e.g. Page View, _active).
filtersobject[][]property_keystringrequiredProperty key to filter on.
operatorstringrequiredFilter operator (matches Amplitude property operators).
valuesstring[]Values to match against.
[]property_typestringProperty namespace for filters, group-bys, and aggregations.
eventusergroupgroup_typestringGroup type for group properties. Empty string for non-group.
group_byobject[]Properties to group by. Required for formula metrics that use property
aggregation functions like PROPSUM(A) or PROPAVG(A).
property_typestringrequiredProperty namespace for filters, group-bys, and aggregations.
eventusergroupvaluestringrequiredProperty name to group by.
group_typestringGroup type for group properties. Empty string for non-group.
return_onintegerNumber of intervals to return on.
min: 1max: 30return_on_intervalintegerInterval length in days. 1 for daily, 7 for weekly, 30 for monthly.
min: 1max: 30funnel_eventsobject[]Ordered funnel steps (minimum 2 events).
event_typestringrequiredEvent name (e.g. Page View, _active).
filtersobject[][]property_keystringrequiredProperty key to filter on.
operatorstringrequiredFilter operator (matches Amplitude property operators).
valuesstring[]Values to match against.
[]property_typestringProperty namespace for filters, group-bys, and aggregations.
eventusergroupgroup_typestringGroup type for group properties. Empty string for non-group.
group_byobject[]Properties to group by. Required for formula metrics that use property
aggregation functions like PROPSUM(A) or PROPAVG(A).
property_typestringrequiredProperty namespace for filters, group-bys, and aggregations.
eventusergroupvaluestringrequiredProperty name to group by.
group_typestringGroup type for group properties. Empty string for non-group.
funnel_modestringorderedunorderedsequentialconversion_secondsintegerMaximum time window to complete the funnel, in seconds
(e.g. 86400 = 1 day, 604800 = 7 days).
min: 1funnel_paths_to_collectstringWhether the funnel measures unique users completing the path or total conversion path counts.
uniquestotalsfunnel_constant_propertiesobject[]Properties held constant across funnel steps.
property_typestringrequiredProperty namespace for filters, group-bys, and aggregations.
eventusergroupvaluestringrequiredNumeric property name to aggregate.
group_typestringfunnel_compute_propertyobjectproperty_typestringrequiredProperty namespace for filters, group-bys, and aggregations.
eventusergroupvaluestringrequiredNumeric property name to aggregate.
group_typestringfunnel_compute_property_functionstringsumavgversionintegerrequiredOptimistic concurrency version. Required on PATCH; incremented on each successful update.
min: 1created_atstringrequiredformat: date-timenullableupdated_atstringrequiredformat: date-timenullablecreated_bystringCreator email or login identifier when available.
nullableurlstringrequiredDeep link to the metric in the Amplitude UI.
format: uriarchivedbooleanrequiredWhether the metric is archived (soft-deleted).
is_officialbooleanWhether the metric is marked official.
is_restrictedbooleanWhether the metric is restricted.
key_propertiesobject[]Key properties associated with the metric definition.
property_typestringrequiredvaluestringrequiredgroup_typestringWas this helpful?