Skip to main content
POST
/
campaigns
Create a new campaign
curl --request POST \
  --url https://{subdomain}.nudj.cx/api/v2/admin/campaigns \
  --header 'Content-Type: application/json' \
  --header 'x-api-token: <api-key>' \
  --data '
{
  "name": "<string>",
  "startDate": "<string>",
  "endDate": "<string>",
  "status": "archived"
}
'
{
  "id": "<string>",
  "organisationId": "<string>",
  "name": "<string>",
  "startDate": "<string>",
  "endDate": "<string>",
  "status": "archived",
  "createdAt": "<string>",
  "updatedAt": "<string>",
  "createdBy": "<string>",
  "updatedBy": "<string>"
}

Authorizations

x-api-token
string
header
required

Body

application/json

The input required to create a campaign

name
string
required

The name of the campaign

startDate
string
required

The start date of the campaign

endDate
string
required

The end date of the campaign

status
enum<string>

Set the campaign status, by default will be set to draft if not provided

Available options:
archived,
draft,
expired,
live,
scheduled

Response

Successful response

A campaign

id
string
required

The id of the campaign

organisationId
string
required

The id of the organisation the campaign belongs to

name
string
required

The name of the campaign

startDate
string
required

The start date of the campaign

endDate
string
required

The end date of the campaign

status
enum<string>
required

The status of the campaign

Available options:
archived,
draft,
expired,
live,
scheduled
createdAt
string
required

The date the campaign was created

updatedAt
string
required

The date the campaign was last updated

createdBy
string
required

The user who created this campaign

updatedBy
string
required

The user who last updated this campaign