Send your first campaign
Step 1: Asset Preparation
Before configuring the campaign, you must create the elements that compose it: the message and the audience.
1.1 Content Creation
Instead of sending raw HTML with every campaign, the NMP API allows you to centralize your creatives. This facilitates reuse and multilingual management.
Endpoint: POST {subdomain}.api.numberly.com/v1/contents
{
"name": "Newsletter June 2025",
"group_id": "65df06372b43d70716133716",
"type": "html",
"usage": "email",
"content": "<html><body><h1>Discover our new features...</h1></body></html>"
}
Retrieve the id returned in the response (e.g., 101) for the configuration step.
1.2 Audience Management (Contact List)
To define who will receive your message, you often need to create a contact list and inject data into it.
A. Creating the Container (The List)
Endpoint: POST {subdomain}.api.numberly.com/v1/lists
Here you define the structure (schema) of your list.
{
"name": "VIP Summer Clients",
"group_id": "65df06372b43d70716133716",
"primary_key": ["EMAIL"],
"contactability": [
{ "channel": "email", "column_name": "EMAIL" }
],
"columns": [
{ "name": "EMAIL", "type": "string", "required": true },
{ "name": "FIRST_NAME", "type": "string" }
]
}
Retrieve the list id (e.g., c2feab59-d124...) for the next steps.
B. Populating the List (Data Import)
Endpoint: POST {subdomain}.api.numberly.com/v1/lists/{id}/operations
You can import contacts via a file (SFTP/S3) or directly in JSON (data).
{
"type": "upsert",
"data": [
{ "EMAIL": "client1@example.com", "FIRST_NAME": "John" },
{ "EMAIL": "client2@example.com", "FIRST_NAME": "Mary" }
]
}
Step 2: Collecting Configuration Identifiers
The NMP API is relational. To link your campaign to your ecosystem, you must retrieve configuration IDs via the Settings endpoints.
Here is the "Shopping List" of necessary IDs:
| Resource | Endpoint | Usage |
|---|---|---|
| Group ID | /v1/settings/groups | Defines the scope (silo) of the campaign. |
| Sender ID | /v1/settings/groups/{id}/senders | Defines the sender (e.g., "Customer Service" or a short code SMS). |
| Targeting Procedure ID | /v1/settings/groups/{id}/targeting-procedures | Crucial: This is the targeting method. You must find the ID of the procedure that matches your need (e.g., "List Targeting" or "Segment Targeting"). |
| Opt-in ID | /v1/settings/groups/{id}/optins | Mandatory for GDPR compliance (Marketing). |
Note on Targeting: A
targeting-procedureacts like a function. If you choose the "List Targeting" procedure, it will expect a parameter (oftenlist_id) in the campaign object.
Step 3: Campaign Creation
This is where you assemble the created elements (Content, List) and configurations (Sender, Procedure).
Endpoint: POST {subdomain}.api.numberly.com/v1/campaigns
Example of a scheduled Marketing Email campaign using the content and list created previously:
{
"name": "Summer Sales Campaign",
"group_id": "65df06372b43d70716133716",
"type": "schedulable",
"channel": "email",
"communication_type": "marketing",
"status": "published",
"timezone": "Europe/Paris",
"content": {
"id": 101, // The content ID created in Step 1.1
"language": "en"
},
"sender": {
"name": "Customer Service",
"populations": [
{ "id": 42, "email": "contact@m.my-domain.com" }
]
},
"target": {
"procedure_id": 33, // The ID of the "List Targeting" procedure
"optin_id": 945,
"parameters": {
"list_id": "c2feab59-d124..." // The list ID created in Step 1.2
}
},
"schedule": {
"type": "one_shot",
"send_at": "2025-06-25T08:00:00Z"
}
}
Important: If you create the campaign with
"status": "draft", it will not launch. You will need to perform aPATCHcall to switch it topublished.
Step 4: Triggering the Send
Triggering depends on the schedule.type property defined above.
- Type
one_shotorrecurring: No action required. If the status ispublished, the platform will automatically send the message at thesend_atdate. - Type
trigger: Sending is manual. You must call thePOST /v1/campaigns/{id}/sendsendpoint with a uniqueexecution_idto trigger immediate sending.
Step 5: Monitoring and Analysis
Once the campaign has started, you have two levels of reading for tracking.
5.1 Global Tracking (Macro)
To check the technical progress of the send (e.g., 50% processed), consult the sending order.
Endpoint: GET {subdomain}.api.numberly.com/v1/campaigns/{id}/sends
{
"status": "processing",
"volume": { "total": 10000, "sent": 5000 }
}
5.2 Message Details (Micro)
To see exactly what was sent to whom, or to debug a specific customer case, you can browse individual messages generated by the campaign.
Endpoint: GET {subdomain}.api.numberly.com/v1/messages
You can filter by campaign to retrieve the full history:
Request example:
GET {subdomain}.api.numberly.com/v1/messages?campaign_id=12345&limit=20
Response:
{
"objects": [
{
"id": "20250521...",
"channel": "email",
"date": "2025-05-21T10:05:00Z",
"recipient": {
"email": "client1@example.com"
},
"delivery_reports": [
{ "type": "delivered", "date": "2025-05-21T10:05:02Z" }
],
"reactions": [
{ "type": "open", "date": "2025-05-21T10:15:00Z" }
]
}
]
}
This allows you to confirm receipt (delivery_reports) and engagement (reactions) contact by contact.
How to use our API Reference
The Numberly Martech Platform API is designed to be powerful and flexible. To help you integrate it as quickly as possible, we have provided an interactive API Reference. This page is not just a list of endpoints: it is a hands-on playground where you can test, debug, and generate code in real time. Here is how to get the most out of it.
Overview
The NMP API is a strict RESTful interface designed to provide complete, standardized programmatic control over your marketing operations. It relies on a resource-oriented architecture, where each entity (Campaigns, Contacts, Content) is accessible via predictable and hierarchical URLs.