Skip to main content
POST
Bulk import up to 1,000 historical send records per request. Use this endpoint to migrate data from another platform into Trackly SMS. Duplicate message IDs are automatically skipped, and invalid phone numbers are flagged in the response.

Authentication

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

Body Parameters

array
required
An array of send records to import. Maximum of 1,000 records per request. Each record accepts the following fields:
All records imported via this endpoint are automatically marked as imported=true. This flag is set by the server and cannot be overridden. Imported records can be selectively cleared later via the Clear History endpoint.

Response Fields

integer
Number of send records successfully imported.
integer
Number of records that failed validation or processing.
integer
Number of records skipped because their ID already exists.
integer
Number of records skipped due to invalid phone numbers.
array
Array of error objects (maximum 100 returned). Each object contains:
  • index (integer) — Position of the failed record in the input array.
  • 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 your imported data

Bulk Create Contacts

Import contacts alongside history