Setup
1
Create the integration
Choose Realtime Spend. The integration starts as a draft. A draft checks and counts the rows
you send, then discards them, so you can test without adding spend.
2
Create an ingest key
Select Create key and copy the key. It is shown once. An ingest key can only send spend to
this integration and cannot read anything; keep it in your server-side configuration.
3
Send a test row
Run the curl command the page shows. The page’s Activity section shows the rows it has
received.
4
Enable
Set the status to Enabled and save. Spend loads into your cost data each night.
Sending spend
POST a JSON array of 1 to 100 rows to the endpoint on the integration page, with
Authorization: Bearer <ingest key>.
Credits and refunds use
cost_type: "Credit" with a negative cost. They lower your spend
and show as savings.
Responses
A200 response lists what was accepted. Valid rows are stored even when others in the batch are
rejected; each rejected row is listed with its position and the field that failed.
countsByDimension counts every row this integration has accepted, by vendor, service and
usage unit. It lists the 1,000 most counted values of each.
Retries
If a call times out or fails, you cannot tell whether its rows were stored. Retrying it without an idempotency key can store them twice and double-count that spend. Send anIdempotency-Key
header on each call, such as a new UUID, and reuse it when you retry that call:
Idempotency-Replayed: true. Use a new key for each new
batch.

