Numberly
Messages

Inbound messages

This guide outlines how to retrieve and process responses from your recipients (SMS MO, email replies) via the NMP API. These incoming messages are referred to as Inbounds.

List Incoming Messages

The main endpoint allows you to retrieve the stream of received messages. It is strongly recommended to use time or campaign filters to target relevant responses.

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

Filtering Parameters

ParameterTypeDescription
channelstringFilter by channel: email, sms, fax.
fromstringFilter by sender (email or E.164 phone number).
message_idstringRetrieve the response associated with a specific outgoing message.
campaign_idarray[int]Filter responses linked to a specific campaign.
after / beforedatetimeFilter by reception date (ISO 8601).

Usage Example

Retrieve "STOP" SMS or responses received since a specific date:

curl -X GET "https://{subdomain}.api.numberly.com/v1/inbounds?channel=sms&after=2024-05-20T08:00:00Z" \
     -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Incoming Message Details

To view the full content of a specific response, use its unique identifier (UUID).

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

Inbound Object Structure

The response contains essential information for automated processing (unsubscription, conversational logic):

  • from: The author of the response (the customer).
  • to: Your sending address or short code.
  • content: The message body (e.g., "STOP", "Yes", email content).
  • message_id: Reference to the initial outgoing message (allows linking the response to the sent message).

JSON Response Example (SMS)

{
  "id": "c2feab59-d124-4b69-9d81-579a76603c7b",
  "channel": "sms",
  "from": "+33612345678",
  "to": "36111",
  "content": "STOP",
  "received_at": "2025-05-21T14:30:00Z",
  "message_id": "20250521080949870162296c8c2f7e7448539b1d9f963cd22c89"
}

JSON Response Example (Email)

For an email, the object also includes the response subject.

{
  "id": "e5b7c8d9-a1f2-4b3c-8d9e-1a2b3c4d5e6f",
  "channel": "email",
  "from": "client@example.com",
  "to": "service-client@votredomaine.com",
  "subject": "Re: Your order #12345",
  "content": "Hello, I would like to modify my delivery address...",
  "received_at": "2025-05-22T09:15:00Z",
  "message_id": "20250521080949870162296c8c2f7e7448539b1d9f963cd22c89"
}