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

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

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

## Request

- Base URL: `https://us.posthog.com`
- URL: `https://us.posthog.com/api/projects/{project_id}/workflow_data_suggestions/generate/`
- 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

- DataSuggestionGenerateRequest
  - `refresh` boolean: Make new suggestions even when the cached ones are still valid.

## Response `200`

- DataSuggestionsResponse
  - `status` 'ready' | 'generating' | 'ai_not_approved' | 'unavailable', required: * `ready` - Ready * `generating` - Generating * `ai_not_approved` - Ai Not Approved * `unavailable` - Unavailable
  - `suggestions` DataSuggestion[], required: Up to 3 suggested workflows, ranked by lifecycle stage and then by weekly volume.
    - `id` string, required: Opaque id of this suggestion, valid while the suggestions stay cached.
    - `name` string, required: Suggested workflow name, written by AI from the project's events.
    - `description` string, required: One sentence on what the workflow does.
    - `reason` string, required: One sentence on why the workflow fits this project.
    - `trigger_event` string, required: The project event that starts the workflow.
    - `weekly_count` integer, required: How often the trigger event fired in the last 7 days.
    - `stage` 'signup' | 'onboarding' | 'trial' | 'purchase' | 'churn_risk' | 'failure' | 'support' | 'other', required: * `signup` - Signup * `onboarding` - Onboarding * `trial` - Trial * `purchase` - Purchase * `churn_risk` - Churn Risk * `failure` - Failure * `support` - Support * `other` - Other
    - `step_outline` DataSuggestionStepKindEnum[], required: The main planned step kinds after the trigger, in order.
    - `premade` boolean, required: Whether PostHog prepared this suggestion ahead of time with its workflow already built. Build it with save_draft to save the draft and stop offering the suggestion.
  - `email_sender_ready` boolean, required: Whether the project has a verified email sender. Without one, an email workflow can be saved as a draft but cannot send until a sending domain is added and verified.

## Changes

> 52 revisions in range; 1 not diffed.

- **2026-10-20** `36a10d3ce7cd`: 1 info
  - added the required property `suggestions/items/premade` to the response with the `200` status
- **2026-10-15** `1fdf8604a9b9`: 1 info
  - added the required property `email_sender_ready` to the response with the `200` status
- **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/generate/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)
