Revenue (v2)
Bulk Record Revenue
Record multiple revenue attributions in a single request.
POST
Record up to 1,000 revenue events in a single API call. Each record follows the same schema as the single revenue endpoint. The response includes per-record error details so you can identify and retry failures individually.
Per-record errors (
Authentication
string
required
Your Trackly SMS API key. Format:
trk_[32-char-hex].Body Parameters
array
required
An array of revenue records to process. Maximum of 1,000 records per request. Each record accepts the following fields:
boolean
Accepted for forward compatibility but not currently used — the value is ignored and has no effect on how records are stored or attributed.
Response Fields
integer
Number of revenue records successfully created.
integer
Number of records that failed validation or processing.
float
Sum of all successfully processed revenue amounts.
array
Array of error objects for failed records. Each object contains:
index(integer) — Position of the failed record in the input array.code(string) — Machine-readable error code.error(string) — Human-readable error description.
Error Codes
Only three conditions reject the whole request. Every other error is reported per record: the request still returns201, and each failed record appears in the response’s errors[] array with a code (see the Partial Success example above).
Request errors (HTTP status)
Authenticated requests can also fail with
401 invalid_credentials, 403 account_suspended, or 429 rate_limited — see Error Codes.
Per-record errors (errors[].code, returned with HTTP 201)
Next Steps
Revenue Tracking
Track and attribute revenue
Send Message
Send messages to drive revenue