Skip to content

API reference

API: Agent mailboxes

Markdown version

MethodPathWhat it doesScope
DELETE/v1/agentmailDisconnect AgentMail: its webhook is removed, every agent mailbox turned off and the key deleted (the inboxes stay in your AgentMail account) (web app only)integrations:write
GET/v1/agentmailAgentMail for this organization: connected or not (never the key) and its agent mailboxessettings:read
PUT/v1/agentmailConnect your own AgentMail account (organization owners, signed in): the key is checked, stored encrypted and never returned, and AgentMail's webhook is registered (web app only)integrations:write
POST/v1/agentmail/checkCheck the saved key with a harmless read, and whether AgentMail still delivers to the webhook (turned back on if AgentMail turned it off) (web app only)integrations:write
POST/v1/agentmail/mailboxesGive an agent its own AgentMail address, or set the organization's agent inbox (a new inbox, or one already in your AgentMail account), with the person responsible for it (web app only)integrations:write
PATCH/v1/agentmail/mailboxes/:idAssign a mailbox to another agent or person, or turn it off or on (web app only)integrations:write
POST/v1/agentmail/mailboxes/:id/messagesSend an email from an agent mailbox as its person (or an owner). Policy, suppression, consent, caps and one-click unsubscribe apply as for any send (web app only)messages:send
POST/v1/webhooks/agentmail/:tokenAgentMail's webhook (Svix-signed): mail received by agent mailboxes, bounces and complaints (no sign-in)—

Examples

GET /v1/agentmail

AgentMail for this organization: connected or not (never the key) and its agent mailboxes

curl -s "https://api.closefinch.com/v1/agentmail" \
  -H "Authorization: Bearer $RA_API_KEY"
const res = await fetch(`https://api.closefinch.com/v1/agentmail`, {
  method: "GET",
  headers: { authorization: `Bearer ${process.env.RA_API_KEY}` },
});
const data = await res.json();

Request and response schemas: https://www.closefinch.com/openapi.json. All resources: API reference.

Send feedback

Tell us what's broken, confusing or missing on this page, or an idea. It goes to the team that builds the product.

Please don't include passwords or card numbers.
Only to reply about this. Never added to any mailing list.