Generate Messages
Outbound Messages
Generate Messages
Synchronously materialize ordinary recipient drafts while preserving AI personalization slots.
POST
Generate Messages
CLI:
Overview
This endpoint supports one POST action, selected by theaction field in the body:
resolve— synchronously resolves%variables%for ordinary sendable nodes and materializes recipient rows incampaign_prospect_messagesasdraft. For personalized email nodes, it prepares drafts from the saved skeleton and preserves$ai {instruction}$slots for the outbound copy operations. Manually edited rows are preserved; template changes flow through to unedited rows.
draft status. Legacy generate_ai generation is not supported by this endpoint.
AI agent notes
resolve is safe to re-run. It upserts on (campaign_id, prospect_id, node_id) and excludes manually-edited rows from the upsert — template changes propagate without clobbering user customizations. If the “find edited messages” query itself fails, the server falls back to ignoreDuplicates: true for the whole batch to avoid silently overwriting edits.AI copy is a separate operation. resolve does not seed recipient drafts from legacy generated_examples and does not ask a copywriter to fill personalization. Use puffleAgent.previewOutboundCopy to fill a reusable preview for up to five recipients, then use puffleAgent.writeOutboundCopy after explicit user approval to fill every remaining $ai {instruction}$ slot. Previewed copy and manual edits are preserved.Check status before launch. Use puffleAgent.getOutboundCopyStatus to determine whether copy is ready, needs_generation, or needs_attention. A needs_attention response can include copywriterError; surface it and retry the copy operation after correcting any manually unresolved slot. For reading the draft outbox or inline-editing one message, use GET or PATCH on this same campaign messages path.Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Campaign UUID
Body
application/json
Synchronously materializes ordinary draft messages. $ai {prompt}$ personalization slots are preserved for puffleAgent.previewOutboundCopy and puffleAgent.writeOutboundCopy.
Response
Messages were resolved or AI generation was queued.