Skip to the page

Cancel import

Stops an import that is queued or running and wipes its key. What it already brought over stays.

opensend.imports.cancel(id)
Needs the scopeimports:writeFrom a terminalopensend imports cancel

Input

id goes first, on its own, and the rest in one object. One object that holds id works too.

  • idstringRequired

    The id of the item. Up to 64 characters.

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.