Skip to main content
PATCH
/
campaigns
/
{campaignId}
Update a campaign
curl --request PATCH \
  --url https://apix.spotzee.com/api/client/campaigns/{campaignId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "subscription_id": 123,
  "provider_id": 123,
  "state": "draft",
  "list_ids": [
    123
  ],
  "exclusion_list_ids": [
    123
  ],
  "send_in_user_timezone": true,
  "send_at": "2023-11-07T05:31:56Z",
  "tags": [
    "<string>"
  ],
  "custom_domain_id": 123
}
'
{
  "id": 24,
  "project_id": 123,
  "type": "blast",
  "name": "<string>",
  "channel": "email",
  "subscription_id": 123,
  "provider_id": 123,
  "state": "draft",
  "created_at": "<string>",
  "updated_at": "<string>",
  "list_ids": [
    123
  ],
  "exclusion_list_ids": [
    123
  ],
  "delivery": {
    "sent": 123,
    "total": 123,
    "opens": 123,
    "clicks": 123,
    "bounced": 123
  },
  "tags": [
    "<string>"
  ],
  "send_in_user_timezone": true,
  "send_at": "<string>",
  "custom_domain_id": 123
}

Documentation Index

Fetch the complete documentation index at: https://docs.spotzee.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Project-scoped secret API key (sk_…). Pass in the Authorization: Bearer <key> header. Grants access to the project the key was issued for.

Path Parameters

campaignId
integer | null

Numeric campaign identifier.

Example:

24

Body

application/json

Partial update of a campaign. To send a blast, set state: "scheduled" and send_at; to cancel, set state: "aborted".

name
string | null
subscription_id
integer | null
provider_id
integer | null
state
enum<string>

Set scheduled to send (with send_at); set aborted to cancel a running campaign.

Available options:
draft,
scheduled,
loading,
running,
finished,
aborting,
aborted
list_ids
integer[] | null
exclusion_list_ids
integer[] | null
send_in_user_timezone
boolean | null
send_at
string<date-time> | null
tags
string[] | null
custom_domain_id
integer | null

Response

The updated campaign.

A one-off (blast) or per-user (trigger) send across one channel.

id
integer
required

Numeric campaign identifier.

Example:

24

project_id
integer
required
type
enum<string>
required

blast campaigns send to every contact in the target lists. trigger campaigns fire per-user when an event matches.

Available options:
blast,
trigger
name
string
required
channel
enum<string>
required

Delivery channel the campaign sends through.

Available options:
email,
text,
push,
webhook,
in_app
subscription_id
integer
required

Subscription type a contact must be opted in to in order to receive this campaign.

provider_id
integer
required

Delivery provider used to send the campaign.

state
enum<string>
required

Campaign lifecycle state. Set state: "scheduled" (with send_at) to send a blast; set state: "aborted" to cancel.

Available options:
draft,
scheduled,
loading,
running,
finished,
aborting,
aborted
created_at
string | null
required
updated_at
string | null
required
list_ids
integer[] | null

IDs of the lists targeted by the campaign.

exclusion_list_ids
integer[] | null

IDs of lists whose members should be excluded from the campaign.

delivery
object

Aggregated delivery counters for the campaign.

tags
string[] | null
send_in_user_timezone
boolean | null

When true, send_at is interpreted as a wall-clock time in each contact’s local timezone.

send_at

When the campaign should send. ISO 8601 string accepted on input.

custom_domain_id
integer | null

Optional override of the project’s default tracking and from-address domain.