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

# Take in underwriting submissions

> Create an underwriting submission, add the broker's files and messages, extract proposed rater inputs from them, and see what the submission still waits on.

An underwriting submission is one broker request to quote, as your underwriting desk works it.
Your intake system or agent can create submissions, add the files and messages that come with
them, and start an **extraction**: a run that reads the documents and proposes values for the
inputs of the submission's program, each with the place it read them. An underwriter then rules on
the proposals, in Effective or through your system. To see how those answers become a premium, follow
[Rate a submission from broker documents](https://docs.canary.effectiveai.app/guides/underwriting/rate-a-submission.md).

Every operation on this page is alpha: it can change without the usual deprecation notice. See
[Stability levels](https://docs.canary.effectiveai.app/getting-started/deprecations.md#stability-levels).

## Before you start

You need an [API key](https://docs.canary.effectiveai.app/getting-started/authentication.md) for a member with access to underwriting
submissions, in a workspace that has underwriting turned on. Elsewhere every operation answers
`403 feature_not_enabled`.

* Creating a submission needs create access to underwriting submissions (a workspace
  administrator, or a member with edit sharing on them), or edit access to the agency account it
  names.
* Adding files and messages and starting extractions needs edit access to the submission. One you
  can read but not edit answers `403 forbidden`; one you can't read answers `404`, as a missing one
  does.
* Ruling on proposals and setting values needs edit access to the submission and a role of its
  program. A workspace can keep them to a person signed in to Effective. See
  [Rule on the proposals](#rule-on-the-proposals).

## Create a submission

No field is required; send what the broker told you. Every create needs an `Idempotency-Key`.
Use a new random UUID for each submission: it becomes the submission's `id`, and a retry with the
same key and body within 24 hours answers `200` with the same submission instead of making a
second one.

```bash theme={"languages":{"custom":["languages/rsl.tmLanguage.json"]}}
curl --request POST \
  --url "https://api.canary.effectiveai.app/api/v2/insurance/underwriting/submissions" \
  --header "Authorization: Bearer $EFFECTIVE_API_KEY" \
  --header "Content-Type: application/json" \
  --header "Idempotency-Key: 6a0f3c1e-9b2d-4e7a-8c5f-2d1e0b9a8c7d" \
  --data '{
    "controlNumber": "HP-2027-0142",
    "programId": "harbor-excess",
    "insuredName": "Harbor Point Marine",
    "sender": { "name": "Dana Ruiz", "email": "dana@broker.example" },
    "businessType": "renewal",
    "requestedEffectiveDate": "2027-01-01",
    "coverageAsked": "Excess $5M xs $10M"
  }'
```

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

```json theme={"languages":{"custom":["languages/rsl.tmLanguage.json"]}}
{
  "id": "6a0f3c1e-9b2d-4e7a-8c5f-2d1e0b9a8c7d",
  "controlNumber": "HP-2027-0142",
  "title": "Harbor Point Marine",
  "status": "received",
  "programId": "harbor-excess",
  "releaseVersion": 4,
  "source": "api",
  "latestExtraction": null,
  "outstanding": [],
  "next": null,
  "webUrl": "…"
}
```

Keep `id` for every later call. The submission stays on the release of its program it was made
on, `releaseVersion`: its extraction, facts and pricing all use that release, even after the
program releases a newer one. Name a ready release in `releaseVersion` to make it on that one;
leave it out for the program's latest.

A create can be refused:

* `409 control_number_taken`: another submission has this `controlNumber`. The error names it in
  `submissionId` when you can read it; add to that one instead.
* `422 unknown_program`, `unknown_agency_account` or `unknown_underwriter`: a `programId`,
  `agencyAccountId` or one of `underwriterIds` that the workspace doesn't have, or you can't read.
* `422 unknown_release`: a `releaseVersion` that is not a ready release of the program.
* `409 idempotency_conflict`: the key was used with a different body. A refused request binds
  nothing, so you can retry its key with a corrected body.

## Add the broker's files

Send up to 20 files, 25 MiB in all, in one multipart request, each as a `file` part. It needs an
`Idempotency-Key`: a retry with the same key and files adds nothing more.

```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/documents" \
  --header "Authorization: Bearer $EFFECTIVE_API_KEY" \
  --header "Idempotency-Key: 7b3e1d9a-2c4f-4a8e-9b6d-0f1e2a3c4d5e" \
  --form "file=@acord-125.pdf;type=application/pdf" \
  --form "file=@loss-runs.pdf;type=application/pdf"
```

The response lists the new `documents`, the files the store `rejected` with why, and
`extraction`: `started` with its `extractionId` where the workspace starts an extraction when
documents arrive, or `skipped` with a `reason`.

### Upload a large file

A file over 25 MiB is two calls and an upload. Ask for an upload URL with the file's name and
exact size:

```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/uploads" \
  --header "Authorization: Bearer $EFFECTIVE_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{ "fileName": "acord-125.pdf", "sizeBytes": 482113, "mimeType": "application/pdf" }'
```

```json theme={"languages":{"custom":["languages/rsl.tmLanguage.json"]}}
{
  "uploadToken": "<opaque completion token>",
  "fileName": "acord-125.pdf",
  "uploadUrl": "https://storage.googleapis.com/example/acord-125.pdf?<signed parameters>",
  "method": "PUT",
  "headers": { "Content-Type": "application/pdf" },
  "expiresAt": "2026-11-26T17:10:00.000Z"
}
```

PUT the bytes to `uploadUrl` with every header in `headers`. Don't send your API key there.

```bash theme={"languages":{"custom":["languages/rsl.tmLanguage.json"]}}
curl --request PUT \
  --url "$UPLOAD_URL" \
  --header "Content-Type: application/pdf" \
  --data-binary @acord-125.pdf
```

Then, within the hour, confirm it with `uploadToken`:

```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/uploads/complete" \
  --header "Authorization: Bearer $EFFECTIVE_API_KEY" \
  --header "Content-Type: application/json" \
  --data "{\"uploadToken\":\"$UPLOAD_TOKEN\"}"
```

The response is the new document: its artifact `id`, `name`, `folder` (the submission's Broker
submission folder) and `source`. Confirming the same token again answers the same document.
`409 upload_incomplete` means the bytes never arrived: PUT them and confirm again.
`400 invalid_upload_content` means they don't match `sizeBytes` or the file's type: start a new
upload.

## Add the broker's message

Add the broker's email, or an SMS or chat message, with
[Add a message to an underwriting submission](https://docs.canary.effectiveai.app/api-reference/underwriting-submissions/add-a-message-to-an-underwriting-submission.md).
For an email, upload its `.eml` as above, then name the document in `raw`. Its body becomes an
`Email.txt` document and each attachment a document of its own:

```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/messages" \
  --header "Authorization: Bearer $EFFECTIVE_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{
    "channel": "email",
    "externalId": "<CAF3x9q@mail.broker.example>",
    "raw": { "artifactId": "0d4b7e2a-6c1f-4a89-b3d5-9e8f7a6b5c4d" }
  }'
```

```json theme={"languages":{"custom":["languages/rsl.tmLanguage.json"]}}
{
  "id": "…",
  "channel": "email",
  "externalId": "<CAF3x9q@mail.broker.example>",
  "from": "dana@broker.example",
  "documents": [
    {
      "id": "0d4b7e2a-6c1f-4a89-b3d5-9e8f7a6b5c4d",
      "name": "renewal.eml",
      "part": "raw"
    },
    { "id": "…", "name": "Email.txt", "part": "message" },
    { "id": "…", "name": "SOV 2027.xlsx", "part": "attachment:1" }
  ],
  "rejected": []
}
```

Without `raw`, send the message as `text`, and its files in `documents`: files already uploaded to
the submission by `artifactId`, or short notes inline as `{ "name": "call-notes.txt", "text": "…" }`.

`externalId` is the channel's own id, such as the email's Message-ID, and makes the request safe to
retry: the same `externalId` and body answer `200` with the message as first added. A different
body under the same `externalId` is `409 idempotency_conflict`. A `raw` file that doesn't parse, or
disagrees with `from`, `receivedAt` or `text`, is `422 invalid_message`. An attachment the file
store refuses is listed in `rejected`; the rest are kept.

To see everything the submission holds, list its documents with
`GET /insurance/underwriting/submissions/{submissionId}/documents`. Each document's `id` is an
artifact: read its text with [Read a bounded chunk of extracted artifact text](https://docs.canary.effectiveai.app/api-reference/artifacts/read-a-bounded-chunk-of-extracted-artifact-text.md).

## Start an extraction

Where the workspace starts an extraction when documents arrive, adding files or a message starts
one, which reads every document. Start one yourself when it didn't, or to read the files again. Send `{}` to read every document, or name some in
`documentIds`. It needs an `Idempotency-Key`; use a new one for each start.

```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/extractions" \
  --header "Authorization: Bearer $EFFECTIVE_API_KEY" \
  --header "Content-Type: application/json" \
  --header "Idempotency-Key: 2e9c4a7b-1f3d-4b60-a8e5-7c0d9b1a2f3e" \
  --data '{}'
```

The answer is `202` with the extraction, `queued` or `running`:

```json theme={"languages":{"custom":["languages/rsl.tmLanguage.json"]}}
{
  "id": "9d1c7b3a-4e2f-4a68-b0c9-5f8e7d6c4b3a",
  "submissionId": "6a0f3c1e-9b2d-4e7a-8c5f-2d1e0b9a8c7d",
  "status": "queued",
  "documents": [],
  "result": null,
  "failure": null,
  "idempotencyExpiresAt": "2026-11-27T16:40:00.000Z"
}
```

One extraction runs at a time per submission, and at most one waits behind it. A start that reads
every document while one runs is queued, and reads the documents as they are when it starts; a
start while one is already queued joins it. So you can start after every file you add: you get at
most two runs, and the last has read every file. Naming `documentIds` while another is running or
queued is `409 extraction_in_progress`, with that one's `extractionId`.

The run acts as the extraction's own service identity, whoever starts it: it reads that
submission's documents and nothing else, and anyone who can read the submission can open the run.
`422 extraction_not_configured` means your workspace turned extraction off for the program, or
the program's creator isn't known or has left the workspace; `422 no_documents` means there is
nothing to read, and `too_many_documents` more than 100.

### What the extraction looks for

The submission's program says what the extraction looks for, in its RSL source: the documents a
submission should hold and the role the extraction answers as (a `Documents` section), how to
find a value (`hint:`) and the documents that usually state it (`found_on:`), what the desk needs
though nothing requires it (`needed_for:`), how to tell two rows of a list apart (`matched_by:`),
and what the extraction never answers (`derived:`, `not_written:`, or a role above the
extraction's). rslc checks each one against the program and
writes it into the release's contract. A release built before programs said this is read for what
its contract asks, with nothing more expected.

What the extraction looks for changes with a new release of the program, never with a setting. The
workspace's `underwriting_extraction` setting holds only the switches, per program:
`extractOnArrival` (start when documents arrive) and the procedure to run (`procedureId`,
`procedureVersion`). Saving a setting with a part that isn't valid is refused,
naming each problem. An extraction keeps what it read with, so a later release leaves it as it
was.

## Read the result

Read the extraction until its `status` is `completed`, `failed` or `cancelled`. While it isn't
final, the response carries `Retry-After`; wait that many seconds between reads. To be told
instead, subscribe a [webhook endpoint](https://docs.canary.effectiveai.app/guides/webhooks.md) to
`underwriting_submission.extraction.completed` and `underwriting_submission.extraction.failed`,
and read the extraction when one arrives.

```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/extractions/9d1c7b3a-4e2f-4a68-b0c9-5f8e7d6c4b3a" \
  --header "Authorization: Bearer $EFFECTIVE_API_KEY"
```

```json theme={"languages":{"custom":["languages/rsl.tmLanguage.json"]}}
{
  "id": "9d1c7b3a-4e2f-4a68-b0c9-5f8e7d6c4b3a",
  "status": "completed",
  "result": {
    "proposals": [
      {
        "path": "locations[id=\"location-1\"].state",
        "value": "FL",
        "from": {
          "document": "acord_125",
          "region": "p2",
          "quote": "Location 1: Tampa, FL"
        },
        "status": "valid"
      }
    ],
    "missing": [{ "path": "operations.vessel_count" }],
    "conflicts": [],
    "facts": [],
    "summary": { "headline": "…", "sentences": [] }
  }
}
```

* `proposals` are the values read for the program's inputs. Each names its input `path`, the
  `value`, and `from`: the document, the place in it and the exact quote. `status` is `valid`,
  `invalid` (with a `problem`), `conflict`, or `ruled` once an underwriter has decided on it.
* `missing` lists inputs nothing was read for, and `conflicts` the inputs where documents disagree.
* `facts` holds what the program keeps as notes and reads in no rule, such as the named insured
  or the claims, each keyed by its note's path and with where it was read.

A result whose quotes don't check out against the documents fails the extraction with
`failure.code` `invalid_extraction`. A submission with no program gets its documents checked
only: with no release, there are no notes to keep as facts.

The submission itself summarizes what to do next. Read it with
[Get an underwriting submission](https://docs.canary.effectiveai.app/api-reference/underwriting-submissions/get-an-underwriting-submission.md):
`outstanding` lists what is missing, blocking items first, each with who it waits on (`broker`,
`underwriter` or `system`), and `next` is who acts now. Once values are written, `rating` says where the
submission stands on its program and what the program computes, such as the premium. Poll the submission when you only need to
know whether it is waiting on you.

To name what a result holds the way the program does, read the contract the extraction was
checked against with
`GET /insurance/underwriting/submissions/{submissionId}/extractions/{extractionId}/contract`:
the program's inputs as JSON Schema (`questions`, with each input's words), its `roles`, and its
`notes`, the paths of the facts. Anyone who can read the submission can read it, with no access to
the program. An extraction read with no program has none (`404`).

### See the run behind an extraction

A person who manages the program can read the procedure run behind an extraction, step by step,
with any step's failure, through
`GET /insurance/underwriting/submissions/{submissionId}/extractions/{extractionId}/run`. It is for
holders of a highest role of the program guideline's role chain (see
[Hosted logs](https://docs.canary.effectiveai.app/rsl/reference/submission-log.md#hosted-logs)); anyone else who can
read the submission gets `403 forbidden`. The documents' contents aren't included.

## Rule on the proposals

An underwriter decides on each proposal: accept it, dismiss it, or enter a value of their own. They
can do it in Effective, on the submission's **Facts**, or your system can do it for them with an API
key, through four operations:

| Operation | Does |
| - | - |
| [Accept proposals](https://docs.canary.effectiveai.app/api-reference/underwriting-submissions/accept-proposals-of-an-underwriting-submission’s-extraction.md) | Keeps proposed values, by `paths` and `facts`, or `{ "all": true }` for every valid one. |
| [Dismiss proposals](https://docs.canary.effectiveai.app/api-reference/underwriting-submissions/dismiss-proposals-of-an-underwriting-submission’s-extraction.md) | Sets values aside; a later extraction doesn't offer the same value again. |
| [Reopen proposals](https://docs.canary.effectiveai.app/api-reference/underwriting-submissions/reopen-proposals-of-an-underwriting-submission’s-extraction.md) | Takes back a ruling, so the proposal is offered again. |
| [Set values](https://docs.canary.effectiveai.app/api-reference/underwriting-submissions/set-the-underwriter’s-values-on-an-underwriting-submission.md) | Holds the underwriter's own value at an input or fact, or removes it with `null`. An input the program reserves for a role needs a reason in `because`. |

Each needs an `Idempotency-Key`, edit access to the submission, and a
[role of the program](https://docs.canary.effectiveai.app/rsl/programs-on-effective.md#submission-logs) that can answer the inputs: a
caller who holds none gets `403 no_program_role`. A workspace administrator can act in any of the
program's roles. This accepts every valid proposal that isn't in conflict:

```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/extractions/9d1c7b3a-4e2f-4a68-b0c9-5f8e7d6c4b3a/accept" \
  --header "Authorization: Bearer $EFFECTIVE_API_KEY" \
  --header "Content-Type: application/json" \
  --header "Idempotency-Key: 5b8d2f6a-3c1e-4d79-9a0b-6e4f2c8d1a7b" \
  --data '{ "all": true }'
```

The answer lists the paths `accepted` and those `skipped`, each with why. Each value is written to
the submission's log as the member the key belongs to.

### Read the rulings

Your system sees the rulings when it reads an extraction: a ruled proposal has `status: "ruled"`
and a `ruling` of `accepted`, `overridden` or `dismissed`, and `values` and `factValues` hold what
the submission keeps now. The submission's `outstanding` updates to match.

## Take in submissions by email

A workspace administrator with edit access to the program can turn on email from
**Underwriting → Submissions → Email intake addresses**. You can also
[create a program address through the API](https://docs.canary.effectiveai.app/guides/email-addresses.md#create-an-address).
Share the address with the brokers who send quote requests for that program.

* The first email of a thread makes a submission of the program, with `source: "email"` and
  `createdBy.type: "system"`. Its body and attachments become the submission's documents, as
  [Add the broker's message](#add-the-brokers-message) describes.
* Replies on the thread from the same sender join that submission. A reply from anyone else is
  held for a person to [attach or discard](https://docs.canary.effectiveai.app/guides/email-addresses.md#resolve-held-email).
* An email with files starts an extraction of every document by itself, unless your workspace
  turned extraction on arrival off for the program. A completed upload does the same. Whether
  extraction started, or why it was skipped, is on the email in
  [the address's email list](https://docs.canary.effectiveai.app/guides/email-addresses.md#see-what-an-address-received).
  Check `latestExtraction` on the submission before you start one; starting another is safe, as
  [Start an extraction](#start-an-extraction) explains.

The API doesn't list submissions. To work on one that email made, take its id from the held
email you resolved (`resolution.submissionId`), or open it on the desk in Effective. To answer the
broker on the thread, see [Reply to brokers by email](https://docs.canary.effectiveai.app/guides/underwriting/correspondence.md).


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