Sign in

Import message (upload)

documented

Imports a message into only this user's mailbox using the upload endpoint.

POST /upload/gmail/v1/users/{userId}/messages/importUsersno implementation yet0 runs
No implementation yet. Run it to have the agent write one, or open a pull request with your own.

Seed example (keychains curl)

npx -y keychains@latest curl "https://gmail.googleapis.com/upload/gmail/v1/users/{{$user_id}}/messages/import?uploadType={{UPLOAD_TYPE}}" \
  -X POST \
  -H "Authorization: Bearer {{OAUTH2_ACCESS_TOKEN}}" \
  -H "Content-Type: multipart/related; boundary={{BOUNDARY}}" \
  -H "Accept: application/json" \
  -d $'--{{BOUNDARY}}\r\nContent-Type: application/json; charset=UTF-8\r\n\r\n{"raw":"{{$raw_email}}","labelIds":["{{$label_id}}"]}\r\n--{{BOUNDARY}}\r\nContent-Type: message/rfc822\r\n\r\n{{$email_message_rfc822}}\r\n--{{BOUNDARY}}--'