Skip to main content
PUT
/
api
/
v1
/
campaigns
/
{campaignId}
curl -X PUT "https://api.usegately.com/api/v1/campaigns/CAMPAIGN_ID" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "X-Project-ID: YOUR_PROJECT_ID" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "June Newsletter (revised)",
    "subject": "What we shipped this month — updated",
    "content": "<h1>June Update</h1><p>Updated content here.</p>"
  }'
{
  "success": true,
  "message": "Campaign updated successfully",
  "campaign": {
    "id": "a1b2c3d4-e5f6-4789-abcd-ef1234567890",
    "name": "June Newsletter (revised)",
    "subject": "What we shipped this month — updated",
    "status": "scheduled",
    "updated_at": "2025-06-15T11:30:00.000Z"
  }
}
Campaigns with status sending or sent cannot be updated. Attempting to do so returns a 400 error.

Headers

Authorization
string
required
Bearer YOUR_API_KEY
X-Project-ID
string
Your project UUID. Not required if the API key already encodes the project.

Path Parameters

campaignId
string
required
Campaign UUID

Request Body

All three body fields are required.
name
string
required
Updated campaign display name
subject
string
required
Updated email subject line
content
string
required
Updated HTML body content
html_content
string
Pre-processed HTML — defaults to content if omitted

Response

success
boolean
true on success
message
string
Human-readable confirmation
campaign
object
The full updated campaign object
curl -X PUT "https://api.usegately.com/api/v1/campaigns/CAMPAIGN_ID" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "X-Project-ID: YOUR_PROJECT_ID" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "June Newsletter (revised)",
    "subject": "What we shipped this month — updated",
    "content": "<h1>June Update</h1><p>Updated content here.</p>"
  }'
{
  "success": true,
  "message": "Campaign updated successfully",
  "campaign": {
    "id": "a1b2c3d4-e5f6-4789-abcd-ef1234567890",
    "name": "June Newsletter (revised)",
    "subject": "What we shipped this month — updated",
    "status": "scheduled",
    "updated_at": "2025-06-15T11:30:00.000Z"
  }
}