Numberly
Messages

Sent message data

This section of the API allows you to audit sends, verify delivery statuses (delivered, bounce, etc.), and retrieve the exact content of sent messages (Email or SMS).

List Message History

The listing endpoint provides a paginated view of all outgoing communications. It is essential for global monitoring or searching for specific messages using filters.

Endpoint: GET {subdomain}.api.numberly.com/v1/messages

Filtering Parameters (Query Parameters)

ParameterTypeDescription
channelstringFilter by channel: email, sms, push_notification.
recipientstringSearch for a specific recipient (email or E.164 number).
campaign_idarray[int]Filter messages linked to one or more specific campaigns.
after / beforedatetimeDefine the time range (ISO 8601 format).
limitintNumber of items per page (default: 20, max: 200).
pageintPage number to retrieve.

Request Example

# Retrieve the last 10 SMS sent after January 1, 2024
curl -X GET "https://{subdomain}.api.numberly.com/v1/messages?channel=sms&after=2024-01-01T00:00:00Z&limit=10" \
     -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Specific Message Details

This endpoint returns the complete metadata of a single message, including its lifecycle (delivery statuses) and user interactions (opens, clicks).

Endpoint: GET {subdomain}.api.numberly.com/v1/messages/{id}

JSON Response Example

{
  "id": "20250521080949870162296c8c2f7e7448539b1d9f963cd22c89",
  "channel": "email",
  "date": "2025-05-21T08:09:49Z",
  "campaign": {
    "id": 33,
    "name": "Welcome Campaign"
  },
  "recipient": {
    "email": "client@example.com"
  },
  "delivery_reports": [
    {
      "date": "2025-05-21T08:09:55Z",
      "type": "delivered"
    }
  ],
  "reactions": [
    {
      "date": "2025-05-21T09:15:00Z",
      "type": "open"
    },
    {
      "date": "2025-05-21T09:16:30Z",
      "type": "click",
      "metadata": {
        "url": "https://mysite.com/offer"
      }
    }
  ]
}

Content Retrieval (Mirror)

Allows access to the raw content of the message as it was generated for the recipient. For emails, the API prioritizes returning HTML; otherwise, it returns plain text.

Endpoint: GET {subdomain}.api.numberly.com/v1/messages/{id}/content

Note: Message content is generally retained for a limited period (e.g., 30 days) from the sending date.

Response Example

{
  "message_id": "20250521080949870162296c8c2f7e7448539b1d9f963cd22c89",
  "content": "<!DOCTYPE html><html><body><h1>Hello Jean,</h1><p>Here is your confirmation...</p></body></html>"
}