Clients and metrics API
Register a client once with its hit, then report what they do (deposits, spend) as metric movements.
Register a client
POST https://<your workspace address>/track/clients
x-api-key: your API key
{ "externalId": "user-881", "hit": "h1.…", "displayName": "Jane D." }
externalId: your own ID for the client. Required.hit: the hit they came with. Required. A client is bound to one hit, once.displayName: optional, a name your team sees; without it the client is an anonymous animal.
Report what they do
POST https://<your workspace address>/track/clients/movements
{
"externalClientId": "user-881",
"requestId": "ledger-77310",
"metrics": [ { "code": "tokens_spent", "value": 120 }, { "code": "deposits", "value": 49.9 } ]
}
externalClientId: the registered client; or sendhitfor a client you did not register.requestId: your own ID for this report. The same one counts once, so retrying is safe.metrics: up to 20, each a metric'scodeand thevalueit moved by (negative to take back).
Good to know
- Make the metrics first in Performance › Clients › Metrics; an unknown code is refused.
- Offers with a client revenue share pay the client's partner their share of each movement.
Did this answer your question?
Checked against the app on October 18, 2026