POST
/
v1
/
campaigns
curl --request POST \
  --url https://api.useplunk.com/v1/campaigns \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: <content-type>' \
  --data '{
  "subject": "<string>",
  "body": "<string>",
  "recipients": [
    "<string>"
  ],
  "style": "<string>"
}'
{
  "id": "45fb8871-c028-414e-a351-ce7fafaf00f1",
  "subject": "My new campaign!",
  "body": "This is my Plunk campaign.",
  "status": "DRAFT",
  "delivered": null,
  "style": "PLUNK",
  "projectId": "191f2aab-224b-4a23-9772-3c536440af09",
  "createdAt": "2024-08-10T19:53:28.207Z",
  "updatedAt": "2024-08-10T19:53:28.207Z"
}

Body

subject
string
required

The subject of the campaign

body
string
required

The body of the campaign

recipients
string[]
required

An array of contact IDs or emails to send the campaign to

style
string
default:
"PLUNK"

Weather the campaign is a PLUNK template or HTML email

Headers

Content-Type
string
required

application/json

Reponse

{
  "id": "45fb8871-c028-414e-a351-ce7fafaf00f1",
  "subject": "My new campaign!",
  "body": "This is my Plunk campaign.",
  "status": "DRAFT",
  "delivered": null,
  "style": "PLUNK",
  "projectId": "191f2aab-224b-4a23-9772-3c536440af09",
  "createdAt": "2024-08-10T19:53:28.207Z",
  "updatedAt": "2024-08-10T19:53:28.207Z"
}