Skip to main content

Update a workflow

PUT 

/workflows/definitions/:id

Pushes a new version of the definition. The body can be the bare definition or { definition, mode }, where mode controls versioning:

  • auto (default): overwrites the latest revision, unless an active alias points at it, in which case a new revision is created. Safe by default: you never rewrite something that is live.
  • new-revision: always create a new revision.
  • overwrite: always rewrite the latest revision.

If the {id} in the URL is a key that doesn't exist yet, the workflow is created instead and the response is 201: PUT doubles as an upsert, so a git repository of definitions can push them without knowing which ones already exist.

Request

Responses

The definition was updated. mode says whether the latest revision was overwritten or a new one created.