List a contact's recent messages

List a contact's recent messages

GET/api/v1/contacts/{id}/activity

GET /contacts/{id}/activity
curl -X GET 'https://www.unitpost.com/api/v1/contacts/con_123/activity' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'User-Agent: my-app/1.0'
Response · 200
{
  "object": "list",
  "has_more": false,
  "data": [
    {
      "object": "contact_activity",
      "message_id": "message_123",
      "channel": "string",
      "direction": "outbound",
      "subject": "Welcome to Acme",
      "status": "queued",
      "campaign_id": "campaign_123",
      "created_at": "2026-01-01T00:00:00.000Z",
      "sent_at": "2026-01-01T00:00:00.000Z",
      "error": "string",
      "error_code": "string"
    }
  ]
}

The contact's most recent messages across channels, newest first: the emails sent to them, and texts both ways. Emails also require emails:read and texts sms:read; without one, those rows are left out. Returns up to limit (1–100, default 25) with no cursor: for the full history page List sent emails or List SMS messages with contact_id. The {id} accepts a contact id or email. Requires the contacts:read capability.

Parameters2 fields
FieldTypeDescription
idrequiredstring · path—
limitinteger · queryHow many recent messages (1–100, default 25).
Response · 200 fields11 fields
FieldTypeDescription
objectrequiredstring—
message_idrequiredstringAn email (`email_…`) or text (`sms_…`) id; read it with its own get operation.
channelrequiredstring`email` or `sms`.
directionrequiredenumoutbound | inbound—
subjectrequiredstring | nullAn email's subject, or the start of a text.
statusrequiredstringThe message's `status` as its own object reports it (`GET /email/{id}`, `GET /sms/{id}`).
campaign_idrequiredstring | null—
created_atrequiredstring—
sent_atrequiredstring | null—
errorrequiredstring | nullTexts only: why it wasn't delivered, in plain words.
error_coderequiredstring | null—
200401403404422

Search docs and guides

Search the docs and product guides.