Campaigns
Update a campaign
Updates the name, content, audience, or policy of a campaign draft. Use this endpoint to update a campaign through the Samva email API.
Updates the name, content, audience, or policy of a campaign draft.
Authorization
apiKey x-api-key<token>
In: header
Path Parameters
id*string
Match
^camp_[0-9a-hjkmnp-tv-z]{16,24}$Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
name?string|null
content?|null
audience?|null
policy?|null
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X PATCH "https://example.com/v1/campaigns/string" \ -H "Content-Type: application/json" \ -d '{}'{ "id": "string", "name": "string", "channel": "email", "content": { "channel": "email", "email": { "subject": "string", "html": "string", "text": "string", "attachments": [ { "filename": "string", "content": "string", "mediaId": "string", "contentType": "string", "size": 1 } ], "publicationId": "string", "inputContractId": "string", "templateId": "string", "templateSlug": "string", "templateData": {}, "inReplyToMessageId": "string", "replyTo": [ "string" ], "unsubscribeGroupId": "string", "tracking": { "opens": true, "clicks": true }, "footer": { "enabled": true } }, "conversationId": "string", "metadata": {} }, "audience": { "includeTags": [ "string" ], "excludeTags": [ "string" ], "contactIds": [ "string" ], "groupIds": [ "string" ] }, "policy": { "unsubscribeGroupId": "string", "pageSize": 100 }, "definition": { "state": "editable", "frozenAt": "string" }, "latestRun": { "id": "string", "status": "scheduled", "scheduledFor": "string", "completedAt": "string", "totalRecipients": 0, "dispatchedCount": 0, "failedCount": 0, "skippedCount": 0 }, "createdBy": "string", "actorEmail": "string", "memberRole": "string", "createdAt": "string", "updatedAt": "string"}