Skip to main content
POST
/
campaigns
Create a campaign
curl --request POST \
  --url https://api.altahq.com/v1/campaigns \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "description": "<string>"
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "objectType": "campaign",
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z",
  "name": "<string>",
  "isArchived": true,
  "launchedAt": "2023-11-07T05:31:56Z"
}
Returns the newly created campaign object.

Authorizations

Authorization
string
header
required

API token authentication. Generate a token from the Alta dashboard and pass it as a Bearer token in the Authorization header.

Body

application/json
name
string
required

The name of the campaign.

Maximum string length: 255
description
string

An optional description for the campaign.

Maximum string length: 255

Response

The newly created campaign object

id
string<uuid>
required

Unique identifier for the object.

objectType
enum<string>
required

The type of this object.

Available options:
campaign
createdAt
string<date-time>
required

Timestamp when the object was created.

updatedAt
string<date-time>
required

Timestamp when the object was last updated.

name
string
required

The name of the campaign.

status
enum<string>
required

The current status of the campaign.

Available options:
draft,
active,
paused,
completed
isArchived
boolean
required

Whether the campaign is archived.

launchedAt
string<date-time>

Timestamp when the campaign was launched.