---
title: "Import historical MessageSent records"
method: POST
path: "/v2/history/sends"
tags: ["history-v2"]
---

# Import historical MessageSent records

`POST /v2/history/sends`

## Request

- Base URL: `https://api.tracklysms.com/api`
- URL: `https://api.tracklysms.com/api/v2/history/sends`
- Auth: API key in header `X-Api-Key`

ID is required and must be unique. Duplicate IDs are skipped.
Either list_id or list_number is required.

## Request body

- SendsImportRequest
  - `imported` boolean: Mark as imported data
  - `records` SendImportRecord[], required: Array of send records
    - `creative_id` integer: Creative ID reference
    - `delivered` boolean: Delivery status
    - `id` string, required: Unique message ID
    - `length` integer: Message length
    - `list_id` integer: Sending list ID
    - `list_number` string: Sending list phone number (E.164)
    - `message` string: Message text
    - `schedule_id` string: Schedule ID reference
    - `send_type` string: Type: campaign, transactional, test
    - `timestamp` string, date-time, required: Send timestamp
    - `to_number` string, required: Recipient phone number (E.164)

## Response `201`

Sends imported

- SendsImportResponse
  - `duplicates_skipped` integer: Duplicate IDs skipped
  - `error_count` integer: Records that failed
  - `errors` object[]: Error details
  - `invalid_phones` integer: Invalid phone numbers
  - `success_count` integer: Records successfully imported

## Other responses

- `400`: Validation error
- `401`: Authentication error
- `413`: Too many records

---

[API](https://skmtc.dev/tracklysms/apis/trackly-sms-api.md) · [All operations](https://skmtc.dev/tracklysms/apis/trackly-sms-api/llms.txt) · [OpenAPI document](https://skmtc.dev/tracklysms/apis/trackly-sms-api/revisions/ac1ad22cb2a9?raw)
