Postmaster Tools API overview
Stay organized with collections
Save and categorize content based on your preferences.
The Postmaster Tools API allows you to gather metrics on bulk emails sent to
Gmail users and import data into, or merge that data with, other systems.
Metrics include the percentage of your email marked as spam by the user and
delivery errors. For a full explanation of the metrics provided by the
Postmaster Tools API, refer to Dashboards section of the
Postmaster Tools help center article.
High-level implementation steps
Follow these high-level steps to use this API:
- Set up an authentication domain, either the DKIM (d=) or SPF domain (Return-Path domain) that is used to authenticate your email.
- Set up the API:
- Create a project.
- Turn on the Postmaster Tools API.
- Set up credentials for the API.
- Create an OAuth2 token.
- Use the OAuth2 token and credentials to make API calls including verifying domains and retrieving metrics.
Next steps
To set up the authentication domain, proceed to
Set up authentication domain.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-28 UTC.
[null,null,["Last updated 2025-08-28 UTC."],[],[],null,["# Postmaster Tools API overview\n\nThe Postmaster Tools API allows you to gather metrics on bulk emails sent to\nGmail users and import data into, or merge that data with, other systems.\nMetrics include the percentage of your email marked as spam by the user and\ndelivery errors. For a full explanation of the metrics provided by the\nPostmaster Tools API, refer to Dashboards section of the\n[Postmaster Tools help center article](https://support.google.com/mail/answer/6227174).\n\nHigh-level implementation steps\n-------------------------------\n\nFollow these high-level steps to use this API:\n\n1. Set up an authentication domain, either the DKIM (d=) or SPF domain (Return-Path domain) that is used to authenticate your email.\n2. Set up the API:\n 1. Create a project.\n 2. Turn on the Postmaster Tools API.\n 3. Set up credentials for the API.\n 4. Create an OAuth2 token.\n3. Use the OAuth2 token and credentials to make API calls including verifying domains and retrieving metrics.\n\nNext steps\n----------\n\nTo set up the authentication domain, proceed to\n[Set up authentication domain](/workspace/gmail/postmaster/guides/domain)."]]