Every API here is available over the APIs.io API and to AI agents over MCP.
MCP server
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
Tools for apis
7 MCP tools reach this
find_apisBrowse and filter every API in the catalog.
get_api_artifactsOne API's artifacts, grouped by type.
get_openapiThe primary OpenAPI for this API.
find_similar_apisAPIs that look like this one.
apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
resolveTurn a domain, URL or GitHub org into the provider it belongs to.
find_cohortsEvery scored population of providers in the catalog.
All 92 tools →
Call it yourself
curl for this page
This API
curl "https://apis.io/api/v1/apis/sendgrid-mail-settings-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
Get an API key
Free tier, no email required.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Twilio SendGrid Provisioning Account Mail Settings API
summary: The Twilio SendGrid Account Provisioning API provides a platform for Twilio SendGrid resellers to manage their customer accounts.
description: 'The Twilio SendGrid Account Provisioning API provides a platform for Twilio SendGrid resellers to manage their customer accounts. This API is for companies that have a formal reseller partnership with Twilio SendGrid.
You can access Twilio SendGrid sub-account functionality without becoming a reseller. If you require sub-account functionality, see the Twilio [SendGrid Subusers](https://docs.sendgrid.com/ui/account-and-settings/subusers) feature, which is available with [Pro and Premier plans](https://sendgrid.com/pricing/).'
termsOfService: https://www.twilio.com/legal/tos
contact:
name: Twilio SendGrid Support
url: https://support.sendgrid.com/hc/en-us
license:
name: MIT
url: https://code.hq.twilio.com/twilio/sendgrid-oas/blob/main/LICENSE
version: 1.0.0
x-sendgrid:
libraryPackage: account_provisioning
servers:
- url: https://api.sendgrid.com
description: for global users and subusers
- url: https://api.eu.sendgrid.com
description: for EU regional subusers
security:
- BearerAuth: []
tags:
- name: Mail Settings
description: Twilio SendGrid Mail Settings API
paths:
/v3/mail_settings:
get:
operationId: ListMailSetting
summary: Retrieve all mail settings
tags:
- Mail Settings
description: '**This endpoint allows you to retrieve a paginated list of all mail settings.**
Each setting will be returned with an `enabled` status set to `true` or `false` and a short description that explains what the setting does.
You can use the `limit` query parameter to set the page size. If your list contains more items than the page size permits, you can make multiple requests. Use the `offset` query parameter to control the position in the list from which to start retrieving additional items.'
parameters:
- name: limit
in: query
description: '`limit` sets the page size, i.e. maximum number of items from the list to be returned for a single API request. If omitted, the default page size is used.'
schema:
type: integer
- $ref: '#/components/parameters/PaginationCommonOffset'
- $ref: '#/components/parameters/OnBehalfOf'
responses:
'200':
description: ''
content:
application/json:
schema:
type: object
properties:
result:
type: array
description: The list of all mail settings.
items:
type: object
properties:
title:
type: string
description: The title of the mail setting.
enabled:
type: boolean
description: Indicates if this mail setting is currently enabled.
name:
type: string
description: The name of the mail setting.
description:
type: string
description: A description of the mail setting.
required:
- title
- enabled
- name
- description
required:
- result
examples:
response:
value:
result:
- title: Address Whitelist
enabled: false
name: address_whitelist
description: Address / domains that should never have email suppressed.
- title: Bounce Purge
enabled: false
name: bounce_purge
description: Allows you to automatically purge bounce records from SendGrid after a specified number of days.
- title: Event Notification
enabled: true
name: event_notify
description: Controls notifications for events, such as bounces, clicks, and opens.
- title: Footer
enabled: false
name: footer
description: Allows you to add a custom footer to outgoing email.
- title: Forward Bounce
enabled: true
name: forward_bounce
description: Allows you to forward bounces to a specific email address.
- title: Forward Spam
enabled: false
name: forward_spam
description: Allows for a copy of spam reports to be forwarded to an email address.
- title: Legacy Email Template
enabled: true
name: template
description: Allows you to customize your outgoing HTML emails.
- title: Plain Content
enabled: false
name: plain_content
description: Convert your plain text emails to HTML.
- title: Spam Checker
enabled: true
name: spam_check
description: Check outbound messages for spam content.
'400':
$ref: '#/components/responses/MailSettingsError400'
'401':
$ref: '#/components/responses/MailSettingsError401'
'403':
$ref: '#/components/responses/MailSettingsError403'
'404':
$ref: '#/components/responses/MailSettingsError404'
'500':
$ref: '#/components/responses/MailSettingsError500'
/v3/mail_settings/address_whitelist:
patch:
operationId: UpdateAddressWhitelist
summary: Update address whitelist mail settings
tags:
- Mail Settings
description: '**This endpoint allows you to update your current email address whitelist settings.**
You can select whether or not this setting should be enabled by assigning the `enabled` field a `true` or `false` value.
Passing only the `enabled` field to this endpoint will not alter your current `list` of whitelist entries. However, any modifications to your `list` of entries will overwrite the entire list. For this reason, you must included all existing entries you wish to retain in your `list` in addition to any new entries you intend to add. To remove one or more `list` entries, pass a `list` with only the entries you wish to retain.
You should not add generic domains such as `gmail.com` or `yahoo.com` in your `list` because your emails will not honor recipients'' unsubscribes. This may cause a legal violation of [CAN-SPAM](https://sendgrid.com/docs/glossary/can-spam/) and could damage your sending reputation.
The Address Whitelist setting allows you to specify email addresses or domains for which mail should never be suppressed.
For example, if you own the domain `example.com`, and one or more of your recipients use `email@example.com` addresses, placing `example.com` in the address whitelist setting instructs Twilio SendGrid to ignore all bounces, blocks, and unsubscribes logged for that domain. In other words, all bounces, blocks, and unsubscribes will still be sent to `example.com` as if they were sent under normal sending conditions.'
parameters:
- $ref: '#/components/parameters/OnBehalfOf'
requestBody:
content:
application/json:
schema:
type: object
properties:
enabled:
type: boolean
description: Indicates if your email address whitelist is enabled.
list:
type: array
description: Either a single email address that you want whitelisted or a domain, for which all email addresses belonging to this domain will be whitelisted.
items:
type: string
example:
enabled: true
list:
- email1@example.com
- example.com
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/MailSettingsAddressWhitelabel200'
examples:
response:
value:
enabled: true
list:
- email1@example.com
'400':
$ref: '#/components/responses/MailSettingsError400'
'401':
$ref: '#/components/responses/MailSettingsError401'
'403':
$ref: '#/components/responses/MailSettingsError403'
'404':
$ref: '#/components/responses/MailSettingsError404'
'500':
$ref: '#/components/responses/MailSettingsError500'
get:
operationId: ListAddressWhitelist
summary: Retrieve address whitelist mail settings
tags:
- Mail Settings
description: '**This endpoint allows you to retrieve your current email address whitelist settings.**
The Address Whitelist setting allows you to specify email addresses or domains for which mail should never be suppressed.
For example, if you own the domain `example.com`, and one or more of your recipients use `email@example.com` addresses, placing `example.com` in the address whitelist setting instructs Twilio SendGrid to ignore all bounces, blocks, and unsubscribes logged for that domain. In other words, all bounces, blocks, and unsubscribes will still be sent to `example.com` as if they were sent under normal sending conditions.'
parameters:
- $ref: '#/components/parameters/OnBehalfOf'
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/MailSettingsAddressWhitelabel200'
examples:
response:
value:
enabled: true
list:
- example.com
- jane_doe@example1.com
'400':
$ref: '#/components/responses/MailSettingsError400'
'401':
$ref: '#/components/responses/MailSettingsError401'
'403':
$ref: '#/components/responses/MailSettingsError403'
'404':
$ref: '#/components/responses/MailSettingsError404'
'500':
$ref: '#/components/responses/MailSettingsError500'
/v3/mail_settings/bounce_purge:
patch:
operationId: UpdateBouncePurge
summary: Update Bounce Purge Mail Settings
tags:
- Mail Settings
description: '**This endpoint allows you to update your current Bounce Purge mail settings.**
The Bounce Purge mail metting allows you to configure the maximum age of contacts in your hard and soft bounce suppressions lists. All contacts older than their respective configured age are deleted.
A hard bounce occurs when an email message has been returned to the sender because the recipient''s address is invalid. A hard bounce might occur because the domain name doesn''t exist or because the recipient is unknown.
A soft bounce occurs when an email message reaches the recipient''s mail server but is bounced back undelivered before it actually reaches the recipient. A soft bounce might occur because the recipient''s inbox is full.
You can also manage this setting in the [Mail Settings section of the Twilio SendGrid App](https://app.sendgrid.com/settings/mail_settings). You can manage your bounces manually using the [Bounces API](https://docs.sendgrid.com/api-reference/bounces-api) or the [Bounces menu in the Twilio SendGrid App](https://app.sendgrid.com/suppressions/bounces).'
parameters:
- $ref: '#/components/parameters/OnBehalfOf'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/MailSettingsBouncePurge'
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/MailSettingsBouncePurge'
examples:
response:
value:
enabled: false
hard_bounces: 5
soft_bounces: 5
'400':
$ref: '#/components/responses/MailSettingsError400'
'401':
$ref: '#/components/responses/MailSettingsError401'
'403':
$ref: '#/components/responses/MailSettingsError403'
'404':
$ref: '#/components/responses/MailSettingsError404'
'500':
$ref: '#/components/responses/MailSettingsError500'
get:
operationId: ListBouncePurge
summary: Retrieve Bounce Purge Mail Settings
tags:
- Mail Settings
description: '**This endpoint allows you to retrieve your current Bounce Purge mail settings.**
The Bounce Purge mail setting allows you to configure the maximum age of contacts in your hard and soft bounce suppressions lists. All contacts older than their respective configured age are deleted.
A hard bounce occurs when an email message has been returned to the sender because the recipient''s address is invalid. A hard bounce might occur because the domain name doesn''t exist or because the recipient is unknown.
A soft bounce occurs when an email message reaches the recipient''s mail server but is bounced back undelivered before it actually reaches the recipient. A soft bounce might occur because the recipient''s inbox is full.
You can also manage this setting in the [Mail Settings section of the Twilio SendGrid App](https://app.sendgrid.com/settings/mail_settings). You can manage your bounces manually using the [Bounces API](https://docs.sendgrid.com/api-reference/bounces-api) or the [Bounces menu in the Twilio SendGrid App](https://app.sendgrid.com/suppressions/bounces).'
parameters:
- $ref: '#/components/parameters/OnBehalfOf'
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/MailSettingsBouncePurge'
examples:
response:
value:
enabled: false
soft_bounces: 5
hard_bounces: 5
'400':
$ref: '#/components/responses/MailSettingsError400'
'401':
$ref: '#/components/responses/MailSettingsError401'
'403':
$ref: '#/components/responses/MailSettingsError403'
'404':
$ref: '#/components/responses/MailSettingsError404'
'500':
$ref: '#/components/responses/MailSettingsError500'
/v3/mail_settings/footer:
patch:
operationId: UpdateFooter
summary: Update footer mail settings
tags:
- Mail Settings
description: '**This endpoint allows you to update your current Footer mail settings.**
The Footer setting will insert a custom footer at the bottom of your text and HTML email message bodies.
You can insert your HTML or plain text directly using this endpoint, or you can create the footer using the [Mail Settings menu in the Twilio SendGrid App](https://app.sendgrid.com/settings/mail_settings).'
parameters:
- $ref: '#/components/parameters/OnBehalfOf'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/MailSettingsFooter'
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/MailSettingsFooter'
examples:
response:
value:
enabled: true
html_content: '<p><a href="http://example.com" target="_blank">Ahoy, World!</a></p>
'
plain_content: ''
'400':
$ref: '#/components/responses/MailSettingsError400'
'401':
$ref: '#/components/responses/MailSettingsError401'
'403':
$ref: '#/components/responses/MailSettingsError403'
'404':
$ref: '#/components/responses/MailSettingsError404'
'500':
$ref: '#/components/responses/MailSettingsError500'
get:
operationId: ListFooter
summary: Retrieve footer mail settings
tags:
- Mail Settings
description: '**This endpoint allows you to retrieve your current Footer mail settings.**
The Footer setting will insert a custom footer at the bottom of your text and HTML email message bodies.
You can insert your HTML or plain text directly using the "Update footer mail settings" endpoint, or you can create the footer using the [Mail Settings menu in the Twilio SendGrid App](https://app.sendgrid.com/settings/mail_settings).'
parameters:
- $ref: '#/components/parameters/OnBehalfOf'
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/MailSettingsFooter'
examples:
response:
value:
enabled: true
html_content: '<p><a href="http://example.com" target="_blank">Ahoy, World!</a></p>
'
plain_content: ''
'400':
$ref: '#/components/responses/MailSettingsError400'
'401':
$ref: '#/components/responses/MailSettingsError401'
'403':
$ref: '#/components/responses/MailSettingsError403'
'404':
$ref: '#/components/responses/MailSettingsError404'
'500':
$ref: '#/components/responses/MailSettingsError500'
/v3/mail_settings/forward_bounce:
patch:
operationId: UpdateForwardBounce
summary: Update forward bounce mail settings
tags:
- Mail Settings
description: '**This endpoint allows you to update your current bounce forwarding mail settings.**
Enabling the Forward Bounce setting allows you to specify an `email` address to which bounce reports will be forwarded.
You can also configure the Forward Spam mail settings in the [Mail Settings section of the Twilio SendGrid App](https://app.sendgrid.com/settings/mail_settings).'
parameters:
- $ref: '#/components/parameters/OnBehalfOf'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/MailSettingsForwardBounce'
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/MailSettingsForwardBounce'
examples:
response:
value:
email: bounces@example.com
enabled: true
'400':
$ref: '#/components/responses/MailSettingsError400'
'401':
$ref: '#/components/responses/MailSettingsError401'
'403':
$ref: '#/components/responses/MailSettingsError403'
'404':
$ref: '#/components/responses/MailSettingsError404'
'500':
$ref: '#/components/responses/MailSettingsError500'
get:
operationId: ListForwardBounce
summary: Retrieve forward bounce mail settings
tags:
- Mail Settings
description: '**This endpoint allows you to retrieve your current bounce forwarding mail settings.**
Enabling the Forward Bounce setting allows you to specify `email` addresses to which bounce reports will be forwarded. This endpoint returns the email address you have set to receive forwarded bounces and an `enabled` status indicating if the setting is active.'
parameters:
- $ref: '#/components/parameters/OnBehalfOf'
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/MailSettingsForwardBounce'
examples:
response:
value:
enabled: true
email: bounces@example.com
'400':
$ref: '#/components/responses/MailSettingsError400'
'401':
$ref: '#/components/responses/MailSettingsError401'
'403':
$ref: '#/components/responses/MailSettingsError403'
'404':
$ref: '#/components/responses/MailSettingsError404'
'500':
$ref: '#/components/responses/MailSettingsError500'
/v3/mail_settings/forward_spam:
patch:
operationId: UpdateForwardSpam
summary: Update forward spam mail settings
tags:
- Mail Settings
description: "**This endpoint allows you to update your current Forward Spam mail settings.**\n\nEnabling the Forward Spam setting allows you to specify `email` addresses to which spam reports will be forwarded. You can set multiple addresses by passing this endpoint a comma separated list of emails in a single string.\n\n```\n{\n \"email\": \"address1@example.com, address2@exapmle.com\",\n \"enabled\": true\n}\n```\n\nThe Forward Spam setting may also be used to receive emails sent to `abuse@` and `postmaster@` role addresses if you have authenticated your domain.\n\nFor example, if you authenticated `example.com` as your root domain and set a custom return path of `sub` for that domain, you could turn on Forward Spam, and any emails sent to `abuse@sub.example.com` or `postmaster@sub.example.com` would be forwarded to the email address you entered in the `email` field.\n\nYou can authenticate your domain using the \"Authenticate a domain\" endpoint or in the [Sender Authentication section of the Twilio SendGrid App](https://app.sendgrid.com/settings/sender_auth). You can also configure the Forward Spam mail settings in the [Mail Settings section of the Twilio SendGrid App](https://app.sendgrid.com/settings/mail_settings)."
parameters:
- $ref: '#/components/parameters/OnBehalfOf'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/MailSettingsForwardSpam'
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/MailSettingsForwardSpam'
examples:
response:
value:
email: abuse@example.com
enabled: true
'400':
$ref: '#/components/responses/MailSettingsError400'
'401':
$ref: '#/components/responses/MailSettingsError401'
'403':
$ref: '#/components/responses/MailSettingsError403'
'404':
$ref: '#/components/responses/MailSettingsError404'
'500':
$ref: '#/components/responses/MailSettingsError500'
get:
operationId: ListForwardSpam
summary: Retrieve forward spam mail settings
tags:
- Mail Settings
description: '**This endpoint allows you to retrieve your current Forward Spam mail settings.**
Enabling the Forward Spam setting allows you to specify `email` addresses to which spam reports will be forwarded. This endpoint returns any email address(es) you have set to receive forwarded spam and an `enabled` status indicating if the setting is active.'
parameters:
- $ref: '#/components/parameters/OnBehalfOf'
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/MailSettingsForwardSpam'
examples:
response:
value:
email: abuse@example.com
enabled: true
'400':
$ref: '#/components/responses/MailSettingsError400'
'401':
$ref: '#/components/responses/MailSettingsError401'
'403':
$ref: '#/components/responses/MailSettingsError403'
'404':
$ref: '#/components/responses/MailSettingsError404'
'500':
$ref: '#/components/responses/MailSettingsError500'
/v3/mail_settings/template:
patch:
operationId: UpdateTemplate
summary: Update template mail settings
tags:
- Mail Settings
description: '**This endpoint allows you to update your current legacy email template settings.**
This setting refers to our original email templates. We currently support more fully featured [Dynamic Transactional Templates](https://sendgrid.com/docs/ui/sending-email/how-to-send-an-email-with-dynamic-transactional-templates/).
The legacy email template setting wraps an HTML template around your email content. This can be useful for sending out marketing email and/or other HTML formatted messages. For instructions on using legacy templates, see how to ["Create and Edit Legacy Transactional Templates](https://sendgrid.com/docs/ui/sending-email/create-and-edit-legacy-transactional-templates/). For help migrating to our current template system, see ["Migrating from Legacy Templates"](https://sendgrid.com/docs/ui/sending-email/migrating-from-legacy-templates/).'
parameters:
- $ref: '#/components/parameters/OnBehalfOf'
requestBody:
content:
application/json:
schema:
type: object
properties:
enabled:
type: boolean
description: Indicates if you want to enable the legacy email template mail setting.
html_content:
type: string
description: The new HTML content for your legacy email template.
example:
enabled: true
html_content: <% body %>
responses:
'200':
description: ''
content:
application/json:
schema:
type: object
properties:
enabled:
type: boolean
description: Indicates if the legacy email template mail setting is enabled.
html_content:
type: string
description: The HTML content of your legacy email template.
required:
- enabled
- html_content
examples:
response:
value:
enabled: false
html_content: '<p><% body %>Example</p>
'
'400':
$ref: '#/components/responses/MailSettingsError400'
'401':
$ref: '#/components/responses/MailSettingsError401'
'403':
$ref: '#/components/responses/MailSettingsError403'
'404':
$ref: '#/components/responses/MailSettingsError404'
'500':
$ref: '#/components/responses/MailSettingsError500'
get:
operationId: ListTemplate
summary: Retrieve legacy template mail settings
tags:
- Mail Settings
description: '**This endpoint allows you to retrieve your current legacy email template settings.**
This setting refers to our original email templates. We currently support more fully featured [Dynamic Transactional Templates](https://sendgrid.com/docs/ui/sending-email/how-to-send-an-email-with-dynamic-transactional-templates/).
The legacy email template setting wraps an HTML template around your email content. This can be useful for sending out marketing email and/or other HTML formatted messages. For instructions on using legacy templates, see how to ["Create and Edit Legacy Transactional Templates](https://sendgrid.com/docs/ui/sending-email/create-and-edit-legacy-transactional-templates/). For help migrating to our current template system, see ["Migrating from Legacy Templates"](https://sendgrid.com/docs/ui/sending-email/migrating-from-legacy-templates/).'
parameters:
- $ref: '#/components/parameters/OnBehalfOf'
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/MailSettingsTemplate200'
examples:
response:
value:
enabled: false
html_content: '<p><% body %>Example</p>
'
'400':
$ref: '#/components/responses/MailSettingsError400'
'401':
$ref: '#/components/responses/MailSettingsError401'
'403':
$ref: '#/components/responses/MailSettingsError403'
'404':
$ref: '#/components/responses/MailSettingsError404'
'500':
$ref: '#/components/responses/MailSettingsError500'
components:
parameters:
OnBehalfOf:
name: on-behalf-of
in: header
description: 'The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent''s Subusers or customer accounts. You will use the parent account''s API key when using this header. When making a call on behalf of a customer account, the property value should be "account-id" followed by the customer account''s ID (e.g., `on-behalf-of: account-id <account-id>`). When making a call on behalf of a Subuser, the property value should be the Subuser''s username (e.g., `on-behalf-of: <subuser-username>`). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information.'
required: false
schema:
type: string
PaginationCommonOffset:
name: offset
in: query
required: false
description: The number of items in the list to skip over before starting to retrieve the items for the requested page. The default `offset` of `0` represents the beginning of the list, i.e. the start of the first page. To request the second page of the list, set the `offset` to the page size as determined by `limit`. Use multiples of the page size as your `offset` to request further consecutive pages. E.g. assume your page size is set to `10`. An `offset` of `10` requests the second page, an `offset` of `20` requests the third page and so on, provided there are sufficiently many items in your list.
schema:
type: integer
minimum: 0
default: 0
schemas:
MailSettingsForwardSpam:
title: 'Mail Settings: Forward Spam'
type: object
properties:
email:
type: string
description: The email address where you would like the spam reports to be forwarded.
enabled:
type: boolean
description: Indicates if the Forward Spam setting is enabled.
example:
email: ''
enabled: true
MailSettingsFooter:
title: 'Mail Settings: Footer'
type: object
properties:
enabled:
type: boolean
description: Indicates if the Footer mail setting is currently enabled.
html_content:
type: string
description: The custom HTML content of your email footer.
plain_content:
type: string
description: The plain text content of your email footer.
example:
enabled: true
html_content: Example HTML content
plain_content: Example plain content
MailSettingsTemplate200:
title: 'Mail Settings: Template'
type: object
properties:
enabled:
type: boolean
description: Indicates if the legacy email template setting is enabled.
html_content:
type: string
description: The HTML content that you want to use for your legacy email template.
example:
enabled: false
html_content:
# --- truncated at 32 KB (38 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/sendgrid/refs/heads/main/openapi/sendgrid-mail-settings-api-openapi.yml