{"openapi":"3.0.0","info":{"description":"The Postmaster Tools API is a RESTful API that provides programmatic access to email traffic metrics (like spam reports, delivery errors etc) otherwise available through the Gmail Postmaster Tools UI currently.","version":[{"name":"v2","value":"v2"}]},"servers":[{"description":"The Postmaster Tools API is a RESTful API that provides programmatic access to email traffic metrics (like spam reports, delivery errors etc) otherwise available through the Gmail Postmaster Tools UI currently.","url":"https://api.apirails.com/googlegmailpostmastertools"}],"paths":{"/v2/domainStats/batchQuery":{"post":{"tags":["Email Security"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://developers.google.com/workspace/gmail/postmaster/reference/rest/v2/domainStats/batchQuery","api_endpoint":"https://gmailpostmastertools.googleapis.com/v2/domainStats:batchQuery"},"summary":"Executes a batch of QueryDomainStats requests for multiple domains.","description":"Executes a batch of QueryDomainStats requests for multiple domains.","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{}},"example":{}}}}}},"/v2/domains":{"get":{"tags":["Domains"],"parameters":[{"name":"pageSize","in":"query","description":"Optional. Requested page size. Server may return fewer domains than requested. If unspecified, the default value for this field is 10. The maximum value for this field is 200.","schema":{"type":"number","example":""}},{"name":"pageToken","in":"query","description":"Optional. The next_page_token value returned from a previous List request, if any.","schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://developers.google.com/workspace/gmail/postmaster/reference/rest/v2/domains/list","api_endpoint":"https://gmailpostmastertools.googleapis.com/v2/domains"},"summary":"Retrieves a list of all domains registered by you, along with their corresponding metadata.","description":"Retrieves a list of all domains registered by you, along with their corresponding metadata.","security":[{"bearerAuth":[]}]},"post":{"tags":["Domains"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://developers.google.com/workspace/gmail/postmaster/reference/rest/v2/domains/create","api_endpoint":"https://gmailpostmastertools.googleapis.com/v2/domains"},"summary":"[Developer Preview](https://developers.google.com/workspace/preview): Adds a domain to the user's account.","description":"[Developer Preview](https://developers.google.com/workspace/preview): Adds a domain to the user's account.","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{}},"example":{}}}}}},"/v2/domains/{domainsId}/verify":{"post":{"tags":["Domains"],"parameters":[{"name":"domainsId","in":"path","description":"Required. The domain to verify.","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://developers.google.com/workspace/gmail/postmaster/reference/rest/v2/domains/verify","api_endpoint":"https://gmailpostmastertools.googleapis.com/v2/domains/{domainsId}:verify"},"summary":"[Developer Preview](https://developers.google.com/workspace/preview): Verifies a user's ownership of a domain","description":"[Developer Preview](https://developers.google.com/workspace/preview): Verifies a user's ownership of a domain at the DNS level.","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{}},"example":{}}}}}},"/v2/domains/{domainsId}":{"get":{"tags":["Domains"],"parameters":[{"name":"domainsId","in":"path","description":"Required. The resource name of the domain. Format: `domains/{domain_name}`, where domain_name is the fully qualified domain name (i.e., mymail.mydomain.com).","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://developers.google.com/workspace/gmail/postmaster/reference/rest/v2/domains/get","api_endpoint":"https://gmailpostmastertools.googleapis.com/v2/domains/{domainsId}"},"summary":"Retrieves detailed information about a domain registered by you.","description":"Retrieves detailed information about a domain registered by you.","security":[{"bearerAuth":[]}]},"delete":{"tags":["Domains"],"parameters":[{"name":"domainsId","in":"path","description":"Required. The domain to delete.","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://developers.google.com/workspace/gmail/postmaster/reference/rest/v2/domains/delete","api_endpoint":"https://gmailpostmastertools.googleapis.com/v2/domains/{domainsId}"},"summary":"[Developer Preview](https://developers.google.com/workspace/preview): Deletes a domain from the user's account","description":"[Developer Preview](https://developers.google.com/workspace/preview): Deletes a domain from the user's account.","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{}},"example":{}}}}}},"/v2/domains/{domainsId}/complianceStatus":{"get":{"tags":["Domains"],"parameters":[{"name":"domainsId","in":"path","description":"Required. The resource name of the domain's compliance status to retrieve. Format: `domains/{domain_id}/complianceStatus`.","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://developers.google.com/workspace/gmail/postmaster/reference/rest/v2/domains/getComplianceStatus","api_endpoint":"https://gmailpostmastertools.googleapis.com/v2/domains/{domainsId}/complianceStatus"},"summary":"Retrieves the compliance status for a given domain.","description":"Retrieves the compliance status for a given domain.","security":[{"bearerAuth":[]}]}},"/v2/domains/{domainsId}/verificationToken":{"get":{"tags":["Domains"],"parameters":[{"name":"domainsId","in":"path","description":"Required. The resource name of the verification token to retrieve. Format: `domains/{domain}/verificationToken`","required":true,"schema":{"type":"string","example":""}},{"name":"verificationMethod","in":"query","description":"Required. The verification method used. Must be specified, i.e. TXT or CNAME.","schema":{"type":"string","example":"","items":{"type":"string","enum":["DOMAIN_VERIFICATION_METHOD_UNSPECIFIED","TXT","CNAME"]}}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://developers.google.com/workspace/gmail/postmaster/reference/rest/v2/domains/getVerificationToken","api_endpoint":"https://gmailpostmastertools.googleapis.com/v2/domains/{domainsId}/verificationToken"},"summary":"[Developer Preview](https://developers.google.com/workspace/preview): Gets a verification token used for verif","description":"[Developer Preview](https://developers.google.com/workspace/preview): Gets a verification token used for verifying a user's ownership over a domain.","security":[{"bearerAuth":[]}]}},"/v2/domains/{domainsId}/users/{usersId}":{"delete":{"tags":["Users"],"parameters":[{"name":"domainsId","in":"path","description":"Required. The resource name of the user to delete. Format: domains/{domain}/users/{user}","required":true,"schema":{"type":"string","example":""}},{"name":"usersId","in":"path","description":"Required. The resource name of the user to delete. Format: domains/{domain}/users/{user}","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://developers.google.com/workspace/gmail/postmaster/reference/rest/v2/domains.users/delete","api_endpoint":"https://gmailpostmastertools.googleapis.com/v2/domains/{domainsId}/users/{usersId}"},"summary":"[Developer Preview](https://developers.google.com/workspace/preview): Deletes a user from a domain.","description":"[Developer Preview](https://developers.google.com/workspace/preview): Deletes a user from a domain.","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{}},"example":{}}}}},"patch":{"tags":["Users"],"parameters":[{"name":"domainsId","in":"path","description":"Identifier. The resource name of the user. Format: users/{user} Note: {user} is the user's email address.","required":true,"schema":{"type":"string","example":""}},{"name":"usersId","in":"path","description":"Identifier. The resource name of the user. Format: users/{user} Note: {user} is the user's email address.","required":true,"schema":{"type":"string","example":""}},{"name":"updateMask","in":"query","description":"The list of fields to update.","schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://developers.google.com/workspace/gmail/postmaster/reference/rest/v2/domains.users/patch","api_endpoint":"https://gmailpostmastertools.googleapis.com/v2/domains/{domainsId}/users/{usersId}"},"summary":"[Developer Preview](https://developers.google.com/workspace/preview): Updates a user for a domain.","description":"[Developer Preview](https://developers.google.com/workspace/preview): Updates a user for a domain.","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{}},"example":{}}}}},"get":{"tags":["Users"],"parameters":[{"name":"domainsId","in":"path","description":"Required. The resource name of the user to retrieve. Format: `domains/{domain}/users/{user}`","required":true,"schema":{"type":"string","example":""}},{"name":"usersId","in":"path","description":"Required. The resource name of the user to retrieve. Format: `domains/{domain}/users/{user}`","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://developers.google.com/workspace/gmail/postmaster/reference/rest/v2/domains.users/get","api_endpoint":"https://gmailpostmastertools.googleapis.com/v2/domains/{domainsId}/users/{usersId}"},"summary":"[Developer Preview](https://developers.google.com/workspace/preview): Retrieves detailed information about a u","description":"[Developer Preview](https://developers.google.com/workspace/preview): Retrieves detailed information about a user that has access to a domain.","security":[{"bearerAuth":[]}]}},"/v2/domains/{domainsId}/users":{"post":{"tags":["Users"],"parameters":[{"name":"domainsId","in":"path","description":"Required. The parent resource where this user will be created. Format: domains/{domain}","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://developers.google.com/workspace/gmail/postmaster/reference/rest/v2/domains.users/create","api_endpoint":"https://gmailpostmastertools.googleapis.com/v2/domains/{domainsId}/users"},"summary":"[Developer Preview](https://developers.google.com/workspace/preview): Creates a user, who has access to a doma","description":"[Developer Preview](https://developers.google.com/workspace/preview): Creates a user, who has access to a domain.","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{}},"example":{}}}}},"get":{"tags":["Users"],"parameters":[{"name":"domainsId","in":"path","description":"Required. The parent resource name for which to list users. Format: `domains/{domain}`","required":true,"schema":{"type":"string","example":""}},{"name":"pageSize","in":"query","description":"Optional. Requested page size. Server may return fewer users than requested. If unspecified, the default value for this field is 10. The maximum value for this field is 200.","schema":{"type":"number","example":""}},{"name":"pageToken","in":"query","description":"Optional. The next_page_token value returned from a previous List request, if any.","schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://developers.google.com/workspace/gmail/postmaster/reference/rest/v2/domains.users/list","api_endpoint":"https://gmailpostmastertools.googleapis.com/v2/domains/{domainsId}/users"},"summary":"[Developer Preview](https://developers.google.com/workspace/preview): Lists the users that have access to a do","description":"[Developer Preview](https://developers.google.com/workspace/preview): Lists the users that have access to a domain.","security":[{"bearerAuth":[]}]}},"/v2/domains/{domainsId}/domainStats/query":{"post":{"tags":["Domainstats"],"parameters":[{"name":"domainsId","in":"path","description":"Required. The parent resource name where the stats are queried. Format: domains/{domain}","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://developers.google.com/workspace/gmail/postmaster/reference/rest/v2/domains.domainStats/query","api_endpoint":"https://gmailpostmastertools.googleapis.com/v2/domains/{domainsId}/domainStats:query"},"summary":"Retrieves a list of domain statistics for a given domain and time period.","description":"Retrieves a list of domain statistics for a given domain and time period.","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{}},"example":{}}}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}}},"security":[{"bearerAuth":[]}]}