> ## Documentation Index
> Fetch the complete documentation index at: https://docs.canary.effectiveai.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Reply to brokers by email

> Read the email thread on an underwriting submission, draft a reply for an underwriter to review, and know who may send it.

A submission that came in by email, through a program's
[email address](https://docs.canary.effectiveai.app/guides/email-addresses.md), keeps its thread with the broker: the emails received
and the replies sent. Your system or agent can read the thread and draft replies. A person signed
in to Effective reviews a draft and sends it, so nothing reaches the broker without them.

The correspondence API is [beta](https://docs.canary.effectiveai.app/getting-started/deprecations.md#stability-levels).

You need an [API key](https://docs.canary.effectiveai.app/getting-started/authentication.md). Reading the thread needs read access to
the submission; drafting needs edit access. A submission you can't read answers `404`.

## Read the thread

```bash theme={"languages":{"custom":["languages/rsl.tmLanguage.json"]}}
curl --request GET \
  --url "https://api.canary.effectiveai.app/api/v2/insurance/underwriting/submissions/6a0f3c1e-9b2d-4e7a-8c5f-2d1e0b9a8c7d/correspondence?limit=25" \
  --header "Authorization: Bearer $EFFECTIVE_API_KEY"
```

The responses on this page are illustrative; your ids and times differ.

```json theme={"languages":{"custom":["languages/rsl.tmLanguage.json"]}}
{
  "messages": [
    {
      "id": "51e3a7c9-2b4d-4f86-9a0e-3c5d7b9f1a2e",
      "direction": "inbound",
      "state": "sent",
      "sender": "dana@broker.example",
      "subject": "Harbor Point excess renewal",
      "sentAt": "2026-11-26T15:12:40.000Z"
    }
  ],
  "next": null
}
```

Emails come newest first. `direction` is `inbound` for an email received and `outbound` for a
reply; a reply's `state` is `draft`, `sending` or `sent`, and a received email is always `sent`.
While `next` isn't null, send it as `before` to read older emails.

Read one email's plain-text body with
`GET /insurance/underwriting/submissions/{submissionId}/correspondence/{emailId}`. The response is
the summary above with `text` added.

## Draft a reply

Pick the received email to answer, by its `id`, and send it as `replyTo`. Choose a new UUID for
the reply as `id`; it names the draft from then on.

```bash theme={"languages":{"custom":["languages/rsl.tmLanguage.json"]}}
curl --request POST \
  --url "https://api.canary.effectiveai.app/api/v2/insurance/underwriting/submissions/6a0f3c1e-9b2d-4e7a-8c5f-2d1e0b9a8c7d/correspondence/drafts" \
  --header "Authorization: Bearer $EFFECTIVE_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{
    "id": "e7b2c4d6-8f1a-4c3e-b5d7-9a0b1c2d3e4f",
    "replyTo": "51e3a7c9-2b4d-4f86-9a0e-3c5d7b9f1a2e",
    "text": "Thanks, Dana. Could you send the 2026 loss runs for all locations?"
  }'
```

```json theme={"languages":{"custom":["languages/rsl.tmLanguage.json"]}}
{
  "id": "e7b2c4d6-8f1a-4c3e-b5d7-9a0b1c2d3e4f",
  "direction": "outbound",
  "state": "draft",
  "sender": "program+k7q2vbn4…@intake.effectiveai.app",
  "subject": "Re: Harbor Point excess renewal",
  "sentAt": "2026-11-26T16:02:18.774Z",
  "text": "Thanks, Dana. Could you send the 2026 loss runs for all locations?"
}
```

Nothing is sent. The draft waits on the thread for a person to review and send. Any caller with edit access may draft, including an agent or an API key.

If the request times out, send it again with the same `id`, `replyTo` and `text`: it answers the
same draft. The same `id` with another `replyTo` or `text` is `409 conflict`, as is a `replyTo`
that isn't a received email, or an `id` equal to `replyTo`. A submission whose email came on a
thread another submission has answers `404`: it has no thread of its own to reply on.

To change a draft's text, send the new `text`:

```bash theme={"languages":{"custom":["languages/rsl.tmLanguage.json"]}}
curl --request PATCH \
  --url "https://api.canary.effectiveai.app/api/v2/insurance/underwriting/submissions/6a0f3c1e-9b2d-4e7a-8c5f-2d1e0b9a8c7d/correspondence/drafts/e7b2c4d6-8f1a-4c3e-b5d7-9a0b1c2d3e4f" \
  --header "Authorization: Bearer $EFFECTIVE_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{ "text": "Thanks, Dana. Could you send five years of loss runs for all locations?" }'
```

Once a reply is being sent or was sent, its text no longer changes: a new text answers
`409 draft_not_editable`. Draft a new reply instead.

## Send a reply

Sending reaches the broker, so only a person signed in to the Effective web app may send, with
edit access to the submission. An API key, an agent or any other client gets
`403 send_not_allowed` from both ways to send:

* [Send a reply draft](https://docs.canary.effectiveai.app/api-reference/underwriting-submissions/send-a-reply-draft.md) sends a draft.
  It is safe to repeat: a retry answers the reply as sent and sends nothing more.
* [Send a reply on a submission's thread](https://docs.canary.effectiveai.app/api-reference/underwriting-submissions/send-a-reply-on-a-submission’s-email-thread.md)
  drafts and sends in one call, with the same `id`, `replyTo` and `text` as a draft. Reuse the
  `id` with the same body after a timeout; the reply is sent once.

The reply goes from the program's address, so the broker's answer comes back to the same
submission. Read the thread to see a sent reply's `state` change to `sent`.

If a send isn't confirmed within a day, the reply goes back to being a draft and the request
answers `409 conflict`. It may have reached the broker, so check the thread before sending it
again.

## Errors

| Status | Code | Meaning |
| - | - | - |
| 403 | `send_not_allowed` | Only a person signed in to the Effective web app sends. Save a draft instead. |
| 403 | `forbidden` | You can read the submission but not edit it. |
| 404 | `not_found` | No such submission or email, you can't read it, or it has no email thread. |
| 409 | `draft_not_editable` | The reply is being sent or was sent. |
| 409 | `conflict` | The reply `id` is in use with other content, or `replyTo` isn't a received email. |
| 503 | `temporarily_unavailable` | Email is unavailable right now. Retry after `Retry-After` seconds. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.