Update campaign status
Prerequisites: Retrieving the Campaign ID
To modify a campaign's status, you must have its unique identifier (ID).
- Via the User Interface (NMP / Sendingly): The ID is often present directly in the campaign URL within the Sendingly application.
- Via the API: The ID is returned in the response of the API call used for campaign creation (via
POST /v1/campaigns).
The ID is the path-parameter element {id} in the endpoint URL: /v1/campaigns/{id}.
Modifying the Status: The PATCH Call
Status modification is performed by submitting a PATCH request to the /v1/campaigns/{id} endpoint.
Endpoint and Method
- Method:
PATCH - Path:
/v1/campaigns/{id} - Request Body (
PatchCampaignPayload): Must include thestatusfield.
Request Body (Payload)
The status is the only campaign element that can be modified via this programmatic endpoint. Accepted values for the status field are draft or published.
| Field | Type | Description | Possible Values |
|---|---|---|---|
status | string | The new status of the campaign. | draft, published |
JSON Payload Example for publication:
{
"status": "published"
}
cURL
curl -X PATCH 'https://api.numberly.com/v1/campaigns/123' \
-H 'Authorization: Bearer <access_token>' \
-H 'Content-Type: application/json' \
-d '{
"status": "published"
}'
API Response (Success):
{
"id": 1
}
Create a campaign
This technical guide details the process for programmatically creating and managing campaigns via the Numberly Martech Platform (NMP) API. It covers retrieving prerequisites and creating campaigns (Email and SMS).
Trigger a send
This technical guide details the procedure to trigger the sending of "trigger" type campaigns (Email or SMS) via the NMP API and track their execution programmatically.