The email address and dedicated inbox APIs are beta.
Before you start
Use a user API key with workspace administration to create an address. Program addresses also require edit access on the program. App credentials and resource-scoped keys are unsupported.
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:
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. CallPOST /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
CallPOST /api/v2/email/addresses with the destination. The following example creates an
address for the harbor-excess program. Substitute your own program ID.
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.
Set up a procedure trigger
Publish a procedure with an input for the email event. If you already have an enabledemail_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:
"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 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 that
the trigger started. The procedure trigger API 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. Setconfig.allowExternalSenders when you
create an address, or update an existing address:
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.
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. Anemail_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
kind (agent, procedure or program) or by
programId. While nextCursor isn’t null, send it as cursor with the same filters; see
Pagination. 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.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 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 usingdelivery.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.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 withPOST /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
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: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:
Decide with
action:
discardkeeps 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 itssubmissionId.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.
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.