आयात
इस समूह का हर ऑपरेशन: वह क्या लेता है, क्या लौटाता है और किन त्रुटियों के साथ जवाब दे सकता है।
ऑपरेशन
Two ways to bring an existing setup across.
A mailbox import reads an export file: Google Takeout archives, .mbox, .eml, .zip and .tgz. Create the import, upload each file in parts, then start it. Imported mail is quiet, so no rules, forwards, notifications, summaries or webhooks run for it.
A provider import reads a Resend account with a full-access key: suppressions, segments as audiences, subscribed contacts, templates, and webhooks created switched off, plus a checklist of the domains and API keys to recreate by hand. Inspect it first to see what would come across. The key is held encrypted only while the import runs and is erased when it ends, and running it twice duplicates nothing.
GET/imports
List mailbox imports
Every import in the workspace, newest first, one page at a time, each with its status, byte progress and running counts. Nothing is dropped from the history, so following nextCursor reaches the first import. A key limited to particular addresses sees only imports into those addresses.
Requires the threads:read scope.
क्वेरी पैरामीटर
addressIdstringOnly imports into this address.
limitintegerRows per page, 1 to 100.
कम से कम 1अधिकतम 100डिफ़ॉल्ट25cursorstringAn import id. Keyset, not offset: pass the previous page's
nextCursor. One that names nothing in this list is a 400invalid_cursor.
लौटाता है
A page of imports, newest first, with hasMore and nextCursor.
त्रुटियाँ
वे त्रुटियाँ जो कोई भी ऑपरेशन लौटा सकता है400401403404422500त्रुटि सूची
इनमें भी उपलब्ध
POST/imports
Start a mailbox import
Creates an import into one address and returns it with status: uploading. Upload each file in parts of chunkBytes with the chunk operation, then call start. The import reads Google Takeout archives, .mbox, .eml, .zip and .tgz files. Imported mail is quiet: no rules, forwards, notifications, summaries or webhooks run for it.
Requires the threads:write scope.
अनुरोध बॉडी
addressIdstringआवश्यकThe address the mail belongs to.
filesobject[]आवश्यकEach file as
{ name, bytes }, 1 to 50 of them, each at most 100 GB.1 से 50 आइटमnamestringआवश्यक- अधिकतम 255 वर्ण
bytesintegerआवश्यक- कम से कम 1अधिकतम 107374182400
optionsobjectkeepInbox,includeSpamandincludeTrash, as forcreate.keepInboxbooleanDefault true. Mail that was in the old inbox lands in Inbox with its unread state; false files everything under Archive.
includeSpambooleanDefault false.
includeTrashbooleanDefault false.
लौटाता है
The import, waiting for its files.
त्रुटियाँ
वे त्रुटियाँ जो कोई भी ऑपरेशन लौटा सकता है400401403404422500त्रुटि सूची
इनमें भी उपलब्ध
GET/imports/{id}
Get a mailbox import
Status, byte progress and counts. Poll it while the import runs.
Requires the threads:read scope.
पाथ पैरामीटर
idstringआवश्यकImport id,
imp_followed by 24 hex characters.
लौटाता है
The import.
त्रुटियाँ
वे त्रुटियाँ जो कोई भी ऑपरेशन लौटा सकता है400401403404422500त्रुटि सूची
इनमें भी उपलब्ध
GET/imports/{id}/upload
Which parts have arrived
For each file, the indexes of the parts already stored, so an interrupted upload sends only what is missing.
Requires the threads:write scope.
पाथ पैरामीटर
idstringआवश्यकImport id,
imp_followed by 24 hex characters.
लौटाता है
Received parts per file.
त्रुटियाँ
वे त्रुटियाँ जो कोई भी ऑपरेशन लौटा सकता है400401403404422500त्रुटि सूची
इनमें भी उपलब्ध
DELETE/imports/{id}/upload
Delete the uploaded files
Removes the uploaded archive. Mail already imported stays in the mailbox. Refused with 409 while the import is queued or running.
Requires the threads:write scope.
पाथ पैरामीटर
idstringआवश्यकImport id,
imp_followed by 24 hex characters.
लौटाता है
The import, with uploadDeleted: true.
त्रुटियाँ
वे त्रुटियाँ जो कोई भी ऑपरेशन लौटा सकता है400401403404422500त्रुटि सूची
इनमें भी उपलब्ध
PUT/imports/{id}/files/{file}/chunks/{chunk}
Upload one part of a file
Stores bytes chunk * chunkBytes up to the next part of file file. Every part is exactly chunkBytes long except the last. Sending a part again replaces it, so a failed part can simply be retried.
Requires the threads:write scope.
पाथ पैरामीटर
idstringआवश्यकImport id,
imp_followed by 24 hex characters.fileintegerआवश्यकThe file index, in the order given to
create.कम से कम 0chunkintegerआवश्यकThe part index, from 0.
कम से कम 0
अनुरोध बॉडी
कंटेंट टाइपapplication/octet-stream
लौटाता है
The part was stored.
त्रुटियाँ
वे त्रुटियाँ जो कोई भी ऑपरेशन लौटा सकता है400401403404422500त्रुटि सूची
इनमें भी उपलब्ध
POST/imports/{id}/start
Start reading the uploaded files
Checks that every part of every file has arrived and queues the import. 412 missing_chunks names the files still incomplete.
Requires the threads:write scope.
पाथ पैरामीटर
idstringआवश्यकImport id,
imp_followed by 24 hex characters.
लौटाता है
The import, queued.
त्रुटियाँ
वे त्रुटियाँ जो कोई भी ऑपरेशन लौटा सकता है400401403404422500त्रुटि सूची
इनमें भी उपलब्ध
POST/imports/{id}/cancel
Cancel a mailbox import
Stops the import at its next checkpoint. Mail already imported stays.
Requires the threads:write scope.
पाथ पैरामीटर
idstringआवश्यकImport id,
imp_followed by 24 hex characters.
लौटाता है
The import, cancelled.
त्रुटियाँ
वे त्रुटियाँ जो कोई भी ऑपरेशन लौटा सकता है400401403404422500त्रुटि सूची
इनमें भी उपलब्ध
GET/imports/{id}/failures
What an import could not bring across
Each message or archive entry that did not come across, with the reason. Page with after, the nextCursor of the previous page.
Requires the threads:read scope.
पाथ पैरामीटर
idstringआवश्यकImport id,
imp_followed by 24 hex characters.
क्वेरी पैरामीटर
afterintegerThe
nextCursorof the previous page.limitintegerAt most 100, the default.
कम से कम 1अधिकतम 100
लौटाता है
Failures.
त्रुटियाँ
वे त्रुटियाँ जो कोई भी ऑपरेशन लौटा सकता है400401403404422500त्रुटि सूची
इनमें भी उपलब्ध
POST/provider-imports/inspect
Look inside a Resend account before importing
Reads the first page of each resource with a full-access Resend key and returns what an import would bring. Nothing is stored and the key is not kept. A sending-only key is 400 restricted_key.
Requires the settings:write scope.
अनुरोध बॉडी
apiKeystringआवश्यक- 8 से 200 वर्ण
लौटाता है
Counts per resource.
त्रुटियाँ
वे त्रुटियाँ जो कोई भी ऑपरेशन लौटा सकता है400401403404422500त्रुटि सूची
इनमें भी उपलब्ध
GET/provider-imports
List imports from sending providers
Every provider import in the workspace, newest first, one page at a time, each with its report. Follow nextCursor to reach the first one.
Requires the settings:read scope.
क्वेरी पैरामीटर
limitintegerRows per page, 1 to 100.
कम से कम 1अधिकतम 100डिफ़ॉल्ट25cursorstringA provider import id. Keyset, not offset: pass the previous page's
nextCursor. One that names nothing in this list is a 400invalid_cursor.
लौटाता है
A page of provider imports, newest first, with hasMore and nextCursor.
त्रुटियाँ
वे त्रुटियाँ जो कोई भी ऑपरेशन लौटा सकता है400401403404422500त्रुटि सूची
इनमें भी उपलब्ध
POST/provider-imports
Import from Resend
Starts an import from a Resend account: suppressions, segments as audiences, subscribed contacts, templates, and webhooks created switched off, plus a checklist of domains and API keys. The key is held encrypted only while the import runs and is erased when it ends. Running it twice duplicates nothing.
Requires the settings:write scope.
अनुरोध बॉडी
apiKeystringआवश्यकA full-access Resend API key.
8 से 200 वर्णresourcesstring[]आवश्यकAny of
suppressions,audiences,contacts,templates,webhooks,domainsandapi-keys.कम से कम एक आइटमइनमें से एक"suppressions""audiences""contacts""templates""webhooks""domains""api-keys"
लौटाता है
The import, queued.
त्रुटियाँ
वे त्रुटियाँ जो कोई भी ऑपरेशन लौटा सकता है400401403404422500त्रुटि सूची
इनमें भी उपलब्ध
GET/provider-imports/{id}
Get an import from a sending provider
Status, current step and the report so far.
Requires the settings:read scope.
पाथ पैरामीटर
idstringआवश्यकProvider import id,
pimp_followed by 24 hex characters.
लौटाता है
The provider import.
त्रुटियाँ
वे त्रुटियाँ जो कोई भी ऑपरेशन लौटा सकता है400401403404422500त्रुटि सूची
इनमें भी उपलब्ध
POST/provider-imports/{id}/cancel
Cancel an import from a sending provider
Stops it and erases the key. What already came across stays.
Requires the settings:write scope.
पाथ पैरामीटर
idstringआवश्यकProvider import id,
pimp_followed by 24 hex characters.
लौटाता है
The provider import, cancelled.
त्रुटियाँ
वे त्रुटियाँ जो कोई भी ऑपरेशन लौटा सकता है400401403404422500त्रुटि सूची