Send a metric change event
Increment or decrement the value of a metric for a user.
Authorizations
Headers
The idempotency key for the event.
The tenant identifier for multi-tenant organisations. Required when the organisation has multi-tenancy enabled. The value should be your internal ID for the tenant. Ignored for single-tenant organisations.
Path Parameters
Unique reference of the metric as set when created.
Body
The user that triggered the event.
The value to add to the user's current total for the given metric.
750
Event attributes as key-value pairs. Keys must match existing event attributes set up in the Trophy dashboard.
{
"category": "writing",
"source": "mobile-app"
}Response
Created event
The unique ID of the event.
"0040fe51-6bce-4b44-b0ad-bddc4e123534"
The unique ID of the metric that was updated.
"d01dcbcb-d51e-4c12-b054-dc811dcdc623"
The user's new total progress against the metric.
750
Achievements completed as a result of this event.
The user's current streak.
A map of points systems by key. Only contains points systems that were affected by the event.
A map of leaderboards by key. Only contains leaderboards that were affected by the event.
The idempotency key used for the event, if one was provided.
Whether the event was replayed due to idempotency.