Skip to the page

Start import

Brings a Resend account over: its domains, suppression list, segments as audiences, contacts, templates, draft broadcasts and webhooks, and the names of its API keys. It runs in the background and can be run again: what is already here is left alone. Nothing arrives in a state that sends, and the key is kept sealed only while the import runs.

opensend.imports.create(input)
Needs the scopeimports:writeFrom a terminalopensend imports create

Input

  • sourcestring

    The service to read the account from. Without it, resend.

    One ofresend

  • apiKeystringRequired

    A key of the other account with full access. At Resend it starts with re_. It is used to read, never to send or to change anything there.

  • resourcesstring[]

    What to bring over: any of domains, suppressions, audiences, contacts, templates, broadcasts, webhooks and api_keys. Without it, all of them.

    One ofdomainssuppressionsaudiencescontactstemplatesbroadcastswebhooksapi_keystopicscontact_propertiesautomationsevents

Returns

The call resolves to the answer, already parsed. A call the API refuses throws OpenSendError with the code and the message of the answer. SDK lists the errors of the client itself.

  • object"import"

    Always import.

  • idstring

    The id of the import.

  • sourcestring

    The service it reads the account from: resend.

    One ofresend

  • statusstring

    Where it stands: queued before it starts, running while it reads, then completed, failed or canceled.

    One ofqueuedrunningcompletedfailedcanceled

  • resourcesstring[]

    What was asked for, in the order it is done.

    One ofdomainssuppressionsaudiencescontactstemplatesbroadcastswebhooksapi_keystopicscontact_propertiesautomationsevents

  • stepstring | null

    What is being read right now, or null.

    One ofdomainssuppressionsaudiencescontactstemplatesbroadcastswebhooksapi_keystopicscontact_propertiesautomationsevents

  • reportobject[]

    One entry for each thing that was asked for, with what came over and what did not.

  • report[].resourcestring

    What was read: domains, suppressions, audiences, contacts, templates, broadcasts, webhooks or api_keys.

    One ofdomainssuppressionsaudiencescontactstemplatesbroadcastswebhooksapi_keystopicscontact_propertiesautomationsevents

  • report[].foundinteger

    How many the other account has, as far as the import has read.

  • report[].createdinteger

    How many were made here.

  • report[].reusedinteger

    How many were here already, from an earlier import or under the same name.

  • report[].skippedinteger

    How many were left out. The notes say why.

  • report[].notesobject[]

    What was left out or changed on the way, each with its reason. The first 50 are kept.

  • report[].notes[].namestring

    What the note is about: a domain, a template, an address.

  • report[].notes[].reasonstring

    What happened to it, and what to do about it when there is something.

  • errorstring | null

    Why it failed, or what it is waiting on before it tries again. null otherwise.

  • createdAtstring

    When the import was started.

  • finishedAtstring | null

    When it ended, or null while it runs.