Data Import (v2)
Import Click History
Import historical click records for previously sent messages.
POST
Bulk import up to 1,000 historical click records per request. Each click is associated with an existing message and offer. Only one click per
Per-record errors (
message_id is stored (MessageClick uses message_id as its primary key), so duplicate entries are automatically skipped.
Importing clicks also updates the associated ListContact’s denormalized stats: click_count and last_clicked_at.
Authentication
string
required
Your Trackly SMS API key. Format:
trk_[32-char-alphanumeric].Body Parameters
array
required
An array of click records to import. Maximum of 1,000 records per request. Each record accepts the following fields:
Response Fields
integer
Number of click records successfully imported.
integer
Number of records that failed validation or processing.
integer
Number of records skipped because a click already exists for that
message_id.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) — Themessage_idof 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 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
Reporting Overview
Analyze click data
Bulk Create Contacts
Import contacts alongside history