Save an automation’s changes
Puts its unsaved changes in use, as a new version in its history. `people: move` (the default) moves everyone in it to the changed automation, as `saveImpact` says; `keep` lets them finish the version they’re on. 422 `checks_failed` with each problem in its place; 409 `nothing_to_save` when there are no unsaved changes.
Puts its unsaved changes in use, as a new version in its history. people: move (the default) moves everyone in it to the changed automation, as saveImpact says; keep lets them finish the version they’re on. 422 checks_failed with each problem in its place; 409 nothing_to_save when there are no unsaved changes.
apiKey writeAuthorizationBearer <token>A workspace API key (pf_…), created under Developers → API keys.
Scope: write
id*string^(auto)_[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 <= 255application/json- body
people?string"move""move""keep"OK
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-timetrigger*||state*draft*curl -X POST 'https://api.postforge.dev/v1/automations/string/save' \ -H 'Content-Type: application/json' \ -d '{}'{ "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", "trigger": { "type": "event", "event": "string", "where": { "type": "and", "conditions": [ null ] } }, "state": { "status": "on", "changedAt": "2019-08-24T14:15:22Z", "active": 0, "unsavedChanges": true }, "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": { "trigger": { "type": "event", "event": "string", "where": { "type": "and", "conditions": [ null ] } }, "entry": { "who": { "type": "and", "conditions": [ null ] }, "again": { "type": "always" }, "whileIn": "restart" }, "steps": [ { "id": "string", "type": "wait", "wait": { "amount": 1, "unit": "minutes" } } ] } }}What saving an automation’s changes does to the people in it GET
For the people in it now, per step they’re on: whether moving them to the changed automation lets them continue, changes their wait (counted from when they reached it), moves them on at once (that wait is over), or makes them leave (their step is gone).
Discard an automation’s unsaved changes POST
Puts its draft back to the version in use. 409 `nothing_to_save` when there are no unsaved changes; 409 `never_saved` for an automation never saved (archive it instead).