AI Edit Email
POST /api/v1/workspaces/{workspace_id}/emails/{email_id}/ai-edit
POST
/api/v1/workspaces/{workspace_id}/emails/{email_id}/ai-edit
Triggers a background AI agent to edit the email asynchronously. While the edit is in progress, the email’s ai_edit_in_progress field will be true.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” workspace_id
required
integer
Workspace ID
email_id
required
integer
Email ID
Request Body
Section titled “Request Body ”object
prompt
required
The instructions for the AI edit.
string
Example
Build out a travel email, showcasing our paris, london and rome holiday destinationsResponses
Section titled “ Responses ”Successful
object
id
required
integer
Example
12345 status
required
string
name
required
string
Example
My Email project_id
required
integer
Example
12345 created_at
required
string format: date-time
Example
2023-08-23T10:30:00.000Z organization_id
required
integer
Example
12345 email_design_system_id
required
integer
Example
12345 default_locale
required
string
Example
en-US locales
required
Array<string>
updated_at
required
string format: date-time
Example
2023-08-23T10:30:00.000Z last_updated_by
required
object
id
required
integer
Example
12345 first_name
required
string
Example
John last_name
required
string
Example
Smith profile_image_url
required
string
Example
https://example.com/profile.jpg ai_edit_in_progress
required
boolean
ai_agent_id
required
integer
Example
12345 brand_profile_id
required
integer
Example
12345 link_tracking_profile_id
required
integer
Example
12345 published_at
required
string format: date-time
Example
2023-08-23T10:30:00.000Z screenshot_url
required
string
Example
https://www.example.com/screenshot.pngUnauthorized
object
message
required
string
Example
Record not foundForbidden
object
message
required
string
Example
Record not foundNot Found
object
message
required
string
Example
Record not foundUnprocessable Entity
object
message
required
string
Example
Failed to save errors
required
object
key
additional properties
Array<string>
Example
{ "errors": { "username": [ "Username is required.", "Username must be unique." ], "email": [ "Invalid email format." ] }}