curl --request POST \
--url https://api.sandbox.usenash.com/v1/notification-triggers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"notificationGroupIds": [
"<string>"
],
"type": "delivery_status_transition",
"parameters": {
"deliveryStatus": "<string>",
"deliveryStatuses": [
"<string>"
],
"sendScheduledMessage": true,
"scheduledSendDeltaMinutes": 2167
},
"description": "<string>",
"enabled": true,
"message": "<string>",
"flag": true,
"autoResolveFlag": true,
"optionsGroupIds": [
"<string>"
],
"contractIds": [
"<string>"
],
"isInternal": true,
"zoneIds": [
"<string>"
],
"customEventName": "<string>",
"conditionalLogic": {}
}
'import requests
url = "https://api.sandbox.usenash.com/v1/notification-triggers"
payload = {
"name": "<string>",
"notificationGroupIds": ["<string>"],
"type": "delivery_status_transition",
"parameters": {
"deliveryStatus": "<string>",
"deliveryStatuses": ["<string>"],
"sendScheduledMessage": True,
"scheduledSendDeltaMinutes": 2167
},
"description": "<string>",
"enabled": True,
"message": "<string>",
"flag": True,
"autoResolveFlag": True,
"optionsGroupIds": ["<string>"],
"contractIds": ["<string>"],
"isInternal": True,
"zoneIds": ["<string>"],
"customEventName": "<string>",
"conditionalLogic": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
notificationGroupIds: ['<string>'],
type: 'delivery_status_transition',
parameters: {
deliveryStatus: '<string>',
deliveryStatuses: ['<string>'],
sendScheduledMessage: true,
scheduledSendDeltaMinutes: 2167
},
description: '<string>',
enabled: true,
message: '<string>',
flag: true,
autoResolveFlag: true,
optionsGroupIds: ['<string>'],
contractIds: ['<string>'],
isInternal: true,
zoneIds: ['<string>'],
customEventName: '<string>',
conditionalLogic: {}
})
};
fetch('https://api.sandbox.usenash.com/v1/notification-triggers', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sandbox.usenash.com/v1/notification-triggers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'notificationGroupIds' => [
'<string>'
],
'type' => 'delivery_status_transition',
'parameters' => [
'deliveryStatus' => '<string>',
'deliveryStatuses' => [
'<string>'
],
'sendScheduledMessage' => true,
'scheduledSendDeltaMinutes' => 2167
],
'description' => '<string>',
'enabled' => true,
'message' => '<string>',
'flag' => true,
'autoResolveFlag' => true,
'optionsGroupIds' => [
'<string>'
],
'contractIds' => [
'<string>'
],
'isInternal' => true,
'zoneIds' => [
'<string>'
],
'customEventName' => '<string>',
'conditionalLogic' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.sandbox.usenash.com/v1/notification-triggers"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"notificationGroupIds\": [\n \"<string>\"\n ],\n \"type\": \"delivery_status_transition\",\n \"parameters\": {\n \"deliveryStatus\": \"<string>\",\n \"deliveryStatuses\": [\n \"<string>\"\n ],\n \"sendScheduledMessage\": true,\n \"scheduledSendDeltaMinutes\": 2167\n },\n \"description\": \"<string>\",\n \"enabled\": true,\n \"message\": \"<string>\",\n \"flag\": true,\n \"autoResolveFlag\": true,\n \"optionsGroupIds\": [\n \"<string>\"\n ],\n \"contractIds\": [\n \"<string>\"\n ],\n \"isInternal\": true,\n \"zoneIds\": [\n \"<string>\"\n ],\n \"customEventName\": \"<string>\",\n \"conditionalLogic\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.sandbox.usenash.com/v1/notification-triggers")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"notificationGroupIds\": [\n \"<string>\"\n ],\n \"type\": \"delivery_status_transition\",\n \"parameters\": {\n \"deliveryStatus\": \"<string>\",\n \"deliveryStatuses\": [\n \"<string>\"\n ],\n \"sendScheduledMessage\": true,\n \"scheduledSendDeltaMinutes\": 2167\n },\n \"description\": \"<string>\",\n \"enabled\": true,\n \"message\": \"<string>\",\n \"flag\": true,\n \"autoResolveFlag\": true,\n \"optionsGroupIds\": [\n \"<string>\"\n ],\n \"contractIds\": [\n \"<string>\"\n ],\n \"isInternal\": true,\n \"zoneIds\": [\n \"<string>\"\n ],\n \"customEventName\": \"<string>\",\n \"conditionalLogic\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.usenash.com/v1/notification-triggers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"notificationGroupIds\": [\n \"<string>\"\n ],\n \"type\": \"delivery_status_transition\",\n \"parameters\": {\n \"deliveryStatus\": \"<string>\",\n \"deliveryStatuses\": [\n \"<string>\"\n ],\n \"sendScheduledMessage\": true,\n \"scheduledSendDeltaMinutes\": 2167\n },\n \"description\": \"<string>\",\n \"enabled\": true,\n \"message\": \"<string>\",\n \"flag\": true,\n \"autoResolveFlag\": true,\n \"optionsGroupIds\": [\n \"<string>\"\n ],\n \"contractIds\": [\n \"<string>\"\n ],\n \"isInternal\": true,\n \"zoneIds\": [\n \"<string>\"\n ],\n \"customEventName\": \"<string>\",\n \"conditionalLogic\": {}\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"type": "<string>",
"name": "<string>",
"enabled": true,
"description": "<string>",
"notificationGroupIds": [
"<string>"
]
}[
{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"response_status": "<string>",
"RequestID": "<string>"
}
]Create Notification Trigger
Create a notification trigger on the authenticated organization. The request body is a discriminated union on type: each trigger type (see GET /v1/notification-triggers/templates) has its own typed parameters shape in the OpenAPI schema. An invalid type returns a 400 listing all valid types. Use the Nash-Org-Id header to scope creation to a specific org (e.g. a child org).
curl --request POST \
--url https://api.sandbox.usenash.com/v1/notification-triggers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"notificationGroupIds": [
"<string>"
],
"type": "delivery_status_transition",
"parameters": {
"deliveryStatus": "<string>",
"deliveryStatuses": [
"<string>"
],
"sendScheduledMessage": true,
"scheduledSendDeltaMinutes": 2167
},
"description": "<string>",
"enabled": true,
"message": "<string>",
"flag": true,
"autoResolveFlag": true,
"optionsGroupIds": [
"<string>"
],
"contractIds": [
"<string>"
],
"isInternal": true,
"zoneIds": [
"<string>"
],
"customEventName": "<string>",
"conditionalLogic": {}
}
'import requests
url = "https://api.sandbox.usenash.com/v1/notification-triggers"
payload = {
"name": "<string>",
"notificationGroupIds": ["<string>"],
"type": "delivery_status_transition",
"parameters": {
"deliveryStatus": "<string>",
"deliveryStatuses": ["<string>"],
"sendScheduledMessage": True,
"scheduledSendDeltaMinutes": 2167
},
"description": "<string>",
"enabled": True,
"message": "<string>",
"flag": True,
"autoResolveFlag": True,
"optionsGroupIds": ["<string>"],
"contractIds": ["<string>"],
"isInternal": True,
"zoneIds": ["<string>"],
"customEventName": "<string>",
"conditionalLogic": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
notificationGroupIds: ['<string>'],
type: 'delivery_status_transition',
parameters: {
deliveryStatus: '<string>',
deliveryStatuses: ['<string>'],
sendScheduledMessage: true,
scheduledSendDeltaMinutes: 2167
},
description: '<string>',
enabled: true,
message: '<string>',
flag: true,
autoResolveFlag: true,
optionsGroupIds: ['<string>'],
contractIds: ['<string>'],
isInternal: true,
zoneIds: ['<string>'],
customEventName: '<string>',
conditionalLogic: {}
})
};
fetch('https://api.sandbox.usenash.com/v1/notification-triggers', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sandbox.usenash.com/v1/notification-triggers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'notificationGroupIds' => [
'<string>'
],
'type' => 'delivery_status_transition',
'parameters' => [
'deliveryStatus' => '<string>',
'deliveryStatuses' => [
'<string>'
],
'sendScheduledMessage' => true,
'scheduledSendDeltaMinutes' => 2167
],
'description' => '<string>',
'enabled' => true,
'message' => '<string>',
'flag' => true,
'autoResolveFlag' => true,
'optionsGroupIds' => [
'<string>'
],
'contractIds' => [
'<string>'
],
'isInternal' => true,
'zoneIds' => [
'<string>'
],
'customEventName' => '<string>',
'conditionalLogic' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.sandbox.usenash.com/v1/notification-triggers"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"notificationGroupIds\": [\n \"<string>\"\n ],\n \"type\": \"delivery_status_transition\",\n \"parameters\": {\n \"deliveryStatus\": \"<string>\",\n \"deliveryStatuses\": [\n \"<string>\"\n ],\n \"sendScheduledMessage\": true,\n \"scheduledSendDeltaMinutes\": 2167\n },\n \"description\": \"<string>\",\n \"enabled\": true,\n \"message\": \"<string>\",\n \"flag\": true,\n \"autoResolveFlag\": true,\n \"optionsGroupIds\": [\n \"<string>\"\n ],\n \"contractIds\": [\n \"<string>\"\n ],\n \"isInternal\": true,\n \"zoneIds\": [\n \"<string>\"\n ],\n \"customEventName\": \"<string>\",\n \"conditionalLogic\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.sandbox.usenash.com/v1/notification-triggers")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"notificationGroupIds\": [\n \"<string>\"\n ],\n \"type\": \"delivery_status_transition\",\n \"parameters\": {\n \"deliveryStatus\": \"<string>\",\n \"deliveryStatuses\": [\n \"<string>\"\n ],\n \"sendScheduledMessage\": true,\n \"scheduledSendDeltaMinutes\": 2167\n },\n \"description\": \"<string>\",\n \"enabled\": true,\n \"message\": \"<string>\",\n \"flag\": true,\n \"autoResolveFlag\": true,\n \"optionsGroupIds\": [\n \"<string>\"\n ],\n \"contractIds\": [\n \"<string>\"\n ],\n \"isInternal\": true,\n \"zoneIds\": [\n \"<string>\"\n ],\n \"customEventName\": \"<string>\",\n \"conditionalLogic\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.usenash.com/v1/notification-triggers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"notificationGroupIds\": [\n \"<string>\"\n ],\n \"type\": \"delivery_status_transition\",\n \"parameters\": {\n \"deliveryStatus\": \"<string>\",\n \"deliveryStatuses\": [\n \"<string>\"\n ],\n \"sendScheduledMessage\": true,\n \"scheduledSendDeltaMinutes\": 2167\n },\n \"description\": \"<string>\",\n \"enabled\": true,\n \"message\": \"<string>\",\n \"flag\": true,\n \"autoResolveFlag\": true,\n \"optionsGroupIds\": [\n \"<string>\"\n ],\n \"contractIds\": [\n \"<string>\"\n ],\n \"isInternal\": true,\n \"zoneIds\": [\n \"<string>\"\n ],\n \"customEventName\": \"<string>\",\n \"conditionalLogic\": {}\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"type": "<string>",
"name": "<string>",
"enabled": true,
"description": "<string>",
"notificationGroupIds": [
"<string>"
]
}[
{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"response_status": "<string>",
"RequestID": "<string>"
}
]Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
- CreateDeliveryStatusTransitionTrigger
- CreateDriverGeolocationTrigger
- CreateTaskReassignmentTrigger
- CreateDeliveryIncidentReportTrigger
- CreateStuckStatusTrigger
- CreateStatusChangedTooQuicklyTrigger
- CreateDriverLocationVsDeliveryStatusTrigger
- CreateDropoffDelayedTrigger
- CreatePickupDelayedTrigger
- CreateOrderNeedsAttentionTrigger
- CreateAutodispatchFailedTrigger
- CreateAddressValidationFailedTrigger
- CreateOrderReadyToFulfillTrigger
- CreateJobCreationFailedTrigger
- CreateTaskHealthStatusTrigger
- CreateTasksAttemptsExhaustedTrigger
- CreateDeliveryCancellationFailedTrigger
- CreateInternalDriverNotAssignedTrigger
- CreateNashAiInvalidPodTrigger
- CreateDeliveryCompletedTooEarlyTrigger
- CreateStatusTriggeredTooEarlyTrigger
- CreateOrderNotDispatchedCloseToPickupTrigger
- CreateRefundRequestTrigger
- CreateOptimizationOrderUnassignedTrigger
- CreateZoneGeolocationTrigger
- CreateApiBasedTrigger
- CreateOptimizationActionStatusTrigger
- CreateDriverStackingTrigger
- CreateTimeElapsedSinceStatusTrigger
- CreateActivityStatusTransitionTrigger
- CreateDemoTrigger
- CreateCustomEventListenerTrigger
- CreateProofOfDeliveryUploadedTrigger
- CreateCourierUpdatedTrigger
- CreateTimingUpdatedTrigger
- CreateAiConversationCompletedTrigger
- CreateDeliveryWindowBookedTimeoutTrigger
- CreateDeliveryNoteAddedTrigger
- CreateOrderModifiedTrigger
- CreateRouteStatusTransitionTrigger
- CreateOrderPickupStartTimeTrigger
- CreateOrderPickupEndTimeTrigger
- CreateOrderDropoffStartTimeTrigger
- CreateOrderDropoffEndTimeTrigger
Root serializer for POST /v1/notification-triggers.
Thin wrapper over the type-discriminated union so flask-openapi3 can
consume it as a body type; callers send the trigger object directly at
the top level of the JSON body.
Human-readable name for this trigger instance.
1IDs of the notification groups that will receive notifications when this trigger fires.
"delivery_status_transition"- DeliveryStatusTransitionParams
- DeliveryStatusTransitionParams
Show child attributes
Show child attributes
Optional description of the trigger.
Whether the trigger is enabled on creation. Defaults to true.
Optional custom message body.
Whether firing this trigger should also flag the job for operator attention.
If true, a flag raised by this trigger resolves automatically when the flag condition clears.
Options groups that scope when this trigger applies.
Contract IDs that scope when this trigger applies.
Whether the trigger is for internal use only (not exposed to customers).
Zone IDs that scope when this trigger applies (separate from zone-geolocation parameters).
For triggers that emit a custom event when fired, the name of that event.
1Optional AND/OR conditional tree that gates when the trigger fires. Shape mirrors the Zod ConditionalStatement schema in nash-ui; currently passed through as JSON. A follow-up will type this explicitly.
Response
OK
A notification trigger configured on an organization.
Notification trigger ID
Trigger type slug, matching a template from GET /v1/notification-triggers/templates, e.g. 'tasks_attempts_exhausted'.
Human-readable name of this trigger instance
Whether the trigger is enabled
Trigger description
Notification group IDs that receive notifications when this trigger fires.
Was this page helpful?