---
title: "Execute a workflow"
method: POST
path: "/api/v2/workflows/{workflow_id}/instances"
tags: ["Workflow Automation"]
---

# Execute a workflow

`POST /api/v2/workflows/{workflow_id}/instances`

## Request

- Base URL: `https://api.datadoghq.com`
- URL: `https://api.datadoghq.com/api/v2/workflows/{workflow_id}/instances`
- Auth: one of:
  - API key in header `DD-API-KEY` and API key in header `DD-APPLICATION-KEY`
  - OAuth 2
    - Authorization code: `/oauth2/v1/authorize`
    - Token URL: `/oauth2/v1/token` scopes: `workflows_run`

Execute the given workflow. This API requires a [registered application key](https://docs.datadoghq.com/api/latest/action-connection/#register-a-new-app-key). Alternatively, you can configure these permissions [in the UI](https://docs.datadoghq.com/account_management/api-app-keys/#actions-api-access).

## Path parameters

- `workflow_id` string, required

## Request body

- WorkflowInstanceCreateRequest: Request used to create a workflow instance.
  - `meta` WorkflowInstanceCreateMeta: Additional information for creating a workflow instance.
    - `payload` object: The input parameters to the workflow.

## Response `200`

Created

- WorkflowInstanceCreateResponse: Response returned upon successful workflow instance creation.
  - `data` WorkflowInstanceCreateResponseData: Data about the created workflow instance.
    - `id` string: The ID of the workflow execution. It can be used to fetch the execution status.

## Other responses

- `400`: Bad Request
- `403`: Forbidden
- `429`: Too many requests

---

[API](https://skmtc.dev/datadog/apis/datadog-api-v2-collection.md) - [All operations](https://skmtc.dev/datadog/apis/datadog-api-v2-collection/llms.txt) - [OpenAPI document](https://skmtc.dev/datadog/apis/datadog-api-v2-collection/revisions/da68bf029e4c?raw)
