Numberly
Campaigns

Track your campaigns

Campaigns on the NMP can be managed via the interface or programmatically. The API provides two dedicated endpoints to track the progress of sending orders in real-time, whether for a specific execution or for the history attached to a campaign.

Prerequisites: Identifier Management

To interact with the tracking endpoints, you must have the correct identifiers:

  1. Campaign Identifier (id): Required for all tracking operations.
    • It is retrieved during campaign creation via the response of POST /v1/campaigns.
    • It is also available by listing existing campaigns via GET /v1/campaigns.
  2. Sending Order Identifier (send_id): Required for specific order tracking.
    • This ID is returned in the response of the trigger call POST /v1/campaigns/{id}/sends or when listing sends.

Tracking a Specific Sending Order

This endpoint retrieves execution details for a specific sending order (status, volumes, dates). It is particularly useful for checking the state of a previously triggered sending order.

Endpoint

GET /v1/campaigns/{id}/sends/{send_id}

Request Example

curl -X GET "https://api.nmp.numberly.com/v1/campaigns/125/sends/890" \
  -H "Authorization: Bearer <ACCESS_TOKEN>" \
  -H "Content-Type: application/json"

API Response

The API returns a SendingOrder object containing the global status and volumetric progress.

Key Fields:

  • status: Current state (scheduled, processing, completed, failed, paused).
  • volume: Object containing the total target volume (total) and the volume already sent (sent).
{
  "id": 890,
  "status": "processing",
  "start_date": "2023-11-27T14:00:00Z",
  "end_date": null,
  "estimated_end_date": "2023-11-27T14:10:00Z",
  "volume": {
    "total": 5000,
    "sent": 2350
  }
}

Tracking All Sends for a Campaign

This endpoint lists all sending orders associated with a programmable campaign. It returns a paginated list of SendingOrder objects.

Endpoint

GET /v1/campaigns/{id}/sends

Query Parameters

ParameterTypeDescription
limitIntegerMaximum number of items to return (min: 5, max: 200, default: 20).
pageIntegerCurrent page number (default: 1).

Request Example

curl -X GET "https://api.nmp.numberly.com/v1/campaigns/125/sends?limit=10&page=1" \
  -H "Authorization: Bearer <ACCESS_TOKEN>" \
  -H "Content-Type: application/json"

API Response

The response includes a collection of SendingOrder objects as well as pagination metadata.

{
  "objects": [
    {
      "id": 890,
      "status": "completed",
      "start_date": "2023-11-27T14:00:00Z",
      "end_date": "2023-11-27T14:05:00Z",
      "volume": {
        "total": 5000,
        "sent": 5000
      }
    },
    {
      "id": 885,
      "status": "failed",
      "start_date": "2023-11-26T09:00:00Z",
      "end_date": "2023-11-26T09:01:00Z",
      "volume": {
        "total": 100,
        "sent": 0
      }
    }
  ],
  "metadata": {
    "timestamp": 1742294105
  },
  "pagination": {
    "total": 45,
    "limit": 10,
    "page": 1
  }
}