---
title: "POST /api/projects/{project_id}/workflow_data_suggestions/build/"
method: POST
path: "/api/projects/{project_id}/workflow_data_suggestions/build/"
tags: ["workflow_data_suggestions"]
---

# POST /api/projects/{project_id}/workflow_data_suggestions/build/

`POST /api/projects/{project_id}/workflow_data_suggestions/build/`

## Request

- Base URL: `https://us.posthog.com`
- URL: `https://us.posthog.com/api/projects/{project_id}/workflow_data_suggestions/build/`
- Auth: HTTP bearer

Workflow ideas written by AI from the project's own events. Both calls are free for the customer.

## Path parameters

- `project_id` string, required

## Request body

- DataSuggestionBuildRequest
  - `suggestion_id` string, required: The id of a suggestion from the list endpoint.
  - `retry` boolean: Start a new build when the last one failed. Leave it false when asking for a running build's status.
  - `save_draft` boolean: Save the built draft in the project and return its workflow_id. Blank settings, like a webhook URL, stay blank and are listed in missing_inputs. Leave it false to get the workflow back without saving.

## Response `200`

- DataSuggestionBuildResponse
  - `status` 'ready' | 'building' | 'failed', required: * `ready` - Ready * `building` - Building * `failed` - Failed
  - `workflow` unknown, required
  - `uses_saved_template` boolean, required: Whether an email step reuses a saved email template.
  - `workflow_id` string, nullable, required: With status ready and save_draft: the id of the saved draft workflow. Null otherwise.
  - `missing_inputs` DataSuggestionMissingInput[], required: With status ready: the settings the draft leaves blank, which must be filled before it is enabled.
    - `step_id` string, required: The id of the workflow step (action) the setting belongs to.
    - `step_name` string, required: The step's name, as the editor shows it.
    - `field` string, required: The setting to fill, like 'Webhook URL', 'Email sender' or 'Condition: Is on a paid plan'.

## Changes

> 52 revisions in range; 1 not diffed.

- **2026-10-15** `1fdf8604a9b9`: 5 info
  - added the new optional request property `save_draft` (media type: application/json)
  - added the new optional request property `save_draft` (media type: application/x-www-form-urlencoded)
  - added the new optional request property `save_draft` (media type: multipart/form-data)
  - added the required property `missing_inputs` to the response with the `200` status
  - …1 more
- **2026-10-15** `9a021d87533d`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/posthog/apis/posthog-api/changes/api/projects/:project_id/workflow_data_suggestions/build/post.md)

---

[API](https://skmtc.dev/posthog/apis/posthog-api.md) · [All operations](https://skmtc.dev/posthog/apis/posthog-api/llms.txt) · [OpenAPI document](https://skmtc.dev/posthog/apis/posthog-api/revisions/71e64193672d?raw)
