Update Campaign

Update an existing campaign by ID

MethodPATCH
/api/v1/campaigns/{campaignId}

https://lumail.io/api/v1/campaigns/{campaignId}

Update an existing campaign's metadata and content. DRAFT campaigns can be updated, and so can SCHEDULED campaigns until 5 minutes before their send. The schedule is kept.

Response

  • Success (200 OK) - Returns the updated campaign object.
  • Error (400 Bad Request) - Campaign is not editable (not a draft, or scheduled to send in less than 5 minutes) or invalid sender ID.
  • Error (404 Not Found) - Campaign not found or doesn't belong to your organization.
  • Error (401 Unauthorized) - Invalid or missing API token.

Path Parameters

ParameterTypeDescription
campaignIdstringRequired. The unique campaign ID

Request Schema

FieldTypeDescription
namestringInternal name for the campaign
subjectstringEmail subject line
previewstringPreview text shown in email clients
contentobjectEmail content in TipTap JSON format
contentTypestringContent type: MAILY, PLATE, or MARKDOWN
senderIdstringEmail sender ID
replyTostringReply-to email address

All fields are optional. Only provided fields will be updated.

Response Fields

FieldTypeDescription
successbooleanIndicates if the operation was successful
campaignobjectThe updated campaign object
campaign.idstringUnique identifier for the campaign
campaign.campaignIdstringSame as id (for consistency)
campaign.namestringName of the campaign
campaign.subjectstringEmail subject line
campaign.previewstring or nullPreview text for the email
campaign.statusstringCampaign status (DRAFT)
campaign.contentTypestringContent type: MAILY, PLATE, or MARKDOWN
campaign.contentobjectEmail content in TipTap JSON format
campaign.replyTostring or nullReply-to email address
campaign.senderIdstringEmail sender ID
campaign.recipientCountnumberNumber of recipients
campaign.createdAtstringISO timestamp when the campaign was created
campaign.updatedAtstringISO timestamp when the campaign was last updated
campaignIdstringCampaign ID at the root level for convenience

Important Notes

  • DRAFT and SCHEDULED campaigns can be updated. A scheduled campaign stays editable until 5 minutes before its send, and keeps its schedule. Sending or sent campaigns cannot be modified.
  • Within the last 5 minutes before the send, cancel the schedule to edit the campaign, then schedule it again.
  • When updating the senderId, the sender must exist and belong to your organization.

Usage Example

Use this API endpoint to:

  • Update campaign subject lines and preview text
  • Modify email content programmatically
  • Change the sender for a campaign
  • Build campaign editing interfaces
  • Sync campaign updates from external systems