Create campaign
curl --request POST \
--url https://app.nudgen.net/api/v1/campaigns \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"link": "https://get.nudgen.net"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({link: 'https://get.nudgen.net'})
};
fetch('https://app.nudgen.net/api/v1/campaigns', 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"
payload = { "link": "https://get.nudgen.net" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"campaign": {
"id": "<string>",
"name": "<string>",
"type": "one-time",
"status": "draft",
"subject": "<string>",
"scheduledAt": "2023-11-07T05:31:56Z",
"sentAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}{
"error": "<string>"
}{
"error": "<string>"
}API reference
Create campaign
Creates a campaign draft, scheduled campaign, or immediate send when sendNow is true.
POST
/
api
/
v1
/
campaigns
Create campaign
curl --request POST \
--url https://app.nudgen.net/api/v1/campaigns \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"link": "https://get.nudgen.net"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({link: 'https://get.nudgen.net'})
};
fetch('https://app.nudgen.net/api/v1/campaigns', 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"
payload = { "link": "https://get.nudgen.net" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"campaign": {
"id": "<string>",
"name": "<string>",
"type": "one-time",
"status": "draft",
"subject": "<string>",
"scheduledAt": "2023-11-07T05:31:56Z",
"sentAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}{
"error": "<string>"
}{
"error": "<string>"
}Authorizations
Personal Access Token created from Settings -> API Keys.
Body
application/json
A CTA link is required. One-time campaigns also require a goal; lifetime campaigns must be created as drafts and activated with the lifecycle endpoint.
Available options:
all, tags, manual, trigger Available options:
one-time, drip, lifetime Lifetime campaigns only. Declares data.* template variables.
Show child attributes
Show child attributes
Lifetime campaigns only. Manifest associated with generated content.
Show child attributes
Show child attributes
Available options:
off, lead_description_intro Response
Campaign created
Show child attributes
Show child attributes
Was this page helpful?