ClientSphereDocs
API reference/Transactional Email

List transactional messages

Returns a paginated send log, newest first. Message content is not included.

GET
/transactional/messages

Authorization

AuthorizationRequiredBearer <token>

API key as Bearer token: Authorization: Bearer sk_live_.... Use sk_live_ prefixed keys for production data and sk_test_ prefixed keys for sandbox/test data.

In: header

X-API-Key<token>

API key via header: X-API-Key: sk_live_.... Use sk_live_ prefixed keys for production data and sk_test_ prefixed keys for sandbox/test data.

In: header

Query Parameters

pageinteger

Page number

Default: 1
limitinteger

Items per page (max 100)

Default: 20Maximum: 100
statusstring

Filter by delivery status

Value in: "queued" | "sending" | "sent" | "delivered" | "bounced" | "complained" | "failed"
templateSlugstring

Filter to one template

tostring

Partial match on the recipient address

curl -X GET "https://clientsphere.io/api/v1/transactional/messages?page=1&limit=20&status=queued&templateSlug=%3Cstring%3E&to=%3Cstring%3E" \
  -H "Authorization: Bearer <token>"

Paginated list of messages

{
  "data": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "status": "rejected",
      "to": "user@example.com",
      "subject": "string",
      "templateSlug": "string",
      "from": "user@example.com",
      "fromName": "string",
      "replyTo": "string",
      "messageId": "string",
      "idempotencyKey": "string",
      "source": "api",
      "attemptCount": 0,
      "error": "string",
      "errorReason": "string",
      "bounceType": "Permanent",
      "createdAt": "2019-08-24T14:15:22Z",
      "sentAt": "2019-08-24T14:15:22Z",
      "deliveredAt": "2019-08-24T14:15:22Z",
      "bouncedAt": "2019-08-24T14:15:22Z",
      "complainedAt": "2019-08-24T14:15:22Z"
    }
  ],
  "meta": {
    "pagination": {
      "page": 1,
      "limit": 20,
      "totalCount": 137,
      "totalPages": 7
    }
  }
}