campaigns_approve_messages
Bulk equivalent of messages_approve, scoped to one campaign step. Mirrors the UI Approve button on the /ws/outreach/campaign/<sqid>/step/<step_sqid>/created page. Typical flow after campaigns_generate_messages completes:
campaigns_generate_messageson a set of leads → returnstask_sqid.jobs_get(task_sqid)→ wait for COMPLETED.campaigns_approve_messageswith the same lead_sqids → flip all their freshly-generated messages NEW/REVIEW_REQUIRED → APPROVED; send scheduler picks them up on the next tick.
Input is Lead sqids, not Message sqids — the view resolves each lead to its current Message for this (campaign, step) pair. Reuses the same identifier the agent already has from the generate-messages call.
Synchronous, no cost. Approving just flips the Message status and computes scheduled_at via get_next_delivery_time (respecting per-mailbox daily / hourly limits). No connects are charged — the connects are already paid at generation time.
Idempotent. Approving an already-APPROVED message reschedules it (useful if you paused a campaign and want to restart sends with fresh delivery times). Messages in terminal states (SENT, DELIVERED, READ, BOUNCED, UNSUBSCRIBED, CANCELED) are skipped with reason already_finalized — no way to un-send an email.
Skip reason codes: not_found (no lead with that sqid in workspace), not_enrolled_on_step (no CampaignLog for this campaign+step+lead), no_message (CampaignLog exists but generation hasn't produced a Message yet — re-call campaigns_generate_messages first), already_finalized, compliance_blocked (a compliance rule excludes the lead — compliance_reason says which; the message was canceled).
Method: POST /api/v1/workspaces/{workspace_sqid}/campaigns/{sqid}/steps/{step_sqid}/approve-messages/
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"sqid": "<sqid>",
"step_sqid": "<step_sqid>",
"lead_sqids": "<lead_sqids>"
},
"name": "campaigns_approve_messages"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sqid | Yes | ||
| step_sqid | Yes | ||
| lead_sqids | Yes | Lead sqids whose messages on this step should be approved for sending. Source these from `campaigns_step_logs` with status=10 (MESSAGE_CREATED / REVIEW_REQUIRED), or reuse the list you passed to `campaigns_generate_messages`. |