---
title: "POST /v1/reply_to_thread"
method: POST
path: "/v1/reply_to_thread"
tags: ["GTM verbs"]
---

# POST /v1/reply_to_thread

`POST /v1/reply_to_thread`

## Request

- Base URL: `https://api.layrcake.dev`
- URL: `https://api.layrcake.dev/v1/reply_to_thread`
- Auth: HTTP bearer

## Headers

- `Idempotency-Key` string

## Request body

- object
  - `reply_id` string, uuid, required
  - `body_text` string, required
  - `confirmation_token` string
  - `dry_run` boolean
  - `supersedes` string, uuid: The confirmation_token of the approval this request replaces. Needed only when that approval was already approved and hasn't started yet; one still waiting for a decision is replaced automatically. Only where Layrcake runs approved actions itself (the result's approval block says execution: server); anywhere else it is refused. A dry run doesn't check it, so it refuses it: send it on the call itself.

## Response `200`

Successful outcome

- union
  - object
    - `result` union, required
      - union
        - object
          - `status` 'needs_confirmation', required
          - `confirmation_token` string, required
          - `approval_url` string, required
          - `approval_email` 'queued' | 'reused' | 'suppressed_rate_limit' | 'no_approver'
          - `preview` object, required
            - `reply_id` string, required
            - `to_email` string, required
            - `from_email` string, required
            - `subject` string, required
            - `body_text` string, required
          - `approval` object
            - `id` string, uuid, required
            - `state` 'draft' | 'pending_approval' | 'held' | 'approved' | 'queued' | 'executing' | 'declined' | 'expired' | 'superseded' | 'cancelled' | 'failed' | 'completed' | 'execution_failed', required
            - `execution` 'server' | 'agent_retry', required
            - `campaign` object
              - …
            - `state_reason` 'waiting_for_capacity' | 'waiting_for_history', nullable
            - `audience_names` string[], required
            - `expires_at` string, required
            - `first_send_at` string, nullable, required
            - `note` string, nullable, required
            - `operation_id` string, uuid, nullable, required
            - `superseded_by` string, uuid, nullable, required
            - `instance` integer, required
            - `asked_again_after` object, nullable, required
              - …
            - `reused` boolean, required
        - object
          - `status` 'sent', required
          - `sent_reply_id` string, required
          - `thread_id` string, nullable, required
          - `from_email` string, required
          - `to_email` string, required
          - `sent_at` string, required
      - object
        - `dry_run` true, required
        - `advisory` true, required
        - `evaluated_at` string, required
        - `plan` object, required
          - `verb` 'reply_to_thread', required
          - `plan_version` 3, required
          - `input_version` string, required
          - `credits_estimate` string, required
          - `would_exceed` string[], required
          - `warnings` string[], required
          - `would` object, required
            - `sends` boolean, required
            - `needs_confirmation` true, required
  - object
    - `result` union, required
      - union
        - object
          - `status` 'needs_confirmation', required
          - `confirmation_token` string, required
          - `approval_url` string, required
          - `approval_email` 'queued' | 'reused' | 'suppressed_rate_limit' | 'no_approver'
          - `preview` object, required
            - `reply_id` string, required
            - `to_email` string, required
            - `from_email` string, required
            - `subject` string, required
            - `body_text` string, required
          - `approval` object
            - `id` string, uuid, required
            - `state` 'draft' | 'pending_approval' | 'held' | 'approved' | 'queued' | 'executing' | 'declined' | 'expired' | 'superseded' | 'cancelled' | 'failed' | 'completed' | 'execution_failed', required
            - `execution` 'server' | 'agent_retry', required
            - `campaign` object
              - …
            - `state_reason` 'waiting_for_capacity' | 'waiting_for_history', nullable
            - `audience_names` string[], required
            - `expires_at` string, required
            - `first_send_at` string, nullable, required
            - `note` string, nullable, required
            - `operation_id` string, uuid, nullable, required
            - `superseded_by` string, uuid, nullable, required
            - `instance` integer, required
            - `asked_again_after` object, nullable, required
              - …
            - `reused` boolean, required
        - object
          - `status` 'sent', required
          - `sent_reply_id` string, required
          - `thread_id` string, nullable, required
          - `from_email` string, required
          - `to_email` string, required
          - `sent_at` string, required
      - object
        - `dry_run` true, required
        - `advisory` true, required
        - `evaluated_at` string, required
        - `plan` object, required
          - `verb` 'reply_to_thread', required
          - `plan_version` 3, required
          - `input_version` string, required
          - `credits_estimate` string, required
          - `would_exceed` string[], required
          - `warnings` string[], required
          - `would` object, required
            - `sends` boolean, required
            - `needs_confirmation` true, required
    - `layrcake` object, required
      - `request_id` string, uuid, required
      - `credits_charged` string, required
      - `credits_available` string, required
      - `replayed` boolean
      - `route` object
        - `used` 'balanced' | 'cheapest' | 'broadest' | 'fastest', required
        - `source` 'request' | 'key' | 'guess' | 'default', required

## Other responses

- `202`: Accepted, in one of two shapes. With `approval`: a person approved it, and Layrcake runs it itself (`approved` until its start, then `in_progress`); calling again with the token only reads this status. With `request_id`: the first call with this Idempotency-Key is still running; read it with get_request.
- `4XX`: Caller, scope, confirmation, or credit error
- `5XX`: Provider or service error

---

[API](https://skmtc.dev/layrcake/apis/layrcake-api.md) · [All operations](https://skmtc.dev/layrcake/apis/layrcake-api/llms.txt) · [OpenAPI document](https://skmtc.dev/layrcake/apis/layrcake-api/revisions/24c80e33c274?raw)
