API referenceAutomations
Get a automation
With its draft: the latest version.
GET
With its draft: the latest version.
apiKey readheader
AuthorizationBearer <token>A workspace API key (pf_…), created under Developers → API keys.
Scope: read
id*stringMatch
^(auto)_[0-9A-Za-z]{8}$OK
application/json- response
id*stringMatch
^(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*stringValue in
"draft""published""archived"draftVersionId*stringFormat
uuidpublishedVersionId*|Format
uuidhasUnpublishedChanges*booleancreatedAt*stringFormat
date-timeupdatedAt*stringFormat
date-timearchivedAt*|Format
date-timetrigger*||state*draft*curl -X GET 'https://api.postforge.dev/v1/automations/string'{ "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" } } ] } }}Create a automation POST
Its first version is the draft; it goes into use by its own action.
Update a automation PATCH
Renames it, moves it, or saves a new draft on top of `baseVersionId`, which must be the current draft (409 `version_stale` otherwise). A save by the same person within 10 minutes of the unpublished draft it continues replaces that draft (D105); otherwise it adds one. The published version doesn’t change.