io.b3os/resend 1.0.0 · email, messaging, notifications · MIT

Send transactional email through Resend with your own Resend API key and a domain you verified in Resend: plain text or HTML, cc, bcc and reply-to, idempotent retries with an idempotency key. Also check an email's delivery status and list your sending domains.

Every call's result carries upstream_status and timing: validate_ms, inject_ms, render_ms, upstream_ms, map_ms and total_ms. upstream is the service's time; the others are B3OS's own (call actions). The snippets below show no timing values, because a fixture records none.

Connection

resend, type bearer: Resend API key.

A Resend API key (re_...) with sending access, from resend.com/api-keys.

How to get one: resend.com.

The credential is sent only to api.resend.com.

Store the credential once as a vault connection for this pack and key, then name its id in a call's connections. Leave the key out and B3OS uses the project's newest connection for the pack and key without a subject (connections).

Hosts it reaches: api.resend.com.

Actions

ActionEffectMCP toolTitle
send-emailirreversibleresend__send-emailSend email
get-emailreadresend__get-emailGet email status
list-domainsreadresend__list-domainsList sending domains

send-email

Send email. Send one email from an address on a domain verified in your Resend account, as HTML, plain text or both. to, cc and bcc take one address or an array. Pass an idempotency key so a retry does not send twice. Returns the Resend email ID.

Ref io.b3os/resend/send-email@1.0.0 · effect irreversible · connection resend · MCP tool resend__send-email

bash
curl -s https://beta-api.b3os.org/v1/actions/call \ -H "Authorization: Bearer $B3OS_API_KEY" \ -H "Idempotency-Key: 7c1e2f6a-1d43-4a8e-b2a5-3f0c9d5e8b11" \ -H "Content-Type: application/json" \ -d '{ "ref": "io.b3os/resend/send-email@1", "input": { "from": "Acme Billing <billing@acme.example>", "to": ["ada@example.com"], "subject": "Your October invoice", "text": "Hi Ada, your invoice for October is attached in the portal.", "replyTo": "support@acme.example" }, "connections": {"resend": "conn_01m5t6cbgdjs1ketgcqwa2sne8"} }'

Output, labeled fixture: Send email (documented response shape, example values). From the bundle's fixtures/send-email.json, not a live call.

json
{"id": "49a3999c-0ce1-4ea6-ab68-afcd6dc2e794", "status": "success"}

When the service answers with an error, the call fails with upstream_error and pack_error.code is one of:

pack_error.codeService statusRetryableMessage
connection_unauthorized401noResend rejected the API key; check the connection.
forbidden403nobuilt from the service's response
not_found404nobuilt from the service's response
rate_limited429yesbuilt from the service's response
invalid_request400, 422nobuilt from the service's response
conflict409nobuilt from the service's response

get-email

Get email status. One sent email by Resend ID: sender, recipients, subject, creation time and its last delivery event (sent, delivered, delivery_delayed, bounced, complained, opened, clicked, ...).

Ref io.b3os/resend/get-email@1.0.0 · effect read · connection resend · MCP tool resend__get-email

bash
curl -s https://beta-api.b3os.org/v1/actions/call \ -H "Authorization: Bearer $B3OS_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "ref": "io.b3os/resend/get-email@1", "input": {"id": "49a3999c-0ce1-4ea6-ab68-afcd6dc2e794"}, "connections": {"resend": "conn_01m5t6cbgdjs1ketgcqwa2sne8"} }'

Output, labeled fixture: Get email status (documented response shape, example values). From the bundle's fixtures/get-email.json, not a live call.

json
{ "id": "49a3999c-0ce1-4ea6-ab68-afcd6dc2e794", "from": "Acme Billing <billing@acme.example>", "to": ["ada@example.com"], "subject": "Your October invoice", "created_at": "2026-10-26 09:12:44.123456+00", "last_event": "delivered"}

When the service answers with an error, the call fails with upstream_error and pack_error.code is one of:

pack_error.codeService statusRetryableMessage
connection_unauthorized401noResend rejected the API key; check the connection.
forbidden403nobuilt from the service's response
not_found404nobuilt from the service's response
rate_limited429yesbuilt from the service's response
invalid_request400, 422nobuilt from the service's response
conflict409nobuilt from the service's response

list-domains

List sending domains. Domains in the Resend account with their verification status (verified, pending, failed, ...) and region. send-email only works from verified domains.

Ref io.b3os/resend/list-domains@1.0.0 · effect read · connection resend · MCP tool resend__list-domains

bash
curl -s https://beta-api.b3os.org/v1/actions/call \ -H "Authorization: Bearer $B3OS_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "ref": "io.b3os/resend/list-domains@1", "input": {}, "connections": {"resend": "conn_01m5t6cbgdjs1ketgcqwa2sne8"} }'

Output, labeled fixture: List sending domains (documented response shape, example values). From the bundle's fixtures/list-domains.json, not a live call.

json
{ "domains": [ { "id": "d91cd9bd-1176-453e-8fc1-35364d380206", "name": "acme.example", "status": "verified", "region": "us-east-1", "created_at": "2026-04-26 20:21:26.347412+00" }, { "id": "1c7b4b2a-6a51-4b5e-9a35-1f0f2b5d7c11", "name": "mail.acme.example", "status": "pending", "region": "eu-west-1", "created_at": "2026-10-20 10:02:11.000000+00" } ]}

When the service answers with an error, the call fails with upstream_error and pack_error.code is one of:

pack_error.codeService statusRetryableMessage
connection_unauthorized401noResend rejected the API key; check the connection.
forbidden403nobuilt from the service's response
not_found404nobuilt from the service's response
rate_limited429yesbuilt from the service's response
invalid_request400, 422nobuilt from the service's response
conflict409nobuilt from the service's response
Ask a question... ⌘I