Skip to content

Resend

Resend Broadcasts and email operations, and sending domains, for Sanoma workflows.

Package @sanoma-ai/connector-resend, version 0.11.24. Its README, with how to install and connect it, is on GitHub.

Resource types, which a data file under resources/ declares: resend.domain.

domain

import

resend.domain.importreadsafe to retry

Find a domain by its name or its binding id and read it; gone when there is none

Input

  • idstringrequired

    at least 1 character

Output

  • idstringrequired

    at least 1 character

  • gonebooleanrequired
  • stateobject
    Fields
    • namestringrequired

      The domain to send from, such as example.com, or a subdomain such as mail.example.com

      matches ^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)+$

    • region"us-east-1" | "eu-west-1" | "sa-east-1" | "ap-northeast-1"

      Where Resend sends from: us-east-1 (the default), eu-west-1, sa-east-1 or ap-northeast-1

    • custom_return_pathstring

      The Return-Path subdomain, send by default (send.example.com)

      matches ^[a-z0-9]([a-z0-9-]*[a-z0-9])?$

    • idstring

      The domain's id at Resend

    • status"not_started" | "pending" | "verified" | "failed" | "temporary_failure" | "partially_verified" | "partially_failed"

      Whether Resend found its DNS records: verified once it has

    • recordsobject[]

      The DNS records Resend asks for, as Resend gives them

      Each item
      • recordstringrequired

        What it is for: SPF and DKIM for sending, Receiving, Tracking, TrackingCAA

      • namestringrequired
      • typestringrequired
      • valuestringrequired
      • ttlstring
      • statusstring
      • priorityinteger
    • dns_recordsobject[]

      The same records as a zone holds them: full lower-case names, TXT text unquoted, ttl 1 for automatic

      Each item
      • type"TXT" | "MX" | "CNAME" | "CAA"required
      • namestringrequired
      • contentstringrequired
      • priorityinteger
      • ttlinteger
  • handlestring

    The driver's data for the object, opaque: pass it back unchanged

read

resend.domain.readreadsafe to retry

Read a domain as it is now; gone when it no longer exists

Input

  • idstringrequired

    at least 1 character

  • staterecord of any
  • handlestring

    The driver's data for the object, opaque: pass it back unchanged

Output

  • idstringrequired

    at least 1 character

  • gonebooleanrequired
  • stateobject
    Fields
    • namestringrequired

      The domain to send from, such as example.com, or a subdomain such as mail.example.com

      matches ^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)+$

    • region"us-east-1" | "eu-west-1" | "sa-east-1" | "ap-northeast-1"

      Where Resend sends from: us-east-1 (the default), eu-west-1, sa-east-1 or ap-northeast-1

    • custom_return_pathstring

      The Return-Path subdomain, send by default (send.example.com)

      matches ^[a-z0-9]([a-z0-9-]*[a-z0-9])?$

    • idstring

      The domain's id at Resend

    • status"not_started" | "pending" | "verified" | "failed" | "temporary_failure" | "partially_verified" | "partially_failed"

      Whether Resend found its DNS records: verified once it has

    • recordsobject[]

      The DNS records Resend asks for, as Resend gives them

      Each item
      • recordstringrequired

        What it is for: SPF and DKIM for sending, Receiving, Tracking, TrackingCAA

      • namestringrequired
      • typestringrequired
      • valuestringrequired
      • ttlstring
      • statusstring
      • priorityinteger
    • dns_recordsobject[]

      The same records as a zone holds them: full lower-case names, TXT text unquoted, ttl 1 for automatic

      Each item
      • type"TXT" | "MX" | "CNAME" | "CAA"required
      • namestringrequired
      • contentstringrequired
      • priorityinteger
      • ttlinteger
  • handlestring

    The driver's data for the object, opaque: pass it back unchanged

plan

resend.domain.planreadsafe to retry

Plan how apply would make a domain match its declaration (or delete it, given none); nothing changes

Input

  • idstring

    at least 1 character

  • staterecord of any
  • handlestring

    The driver's data for the object, opaque: pass it back unchanged

  • desiredrecord of any

    The declared fields; a write-only one may hold a secret marker

Output

  • action"none" | "create" | "update" | "replace" | "delete"required
  • plannedrecord of any
  • unknownstring[]required
  • replacestring[]required

    The fields whose change replaces the object: not empty exactly when replace

create

resend.domain.createwrite

Create a domain as declared

Input

  • desiredrecord of anyrequired

    The declared fields; a write-only one may hold a secret marker

Output

  • idstringrequired

    at least 1 character

  • stateobjectrequired
    Fields
    • namestringrequired

      The domain to send from, such as example.com, or a subdomain such as mail.example.com

      matches ^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)+$

    • region"us-east-1" | "eu-west-1" | "sa-east-1" | "ap-northeast-1"

      Where Resend sends from: us-east-1 (the default), eu-west-1, sa-east-1 or ap-northeast-1

    • custom_return_pathstring

      The Return-Path subdomain, send by default (send.example.com)

      matches ^[a-z0-9]([a-z0-9-]*[a-z0-9])?$

    • idstring

      The domain's id at Resend

    • status"not_started" | "pending" | "verified" | "failed" | "temporary_failure" | "partially_verified" | "partially_failed"

      Whether Resend found its DNS records: verified once it has

    • recordsobject[]

      The DNS records Resend asks for, as Resend gives them

      Each item
      • recordstringrequired

        What it is for: SPF and DKIM for sending, Receiving, Tracking, TrackingCAA

      • namestringrequired
      • typestringrequired
      • valuestringrequired
      • ttlstring
      • statusstring
      • priorityinteger
    • dns_recordsobject[]

      The same records as a zone holds them: full lower-case names, TXT text unquoted, ttl 1 for automatic

      Each item
      • type"TXT" | "MX" | "CNAME" | "CAA"required
      • namestringrequired
      • contentstringrequired
      • priorityinteger
      • ttlinteger
  • handlestring

    The driver's data for the object, opaque: pass it back unchanged

update

resend.domain.updatewrite

Change a domain to match its declaration, replacing it where a field cannot change in place

Input

  • idstringrequired

    at least 1 character

  • staterecord of any
  • handlestring

    The driver's data for the object, opaque: pass it back unchanged

  • desiredrecord of anyrequired

    The declared fields; a write-only one may hold a secret marker

  • expectobject
    Fields
    • action"none" | "create" | "update" | "replace" | "delete"required
    • replacestring[]required

Output

  • idstringrequired

    at least 1 character

  • stateobjectrequired
    Fields
    • namestringrequired

      The domain to send from, such as example.com, or a subdomain such as mail.example.com

      matches ^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)+$

    • region"us-east-1" | "eu-west-1" | "sa-east-1" | "ap-northeast-1"

      Where Resend sends from: us-east-1 (the default), eu-west-1, sa-east-1 or ap-northeast-1

    • custom_return_pathstring

      The Return-Path subdomain, send by default (send.example.com)

      matches ^[a-z0-9]([a-z0-9-]*[a-z0-9])?$

    • idstring

      The domain's id at Resend

    • status"not_started" | "pending" | "verified" | "failed" | "temporary_failure" | "partially_verified" | "partially_failed"

      Whether Resend found its DNS records: verified once it has

    • recordsobject[]

      The DNS records Resend asks for, as Resend gives them

      Each item
      • recordstringrequired

        What it is for: SPF and DKIM for sending, Receiving, Tracking, TrackingCAA

      • namestringrequired
      • typestringrequired
      • valuestringrequired
      • ttlstring
      • statusstring
      • priorityinteger
    • dns_recordsobject[]

      The same records as a zone holds them: full lower-case names, TXT text unquoted, ttl 1 for automatic

      Each item
      • type"TXT" | "MX" | "CNAME" | "CAA"required
      • namestringrequired
      • contentstringrequired
      • priorityinteger
      • ttlinteger
  • handlestring

    The driver's data for the object, opaque: pass it back unchanged

delete

resend.domain.deletewritesafe to retry

Delete a domain; done already when it is gone

Input

  • idstringrequired

    at least 1 character

  • staterecord of any
  • handlestring

    The driver's data for the object, opaque: pass it back unchanged

Output

  • idstringrequired

    at least 1 character

  • gonetruerequired

broadcast

create

resend.broadcast.createwrite

Create a broadcast to an audience. Nothing is sent.

Input

  • audiencestringrequired

    at least 1 character

  • fromstringrequired

    The sender, such as Acme <news@acme.example>, on a domain verified in Resend

    at least 1 character

  • subjectstringrequired

    at least 1 character

  • htmlstringrequired

Output

  • idstringrequired

send

resend.broadcast.sendsend

Send a broadcast to every contact in its audience. Cannot be undone.

Input

  • idstringrequired

Output

  • idstringrequired
  • status"queued" | "sent"required

emails

send

resend.emails.sendsend

Send one email to an address, or to a list of up to 50, with files attached. Cannot be undone.

Input

  • tostring | string[]required
  • fromstringrequired

    The sender, such as Acme <news@acme.example>, on a domain verified in Resend

    at least 1 character

  • subjectstringrequired

    at least 1 character

  • htmlstring
  • textstring
  • attachmentsobject[]

    Files to attach; Resend takes up to 40 MB per email, encoded

    Each item
    • filenamestringrequired

      The file's name, such as invoice-001.pdf

      at least 1 character

    • contentstringrequired

      The file's bytes, base64-encoded

      format base64, encoded as base64, matches ^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$, at least 1 character

Output

  • idstringrequired

These pages describe sanoma 0.11.24.