---
title: "Creates/saves a workflow action"
method: POST
path: "/api/v1/workflow/actions"
tags: ["Workflow"]
---

# Creates/saves a workflow action

`POST /api/v1/workflow/actions`

Creates or updates a [workflow action](https://www.dotcms.com/docs/latest/managing-workflows#Actions) from the properties specified in the payload. Returns the created workflow action.

**Tip:** Passing a `stepId` in the body also **attaches the new action to that step** as a side-effect. The separate `POST /api/v1/workflow/steps/{stepId}/actions` endpoint is only needed when attaching an action that already exists; for new actions created via this endpoint, `stepId` performs both the create and the attach in a single call.

**Anyone / public role:** there is no magic `"anyone"` constant for `whoCanUse` or `actionNextAssign`. Use the CMS Anonymous role id (`654b0931-1027-41f7-ad4d-173115ed8ec1`) on most installs, or look up the actual id by inspecting an existing System Workflow action.

## Request body

- WorkflowActionForm
  - `actionId` string
  - `schemeId` string, required
  - `stepId` string
  - `actionName` string, required
  - `whoCanUse` string[]
  - `actionIcon` string
  - `actionAssignable` boolean, required
  - `actionCommentable` boolean, required
  - `showOn` string[], required
  - `actionRoleHierarchyForAssign` boolean, required
  - `actionNextStep` string, required
  - `actionNextAssign` string
  - `actionCondition` string
  - `metadata` object

## Response `200`

Workflow action created successfully

- ResponseEntityWorkflowActionView
  - `errors` ErrorEntity[]
    - `errorCode` string
    - `message` string
    - `fieldName` string
  - `entity` WorkflowAction
    - `id` string
    - `name` string
    - `schemeId` string
    - `condition` string
    - `nextStep` string
    - `nextAssign` string
    - `icon` string
    - `roleHierarchyForAssign` boolean
    - `assignable` boolean
    - `commentable` boolean
    - `order` integer
    - `saveActionlet` boolean
    - `publishActionlet` boolean
    - `unpublishActionlet` boolean
    - `archiveActionlet` boolean
    - `pushPublishActionlet` boolean
    - `onlyBatchActionlet` boolean
    - `unarchiveActionlet` boolean
    - `deleteActionlet` boolean
    - `destroyActionlet` boolean
    - `moveActionlet` boolean
    - `commentActionlet` boolean
    - `metadata` object
    - `resetable` boolean
    - `nextStepCurrentStep` boolean
    - `moveActionletHashPath` boolean
    - `owner` string
    - `showOn` string[]
    - `hasOnlyBatchActionlet` boolean
    - `hasPublishActionlet` boolean
    - `hasUnpublishActionlet` boolean
    - `hasArchiveActionlet` boolean
    - `hasPushPublishActionlet` boolean
    - `hasUnarchiveActionlet` boolean
    - `hasDeleteActionlet` boolean
    - `hasDestroyActionlet` boolean
    - `hasCommentActionlet` boolean
    - `hasResetActionlet` boolean
    - `hasMoveActionletHasPathActionlet` boolean
    - `hasMoveActionletActionlet` boolean
    - `hasSaveActionlet` boolean
  - `messages` MessageEntity[]
    - `message` string
  - `i18nMessagesMap` object
  - `permissions` string[]
  - `pagination` Pagination
    - `currentPage` integer
    - `perPage` integer
    - `totalEntries` integer

## Other responses

- `400` — Bad request
- `401` — Invalid User
- `403` — Forbidden
- `406` — Not Acceptable
- `415` — Unsupported Media Type
- `500` — Internal Server Error

---

[API](https://skmtc.dev/jostens/apis/dotcms-rest-api.md) · [All operations](https://skmtc.dev/jostens/apis/dotcms-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/jostens/dotcms-rest-api/revisions/a088fe9f515c/schema)
