Follow-up endpoints

Follow-up endpoints: read and change a campaign's follow-up settings, list the conversations being followed after a replied lead went quiet, read one with its touches, start one by hand, and stop it.

These endpoints run follow-ups: a campaign that opts in drafts the next message for a replied lead who went quiet, and a person sends it. Nothing here sends mail. Every route answers 503 follow_ups_disabled while follow-ups are unavailable. Gates and scopes are in the scope map; error codes are under follow-up refusals.

Campaign settings

GET /campaigns/:id/follow-ups returns the campaign's settings. A campaign that never saved them reads as off with the defaults:

{
  "campaign_id": "...",
  "enabled": false,
  "goal": "",
  "max_touches": 6,
  "window_days": 28,
  "model": "",
  "models": [""]
}

model is the key of the model that plans and writes each follow-up: "" for the workspace's standard model, gemini_flash_lite or sonnet. models is read-only and lists the keys this instance can serve, always with ""; a stored key the instance cannot serve runs on the standard model.

Once the settings were saved, they also carry created_at, updated_at and updated_by.

PUT /campaigns/:id/follow-ups takes any of {enabled, goal, max_touches, window_days, model} and returns the saved settings. A field left out keeps its stored value. goal is the campaign's aim in its own words (an empty goal means a short call), at most 500 characters. max_touches is 1 to 8, window_days 3 to 45 and model one of the three keys. A value outside those answers 400 follow_up_invalid_settings, and turning follow-ups on in a workspace an AI agent opened and nobody claimed answers 403 agent_workspace_unclaimed. A key held to some mailboxes changes the settings only when the campaign has an explicit sender pool inside its grant.

Followed conversations

GET /follow-ups?campaign_id=&thread_id=&status=&limit=&cursor= returns data plus pagination, newest first. status is one or more of watching, drafted, stopped and done, comma-separated. limit is 1 to 100 (default 50). A bad cursor, limit, id or status answers 400. A key held to some mailboxes sees only follow-ups in those mailboxes.

{
  "data": [
    {
      "id": "...",
      "campaign_id": "...",
      "contact_id": "...",
      "thread_id": "...",
      "email_account_id": "...",
      "status": "watching",
      "stop_reason": "",
      "origin": "reply",
      "touches": 2,
      "max_touches": 6,
      "next_action_at": "2026-11-26T10:15:00Z",
      "until_at": "2026-12-15T09:00:00Z",
      "paused_until": null,
      "draft_id": null,
      "last_touch_at": "2026-11-23T14:02:00Z",
      "created_at": "2026-11-12T09:41:00Z",
      "updated_at": "2026-11-23T14:02:00Z"
    }
  ],
  "pagination": { "next_cursor": null, "has_more": false }
}

origin is reply for a follow-up a lead's reply opened and member for one started by hand; a new reply hands it back to reply. watching waits for the next touch to be due, drafted has a draft waiting in the inbox (draft_id), and stopped and done are closed. A closed follow-up names why in stop_reason: declined, unsubscribed, suppressed, bounced, meeting_booked, campaign_ended, campaign_gone, disabled, stopped_by_member, planner_stop, exhausted, unanswered or mailbox_unavailable.

GET /follow-ups/:id returns one follow-up with touch_history:

{
  "touch_history": [
    { "seq": 1, "move": "answer_open_question", "outcome": "sent", "created_at": "...", "resolved_at": "..." },
    { "seq": 2, "move": "specific_proof", "outcome": "pending", "created_at": "...", "resolved_at": null }
  ]
}

move is one of nine: the relationship moves brief_check_in, lower_the_ask, concrete_next_step, check_timing and permission_to_close, and the content moves answer_open_question, specific_proof, use_case_for_them and new_angle. A client should show an unknown move by its name rather than refuse it. outcome is pending (the draft waits), sent, discarded or superseded (the lead wrote again, or a person sent their own message first, so it does not count). Each touch also carries the planner's reason for a caller with manage_campaigns or WRITE_CAMPAIGNS. A follow-up in another workspace, or in a mailbox outside the caller's grant, answers 404 follow_up_not_found.

Start by hand

POST /follow-ups with {"thread_id": "..."} follows a campaign lead's thread that has no open follow-up, such as a lead who was already quiet when the campaign turned follow-ups on. The thread must answer one of the workspace's campaign sends, and the lead must have written in it from the contact's stored address. Drafts go to that stored address, from the mailbox the lead's newest reply arrived in.

It answers 201 with the new follow-up, or 200 with the thread's open follow-up unchanged when one already exists. The new follow-up is watching, has origin: "member" and is due at once. Its first draft skips the usual gap of business days: it is written on the next pass once 24 hours have passed since our newest message in the thread. When the lead's reply is still unanswered, it waits for your answer. Later follow-ups keep the usual timing. The campaign's limits and window still apply, so a lead quiet for longer than window_days ends at once as exhausted. Starting again after a person's Stop (stopped_by_member), a run that ran out (exhausted) or follow-ups turned off (disabled) opens a new follow-up.

CodeStatusWhen
bad_request400thread_id is missing, empty or longer than 998 characters
follow_up_thread_not_found404The thread does not answer a campaign send in this workspace, or it is in a mailbox outside the caller's grant
follow_ups_not_enabled409The thread's campaign does not have follow-ups turned on
follow_up_no_reply409The lead never wrote in this thread, or their newest message was read as automatic, such as an out-of-office
follow_up_contact_closed409The lead unsubscribed or the address is suppressed
follow_up_closed409The lead's newest reply was read as a no, or the thread's follow-ups ended on or after it for a reason a start does not override
agent_workspace_unclaimed403The workspace was opened by an AI agent and nobody has claimed it yet

Send an Idempotency-Key to retry safely; a repeat without one answers 200 with the same follow-up.

Stop

POST /follow-ups/:id/stop takes no body. It ends the follow-up with stop_reason: "stopped_by_member", discards its waiting draft and returns the follow-up. A new reply from the lead or a start by hand follows the thread again. A follow-up already stopped or done answers 409 follow_up_closed, so send an Idempotency-Key to retry safely.

On this page