Edits a saved email by running the Brew email agent against the current version: "latest" JSX. The new draft is persisted as a fresh version: "latest" row on the same emailId, and the previous head is demoted to a numeric historical version. PATCH supports idempotency for safe retries.
Documentation Index
Fetch the complete documentation index at: https://docs.brew.new/llms.txt
Use this file to discover all available pages before exploring further.
Send your Brew API key as Authorization: Bearer brew_xxx.
Optional idempotency key for safe retries. Reusing the same key with the same request body returns the original response for 24 hours.
1 - 100The id of the email to edit. The email must belong to the same brand the API key is scoped to; cross-brand ids surface as 404 to avoid leaking existence.
Edit instruction and optional fresh content URL. The brand is resolved from the API key and the emailId is on the URL — neither is accepted in the body.