emails

Regenerate Drafts

Regenerate pending outreach drafts from their current templates.

Drafts are rendered when an outreach stage or statement schedule runs, so a template fix does not reach drafts already waiting for approval. This queues a background job that re-renders the selected unsent drafts through the same path that created them and replaces the old drafts. Nothing is sent. By default, drafts a user has already edited are left as they are.

With no filter every pending outreach draft is regenerated; workflow_id limits it to one workflow and email_ids to specific drafts. Returns the number of drafts queued; the regeneration completes asynchronously.

post/v2/emails/drafts/regenerate

Request

  • Base URL
    https://api.stuut.ai (the document declares no server; this is the origin it was published from)
  • Auth
    HTTP bearer

Request body

workflow_idstring nullable

Only drafts produced by this outreach workflow's stages or statement schedule.

email_idsstring[] nullable

Only these draft emails. Drafts not produced by outreach are ignored.

skip_editedboolean

Leave drafts whose body a user has already edited untouched. Set to false to replace those drafts too, discarding the edits.

Response

Successful Response

draft_countinteger required

Pending drafts queued for regeneration.

unsupported_countinteger required

Requested emails that cannot be regenerated: not a pending draft, or not produced by an outreach stage or statement schedule. Always 0 without email_ids.

skip_editedboolean required

Changes

No recorded changes to this operation across all 1 revision of this API.