Skip to main content
PATCH
/
campaigns
/
{campaignId}
curl --request PATCH \
  --url 'https://api.autosend.com/v1/campaigns/60d5ec49f1b2c72d9c8b4567' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "name": "Spring Sale Newsletter - Final",
    "subject": "Last chance: Spring Sale ends tonight!",
    "previewText": "Up to 50% off — ends at midnight",
    "trackingClick": true,
    "trackingOpen": true
  }'
{
  "success": true,
  "data": {
    "id": "60d5ec49f1b2c72d9c8b4567",
    "name": "Spring Sale Newsletter - Final",
    "subject": "Last chance: Spring Sale ends tonight!",
    "previewText": "Up to 50% off — ends at midnight",
    "status": "draft",
    "sendMode": "immediate",
    "trackingClick": true,
    "trackingOpen": true,
    "createdAt": "2026-03-01T10:00:00.000Z",
    "updatedAt": "2026-03-15T14:30:00.000Z"
  }
}
curl --request PATCH \
  --url 'https://api.autosend.com/v1/campaigns/60d5ec49f1b2c72d9c8b4567' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "name": "Spring Sale Newsletter - Final",
    "subject": "Last chance: Spring Sale ends tonight!",
    "previewText": "Up to 50% off — ends at midnight",
    "trackingClick": true,
    "trackingOpen": true
  }'
{
  "success": true,
  "data": {
    "id": "60d5ec49f1b2c72d9c8b4567",
    "name": "Spring Sale Newsletter - Final",
    "subject": "Last chance: Spring Sale ends tonight!",
    "previewText": "Up to 50% off — ends at midnight",
    "status": "draft",
    "sendMode": "immediate",
    "trackingClick": true,
    "trackingOpen": true,
    "createdAt": "2026-03-01T10:00:00.000Z",
    "updatedAt": "2026-03-15T14:30:00.000Z"
  }
}

Authorizations

Authorizations
string | header
required
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

campaignId
string
required
The id of the campaign to update.

Body

All body fields are optional. Only the fields provided will be updated.
name
string
Display name of the campaign. Between 1 and 200 characters.
subject
string
Email subject line. Between 1 and 998 characters.
previewText
string
Preview text shown in email clients. Maximum 200 characters.
from
object
Sender identity to use for this campaign.
fromSenderId
string
id of a saved sender identity.
replyTo
string
Reply-to email address. Must be a valid email.
templateId
string
ID of the email template to use. The template can be created via the Template API. Either templateId or htmlTemplate is required.
htmlTemplate
string
Raw HTML content to use as the campaign email body. Either htmlTemplate or templateId is required. If both are provided, htmlTemplate takes precedence and the template referenced by templateId will be updated with the provided HTML content.
toLists
array
Array of list or segment IDs to send the campaign to.
excludeLists
array
Array of list or segment IDs to exclude from sending.
unsubscribeGroupId
string
ID of the unsubscribe group to associate with this campaign.
sendNow
boolean
If true, triggers sending immediately.
scheduledAt
string
ISO 8601 date-time string at which to schedule the campaign for sending.
sendToGlobalList
boolean
If true, send to all contacts in the global list.
publish
boolean
If true, publishes and finalizes the campaign.
trackingClick
boolean
Enable or disable click tracking.
trackingOpen
boolean
Enable or disable open tracking.
sendMode
string
Delivery mode. One of: immediate, scheduled, gradual.
gradualStrategy
string
Growth strategy for gradual sending. One of: fixed, 1.25x, 1.5x, 1.75x, 2x.
dailyBatchSize
integer
Number of emails to send per day in gradual mode. Must be at least 1.
timezone
string
Timezone string for scheduled or gradual sending.

Response

Returns the updated campaign object.
success
boolean
Indicates whether the request was successful.
data
object
The updated campaign object.