POST /v1/signals with one or more signals; each becomes an event named activity.<name> or outcome.<name>, attributed to a specific agent — so you can bill on results and read each agent’s value.
Activity vs. outcome
Every signal has akind. The distinction drives both how you read agent performance and how you bill.
activity
An action the agent took —
message_sent, lead_enriched, document_processed. Activities measure effort and throughput. They are not, on their own, billable results.outcome
A billable result the agent produced —
meeting_booked, ticket_resolved, revenue_attributed. Outcomes carry a data.value_cents and an optional data.verified flag, and they feed the value receipt.activity named message_sent is recorded as the event activity.message_sent. A signal of kind outcome named meeting_booked is recorded as outcome.meeting_booked. Both are attributed to the agent_id you pass, so usage-based meters and per-agent reporting can filter on the agent that produced the work.
Request shape
POST https://api.macropay.ai/v1/signals accepts a batch. Send as many signals as you like in one call.
A
customer_id or external_customer_id is required on every signal — Macropay attributes the activity and value to a customer as well as an agent. Send one or the other, not both.Post an activity and an outcome
The example below reports one activity (message_sent) and one outcome (meeting_booked) in a single batch.
Dedupe outcomes by external_id
Outcomes are deduplicated by the pair(organization, external_id). The first signal with a given external_id is recorded; later signals carrying the same external_id are ignored. This makes the endpoint safe to retry and protects you from double-billing.
Activities can share the dedupe behavior too, but the high-value guarantee is for outcomes, because outcomes are what get billed.
Outcomes drive the value receipt
For anoutcome signal, two fields in data matter most:
data.value_cents— the monetary value of the result, in cents. This is the amount attributed to the agent and rolled up into its value receipt.data.verified— an optional boolean. Set ittrueonce the value is confirmed (the meeting actually happened, the revenue actually landed). Verified value is reported separately from reported value, so you can bill on confirmed results and watch the gap between what an agent claimed and what stuck.
verified flag flow straight into the agent’s value receipt, where reported value and verified value are split. To turn outcomes into invoices, point a usage-based meter at the relevant outcome.<name> event and attach a price.
Reporting a signal never bills a customer on its own. Signals are recorded as events; a meter aggregates the matching events and a price turns the aggregate into an amount. Macropay then bills as the merchant of record, handling sales tax and VAT for you.
FAQ
What is the difference between activity and outcome? An activity is an action the agent took (for examplemessage_sent), recorded as activity.<name>. An outcome is a billable result the agent produced (for example meeting_booked), recorded as outcome.<name> and carrying data.value_cents. Activities measure effort; outcomes measure value and are what you bill on.
How do I avoid double-billing an outcome?
Set a stable, unique external_id on each outcome, derived from the underlying event (a meeting ID or order ID), not a timestamp or per-call random value. Outcomes dedupe by (organization, external_id), so the first signal wins and any retry with the same external_id is ignored — making the endpoint safe to call repeatedly.
What is verified value?
Verified value is outcome value you’ve confirmed actually occurred, marked with data.verified: true. Macropay reports verified value separately from reported (unverified) value on the agent’s value receipt, so you can bill only on confirmed results and measure the gap between what an agent claimed and what was real.
Next steps
Value receipts
See how reported and verified outcome value rolls up per agent.
Usage-based meters
Aggregate
outcome.<name> events and attach a price to bill on results.