> ## 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.

# Receive email at an address

> Give an agent, a procedure trigger or an underwriting program an inbound email address, decide who can write to it, and resolve the email it holds back.

Create an inbound address so someone can start an agent conversation, trigger a procedure, or
submit a risk by email. Every address points to one destination.

| Destination | What happens when email arrives |
| - | - |
| Agent | Starts a conversation or continues the email thread. You can start the conversation inside a Project. |
| Procedure | Starts a run of an enabled [procedure](https://docs.canary.effectiveai.app/procedures/reference/triggers.md) trigger that handles `email_received`. |
| Program | Creates or updates an [underwriting submission](https://docs.canary.effectiveai.app/guides/underwriting/submissions.md) for a released guideline program. |

The email address and dedicated inbox APIs are [beta](https://docs.canary.effectiveai.app/getting-started/deprecations.md#stability-levels).

## Before you start

Use a user [API key](https://docs.canary.effectiveai.app/getting-started/authentication.md) with workspace administration to create
an address. Program addresses also require edit access on the program. App credentials and
resource-scoped keys are unsupported.

| Address | Read it | Create, change or delete it | Resolve its held email |
| - | - | - | - |
| Agent | Workspace administration | Workspace administration | Workspace administration |
| Procedure | Workspace administration | Workspace administration | Workspace administration |
| Program | View on the program | Workspace administration and edit on the program | Edit on the program |

An address you can't read is left out of lists and answers `404` when you name it. A program
address also needs underwriting turned on for the workspace, and a program that is a released
guideline on the underwriting desk; otherwise it answers `404` with the check that failed:

| Code | What to fix |
| - | - |
| `underwriting_desk_disabled` | Underwriting is turned off for the workspace. |
| `program_not_released` | The program isn't a guideline program, or has no release yet. |
| `desk_programs_invalid` | The workspace's `underwriting_desk_programs` setting can't be read, so the desk lists no program. |
| `program_not_on_desk` | The workspace's `underwriting_desk_programs` setting doesn't list the program. |

A program you can't read answers `404 not_found`, as if it didn't exist.

## Choose an inbox

Each workspace owns its dedicated inboxes. The workspace spends 4 credits when an inbox
activates and on each monthly anniversary. List or read an inbox's mail, including mail that
reached no workflow, with workspace administration.

Effective provisions an inbox when you create one or turn on email for a workflow. Opening
the settings or reading existing addresses leaves inbox usage and billing unchanged.

Call `POST /api/v2/email/inboxes` with a workspace-unique `name` to provision a dedicated
inbox. Save its `id` for the address request. If the response is lost, repeat the same name
to recover the inbox and its `nextChargeAt`. Closing the inbox stops future renewals.

When creating an address, pass the inbox's `inboxId`, or omit it to provision a dedicated inbox
for the workflow. A retry for the same default returns the existing address without another
inbox charge. An inbox can connect to one workflow. Binding a different workflow to a connected
inbox returns `409`. Effective routes email by the receiving inbox, including when it is Bcc'd.

When a new inbox would exceed capacity, the API returns `409` with **Max limit reached, contact
support**. Use an existing unconnected inbox or contact Effective support for help with capacity.

Use `GET /api/v2/email/inboxes` to list inboxes in your workspace and
`GET /api/v2/email/inboxes/{inboxId}/messages` to see their mail. The address's `inboxId` identifies
the inbox it uses. An inbox without a connected workflow still receives mail for admins to read.
Use the message's attachment ID to download it at
`GET /api/v2/email/inboxes/{inboxId}/messages/{messageId}/attachments/{attachmentId}`.

In the app, use **Admin → Agent Configuration → Email agent** for agent, Project and procedure
addresses. For a released guideline program on your underwriting desk, open **Underwriting →
Submissions → Email intake addresses**, select the program, then turn on intake.

## Create an address

Call `POST /api/v2/email/addresses` with the destination. The following example creates an
address for the `harbor-excess` program. Substitute your own program ID.

```bash theme={"languages":{"custom":["languages/rsl.tmLanguage.json"]}}
curl --request POST \
  --url "https://api.canary.effectiveai.app/api/v2/email/addresses" \
  --header "Authorization: Bearer $EFFECTIVE_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{ "destination": { "kind": "program", "programId": "harbor-excess" } }'
```

The examples use sample IDs and addresses. Use the values from your own responses in subsequent calls.

```json theme={"languages":{"custom":["languages/rsl.tmLanguage.json"]}}
{
  "id": "3f6c2a9e-51b7-4d08-9a3e-7c1d2b4e5f60",
  "inboxId": "66a0d139-2982-42a7-8c7a-ac4ec6a5f6cc",
  "address": "quiet-heron-6d2ba718fd05@intake.effectiveai.app",
  "config": { "allowExternalSenders": true },
  "name": null,
  "destination": { "kind": "program", "programId": "harbor-excess" },
  "createdBy": "1042",
  "createdAt": "2026-11-26T15:04:11.208Z",
  "rotatedAt": null
}
```

Share `address` with the people who should send mail. Use `id` to manage the workflow binding
and check delivery. Use `inboxId` to read the inbox and manage its billing. Mail is processed
asynchronously.

Creation returns `201 Created`. Repeat a request for the same inbox and workflow to recover a
lost response. A matching binding returns `200 OK`. To change its sender settings, use `PATCH`.

A program has one address. A repeat request returns `200 OK` with the existing address
and sets its `createdBy` to the caller. Automated extraction uses that person's access to
read the program. If the person leaves the workspace, an authorized administrator can
call create again to take over.

For an agent, provide its exact registered name in `agentName`. Omit it to use `general-agent`.
To start in a Project, set `projectId` to the Project's UUID. The API's Projects operations don't
return it, so to pick a Project for an address, a workspace administrator can create the address
in the Effective app instead, under **Admin**, **Agent Configuration**, **Email agent**.

```json theme={"languages":{"custom":["languages/rsl.tmLanguage.json"]}}
{ "destination": { "kind": "agent", "agentName": "general-agent" } }
```

For a procedure, provide the enabled trigger's ID.

```json theme={"languages":{"custom":["languages/rsl.tmLanguage.json"]}}
{
  "destination": {
    "kind": "procedure",
    "procedureTriggerId": "8b1e0c47-2d9a-4f63-b5e8-0a7c3d9f1e24"
  }
}
```

### Set up a procedure trigger

Publish a procedure with an input for the email event. If you already have an enabled
`email_received` trigger, reuse it. Otherwise create one, replacing `email-intake` in
`procedureId` with your published procedure ID and the example sender with an address you want
to admit:

```bash theme={"languages":{"custom":["languages/rsl.tmLanguage.json"]}}
curl --request POST \
  --url "https://api.canary.effectiveai.app/api/v2/procedures/triggers" \
  --header "Authorization: Bearer $EFFECTIVE_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{
    "name": "email-intake",
    "procedureId": "email-intake",
    "event": {
      "type": "email_received",
      "match": { "senderEmails": ["submissions@example.com"] },
      "input": "email"
    },
    "enabled": true,
    "runAs": "self"
  }'
```

`"enabled": true` with `"runAs": "self"` creates the trigger enabled, with its runs acting as you.
Use an API key that acts as you in full: resource-scoped API keys and app credentials are refused
with `403`. If the request is refused with a `4xx`, nothing is created. After a `5xx` or a lost
response, the trigger may exist and be enabled: get it by name, and if it exists,
[enable it](https://docs.canary.effectiveai.app/procedures/reference/triggers.md#enable-a-disabled-trigger) again rather than creating it
again.

Use the trigger's `id` from the response as `procedureTriggerId` when creating the address. Use
its `runTriggerId` to [find the runs](https://docs.canary.effectiveai.app/procedures/reference/triggers.md#find-a-triggers-runs) that
the trigger started. The [procedure trigger API](https://docs.canary.effectiveai.app/procedures/reference/triggers.md) is alpha.

## Who can send to an address

Agent, Project and procedure addresses accept authenticated workspace members by default.
Program addresses accept external senders by default. Set `config.allowExternalSenders` when you
create an address, or update an existing address:

```bash theme={"languages":{"custom":["languages/rsl.tmLanguage.json"]}}
curl --request PATCH \
  --url "https://api.canary.effectiveai.app/api/v2/email/addresses/3f6c2a9e-51b7-4d08-9a3e-7c1d2b4e5f60" \
  --header "Authorization: Bearer $EFFECTIVE_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{ "config": { "allowExternalSenders": false } }'
```

The response includes the updated `config`. Addresses with `config: null` have fixed sender
settings. The setting controls who can start work. Each destination determines whose access
that work uses.

* **Agent or Project:** a workspace member's conversation uses their own access. An authenticated
  external sender's conversation uses the address creator's access. Only the creator can enable
  this access or change the destination while it is enabled. While external sending is enabled,
  the sender can continue their original thread even after joining the workspace. That thread
  uses the creator's access while the creator is a member and their authorization remains valid.
  New threads from the member use their own access.
* **Procedure:** the procedure runs as the trigger's authorized user. When the trigger specifies
  `event.match.senderEmails`, the sender must be on that list as well.
* **Program:** the first email makes a submission. Only an authenticated reply from the same
  sender joins it.

Every address holds back mail that the provider marks as spam, blocked or unauthenticated.
Authentication requires DMARC to pass for the From domain or, where the domain publishes no
DMARC policy, SPF or DKIM to pass for that domain. An open program address can accept a thread's
first email from a sender whose domain does not authenticate it. [Review held mail](#resolve-held-email).

## What to put in the email

For an agent or Project, put the request and desired result in the body and attach any files the
agent should read. For a procedure, use the input format the procedure author provides. An
`email_received` trigger can bind the event to an `email` input. Its `payload` includes the
sender, subject, plain-text body, and references to attachments. The procedure can parse and
validate structured values in the body, such as a JSON block. Values shared by every run can
go in the trigger's configured inputs.

## List and read addresses

```bash theme={"languages":{"custom":["languages/rsl.tmLanguage.json"]}}
curl --request GET \
  --url "https://api.canary.effectiveai.app/api/v2/email/addresses?kind=program&limit=50" \
  --header "Authorization: Bearer $EFFECTIVE_API_KEY"
```

```json theme={"languages":{"custom":["languages/rsl.tmLanguage.json"]}}
{
  "addresses": [
    {
      "id": "3f6c2a9e-51b7-4d08-9a3e-7c1d2b4e5f60",
      "inboxId": "66a0d139-2982-42a7-8c7a-ac4ec6a5f6cc",
      "address": "quiet-heron-6d2ba718fd05@intake.effectiveai.app",
      "config": { "allowExternalSenders": true },
      "destination": { "kind": "program", "programId": "harbor-excess" }
    }
  ],
  "nextCursor": null
}
```

Addresses come oldest first. Filter by `kind` (`agent`, `procedure` or `program`) or by
`programId`. While `nextCursor` isn't null, send it as `cursor` with the same filters; see
[Pagination](https://docs.canary.effectiveai.app/getting-started/pagination.md). Read one address with
`GET /email/addresses/{addressId}`.

## See what an address received

List every email an address received, newest first, with what became of it. Program addresses
also say which submission each email made or joined, and whether its files started an extraction.

```bash theme={"languages":{"custom":["languages/rsl.tmLanguage.json"]}}
curl --request GET \
  --url "https://api.canary.effectiveai.app/api/v2/email/addresses/3f6c2a9e-51b7-4d08-9a3e-7c1d2b4e5f60/emails?limit=25" \
  --header "Authorization: Bearer $EFFECTIVE_API_KEY"
```

```json theme={"languages":{"custom":["languages/rsl.tmLanguage.json"]}}
{
  "emails": [
    {
      "id": "8b1e2c3d-4f5a-4b6c-9d7e-0a1b2c3d4e5f",
      "addressId": "3f6c2a9e-51b7-4d08-9a3e-7c1d2b4e5f60",
      "sender": "broker@harborpoint.example",
      "subject": "North Harbor Marine: excess quote",
      "receivedAt": "2026-11-26T01:02:00.000Z",
      "status": "delivered",
      "completedAt": "2026-11-26T01:02:04.000Z",
      "delivery": {
        "submissionId": "0d9c8b7a-6f5e-4d3c-9b2a-1f0e9d8c7b6a",
        "extraction": {
          "status": "failed",
          "extractionId": null,
          "reason": "forbidden",
          "message": "The program’s creator cannot run the extraction procedure."
        }
      },
      "held": null
    }
  ],
  "nextCursor": null
}
```

`status` is `pending` while the email is queued or retried, `delivered` once its destination took
it, or `held`, with `held` giving the reason and what was done with it; read or
[resolve](#resolve-held-email) it by its `id`. `delivery.extraction.status` is `started` (with `extractionId`), `skipped` with `reason` saying why none started (`no_documents`, `auto_off`, `extraction_not_configured`, or `extraction_in_progress` when it joined the one already waiting), or `failed` with the failure's code as `reason` and its `message`. Filter with `status`, and page with `nextCursor` as above. Who may list an address's email
is who may resolve its held email.

### Verify delivery

Send a synthetic email with a unique subject from an admitted sender. Check the address's email
history, then open the resulting conversation, check that it appears in the intended Project, or
inspect the procedure run and its result. For a program, read the submission using
`delivery.submissionId`. For a legacy named address, check the conversation directly if the
address's email history is empty.

## Point an address somewhere else

Send the new destination. The address itself doesn't change, and conversations it already started
keep going where they are.

```bash theme={"languages":{"custom":["languages/rsl.tmLanguage.json"]}}
curl --request PATCH \
  --url "https://api.canary.effectiveai.app/api/v2/email/addresses/3f6c2a9e-51b7-4d08-9a3e-7c1d2b4e5f60" \
  --header "Authorization: Bearer $EFFECTIVE_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{ "destination": { "kind": "program", "programId": "harbor-excess-2027" } }'
```

Keep the same destination kind. For a configurable address, also keep the distinction between
a Project-only address and an agent address. For example, you can move a Project-only address
to another Project, but adding `agentName` requires creating a new address. An unsupported
change returns `400 invalid_request`.

## Change the email address

An inbox keeps the same email address for its lifetime. To give a workflow a new address,
provision a new inbox with `POST /api/v2/email/inboxes`, delete the old address binding,
and create an address with the new `inboxId`. Share the returned address with your senders.
Close the old inbox with `DELETE /api/v2/email/inboxes/{inboxId}` to stop delivery and future
inbox charges.

## Delete an address

```bash theme={"languages":{"custom":["languages/rsl.tmLanguage.json"]}}
curl --request DELETE \
  --url "https://api.canary.effectiveai.app/api/v2/email/addresses/3f6c2a9e-51b7-4d08-9a3e-7c1d2b4e5f60" \
  --header "Authorization: Bearer $EFFECTIVE_API_KEY"
```

The answer is `204`. New mail stops reaching the workflow. Admins can still read mail from
its inbox, and the inbox renews until closed. Conversations, runs and submissions keep their
history.

## Resolve held email

Email that arrived at an address and reached no destination is held for a person to decide on.
List what is waiting:

```bash theme={"languages":{"custom":["languages/rsl.tmLanguage.json"]}}
curl --request GET \
  --url "https://api.canary.effectiveai.app/api/v2/email/addresses/3f6c2a9e-51b7-4d08-9a3e-7c1d2b4e5f60/held-emails?status=open" \
  --header "Authorization: Bearer $EFFECTIVE_API_KEY"
```

```json theme={"languages":{"custom":["languages/rsl.tmLanguage.json"]}}
{
  "heldEmails": [
    {
      "id": "c2d8e4f1-7a3b-4c95-8e06-1f2a3b4c5d6e",
      "addressId": "3f6c2a9e-51b7-4d08-9a3e-7c1d2b4e5f60",
      "sender": "assistant@broker.example",
      "subject": "RE: Harbor Point excess renewal",
      "reason": "different_sender",
      "receivedAt": "2026-11-26T16:20:03.000Z",
      "heldAt": "2026-11-26T16:20:09.511Z",
      "resolution": null
    }
  ],
  "nextCursor": null
}
```

Held email comes newest first. `status=open`, the default, lists what is waiting;
`status=resolved` lists what was decided, each with its `resolution`. Read one with
`GET /email/addresses/{addressId}/held-emails/{heldEmailId}`. `reason` says why it was held:

| `reason` | Why |
| - | - |
| `different_sender` | A reply on a submission's thread came from someone other than who started it. |
| `spam` | The mail provider judged it spam. |
| `unauthenticated` | The sender wasn't authenticated, by the provider's judgment or the sender's domain. |
| `blocked` | The mail provider blocked the sender. |
| `desk_disabled` | It reached a program address while underwriting was turned off for the workspace. |
| `sender_not_admitted` | The sender may not use the destination: not a workspace member, or not on the trigger's list. |
| `destination_unavailable` | The destination is gone, or can't take email now. |
| `delivery_failed` | It could not be delivered after repeated tries. |

Decide with `action`:

* `discard` keeps it out, for any address.
* `attach`, for a program address, adds the email, with its attachments and the `.eml`, to a
  submission you may edit. Send its `submissionId`.
* `create`, for a program address, makes a new submission of it, as if it had been the first
  email of a thread. If its thread has no submission yet, the sender's later replies join the new
  one.

This attaches the reply above to the submission its thread already has:

```bash theme={"languages":{"custom":["languages/rsl.tmLanguage.json"]}}
curl --request POST \
  --url "https://api.canary.effectiveai.app/api/v2/email/addresses/3f6c2a9e-51b7-4d08-9a3e-7c1d2b4e5f60/held-emails/c2d8e4f1-7a3b-4c95-8e06-1f2a3b4c5d6e/resolve" \
  --header "Authorization: Bearer $EFFECTIVE_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{ "action": "attach", "submissionId": "6a0f3c1e-9b2d-4e7a-8c5f-2d1e0b9a8c7d" }'
```

```json theme={"languages":{"custom":["languages/rsl.tmLanguage.json"]}}
{
  "id": "c2d8e4f1-7a3b-4c95-8e06-1f2a3b4c5d6e",
  "reason": "different_sender",
  "resolution": {
    "action": "attached",
    "submissionId": "6a0f3c1e-9b2d-4e7a-8c5f-2d1e0b9a8c7d",
    "resolvedBy": "1042",
    "resolvedAt": "2026-11-26T16:31:47.102Z"
  }
}
```

`resolution.submissionId` names the submission the email went to, for `attached` and `created`.
Resolving is safe to repeat: sending the same resolution again answers the held email as it was
resolved. A different resolution of an email already resolved answers `409 held_email_resolved`;
list resolved email to see what was done. `attach` or `create` on an agent or procedure address
answers `409 held_email_action_unavailable`. A submission that can't take the email answers `422`
with the reason.


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