Unschedule a campaign
Takes a scheduled campaign out of the schedule: it’s a draft again, to edit and schedule again, its time kept. 409 `not_scheduled` once it has started sending (cancel it instead).
Takes a scheduled campaign out of the schedule: it’s a draft again, to edit and schedule again, its time kept. 409 not_scheduled once it has started sending (cancel it instead).
apiKey writeAuthorizationBearer <token>A workspace API key (pf_…), created under Developers → API keys.
Scope: write
id*string^(camp)_[0-9A-Za-z]{8}$idempotency-key?stringRun this write once: a retry with the same key gets the first answer (24 hours).
1 <= length <= 255OK
application/json- response
id*string^(tmpl|comp|brand|otype|seg|trait|camp|auto)_[0-9A-Za-z]{8}$kind*stringname*stringfolder*|The folder it’s in; null at the top level
status*string"draft""published""archived"draftVersionId*stringuuidpublishedVersionId*|uuidhasUnpublishedChanges*booleancreatedAt*stringdate-timeupdatedAt*stringdate-timearchivedAt*|date-timesend*|nulldraft*curl -X POST 'https://api.postforge.dev/v1/campaigns/string/unschedule'{ "id": "string", "kind": "string", "name": "string", "folder": { "id": "string", "name": "string" }, "status": "draft", "draftVersionId": "e7fc80a1-b65e-482e-8fcd-f6c647b4104b", "publishedVersionId": "9786f1b1-ef7e-4f6a-94c4-c8eb67e924eb", "hasUnpublishedChanges": true, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "archivedAt": "2019-08-24T14:15:22Z", "send": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "status": "scheduled", "scheduledAt": "2019-08-24T14:15:22Z", "campaignVersionId": "39ec451d-3233-4d62-ae15-7fb6a61cb71a", "emailVersionId": "5aa7582b-c80e-4f53-9246-74f188431e79", "startedAt": "2019-08-24T14:15:22Z", "finishedAt": "2019-08-24T14:15:22Z", "failureReason": "email_has_issues", "failureDetail": "string", "noEmail": 0, "notSubscribed": 0 }, "draft": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "definitionId": "string", "parentVersionId": "abf80970-9686-419e-bc00-5ddcccc33ba6", "origin": "edit", "schemaVersion": 0, "author": { "type": "user", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string" }, "createdAt": "2019-08-24T14:15:22Z", "openedAt": "2019-08-24T14:15:22Z", "definition": { "audience": { "include": [ { "type": "list", "listId": "string" } ], "exclude": [ { "type": "list", "listId": "string" } ] }, "emailId": "string", "senderId": "6b2f63ba-164c-48c9-87b1-690cee2b3da3", "replyTo": "user@example.com", "smartSending": { "enabled": true, "hours": 1 }, "utm": { "enabled": true, "source": "string", "medium": "string", "campaign": "string", "content": "string" }, "linkParameters": [ { "name": "string", "value": { "kind": "fixed", "text": "string" } } ] } }}Schedule a campaign POST
Runs the checklist and, when it passes, pins the campaign’s draft and its email’s latest version and schedules its send for `at` (or now). From then on the campaign and its email are read-only (`campaign_scheduled`) until it’s unscheduled. 422 `checklist_failed` with the checks that failed; 409 `campaign_scheduled` when it’s scheduled or sending already.
Cancel a campaign’s send POST
Stops a scheduled or sending campaign: what hasn’t gone out yet is cancelled (emails already handed to the provider still arrive). It can’t be scheduled again; duplicate it to send it later. 409 `not_sending` when there’s nothing to cancel.