Skip to main content
POST
Record a single revenue event against a previously sent message. The message is looked up by its opaque, variable-length message identifier. If an offer is not explicitly provided, the system will attempt to resolve it from the message’s short link.

Authentication

string
required
Your Trackly SMS API key. Format: trk_[32-char-hex].

Body Parameters

string
required
The opaque, variable-length message identifier returned when the message was sent. This is the same value passed via the {{sendId}} macro.
float
required
Revenue amount to attribute. Must be greater than or equal to 0.
string
required
How the revenue was attributed. One of: sale, click, or send.
string
The offer ID this revenue is associated with. Can be either the externalId or the offer ID generated by TracklySMS. If omitted, the system will attempt to resolve the offer from the message’s short link.
datetime
ISO 8601 timestamp for the revenue event. Assumed to be UTC if no timezone is provided. Defaults to the current time if omitted.

Response Fields

boolean
Whether the revenue was recorded successfully.
string
The unique ID of the created revenue record.
string
The message ID the revenue was attributed to.
float
The revenue amount that was recorded.

Error Codes

Next Steps

Revenue Tracking

Track and attribute revenue

Send Message

Send messages to drive revenue