Stop an import
DELETE
/mailboxes/{id}/importsStops an import once it finishes the batch it’s on. Everything imported by then stays.
Needs the permissionimports:stop
It asks the import to stop rather than cutting it off, so the import shows stopping for a few seconds and then done. Imports go newest first, so stopping early leaves you the most recent mail.
Path parameters
idstringrequired- The mailbox.
Query parameters
runIdstringrequired- The import to stop, from Import history or List imports.
Returns
idstring- The import.
stoppingboolean- Always true.
Errors
400run_id_required- There’s no
runIdin the query. 401invalid_key- The key is wrong, expired or revoked. With no Authorization header at all, the code is
missing_credentials. 403missing_scope- The key doesn’t have
imports:stop. TheX-Required-Scopeheader names what’s missing. 429rate_limited- More than 120 requests a minute from this key. Wait for
Retry-Afterseconds.