Skip to main content
POST
/
campaigns
Create a campaign
curl --request POST \
  --url https://app.heyoo.ai/api/campaigns \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "Employee Advocacy Campaign",
  "description": "<string>",
  "shareContext": "<string>",
  "objective": "<string>",
  "status": "draft",
  "destinationUrl": "<string>",
  "startDate": "<string>",
  "shareRewardAmount": 123,
  "clickRewardAmount": 123,
  "maxRewardPerEmployee": 123,
  "totalBudget": 123,
  "endDate": "<string>",
  "domain": "<string>",
  "image": "<string>",
  "tagIds": [
    "123e4567-e89b-12d3-a456-426614174000"
  ],
  "groupIds": [
    "223e4567-e89b-12d3-a456-426614174001"
  ],
  "resources": [
    "<string>"
  ],
  "targetShares": 123,
  "contentPillarId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'
{
  "id": "<string>",
  "name": "<string>",
  "status": "draft",
  "createdAt": "<string>",
  "description": "<string>",
  "destinationUrl": "<string>",
  "clicks": 123,
  "shares": 123,
  "startDate": "<string>",
  "endDate": "<string>",
  "targetShares": 123,
  "hasShared": true
}

Authorizations

Authorization
string
header
required

Default authentication mechanism

Body

application/json
name
string
required

The name of the campaign

Example:

"Employee Advocacy Campaign"

description
string
required

The description of the campaign

shareContext
string
required

The share context of the campaign

objective
string
required

The objective of the campaign

status
enum<string>
required

The status of the campaign

Available options:
draft,
published,
archived
destinationUrl
string
required

The destination URL of the campaign

startDate
string
required
shareRewardAmount
required
clickRewardAmount
required
maxRewardPerEmployee
required
totalBudget
required
endDate
string
required
domain
string | null

The domain of the campaign

image
string | null

The image of the campaign

tagIds
string<uuid>[]

The unique IDs of the tags assigned to the campaign.

Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Example:
["123e4567-e89b-12d3-a456-426614174000"]
groupIds
string<uuid>[]

The unique IDs of the groups assigned to the campaign.

Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Example:
["223e4567-e89b-12d3-a456-426614174001"]
resources
(string | object)[]
targetShares
contentPillarId
string<uuid> | null

The unique ID of the content pillar assigned to the campaign.

Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$

Response

The created campaign

id
string
required

The unique ID of the campaign.

name
string
required

The name of the campaign.

status
enum<string>
required

The status of the campaign.

Available options:
draft,
published,
archived
createdAt
string
required

The creation date of the campaign.

description
string
required

The description of the campaign.

destinationUrl
string | null
required

The destination URL of the campaign.

clicks
number
required

The number of clicks the campaign has received.

shares
number
required

The number of shares the campaign has received.

startDate
string
required

The start date of the campaign.

endDate
string
required

The end date of the campaign.

targetShares
number | null
required

The target shares for the campaign.

hasShared
boolean

Whether the authenticated user has shared this campaign.