Skip to main content
POST
Bulk import up to 1,000 historical revenue records per request. Each record is tied to an existing message and offer. Successfully imported records automatically update the associated ListContact’s denormalized stats: revenue_total, conversion_count, and last_revenue_at.

Authentication

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

Body Parameters

array
required
An array of revenue records to import. Maximum of 1,000 records per request. Each record accepts the following fields:

Response Fields

integer
Number of revenue records successfully imported.
integer
Number of records that failed validation or processing.
float
Sum of all successfully imported revenue amounts.
array
Array of error objects (maximum 100 returned). Each object contains:
  • index (integer) — Position of the failed record in the input array.
  • message_id (string) — The message_id of the failed record.
  • code (string) — Machine-readable error code.
  • error (string) — Human-readable error description.

Error Codes

Only two conditions reject the whole request. Every other error is reported per record: the request still returns 201, 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

Reporting Overview

Analyze revenue data

Bulk Create Contacts

Import contacts alongside history