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. Only campaigns with DRAFT status can be updated. For scheduled campaigns, cancel the schedule first.
Response
- Success (200 OK) - Returns the updated campaign object.
- Error (400 Bad Request) - Campaign is not in DRAFT status 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
| Parameter | Type | Description |
|---|---|---|
campaignId | string | Required. The unique campaign ID |
Request Schema
| Field | Type | Description |
|---|---|---|
name | string | Internal name for the campaign |
subject | string | Email subject line |
preview | string | Preview text shown in email clients |
content | object | Email content in TipTap JSON format |
contentType | string | Content type: MAILY, PLATE, or MARKDOWN |
senderId | string | Email sender ID |
replyTo | string | Reply-to email address |
All fields are optional. Only provided fields will be updated.
Response Fields
| Field | Type | Description |
|---|---|---|
success | boolean | Indicates if the operation was successful |
campaign | object | The updated campaign object |
campaign.id | string | Unique identifier for the campaign |
campaign.campaignId | string | Same as id (for consistency) |
campaign.name | string | Name of the campaign |
campaign.subject | string | Email subject line |
campaign.preview | string or null | Preview text for the email |
campaign.status | string | Campaign status (DRAFT) |
campaign.contentType | string | Content type: MAILY, PLATE, or MARKDOWN |
campaign.content | object | Email content in TipTap JSON format |
campaign.replyTo | string or null | Reply-to email address |
campaign.senderId | string | Email sender ID |
campaign.recipientCount | number | Number of recipients |
campaign.createdAt | string | ISO timestamp when the campaign was created |
campaign.updatedAt | string | ISO timestamp when the campaign was last updated |
campaignId | string | Campaign ID at the root level for convenience |
Important Notes
- Only DRAFT campaigns can be updated. Scheduled, sending, or sent campaigns cannot be modified.
- To update a scheduled campaign, you must first cancel the schedule using the Lumail UI.
- 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
Related Documentation
- List Campaigns - List all campaigns
- Create Campaign - Create a new campaign
- Get Campaign - Get details for a specific campaign
- Delete Campaign - Delete a campaign