---
title: "Add a workflow action"
method: POST
path: "/workflows/{workflowId}/actions"
tags: ["Workflows"]
---

# Add a workflow action

`POST /workflows/{workflowId}/actions`

## Request

- Base URL: `https://{prefix}.api.sandbox.checkout.com`
- URL: `https://{prefix}.api.sandbox.checkout.com/workflows/{workflowId}/actions`
- Auth: one of:
  - OAuth 2
    - Client credentials
    - Token URL: `string` scopes: `flow`, `flow:workflows`
  - API key in header `Authorization`
- TypeScript: <https://skmtc.dev/checkout/apis/checkout-com-api-reference/docs/workflows/:workflowId/actions/post.ts> (a function with typed inputs; its response is checked against the schema)

Adds a workflow action. Actions determine what the workflow will do when it is triggered.

## Path parameters

- `workflowId` string, required

## Request body

- AddUpdateWorkflowActionRequest: The workflow action
  - `type` string, required

## Response `201`

Workflow action added successfully

- AddWorkflowActionResponse
  - `id` string: The workflow action identifier
  - `_links` WorkflowActionLinks: Links related to the workflow action
    - `self` Link
      - `href` string, required: The link URL

## Other responses

- `401`: Unauthorized
- `404`: Workflow not found
- `422`: Invalid data was sent
- `500`: Internal Error

---

[API](https://skmtc.dev/checkout/apis/checkout-com-api-reference.md) - [All operations](https://skmtc.dev/checkout/apis/checkout-com-api-reference/llms.txt) - [OpenAPI document](https://skmtc.dev/checkout/apis/checkout-com-api-reference/revisions/0f1abdb1c3e9?raw)
