Managing Email Migrations

Stay organized with collections Save and categorize content based on your preferences.

Managing migrations

The Groups Migration API manages the migration of shared emails from public folders and distribution lists to a group's discussion archive. The media upload feature allows the API to store group email messages in the cloud and make it available to the server. When managing a migration, it is important to note:

  • The API is for the migration of shared emails to Google Groups. For information about migrating or syncing emails from a specific custom application to Gmail, see Gmail API.
  • All group members who have access to the group's archive can view the migrated messages, but the emails are not delivered to individual group members. For specific information for custom application migration to Google Workspace, see the Google Workspace migration tools product matrix.
  • For migration purposes, the API returns an error if a group is suspended, has not been created, or has read-only access. For more information about how to identify and fix these, see the Directory API, the Groups Settings API, and Ways to create groups.
  • Before migrating an email message:
    • Confirm that the target group exists and the group's email is accurate before migrating an email message to that group's archive.
    • If the email's sender has the same domain as the target group, confirm the email sender exists before migrating the email message to the target group's archive.
    For more information about listing groups and users, see the Directory API.
  • Before migration, the email message format must be in the RFC 822 standard definition. Use the Content-type: message/rfc822 header. Confirm the email message's To:, From:, and Date: fields are properly formed. The response is returned in the JSON data format.
  • The API supports parallel requests for email insertions into different group archives. But the API does not support parallel message insertions into the same group archive. The API project's maximum QPS is 10, and the maximum number of migration requests per day is 500,000.
  • The API does not support data location policies requiring data to be stored in specific geographic or political boundaries for contractual reasons. Do not use the API if data location is required for your account.

Migrate an email message to Google Groups

To migrate an email message to a group's archive, use the following POST HTTP request. Include the Authorization header as described in Authorizing requests. The group email address is the requested destination of the migrated email message.

POST email address/archive?uploadType=media

JSON request

This example migrates email messages to the archive. The Content-Length is limited to 25MB which includes the message's meta data, body, and any attachments:

Content-Type: message/rfc822
Content-Length: number of bytes in the email
Authorization: Bearer Auth token

The email's meta data, body, and any attachments

This is an example email message in RFC 822 text format that was migrated into the archive of The is this example's Message-ID. The migrated email's sender is and the email is migrated to the archive of the group:

    Received: by with HTTP; Mon, 16 Jul 2007 10:12:26 -0700 (PDT)
    Message-ID: <>
    Date: Mon, 16 Jul 2007 10:12:26 -0700
    Subject: SUBJECT
    MIME-Version: 1.0
    Content-Type: text/plain; charset=ISO-8859-1; format=flowed
    Content-Transfer-Encoding: 7bit
    Content-Disposition: inline

    This is the body of the migrated email message.

JSON response

A successful response returns a 200 HTTP status code. Along with the status code, the response returns the migration status. For more information about responseCode values, see the API Reference.

 "kind": "groupsMigration#groups",
 "responseCode": "SUCCESS",

Viewing imported messages on the Google Groups interface

On Google Groups, threads' read/unread state is stored separately for each user. When inserting messages and threads using this API, they are treated as if they were sent by the user in the From: header. This means that they would appear as unread for all users, except for the user whose address is in the From: header. For example, after the JSON request above, the message titled "SUBJECT" would appear as read if logged in to Google Groups, but would appear as unread for all other users.