---
title: "Create a new playbook"
method: POST
path: "/workspace/{ws_id}/playbooks"
tags: ["Workflows"]
---

# Create a new playbook

`POST /workspace/{ws_id}/playbooks`

Creates a new playbook in the specified workspace and immediately publishes it.

## Path parameters

- `ws_id` string, required

## Query parameters

- `playbook_content_url` string

## Request body

- ModelsPlaybook — Playbook information that includes the playbook definition (YAML), metadata, and associations with packs, connections, and subflows.
  - `actions` ModelsPlaybookAction[] — List of actions used in the playbook
    - `action_full_name` string
    - `collection_icon_uri` string
    - `collection_name` string
    - `full_name` string
    - `id` string — TODO: migrate automations to remove the below fields + remove usage from actions-cell-renderer UI component
    - `name` string
  - `active` boolean — Whether the playbook is currently active
  - `analyst_copilot_workflow` boolean — Whether this is an Analyst Copilot workflow
  - `automation_origin_id` string — The ID of the original playbook if this is a replica
  - `automation_type` string — The type of automation
  - `created_at` integer
  - `created_by` string
  - `custom_timeout` integer — Custom execution timeout in hours
  - `deleted` string — When the playbook was deleted
  - `display_settings` ModelsRequestDisplaySettings — Settings for displaying the playbook in the self-service portal.
    - `description` string — The description in the portal
    - `display_as_html` boolean — Whether to render the description as HTML
    - `icon` string — The icon URI
    - `name` string — The display name in the portal
  - `icon` string — The icon associated with the playbook
  - `id` string
  - `is_icon_selected_by_user` boolean — Whether the icon was manually selected
  - `is_otb` boolean — Whether this is an Out-Of-The-Box playbook
  - `is_request` boolean — Whether the playbook is exposed as a self-service request
  - `max_concurrency_level` integer — Maximum number of concurrent executions (0 for unlimited)
  - `name` string — The name of the playbook
  - `notification_emails` string — A comma-separated list of emails for notifications
  - `pack_id` string — The ID of the automation pack containing this playbook
  - `playbook` string — The YAML definition of the playbook
  - `playbook_to_run_on_error` string — The ID of the playbook to run if this one fails
  - `preferred_engine_version` string — The preferred workflow engine version
  - `runner` string — The name of the runner group assigned to this playbook
  - `step_transition_limit` integer — Maximum number of step transitions allowed in a single execution
  - `tags` string[] — Tags associated with the playbook
  - `tenant_id` string — The ID of the parent tenant
  - `updated_at` integer
  - `updated_by` string
  - `used_connections` string[] — List of connection IDs used by the playbook
  - `used_global_variables` string[] — List of used global variables
  - `used_subflows` string[] — List of subflow IDs used by the playbook
  - `used_tables` string[] — List of used tables
  - `version` string — The version of the playbook
  - `wizard_id` string — The ID of the wizard used to create this playbook
  - `workspace_id` string — The ID of the parent workspace

## Response `200`

Created playbook

- ModelsPlaybook — Playbook information that includes the playbook definition (YAML), metadata, and associations with packs, connections, and subflows.
  - `actions` ModelsPlaybookAction[] — List of actions used in the playbook
    - `action_full_name` string
    - `collection_icon_uri` string
    - `collection_name` string
    - `full_name` string
    - `id` string — TODO: migrate automations to remove the below fields + remove usage from actions-cell-renderer UI component
    - `name` string
  - `active` boolean — Whether the playbook is currently active
  - `analyst_copilot_workflow` boolean — Whether this is an Analyst Copilot workflow
  - `automation_origin_id` string — The ID of the original playbook if this is a replica
  - `automation_type` string — The type of automation
  - `created_at` integer
  - `created_by` string
  - `custom_timeout` integer — Custom execution timeout in hours
  - `deleted` string — When the playbook was deleted
  - `display_settings` ModelsRequestDisplaySettings — Settings for displaying the playbook in the self-service portal.
    - `description` string — The description in the portal
    - `display_as_html` boolean — Whether to render the description as HTML
    - `icon` string — The icon URI
    - `name` string — The display name in the portal
  - `icon` string — The icon associated with the playbook
  - `id` string
  - `is_icon_selected_by_user` boolean — Whether the icon was manually selected
  - `is_otb` boolean — Whether this is an Out-Of-The-Box playbook
  - `is_request` boolean — Whether the playbook is exposed as a self-service request
  - `max_concurrency_level` integer — Maximum number of concurrent executions (0 for unlimited)
  - `name` string — The name of the playbook
  - `notification_emails` string — A comma-separated list of emails for notifications
  - `pack_id` string — The ID of the automation pack containing this playbook
  - `playbook` string — The YAML definition of the playbook
  - `playbook_to_run_on_error` string — The ID of the playbook to run if this one fails
  - `preferred_engine_version` string — The preferred workflow engine version
  - `runner` string — The name of the runner group assigned to this playbook
  - `step_transition_limit` integer — Maximum number of step transitions allowed in a single execution
  - `tags` string[] — Tags associated with the playbook
  - `tenant_id` string — The ID of the parent tenant
  - `updated_at` integer
  - `updated_by` string
  - `used_connections` string[] — List of connection IDs used by the playbook
  - `used_global_variables` string[] — List of used global variables
  - `used_subflows` string[] — List of subflow IDs used by the playbook
  - `used_tables` string[] — List of used tables
  - `version` string — The version of the playbook
  - `wizard_id` string — The ID of the wizard used to create this playbook
  - `workspace_id` string — The ID of the parent workspace

## Other responses

- `400` — Invalid request body or creation failed
- `401` — Unauthorized
- `403` — Forbidden
- `500` — Internal server error (e.g. publish step failed)

---

[API](https://skmtc.net/blinkops/apis/blink-rest-api.md) · [All operations](https://skmtc.net/blinkops/apis/blink-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/blinkops/blink-rest-api/versions/f043409736b2/schema)
