---
title: "Edit website with AI prompt"
method: POST
path: "/v1/ai/workspace/website/{website_id}/edit"
tags: ["Workflows"]
---

# Edit website with AI prompt

`POST /v1/ai/workspace/website/{website_id}/edit`

## Request

- Base URL: `https://api.lindo.ai`
- URL: `https://api.lindo.ai/v1/ai/workspace/website/{website_id}/edit`
- Auth: HTTP bearer

Starts an AI-driven edit workflow on an existing website. The agent wakes up in a sandbox, edits the site (across its pages) per the prompt, and publishes the changes. Requires website ownership verification. Returns a `workflow_id` you can poll via `GET /v1/ai/workspace/website/edit/status/{workflow_id}`.

## Path parameters

- `website_id` string, required: The ID of the website to edit

## Request body

- EditWebsiteWorkflowRequest
  - `prompt` string, required: AI prompt describing the change to make to the website. Must be at least 10 characters.
  - `publish` boolean: When true, the edited page(s) are published to the live website. When false or omitted, the changes are saved as drafts that can be reviewed and published from the editor ("Publish all").
  - `schedule_at` string: Optional ISO 8601 date to schedule the workflow for future execution.

## Response `200`

Workflow started successfully

- WorkflowResponse
  - `success` true, required: Indicates the workflow was started successfully
  - `result` object, required
    - `workflow_id` string, required: Unique identifier for this workflow. Pass it back to the matching status endpoint (GET /v1/ai/workspace/{website|page|blog}/status/{workflow_id}) to poll progress.
    - `website_id` string: Preallocated website ID. Returned by create-website so callers can reference the website while generation runs.

## Other responses

- `400`: Invalid request - validation error
- `401`: Unauthorized - invalid or missing API key
- `403`: Forbidden - website does not belong to workspace
- `500`: Internal server error

---

[API](https://skmtc.dev/lindo/apis/lindo-unified-api.md) · [All operations](https://skmtc.dev/lindo/apis/lindo-unified-api/llms.txt) · [OpenAPI document](https://skmtc.dev/lindo/apis/lindo-unified-api/revisions/2672f34525a4?raw)
