Overview
Core Principles
The API adheres to REST architectural constraints to ensure seamless and intuitive integration:
- Resource-Oriented: URLs represent nouns (e.g.,
/campaigns,/users) rather than actions. These resources are manipulated using standard HTTP verbs. - HTTP Semantics: The API utilizes HTTP methods (
GET,POST,PUT,DELETE) in accordance with their standard definitions to indicate the intent of the request. - Stateless: Each request is independent and must contain all information necessary for processing (specifically the Authentication Token). The server does not maintain client session state between requests.
- Secure: Access to the API is exclusively via HTTPS (TLS 1.2 or higher). Any request made over insecure HTTP will be rejected.
Key Features
The API architecture meets modern integration requirements:
- Resource Management (CRUD): Manipulate all your assets (campaigns, audiences, templates, assets) via standardized endpoints.
- Real-time Execution: Creation and update operations are synchronous, ensuring immediate effect on the platform.
- Transactional Messaging: Trigger individual message sends (Email, SMS) with high priority and minimal latency.
- System Integration: Seamlessly interconnect the NMP with your technical ecosystem (CRM, CDP, ERP) to automate data flows.
Format and Protocols
The API exclusively uses the JSON format for data exchange.
- Requests: Request bodies must be valid JSON objects.
- Responses: The API consistently returns JSON objects, including for errors.
- Encoding: All data must be UTF-8 encoded.
HTTP Header Configuration
To ensure proper processing of your requests, the following headers are required for any operation sending data (POST, PUT, PATCH):
| Header | Required Value | Description |
|---|---|---|
Content-Type | application/json | Indicates that the request body is in JSON format. |
Accept | application/json | (Recommended) Indicates that the client expects a JSON response. |
Implementation Example (cURL):
curl -X POST "https://{subdomain}.api.numberly.com/v1/campaigns" \
-H "Authorization: Bearer <YOUR_ACCESS_TOKEN>" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"name": "Welcome Campaign",
"type": "transactional"
}'
Send your first campaign
Sending a campaign via the NMP API is a structured process that goes beyond a single call. It requires preparing your 'assets' (content, data) and retrieving technical configurations before assembling everything into the Campaign object. This guide details the end-to-end flow: from resource creation to analyzing sent messages.
Rate limiting
To ensure fair usage and maintain platform stability, the NMP API enforces a strict rate limiting system on the number of requests performed within a given time period.