Trigger a lifetime campaign
curl --request POST \
--url https://app.nudgen.net/api/v1/campaigns/{id}/triggers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"eventId": "<string>",
"contact": {
"email": "jsmith@example.com",
"externalId": "<string>",
"name": "<string>",
"phone": "<string>",
"metadata": {}
},
"data": {}
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
eventId: '<string>',
contact: {
email: 'jsmith@example.com',
externalId: '<string>',
name: '<string>',
phone: '<string>',
metadata: {}
},
data: {}
})
};
fetch('https://app.nudgen.net/api/v1/campaigns/{id}/triggers', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.nudgen.net/api/v1/campaigns/{id}/triggers"
payload = {
"eventId": "<string>",
"contact": {
"email": "jsmith@example.com",
"externalId": "<string>",
"name": "<string>",
"phone": "<string>",
"metadata": {}
},
"data": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"execution": {
"id": "<string>",
"status": "<string>"
},
"duplicate": true
}{
"execution": {
"id": "<string>",
"status": "<string>"
},
"duplicate": true
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>",
"details": [
{
"path": "<string>",
"code": "required"
}
]
}{
"error": "<string>"
}{
"error": "<string>"
}API reference
Trigger a lifetime campaign
Requires a team API key with campaigns:trigger scope. The key must belong to the campaign workspace. eventId is an idempotency key within this campaign: a duplicate returns the existing execution with HTTP 200. New executions return HTTP 201; suppressed contacts can produce a skipped execution. Limit: 600 requests per window per key, 64 KiB request body, 32 KiB data object, and JSON nesting depth 8.
POST
/
api
/
v1
/
campaigns
/
{id}
/
triggers
Trigger a lifetime campaign
curl --request POST \
--url https://app.nudgen.net/api/v1/campaigns/{id}/triggers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"eventId": "<string>",
"contact": {
"email": "jsmith@example.com",
"externalId": "<string>",
"name": "<string>",
"phone": "<string>",
"metadata": {}
},
"data": {}
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
eventId: '<string>',
contact: {
email: 'jsmith@example.com',
externalId: '<string>',
name: '<string>',
phone: '<string>',
metadata: {}
},
data: {}
})
};
fetch('https://app.nudgen.net/api/v1/campaigns/{id}/triggers', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.nudgen.net/api/v1/campaigns/{id}/triggers"
payload = {
"eventId": "<string>",
"contact": {
"email": "jsmith@example.com",
"externalId": "<string>",
"name": "<string>",
"phone": "<string>",
"metadata": {}
},
"data": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"execution": {
"id": "<string>",
"status": "<string>"
},
"duplicate": true
}{
"execution": {
"id": "<string>",
"status": "<string>"
},
"duplicate": true
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>",
"details": [
{
"path": "<string>",
"code": "required"
}
]
}{
"error": "<string>"
}{
"error": "<string>"
}Authorizations
Scoped team API key created by an owner or admin. Required scope: campaigns:trigger. Personal Access Tokens do not authorize this endpoint.
Path Parameters
Body
application/json
Was this page helpful?