Query structured spec data via REST or MCP. Get exactly what your agent needs.
http://api.sendgrid.com/v3
/scopes
This endpoint returns a list of all scopes that this user has access to.
API Keys are used to authenticate with SendGrid’s v3 API.
API Keys may be assigned certain permissions, or scopes, that limit which API endpoints they are able to access.
This endpoint returns all the scopes assigned to the key you use to authenticate with it. To retrieve the scopes assigned to another key, you can pass an API key ID to the “Retrieve an existing API key” endpoint.
For a more detailed explanation of how you can use API Key permissions, please visit our API Keys documentation.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| on-behalf-of | header | optional | string | — |
GET /scopes
/api_keys
This endpoint allows you to retrieve all API Keys that belong to the authenticated user.
A successful response from this API will include all available API keys’ names and IDs.
For security reasons, there is not a way to retrieve the key itself after it’s created. If you lose your API key, you must create a new one. Only the “Create API keys” endpoint will return a key to you and only at the time of creation.
An api_key_id can be used to update or delete the key, as well as retrieve the key’s details, such as its scopes.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| limit | query | optional | integer | — |
| on-behalf-of | header | optional | string | — |
GET /api_keys
/api_keys/{api_key_id}
This endpoint allows you to retrieve a single API key using an api_key_id.
The endpoint will return a key’s name, ID, and scopes. If the API Key ID does not, exist a 404 status will be returned.
See the API Key Permissions List for all available scopes. An API key’s scopes can be updated after creation using the “Update API keys” endpoint.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| api_key_id | path | required | string | — |
| on-behalf-of | header | optional | string | — |
GET /api_keys/{api_key_id}
/alerts
This endpoint allows you to retrieve all of your alerts.
Alerts allow you to specify an email address to receive notifications regarding your email usage or statistics.
For more information about alerts, please see our Alerts documentation.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| on-behalf-of | header | optional | string | — |
GET /alerts
/alerts/{alert_id}
This endpoint allows you to retrieve a specific alert.
Alerts allow you to specify an email address to receive notifications regarding your email usage or statistics.
For more information about alerts, please see our Alerts documentation.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| alert_id | path | required | integer | The ID of the alert you would like to retrieve. |
| on-behalf-of | header | optional | string | — |
GET /alerts/{alert_id}
/suppression/blocks
This endpoint allows you to retrieve all email addresses that are currently on your blocks list.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| start_time | query | optional | integer | The start of the time range when a blocked email was created (inclusive). This is a unix timestamp. |
| end_time | query | optional | integer | The end of the time range when a blocked email was created (inclusive). This is a unix timestamp. |
| limit | query | optional | integer | Limit the number of results to be displayed per page. |
| offset | query | optional | integer | The point in the list to begin displaying results. |
| on-behalf-of | header | optional | string | — |
GET /suppression/blocks
/suppression/blocks/{email}
This endpoint allows you to retrieve a specific email address from your blocks list.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| path | required | string | The email address of the specific block. |
|
| on-behalf-of | header | optional | string | — |
GET /suppression/blocks/{email}
/suppression/bounces
This endpoint allows you to retrieve all of your bounces.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| start_time | query | optional | integer | Refers start of the time range in unix timestamp when a bounce was created (inclusive). |
| end_time | query | optional | integer | Refers end of the time range in unix timestamp when a bounce was created (inclusive). |
| on-behalf-of | header | optional | string | — |
GET /suppression/bounces
/suppression/bounces/{email}
This endpoint allows you to retrieve a specific bounce by email address.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| path | required | string | — | |
| on-behalf-of | header | optional | string | — |
GET /suppression/bounces/{email}
/messages/download/{download_uuid}
This endpoint will return a presigned URL that can be used to download the CSV that was requested from the “Request a CSV” endpoint.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| download_uuid | path | required | string | UUID used to locate the download csv request entry in the DB. This is the UUID provided in the email sent to the user when their csv file is ready to download |
GET /messages/download/{download_uuid}
/campaigns
This endpoint allows you to retrieve a list of all of your campaigns.
Returns campaigns in reverse order they were created (newest first).
Returns an empty array if no campaigns exist.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| limit | query | optional | integer | The number of results you would like to receive at a time. |
| offset | query | optional | integer | The index of the first campaign to return, where 0 is the first campaign. |
| on-behalf-of | header | optional | string | — |
GET /campaigns
/campaigns/{campaign_id}
This endpoint allows you to retrieve a specific campaign.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| campaign_id | path | required | integer | The id of the campaign you would like to retrieve. |
| on-behalf-of | header | optional | string | — |
””: “not found”
GET /campaigns/{campaign_id}
/campaigns/{campaign_id}/schedules
This endpoint allows you to retrieve the date and time that a campaign has been scheduled to be sent.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| campaign_id | path | required | integer | — |
| on-behalf-of | header | optional | string | — |
””: “not found”
GET /campaigns/{campaign_id}/schedules
/mail/batch/{batch_id}
This endpoint allows you to validate a batch ID.
When you pass a valid batch_id to this endpoint, it will return a 200 status code and the batch ID itself.
If you pass an invalid batch_id to the endpoint, you will receive a 400 level status code and an error message.
A batch_id does not need to be assigned to a scheduled send to be considered valid. A successful response means only that the batch_id has been created, but it does not indicate that it has been associated with a send.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| batch_id | path | required | string | — |
| on-behalf-of | header | optional | string | — |
GET /mail/batch/{batch_id}
/user/scheduled_sends
This endpoint allows you to retrieve all cancelled and paused scheduled send information.
This endpoint will return only the scheduled sends that are associated with a batch_id. If you have scheduled a send using the /mail/send endpoint and the send_at field but no batch_id, the send will be scheduled for delivery; however, it will not be returned by this endpoint. For this reason, you should assign a batch_id to any scheduled send you may need to pause or cancel in the future.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| on-behalf-of | header | optional | string | — |
GET /user/scheduled_sends
/user/scheduled_sends/{batch_id}
This endpoint allows you to retrieve the cancel/paused scheduled send information for a specific batch_id.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| batch_id | path | required | string | — |
| on-behalf-of | header | optional | string | — |
GET /user/scheduled_sends/{batch_id}
/categories
This endpoint allows you to retrieve a list of all of your categories.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| limit | query | optional | integer | The number of categories to display per page. |
| category | query | optional | string | Allows you to perform a prefix search on this particular category. |
| offset | query | optional | integer | The point in the list that you would like to begin displaying results. |
| on-behalf-of | header | optional | string | — |
GET /categories
/categories/stats
This endpoint allows you to retrieve all of your email statistics for each of your categories.
If you do not define any query parameters, this endpoint will return a sum for each category in groups of 10.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| start_date | query | required | string | The starting date of the statistics to retrieve. Must follow format YYYY-MM-DD |
| end_date | query | optional | string | The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD. |
| categories | query | required | string | The individual categories that you want to retrieve statistics for. You may include up to 10 different categories. |
| limit | query | optional | integer | The number of results to include. |
| offset | query | optional | integer | The number of results to skip. |
| aggregated_by | query | optional | string | How to group the statistics. Must be either “day”, “week”, or “month”. |
| on-behalf-of | header | optional | string | — |
GET /categories/stats
/categories/stats/sums
This endpoint allows you to retrieve the total sum of each email statistic for every category over the given date range.
If you do not define any query parameters, this endpoint will return a sum for each category in groups of 10.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| sort_by_metric | query | optional | string | The metric that you want to sort by. Must be a single metric. |
| sort_by_direction | query | optional | string | The direction you want to sort. |
| start_date | query | required | string | The starting date of the statistics to retrieve. Must follow format YYYY-MM-DD. |
| end_date | query | optional | string | The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD. |
| limit | query | optional | integer | Limits the number of results returned. |
| offset | query | optional | integer | The point in the list to begin retrieving results. |
| aggregated_by | query | optional | string | How to group the statistics. Must be either “day”, “week”, or “month”. |
| on-behalf-of | header | optional | string | — |
GET /categories/stats/sums
/sso/certificates/{cert_id}
This endpoint allows you to retrieve an individual SSO certificate.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| cert_id | path | required | string | — |
GET /sso/certificates/{cert_id}
/sso/integrations/{integration_id}/certificates
This endpoint allows you to retrieve all your IdP configurations by configuration ID.
The integration_id expected by this endpoint is the id returned in the response by the “Get All SSO Integrations” endpoint.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| integration_id | path | required | string | An ID that matches a certificate to a specific IdP integration. |
GET /sso/integrations/{integration_id}/certificates
/marketing/contacts
This endpoint will return up to 50 of the most recent contacts uploaded or attached to a list.
This list will then be sorted by email address.
The full contact count is also returned.
Please note that pagination of the contacts has been deprecated.
Twilio SendGrid recommends exporting your contacts regularly as a backup to avoid issues or lost data.
GET /marketing/contacts
/marketing/contacts/count
This endpoint returns the total number of contacts you have stored.
Twilio SendGrid recommends exporting your contacts regularly as a backup to avoid issues or lost data.
GET /marketing/contacts/count
/marketing/contacts/exports
Use this endpoint to retrieve details of all current exported jobs.
It will return an array of objects, each of which records an export job in flight or recently completed.
Each object’s export_type field will tell you which kind of export it is and its status field will indicate what stage of processing it has reached. Exports which are ready will be accompanied by a urls field which lists the URLs of the export’s downloadable files — there will be more than one if you specified a maximum file size in your initial export request.
Use this endpoint if you have exports in flight but do not know their IDs, which are required for the “Export Contacts Status” endpoint.
Twilio SendGrid recommends exporting your contacts regularly as a backup to avoid issues or lost data.
GET /marketing/contacts/exports
/marketing/contacts/exports/{id}
This endpoint can be used to check the status of a contact export job.
To use this call, you will need the id from the “Export Contacts” call.
If you would like to download a list, take the id that is returned from the “Export Contacts” endpoint and make an API request here to get the urls. Once you have the list of URLs, make a GET request on each URL to download your CSV file(s).
Twilio SendGrid recommends exporting your contacts regularly as a backup to avoid issues or lost data.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| id | path | required | string | — |
GET /marketing/contacts/exports/{id}
/marketing/contacts/imports/{id}
This endpoint can be used to check the status of a contact import job.
Use the job_id from the “Import Contacts,” “Add or Update a Contact,” or “Delete Contacts” endpoints as the id in the path parameter.
If there is an error with your PUT request, download the errors_url file and open it to view more details.
The job status field indicates whether the job is pending, completed, errored, or failed.
Pending means not started. Completed means finished without any errors. Errored means finished with some errors. Failed means finshed with all errors, or the job was entirely unprocessable: for example, if you attempt to import file format we do not support.
The results object will have fields depending on the job type.
Twilio SendGrid recommends exporting your contacts regularly as a backup to avoid issues or lost data.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| id | path | required | string | — |
GET /marketing/contacts/imports/{id}
/marketing/contacts/{id}
This endpoint returns the full details and all fields for the specified contact.
The “Get Contacts by Emails” endpoint can be used to get the ID of a contact.
Twilio SendGrid recommends exporting your contacts regularly as a backup to avoid issues or lost data.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| id | path | required | string | — |
GET /marketing/contacts/{id}
/contactdb/custom_fields
This endpoint allows you to retrieve all custom fields.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| on-behalf-of | header | optional | string | — |
GET /contactdb/custom_fields
/contactdb/custom_fields/{custom_field_id}
This endpoint allows you to retrieve a custom field by ID.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| custom_field_id | path | required | integer | The ID of the custom field that you want to retrieve. |
| on-behalf-of | header | optional | string | — |
“custom_field_id” : “Returned if custom_field_id does not exist”
GET /contactdb/custom_fields/{custom_field_id}
/contactdb/reserved_fields
This endpoint allows you to list all fields that are reserved and can’t be used for custom field names.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| on-behalf-of | header | optional | string | — |
GET /contactdb/reserved_fields
/contactdb/lists
This endpoint allows you to retrieve all of your recipient lists. If you don’t have any lists, an empty array will be returned.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| on-behalf-of | header | optional | string | — |
GET /contactdb/lists
/contactdb/lists/{list_id}
This endpoint allows you to retrieve a single recipient list.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| list_id | path | required | string | — |
| list_id | query | optional | integer | The ID of the list to retrieve. |
| on-behalf-of | header | optional | string | — |
“list_id” : “Returned if list_id is not valid”
“list_id” : “Returned if list_id does not exist”
GET /contactdb/lists/{list_id}
/contactdb/lists/{list_id}/recipients
This endpoint allows you to retrieve all recipients on the list with the given ID.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| list_id | path | required | integer | The id of the list of recipients you want to retrieve. |
| page | query | optional | integer | Page index of first recipient to return (must be a positive integer) |
| page_size | query | optional | integer | Number of recipients to return at a time (must be a positive integer between 1 and 1000) |
| list_id | query | required | integer | The ID of the list whose recipients you are requesting. |
| on-behalf-of | header | optional | string | — |
“list_id” : “Returned if list_id is not a valid integer”
“page” : “Returned if page is not a valid integer”
“page” : “Returned if page is less than 1”
“page_size” : “Returned if page_size is not a valid integer”
“page_size” : “Returned if page_size is less than 1 or greater than 1000”
“list_id” : “Returned if list_id does not exist”
GET /contactdb/lists/{list_id}/recipients
/contactdb/recipients
This endpoint allows you to retrieve all of your Marketing Campaigns recipients.
Batch deletion of a page makes it possible to receive an empty page of recipients before reaching the end of
the list of recipients. To avoid this issue; iterate over pages until a 404 is retrieved.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| page | query | optional | integer | Page index of first recipients to return (must be a positive integer) |
| page_size | query | optional | integer | Number of recipients to return at a time (must be a positive integer between 1 and 1000) |
| on-behalf-of | header | optional | string | — |
“page” : “Returned if page is not a valid integer”
“page” : “Returned if page is less than 1”
“page_size” : “Returned if page_size is not a valid integer”
“page_size” : “Returned if page_size is less than 1 or greater than 1000”
GET /contactdb/recipients
/contactdb/recipients/billable_count
This endpoint allows you to retrieve the number of Marketing Campaigns recipients that you will be billed for.
You are billed for marketing campaigns based on the highest number of recipients you have had in your account at one time. This endpoint will allow you to know the current billable count value.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| on-behalf-of | header | optional | string | — |
GET /contactdb/recipients/billable_count
/contactdb/recipients/count
This endpoint allows you to retrieve the total number of Marketing Campaigns recipients.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| on-behalf-of | header | optional | string | — |
GET /contactdb/recipients/count
/contactdb/recipients/search
This endpoint allows you to perform a search on all of your Marketing Campaigns recipients.
field_name:
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| {field_name} | query | optional | string | — |
| on-behalf-of | header | optional | string | — |
”” : “Returned if no search params are specified”
“field” : “Returned if the provided field is invalid or does not exist”
GET /contactdb/recipients/search
/contactdb/recipients/{recipient_id}
This endpoint allows you to retrieve a single recipient by ID from your contact database.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| recipient_id | path | required | string | The ID of the recipient that you want to retrieve. |
| on-behalf-of | header | optional | string | — |
“recipient_id” : “Returned if recipient_id is not valid”
“recipient_id” : “Returned if record for recipient id does not exist”
GET /contactdb/recipients/{recipient_id}
/contactdb/recipients/{recipient_id}/lists
This endpoint allows you to retrieve the lists that a given recipient belongs to.
Each recipient can be on many lists. This endpoint gives you all of the lists that any one recipient has been added to.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| recipient_id | path | required | string | The ID of the recipient for whom you are retrieving lists. |
| on-behalf-of | header | optional | string | — |
“recipient_id” : “Returned if recipient_id is not valid”
“recipient_id” : “Returned if record for the recipient id does not exist”
GET /contactdb/recipients/{recipient_id}/lists
/contactdb/status
This endpoint allows you to check the upload status of a Marketing Campaigns recipient.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| on-behalf-of | header | optional | string | — |
GET /contactdb/status
/contactdb/segments
This endpoint allows you to retrieve all of your segments.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| on-behalf-of | header | optional | string | — |
GET /contactdb/segments
/contactdb/segments/{segment_id}
This endpoint allows you to retrieve a single segment with the given ID.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| segment_id | path | required | string | — |
| segment_id | query | required | integer | The ID of the segment you want to request. |
| on-behalf-of | header | optional | string | — |
“segment_id” : “Returned if segment_id is not valid”
“segment_id” : “Returned if segment_id does not exist”
GET /contactdb/segments/{segment_id}
/contactdb/segments/{segment_id}/recipients
This endpoint allows you to retrieve all of the recipients in a segment with the given ID.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| segment_id | path | required | integer | The ID of the segment from which you want to retrieve recipients. |
| page | query | optional | integer | — |
| page_size | query | optional | integer | — |
| on-behalf-of | header | optional | string | — |
“page” : “Returned if page is not a valid integer”
“page” : “Returned if page is less than 1”
“page_size” : “Returned if page_size is not a valid integer”
“segment_id” : “Returned if segment_id is not valid”
“segment_id” : “Returned if segment_id does not exist”
GET /contactdb/segments/{segment_id}/recipients
/marketing/field_definitions
This endpoint retrieves all defined Custom Fields and Reserved Fields.
GET /marketing/field_definitions
/designs
This endpoint allows you to retrieve a list of designs already stored in your Design Library.
A GET request to /designs will return a list of your existing designs. This endpoint will not return the pre-built Twilio SendGrid designs. Pre-built designs can be retrieved using the /designs/pre-builts endpoint, which is detailed below.
By default, you will receive 100 results per request; however, you can modify the number of results returned by passing an integer to the page_size query parameter.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| page_size | query | optional | integer | number of results to return |
| page_token | query | optional | string | token corresponding to a specific page of results, as provided by metadata |
| summary | query | optional | boolean | set to false to return all fields |
GET /designs
/designs/pre-builts
This endpoint allows you to retrieve a list of pre-built designs provided by Twilio SendGrid.
Unlike the /designs endpoint where your designs are stored, a GET request made to designs/pre-builts will retrieve a list of the pre-built Twilio SendGrid designs. This endpoint will not return the designs stored in your Design Library.
By default, you will receive 100 results per request; however, you can modify the number of results returned by passing an integer to the page_size query parameter.
This endpoint is useful for retrieving the IDs of Twilio SendGrid designs that you want to duplicate and modify.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| page_size | query | optional | integer | number of results to return |
| page_token | query | optional | string | token corresponding to a specific page of results, as provided by metadata |
| summary | query | optional | boolean | set to false to return all fields |
GET /designs/pre-builts
/designs/pre-builts/{id}
This endpoint allows you to retrieve a single pre-built design.
A GET request to /designs/pre-builts/{id} will retrieve details about a specific pre-built design.
This endpoint is valuable when retrieving details about a pre-built design that you wish to duplicate and modify.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| id | path | required | string | The ID of the pre-built Design you want to duplicate. |
GET /designs/pre-builts/{id}
/designs/{id}
This endpoint allows you to retrieve a single design.
A GET request to /designs/{id} will retrieve details about a specific design in your Design Library.
This endpoint is valuable when retrieving information stored in a field that you wish to update using a PATCH request.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| id | path | required | string | The ID of the Design you want to duplicate. |
GET /designs/{id}
/whitelabel/domains
This endpoint allows you to retrieve a list of all domains you have authenticated.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| limit | query | optional | integer | Number of domains to return. |
| offset | query | optional | integer | Paging offset. |
| exclude_subusers | query | optional | boolean | Exclude subuser domains from the result. |
| username | query | optional | string | The username associated with an authenticated domain. |
| domain | query | optional | string | Search for authenticated domains. |
| on-behalf-of | header | optional | string | — |
GET /whitelabel/domains
/whitelabel/domains/default
This endpoint allows you to retrieve the default authentication for a domain.
When creating or updating a domain authentication, you can set the domain as a default. The default domain will be used to send all mail. If you have multiple authenticated domains, the authenticated domain matching the domain of the From address will be used, and the default will be overridden.
This endpoint will return a default domain and its details only if a default is set. You are not required to set a default. If you do not set a default domain, this endpoint will return general information about your domain authentication status.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| domain | query | optional | string | The domain to find a default authentication. |
| on-behalf-of | header | optional | string | — |
GET /whitelabel/domains/default
/whitelabel/domains/subuser
This endpoint allows you to retrieve all of the authenticated domains that have been assigned to a specific subuser.
Authenticated domains can be associated with (i.e. assigned to) subusers from a parent account. This functionality allows subusers to send mail using their parent’s domain authentication. To associate an authenticated domain with a subuser, the parent account must first authenticate and validate the domain. The parent may then associate the authenticated domain via the subuser management tools.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| username | query | required | string | Username for the subuser to find associated authenticated domain. |
GET /whitelabel/domains/subuser
/whitelabel/domains/{domain_id}
This endpoint allows you to retrieve a specific authenticated domain.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| domain_id | path | required | string | — |
| on-behalf-of | header | optional | string | — |
GET /whitelabel/domains/{domain_id}
/access_settings/activity
This endpoint allows you to retrieve a list of all of the IP addresses that recently attempted to access your account either through the User Interface or the API.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| limit | query | optional | integer | Limits the number of IPs to return. |
| on-behalf-of | header | optional | string | — |
GET /access_settings/activity
/access_settings/whitelist
This endpoint allows you to retrieve a list of IP addresses that are currently allowed to access your account.
Each IP address returned to you will have created_at and updated_at dates. Each IP will also be associated with an id that can be used to remove the address from your allow list.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| on-behalf-of | header | optional | string | — |
GET /access_settings/whitelist
/access_settings/whitelist/{rule_id}
This endpoint allows you to retreive a specific IP address that has been allowed to access your account.
You must include the ID for the specific IP address you want to retrieve in your call. You can retrieve the IDs associated with your allowed IP addresses using the “Retrieve a list of currently allowed IPs” endpoint.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| rule_id | path | required | string | The ID of the allowed IP address that you want to retrieve. |
| on-behalf-of | header | optional | string | — |
GET /access_settings/whitelist/{rule_id}
/ips
This endpoint allows you to retrieve a list of all assigned and unassigned IPs.
Response includes warm up status, pools, assigned subusers, and reverse DNS info. The start_date field corresponds to when warmup started for that IP.
A single IP address or a range of IP addresses may be dedicated to an account in order to send email for multiple domains. The reputation of this IP is based on the aggregate performance of all the senders who use it.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| ip | query | optional | string | The IP address to get |
| exclude_whitelabels | query | optional | boolean | Should we exclude reverse DNS records (whitelabels)? |
| limit | query | optional | integer | The number of IPs you want returned at the same time. |
| offset | query | optional | integer | The offset for the number of IPs that you are requesting. |
| subuser | query | optional | string | The subuser you are requesting for. |
| sort_by_direction | query | optional | string | The direction to sort the results. |
GET /ips
/ips/assigned
This endpoint allows you to retrieve only assigned IP addresses.
A single IP address or a range of IP addresses may be dedicated to an account in order to send email for multiple domains. The reputation of this IP is based on the aggregate performance of all the senders who use it.
GET /ips/assigned
/ips/remaining
This endpoint gets amount of IP Addresses that can still be created during a given period and the price of those IPs.
GET /ips/remaining
/ips/{ip_address}
This endpoint allows you to see which IP pools a particular IP address has been added to.
The same IP address can be added to multiple IP pools.
A single IP address or a range of IP addresses may be dedicated to an account in order to send email for multiple domains. The reputation of this IP is based on the aggregate performance of all the senders who use it.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| ip_address | path | required | string | The IP address you are retrieving the IP pools for. |
GET /ips/{ip_address}
/ips/pools
This endpoint allows you to get all of your IP pools.
GET /ips/pools
/ips/pools/{pool_name}
This endpoint allows you to get all of the IP addresses that are in a specific IP pool.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| pool_name | path | required | string | The name of the IP pool that you want to retrieve the IP addresses for. |
GET /ips/pools/{pool_name}
/ips/warmup
This endpoint allows you to retrieve all of your IP addresses that are currently warming up.
GET /ips/warmup
/ips/warmup/{ip_address}
This endpoint allows you to retrieve the warmup status for a specific IP address.
You can retrieve all of your warming IPs using the “Retrieve all IPs currently in warmup” endpoint.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| ip_address | path | required | string | The IP address that you want to retrieve the warmup status for. |
GET /ips/warmup/{ip_address}
/suppression/invalid_emails
This endpoint allows you to retrieve a list of all invalid email addresses.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| start_time | query | optional | integer | Refers start of the time range in unix timestamp when an invalid email was created (inclusive). |
| end_time | query | optional | integer | Refers end of the time range in unix timestamp when an invalid email was created (inclusive). |
| limit | query | optional | integer | Limit the number of results to be displayed per page. |
| offset | query | optional | integer | Paging offset. The point in the list to begin displaying results. |
| on-behalf-of | header | optional | string | — |
GET /suppression/invalid_emails
/suppression/invalid_emails/{email}
This endpoint allows you to retrieve a specific invalid email addresses.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| path | required | string | The specific email address of the invalid email entry that you want to retrieve. |
|
| on-behalf-of | header | optional | string | — |
GET /suppression/invalid_emails/{email}
/whitelabel/links
This endpoint allows you to retrieve all branded links.
You can submit this request as one of your subusers if you include their ID in the on-behalf-of header in the request.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| limit | query | optional | integer | Limits the number of results returned per page. |
| on-behalf-of | header | optional | string | — |
GET /whitelabel/links
/whitelabel/links/default
This endpoint allows you to retrieve the default branded link.
The default branded link is the actual URL to be used when sending messages. If you have more than one branded link, the default is determined by the following order:
default (set when you call the “Create a branded link” endpoint or by calling the “Update a branded link” endpoint on an existing link)100.ct.sendgrid.net)You can submit this request as one of your subusers if you include their ID in the on-behalf-of header in the request.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| domain | query | optional | string | The domain to match against when finding the default branded link. |
| on-behalf-of | header | optional | string | — |
GET /whitelabel/links/default
/whitelabel/links/subuser
This endpoint allows you to retrieve the branded link associated with a subuser.
Link branding can be associated with subusers from the parent account. This functionality allows subusers to send mail using their parent’s link branding. To associate link branding, the parent account must first create a branded link and then validate it. The parent may then associate that branded link with a subuser via the API or the Subuser Management page of the Twilio SendGrid App.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| username | query | required | string | The username of the subuser to retrieve associated branded links for. |
GET /whitelabel/links/subuser
/whitelabel/links/{id}
This endpoint allows you to retrieve a specific branded link by providing its ID.
You can submit this request as one of your subusers if you include their ID in the on-behalf-of header in the request.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| id | path | required | integer | The ID of the branded link you want to retrieve. |
| on-behalf-of | header | optional | string | — |
GET /whitelabel/links/{id}
/marketing/lists
This endpoint returns an array of all of your contact lists.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| page_size | query | optional | number | Maximum number of elements to return. Defaults to 100, returns 1000 max |
| page_token | query | optional | string | — |
GET /marketing/lists
/marketing/lists/{id}
This endpoint returns data about a specific list.
Setting the optional parameter contact_sample=true returns the contact_sample in the response body. Up to fifty of the most recent contacts uploaded or attached to a list will be returned, sorted alphabetically, by email address.
The full contact count is also returned.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| id | path | required | string | — |
| contact_sample | query | optional | boolean | Setting this parameter to the true will cause the contact_sample to be returned |
GET /marketing/lists/{id}
/marketing/lists/{id}/contacts/count
This endpoint returns the number of contacts on a specific list.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| id | path | required | string | — |
GET /marketing/lists/{id}/contacts/count
/marketing/stats/automations
This endpoint allows you to retrieve stats for all your Automations.
By default, all of your Automations will be returned, but you can specify a selection by passing in a comma-separated list of Automation IDs as the value of the query string parameter automation_ids.
Responses are paginated. You can limit the number of responses returned per batch using the page_size query string parameter. The default is 50, but you specify a value between 1 and 100.
You can retrieve a specific page of responses with the page_token query string parameter.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| automation_ids | query | optional | array | This endpoint returns all automation IDs if no |
| page_size | query | optional | integer | The number of elements you want returned on each page. |
| page_token | query | optional | string | The stats endpoints are paginated. To get the next page, call the passed |
GET /marketing/stats/automations
/marketing/stats/automations/export
This endpoint allows you to export Automation stats as CSV data.
You can specify one Automation or many: include as many Automation IDs as you need, separating them with commas, as the value of the ids query string paramter.
The data is returned as plain text response but in CSV format, so your application making the call can present the information in whatever way is most appropriate, or just save the data as a .csv file.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| ids | query | optional | array | The IDs of Automations for which to export stats. |
| timezone | query | optional | string | The IANA Area/Region string representing the timezone in which the stats are to be presented; i.e. |
GET /marketing/stats/automations/export
/marketing/stats/automations/{id}
This endpoint allows you to retrieve stats for a single Automation using its ID.
Multiple Automation IDs can be retrieved using the “Get All Automation Stats” endpoint. Once you have an ID, this endpoint will return detailed stats for the single automation specified.
You may constrain the stats returned using the start_date and end_date query string parameters. You can also use the group_by and aggregated_by query string parameters to further refine the stats returned.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| id | path | required | string | — |
| group_by | query | optional | array | Automations can have multiple steps. Including |
| step_ids | query | optional | array | Comma-separated list of |
| aggregated_by | query | optional | string | Dictates how the stats are time-sliced. Currently, |
| start_date | query | optional | string | Format: |
| end_date | query | optional | string | Format: |
| timezone | query | optional | string | IANA Area/Region string representing the timezone in which the stats are to be presented, e.g., “America/Chicago”. |
| page_size | query | optional | integer | The number of elements you want returned on each page. |
| page_token | query | optional | string | The stats endpoints are paginated. To get the next page, call the passed |
GET /marketing/stats/automations/{id}
/marketing/stats/automations/{id}/links
This endpoint lets you retrieve click-tracking stats for a single Automation.
The stats returned list the URLs embedded in your Automation and the number of clicks each one received.
Responses are paginated. You can limit the number of responses returned per batch using the page_size query string parameter. The default is 50, but you specify a value between 1 and 100.
You can retrieve a specific page of responses with the page_token query string parameter.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| id | path | required | string | The ID of the Automation you want to get click tracking stats for. |
| group_by | query | optional | array | Automations can have multiple steps. Including |
| step_ids | query | optional | array | Comma-separated list of |
| page_size | query | optional | integer | The number of elements you want returned on each page. |
| page_token | query | optional | string | The stats endpoints are paginated. To get the next page, call the passed |
GET /marketing/stats/automations/{id}/links
/marketing/stats/singlesends
This endpoint allows you to retrieve stats for all your Single Sends.
By default, all of your Single Sends will be returned, but you can specify a selection by passing in a comma-separated list of Single Send IDs as the value of the query string parameter singlesend_ids.
Responses are paginated. You can limit the number of responses returned per batch using the page_size query string parameter. The default is 50, but you specify a value between 1 and 100.
You can retrieve a specific page of responses with the page_token query string parameter.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| singlesend_ids | query | optional | array | This endpoint returns all Single Send IDs if no IDs are included in |
| page_size | query | optional | integer | The number of elements you want returned on each page. |
| page_token | query | optional | string | The stats endpoints are paginated. To get the next page, call the passed |
GET /marketing/stats/singlesends
/marketing/stats/singlesends/export
This endpoint allows you to export Single Send stats as .CSV data.
You can specify one Single Send or many: include as many Single Send IDs as you need, separating them with commas, as the value of the ids query string paramter.
The data is returned as plain text response but in .CSV format, so your application making the call can present the information in whatever way is most appropriate, or just save the data as a .csv file.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| ids | query | optional | array | The IDs of Single Sends for which to export stats. |
| timezone | query | optional | string | The IANA Area/Region string representing the timezone in which the stats are to be presented; i.e. |
GET /marketing/stats/singlesends/export
/marketing/stats/singlesends/{id}
This endpoint allows you to retrieve stats for an individual Single Send using a Single Send ID.
Multiple Single Send IDs can be retrieved using the “Get All Single Sends Stats” endpoint. Once you have an ID, this endpoint will return detailed stats for the Single Send specified.
You may constrain the stats returned using the start_date and end_date query string parameters. You can also use the group_by and aggregated_by query string parameters to further refine the stats returned.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| id | path | required | string | — |
| aggregated_by | query | optional | string | Dictates how the stats are time-sliced. Currently, |
| start_date | query | optional | string | Format: |
| end_date | query | optional | string | Format: |
| timezone | query | optional | string | IANA Area/Region string representing the timezone in which the stats are to be presented, e.g., “America/Chicago”. |
| page_size | query | optional | integer | The number of elements you want returned on each page. |
| page_token | query | optional | string | The stats endpoints are paginated. To get the next page, call the passed |
| group_by | query | optional | array | A/B Single Sends have multiple variation IDs and phase IDs. Including these additional fields allows further granularity of stats by these fields. |
GET /marketing/stats/singlesends/{id}
/marketing/stats/singlesends/{id}/links
This endpoint lets you retrieve click-tracking stats for one Single Send.
The stats returned list the URLs embedded in the specified Single Send and the number of clicks each one received.
Responses are paginated. You can limit the number of responses returned per batch using the page_size query string parameter. The default is 50, but you specify a value between 1 and 100.
You can retrieve a specific page of responses with the page_token query string parameter.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| id | path | required | string | — |
| page_size | query | optional | integer | The number of elements you want returned on each page. |
| page_token | query | optional | string | The stats endpoints are paginated. To get the next page, call the passed |
| group_by | query | optional | array | A/B Single Sends have multiple variation IDs and phase IDs. Including these additional fields allows further granularity of stats by these fields. |
| ab_variation_id | query | optional | string | — |
| ab_phase_id | query | optional | string | — |
GET /marketing/stats/singlesends/{id}/links
/messages
This is BETA functionality. You may not have access, and we reserve the right to change functionality without notice.
Filter all messages to search your Email Activity. All queries need to be URL encoded, and have this format:
query={query_type}="{query_content}"
encoded, this would look like this:
query=type%3D%22query_content%22
for example:
Filter by a specific email - query=to_email%3D%22example%40example.com%22
Filter by subject line - query=subject%3d%22A%20Great%20Subject%22
Full list of basic query types and examples:
| Filter query | Unencoded Example (put this one into the try it out query - it’ll automatically encode it for you) | Encoded Example (use this one in your code) |
|---|---|---|
| msg_id | msg_id=“filter0307p1las1-16816-5A023E36-1.0” | msg_id%3D%22filter0307p1las1-16816-5A023E36-1.0%22 |
| from_email | from_email=“testing@sendgrid.net” | from_email%3D%22testing%40sendgrid.net%22 |
| subject | subject=”This is a subject test” | subject%22This%20is%20a%20subject%20test%22 |
| to_email | to_email=”example@example.com” | to_email%3D%22example%40example.com%22 |
| status | status%22processed%22 | |
| template_id | ||
| asm_group_id | ||
| api_key_id | ||
| events | status=”processed” | status%3D%22processed%22 |
| originating_ip | ||
| categories | ||
| unique_args | ||
| outbound_ip | ||
| last_event_time | last_event_time=“2017-11-07T23:13:58Z” | last_event_time%3D%E2%80%9C2017-11-07T23%3A13%3A58Z%E2%80%9D |
| clicks | clicks=”0” | clicks%3D%220%22 |
For information about building compound queries, and for the full query language functionality, see the query language reference.
Coming soon, example compound queries: limit + to email + date
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| query | query | required | string | Use the query syntax to filter your email activity. |
| limit | query | optional | number | The number of messages returned. This parameter must be greater than 0 and less than or equal to 1000 |
| X-Query-Id | header | optional | string | — |
| X-Cursor | header | optional | string | — |
GET /messages
/messages/{msg_id}
This is BETA functionality. You may not have access, and we reserve the right to change functionality without notice.
Get all of the details about the specified message.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| msg_id | path | required | string | The ID of the message you are requesting details for. |
GET /messages/{msg_id}
/whitelabel/ips
This endpoint allows you to retrieve all of the Reverse DNS records created by this account.
You may include a search key by using the ip query string parameter. This enables you to perform a prefix search for a given IP segment (e.g., ?ip="192.").
Use the limit query string parameter to reduce the number of records returned. All records will be returned if you have fewer records than the specified limit.
The offset query string parameter allows you to specify a non-zero index from which records will be returned. For example, if you have ten records, ?offset=5 will return the last five records (at indexes 5 through 9). The list starts at index zero.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| limit | query | optional | integer | The maximum number of results to retrieve. |
| offset | query | optional | integer | The point in the list of results to begin retrieving IP addresses from. |
| ip | query | optional | string | The IP address segment that you’d like to use in a prefix search. |
| on-behalf-of | header | optional | string | — |
GET /whitelabel/ips
/whitelabel/ips/{id}
This endpoint allows you to retrieve a reverse DNS record.
You can retrieve the IDs associated with all your reverse DNS records using the “Retrieve all reverse DNS records” endpoint.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| id | path | required | string | The ID of the reverse DNS record that you would like to retrieve. |
| on-behalf-of | header | optional | string | — |
GET /whitelabel/ips/{id}
/marketing/segments
This endpoint allows you to retrieve a list of segments.
The query param parent_list_ids is treated as a filter. Any match will be returned. 0 matches will return a response code of 200 with an empty results array.
parent_list_ids |
no_parent_list_id |
result |
|---|---|---|
| empty | false | all segments |
| values | false | segments filtered by list_ids |
| values | true | segments filtered by list_ids and segments with no parent list_ids |
| empty | true | segments with no parent list_ids |
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| parent_list_ids | query | optional | string | A comma separated list of list ids to be used when searching for segments with the specified parent_list_id, no more than 50 is allowed |
| no_parent_list_id | query | optional | boolean | If set to |
GET /marketing/segments
/marketing/segments/{segment_id}
This endpoint allows you to retrieve a single segment by ID.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| segment_id | path | required | string | — |
| query_json | query | optional | boolean | Defaults to |
GET /marketing/segments/{segment_id}
/marketing/segments/2.0
The Segmentation V2 API is currently in private beta. If you’d like to be added to the beta, please fill out this form
The query param parent_list_ids is treated as a filter. Any match will be returned. 0 matches will return a response code of 200 with an empty results array.
parent_list_ids |
no_parent_list_id |
result |
|---|---|---|
| empty | false | all segments |
| values | false | segments filtered by list_ids |
| values | true | segments filtered by list_ids and segments with no parent list_ids |
| empty | true | segments with no parent list_ids |
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| parent_list_ids | query | optional | string | A comma separated list up to 50 in size, to filter segments on. Only segments that have any of these list ids as the parent list will be retrieved. This is different from the parameter of the same name used when creating a segment. |
| no_parent_list_id | query | optional | boolean | If set to |
GET /marketing/segments/2.0
/marketing/segments/2.0/{segment_id}
The Segmentation V2 API is currently in private beta. If you’d like to be added to the beta, please fill out this form
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| segment_id | path | required | string | — |
| contacts_sample | query | optional | boolean | Defaults to |
GET /marketing/segments/2.0/{segment_id}
/senders
This endpoint allows you to retrieve a list of all sender identities that have been created for your account.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| on-behalf-of | header | optional | string | — |
GET /senders
/senders/{sender_id}
This endpoint allows you to retrieve a specific sender identity.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| sender_id | path | required | integer | The ID of the sender identity that you want to retrieve. |
| on-behalf-of | header | optional | string | — |
GET /senders/{sender_id}
/verified_senders
This endpoint allows you to retrieve all the Sender Identities associated with an account.
This endpoint will return both verified and unverified senders.
You can limit the number of results returned using the limit, lastSeenID, and id query string parameters.
limit allows you to specify an exact number of Sender Identities to return.lastSeenID will return senders with an ID number occuring after the passed in ID. In other words, the lastSeenID provides a starting point from which SendGrid will iterate to find Sender Identities associated with your account.id will return information about only the Sender Identity passed in the request.| Name | In | Required | Type | Description |
|---|---|---|---|---|
| limit | query | optional | number | — |
| lastSeenID | query | optional | number | — |
| id | query | optional | integer | — |
GET /verified_senders
/verified_senders/domains
This endpoint returns a list of domains known to implement DMARC and categorizes them by failure type — hard failure or soft failure.
Domains listed as hard failures will not deliver mail when used as a Sender Identity due to the domain’s DMARC policy settings.
For example, using a yahoo.com email address as a Sender Identity will likely result in the rejection of your mail. For more information about DMARC, see Everything about DMARC.
GET /verified_senders/domains
/verified_senders/steps_completed
This endpoint allows you to determine which of SendGrid’s verification processes have been completed for an account.
This endpoint returns boolean values, true and false, for Domain Authentication, domain_verified, and Single Sender Verification, sender_verified, for the account.
An account may have one, both, or neither verification steps completed. If you need to authenticate a domain rather than a Single Sender, see the “Authenticate a domain” endpoint.
GET /verified_senders/steps_completed
/verified_senders/verify/{token}
This endpoint allows you to verify a sender requests.
The token is generated by SendGrid and included in a verification email delivered to the address that’s pending verification.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| token | path | required | string | — |
GET /verified_senders/verify/{token}
/user/settings/enforced_tls
This endpoint allows you to retrieve your current Enforced TLS settings.
The Enforced TLS settings specify whether or not the recipient is required to support TLS or have a valid certificate.
If either require_tls or require_valid_cert is set to true, the recipient must support TLS 1.1 or higher or have a valid certificate. If these conditions are not met, Twilio SendGrid will drop the message and send a block event with “TLS required but not supported” as the description.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| on-behalf-of | header | optional | string | — |
GET /user/settings/enforced_tls
/user/webhooks/parse/settings/{hostname}
This endpoint allows you to retrieve a specific inbound parse setting by hostname.
You can retrieve all your Inbound Parse settings and their associated host names with the “Retrieve all parse settings” endpoint.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| hostname | path | required | string | The hostname associated with the inbound parse setting that you would like to retrieve. |
| on-behalf-of | header | optional | string | — |
GET /user/webhooks/parse/settings/{hostname}
/mail_settings
This endpoint allows you to retrieve a 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.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| limit | query | optional | integer | The number of settings to return. |
| offset | query | optional | integer | Where in the list of results to begin displaying settings. |
| on-behalf-of | header | optional | string | — |
GET /mail_settings
/mail_settings/address_whitelist
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.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| on-behalf-of | header | optional | string | — |
GET /mail_settings/address_whitelist
/mail_settings/bounce_purge
This endpoint allows you to retrieve your current bounce and purge settings.
The Bounce Perge setting allows you to set a schedule that Twilio SendGrid will use to automatically delete contacts from your soft and hard bounce suppression lists.
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. You can manage your bounces manually using the Bounces API or the Bounces menu in the Twilio SendGrid App.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| on-behalf-of | header | optional | string | — |
GET /mail_settings/bounce_purge
/mail_settings/footer
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.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| on-behalf-of | header | optional | string | — |
GET /mail_settings/footer
/mail_settings/forward_bounce
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.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| on-behalf-of | header | optional | string | — |
GET /mail_settings/forward_bounce
/mail_settings/forward_spam
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.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| on-behalf-of | header | optional | string | — |
GET /mail_settings/forward_spam
/mail_settings/template
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.
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. For help migrating to our current template system, see “Migrating from Legacy Templates”.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| on-behalf-of | header | optional | string | — |
GET /mail_settings/template
/partner_settings
This endpoint allows you to retrieve a list of all partner settings that you can enable.
Our partner settings allow you to integrate your SendGrid account with our partners to increase your SendGrid experience and functionality. For more information about our partners, and how you can begin integrating with them, please visit our Partners documentation.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| limit | query | optional | integer | The number of settings to return per page. |
| offset | query | optional | integer | The paging offset. |
| on-behalf-of | header | optional | string | — |
GET /partner_settings
/partner_settings/new_relic
This endpoint allows you to retrieve your current New Relic partner settings.
Our partner settings allow you to integrate your SendGrid account with our partners to increase your SendGrid experience and functionality. For more information about our partners, and how you can begin integrating with them, please visit our Partners documentation.
By integrating with New Relic, you can send your SendGrid email statistics to your New Relic Dashboard. If you enable this setting, your stats will be sent to New Relic every 5 minutes. You will need your New Relic License Key to enable this setting. For more information, please see our SendGrid for New Relic documentation.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| on-behalf-of | header | optional | string | — |
GET /partner_settings/new_relic
/tracking_settings
This endpoint allows you to retrieve a list of all tracking settings on your account.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| on-behalf-of | header | optional | string | — |
GET /tracking_settings
/tracking_settings/click
This endpoint allows you to retrieve your current click tracking setting.
Click Tracking overrides all the links and URLs in your emails and points them to either SendGrid’s servers or the domain with which you branded your link. When a customer clicks a link, SendGrid tracks those clicks.
Click tracking helps you understand how users are engaging with your communications. SendGrid can track up to 1000 links per email
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| on-behalf-of | header | optional | string | — |
GET /tracking_settings/click
/tracking_settings/google_analytics
This endpoint allows you to retrieve your current setting for Google Analytics.
Google Analytics helps you understand how users got to your site and what they’re doing there. For more information about using Google Analytics, please refer to Google’s URL Builder and their article on “Best Practices for Campaign Building”.
We default the settings to Google’s recommendations. For more information, see Google Analytics Demystified.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| on-behalf-of | header | optional | string | — |
GET /tracking_settings/google_analytics
/tracking_settings/open
This endpoint allows you to retrieve your current settings for open tracking.
Open Tracking adds an invisible image at the end of the email which can track email opens.
If the email recipient has images enabled on their email client, a request to SendGrid’s server for the invisible image is executed and an open event is logged.
These events are logged in the Statistics portal, Email Activity interface, and are reported by the Event Webhook.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| on-behalf-of | header | optional | string | — |
GET /tracking_settings/open
/tracking_settings/subscription
This endpoint allows you to retrieve your current settings for subscription tracking.
Subscription tracking adds links to the bottom of your emails that allows your recipients to subscribe to, or unsubscribe from, your emails.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| on-behalf-of | header | optional | string | — |
GET /tracking_settings/subscription
/marketing/singlesends
This endpoint allows you to retrieve all your Single Sends.
Returns all of your Single Sends with condensed details about each, including the Single Sends’ IDs. For more details about an individual Single Send, pass the Single Send’s ID to the /marketing/singlesends/{id} endpoint.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| page_size | query | optional | integer | — |
| page_token | query | optional | string | — |
GET /marketing/singlesends
/marketing/singlesends/categories
This endpoint allows you to retrieve all the categories associated with your Single Sends.
This endpoint will return your latest 1,000 categories.
GET /marketing/singlesends/categories
/marketing/singlesends/{id}
This endpoint allows you to retrieve details about one Single Send using a Single Send ID.
You can retrieve all of your Single Sends by making a GET request to the /marketing/singlesends endpoint.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| id | path | required | string | — |
GET /marketing/singlesends/{id}
/sso/integrations
This endpoint allows you to retrieve all SSO integrations tied to your Twilio SendGrid account.
The IDs returned by this endpoint can be used by the APIs additional endpoints to modify your SSO integrations.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| si | query | optional | boolean | If this parameter is set to |
GET /sso/integrations
/sso/integrations/{id}
This endpoint allows you to retrieve an SSO integration by ID.
You can retrieve the IDs for your configurations from the response provided by the “Get All SSO Integrations” endpoint.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| id | path | required | string | — |
| si | query | optional | boolean | If this parameter is set to |
GET /sso/integrations/{id}
/suppression/spam_reports
This endpoint allows you to retrieve all spam reports.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| start_time | query | optional | integer | The start of the time range when a spam report was created (inclusive). This is a unix timestamp. |
| end_time | query | optional | integer | The end of the time range when a spam report was created (inclusive). This is a unix timestamp. |
| limit | query | optional | integer | Limit the number of results to be displayed per page. |
| offset | query | optional | integer | Paging offset. The point in the list to begin displaying results. |
| on-behalf-of | header | optional | string | — |
GET /suppression/spam_reports
/suppression/spam_reports/{email}
This endpoint allows you to retrieve a specific spam report by email address.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| path | required | string | The email address of a specific spam report that you want to retrieve. |
|
| on-behalf-of | header | optional | string | — |
GET /suppression/spam_reports/{email}
/stats
This endpoint allows you to retrieve all of your global email statistics between a given date range.
Parent accounts will see aggregated stats for their account and all subuser accounts. Subuser accounts will only see their own stats.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| on-behalf-of | header | optional | string | — |
| limit | query | optional | integer | The number of results to return. |
| offset | query | optional | integer | The point in the list to begin retrieving results. |
| aggregated_by | query | optional | string | How to group the statistics. Must be either “day”, “week”, or “month”. |
| start_date | query | optional | string | The starting date of the statistics to retrieve. Must follow format YYYY-MM-DD. |
| end_date | query | optional | string | The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD. |
GET /stats
/browsers/stats
This endpoint allows you to retrieve your email statistics segmented by browser type.
We only store up to 7 days of email activity in our database. By default, 500 items will be returned per request via the Advanced Stats API endpoints.
Advanced Stats provide a more in-depth view of your email statistics and the actions taken by your recipients. You can segment these statistics by geographic location, device type, client type, browser, and mailbox provider. For more information about statistics, please see our Statistics Overview.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| browsers | query | optional | string | The browsers to get statistics for. You can include up to 10 different browsers by including this parameter multiple times. |
| on-behalf-of | header | optional | string | — |
| limit | query | optional | integer | The number of results to return. |
| offset | query | optional | integer | The point in the list to begin retrieving results. |
| aggregated_by | query | optional | string | How to group the statistics. Must be either “day”, “week”, or “month”. |
| start_date | query | optional | string | The starting date of the statistics to retrieve. Must follow format YYYY-MM-DD. |
| end_date | query | optional | string | The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD. |
GET /browsers/stats
/clients/stats
This endpoint allows you to retrieve your email statistics segmented by client type.
We only store up to 7 days of email activity in our database. By default, 500 items will be returned per request via the Advanced Stats API endpoints.
Advanced Stats provide a more in-depth view of your email statistics and the actions taken by your recipients. You can segment these statistics by geographic location, device type, client type, browser, and mailbox provider. For more information about statistics, please see our Statistics Overview.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| on-behalf-of | header | optional | string | — |
| start_date | query | optional | string | The starting date of the statistics to retrieve. Must follow format YYYY-MM-DD. |
| end_date | query | optional | string | The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD. |
| aggregated_by | query | optional | string | How to group the statistics. Must be either “day”, “week”, or “month”. |
GET /clients/stats
/clients/{client_type}/stats
This endpoint allows you to retrieve your email statistics segmented by a specific client type.
We only store up to 7 days of email activity in our database. By default, 500 items will be returned per request via the Advanced Stats API endpoints.
Advanced Stats provide a more in-depth view of your email statistics and the actions taken by your recipients. You can segment these statistics by geographic location, device type, client type, browser, and mailbox provider. For more information about statistics, please see our Statistics Overview.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| client_type | path | required | string | Specifies the type of client to retrieve stats for. Must be either “phone”, “tablet”, “webmail”, or “desktop”. |
| on-behalf-of | header | optional | string | — |
| start_date | query | optional | string | The starting date of the statistics to retrieve. Must follow format YYYY-MM-DD. |
| end_date | query | optional | string | The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD. |
| aggregated_by | query | optional | string | How to group the statistics. Must be either “day”, “week”, or “month”. |
GET /clients/{client_type}/stats
/devices/stats
This endpoint allows you to retrieve your email statistics segmented by the device type.
We only store up to 7 days of email activity in our database. By default, 500 items will be returned per request via the Advanced Stats API endpoints.
| Device | Description | Example |
|—|—|—|
| Desktop | Email software on desktop computer. | I.E., Outlook, Sparrow, or Apple Mail. |
| Webmail | A web-based email client. | I.E., Yahoo, Google, AOL, or Outlook.com. |
| Phone | A smart phone. | iPhone, Android, Blackberry, etc.
| Tablet | A tablet computer. | iPad, android based tablet, etc. |
| Other | An unrecognized device. |
Advanced Stats provide a more in-depth view of your email statistics and the actions taken by your recipients. You can segment these statistics by geographic location, device type, client type, browser, and mailbox provider. For more information about statistics, please see our Statistics Overview.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| on-behalf-of | header | optional | string | — |
| limit | query | optional | integer | The number of results to return. |
| offset | query | optional | integer | The point in the list to begin retrieving results. |
| aggregated_by | query | optional | string | How to group the statistics. Must be either “day”, “week”, or “month”. |
| start_date | query | optional | string | The starting date of the statistics to retrieve. Must follow format YYYY-MM-DD. |
| end_date | query | optional | string | The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD. |
GET /devices/stats
/geo/stats
This endpoint allows you to retrieve your email statistics segmented by country and state/province.
We only store up to 7 days of email activity in our database. By default, 500 items will be returned per request via the Advanced Stats API endpoints.
Advanced Stats provide a more in-depth view of your email statistics and the actions taken by your recipients. You can segment these statistics by geographic location, device type, client type, browser, and mailbox provider. For more information about statistics, please see our User Guide.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| country | query | optional | string | The country you would like to see statistics for. Currently only supported for US and CA. |
| on-behalf-of | header | optional | string | — |
| limit | query | optional | integer | The number of results to return. |
| offset | query | optional | integer | The point in the list to begin retrieving results. |
| aggregated_by | query | optional | string | How to group the statistics. Must be either “day”, “week”, or “month”. |
| start_date | query | optional | string | The starting date of the statistics to retrieve. Must follow format YYYY-MM-DD. |
| end_date | query | optional | string | The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD. |
GET /geo/stats
/mailbox_providers/stats
This endpoint allows you to retrieve your email statistics segmented by recipient mailbox provider.
We only store up to 7 days of email activity in our database. By default, 500 items will be returned per request via the Advanced Stats API endpoints.
Advanced Stats provide a more in-depth view of your email statistics and the actions taken by your recipients. You can segment these statistics by geographic location, device type, client type, browser, and mailbox provider. For more information about statistics, please see our Statistics Overview.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| mailbox_providers | query | optional | string | The mail box providers to get statistics for. You can include up to 10 by including this parameter multiple times. |
| on-behalf-of | header | optional | string | — |
| limit | query | optional | integer | The number of results to return. |
| offset | query | optional | integer | The point in the list to begin retrieving results. |
| aggregated_by | query | optional | string | How to group the statistics. Must be either “day”, “week”, or “month”. |
| start_date | query | optional | string | The starting date of the statistics to retrieve. Must follow format YYYY-MM-DD. |
| end_date | query | optional | string | The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD. |
GET /mailbox_providers/stats
/subusers/{subuser_name}/monitor
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| subuser_name | path | required | string | The name of the subuser for which to retrieve monitor settings. |
GET /subusers/{subuser_name}/monitor
/subusers/stats
This endpoint allows you to retrieve the email statistics for the given subusers.
You may retrieve statistics for up to 10 different subusers by including an additional subusers parameter for each additional subuser.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| limit | query | optional | integer | Limits the number of results returned per page. |
| offset | query | optional | integer | The point in the list to begin retrieving results from. |
| aggregated_by | query | optional | string | How to group the statistics. Must be either “day”, “week”, or “month”. |
| subusers | query | required | string | The subuser you want to retrieve statistics for. You may include this parameter up to 10 times to retrieve statistics for multiple subusers. |
| start_date | query | required | string | The starting date of the statistics to retrieve. Must follow format YYYY-MM-DD. |
| end_date | query | optional | string | The end date of the statistics to retrieve. Defaults to today. |
GET /subusers/stats
/subusers/stats/monthly
This endpoint allows you to retrieve the monthly email statistics for all subusers over the given date range.
When using the sort_by_metric to sort your stats by a specific metric, you can not sort by the following metrics:
bounce_drops, deferred, invalid_emails, processed, spam_report_drops, spam_reports, or unsubscribe_drops.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| date | query | required | string | The date of the month to retrieve statistics for. Must be formatted YYYY-MM-DD |
| subuser | query | optional | string | A substring search of your subusers. |
| sort_by_metric | query | optional | string | The metric that you want to sort by. Metrics that you can sort by are: |
| sort_by_direction | query | optional | string | The direction you want to sort. |
| limit | query | optional | integer | Optional field to limit the number of results returned. |
| offset | query | optional | integer | Optional beginning point in the list to retrieve from. |
GET /subusers/stats/monthly
/subusers/stats/sums
This endpoint allows you to retrieve the total sums of each email statistic metric for all subusers over the given date range.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| sort_by_direction | query | optional | string | The direction you want to sort. |
| start_date | query | required | string | The starting date of the statistics to retrieve. Must follow format YYYY-MM-DD. |
| end_date | query | optional | string | The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD. |
| limit | query | optional | integer | Limits the number of results returned per page. |
| offset | query | optional | integer | The point in the list to begin retrieving results from. |
| aggregated_by | query | optional | string | How to group the statistics. Defaults to today. Must follow format YYYY-MM-DD. |
| sort_by_metric | query | optional | string | The metric that you want to sort by. Must be a single metric. |
GET /subusers/stats/sums
/subusers/{subuser_name}/stats/monthly
This endpoint allows you to retrive the monthly email statistics for a specific subuser.
When using the sort_by_metric to sort your stats by a specific metric, you can not sort by the following metrics:
bounce_drops, deferred, invalid_emails, processed, spam_report_drops, spam_reports, or unsubscribe_drops.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| subuser_name | path | required | string | — |
| date | query | required | string | The date of the month to retrieve statistics for. Must be formatted YYYY-MM-DD |
| sort_by_metric | query | optional | string | The metric that you want to sort by. Metrics that you can sort by are: |
| sort_by_direction | query | optional | string | The direction you want to sort. |
| limit | query | optional | integer | Optional field to limit the number of results returned. |
| offset | query | optional | integer | Optional beginning point in the list to retrieve from. |
GET /subusers/{subuser_name}/stats/monthly
/subusers
This endpoint allows you to retrieve a list of all of your subusers.
You can choose to retrieve specific subusers as well as limit the results that come back from the API.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| username | query | optional | string | The username of this subuser. |
| limit | query | optional | integer | The number of results you would like to get in each request. |
| offset | query | optional | integer | The number of subusers to skip. |
Unexpected error in API call. See HTTP response body for details.
GET /subusers
/subusers/reputations
This endpoint allows you to request the reputations for your subusers.
Subuser sender reputations give a good idea how well a sender is doing with regards to how recipients and recipient servers react to the mail that is being received. When a bounce, spam report, or other negative action happens on a sent email, it will affect your sender rating.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| usernames | query | optional | string | — |
GET /subusers/reputations
/asm/suppressions/global/{email}
This endpoint allows you to retrieve a global suppression. You can also use this endpoint to confirm if an email address is already globally suppresed.
If the email address you include in the URL path parameter {email} is already globally suppressed, the response will include that email address. If the address you enter for {email} is not globally suppressed, an empty JSON object {} will be returned.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| path | required | string | The email address of the global suppression you want to retrieve. Or, if you want to check if an email address is on the global suppressions list, enter that email address here. |
|
| on-behalf-of | header | optional | string | — |
GET /asm/suppressions/global/{email}
/suppression/unsubscribes
This endpoint allows you to retrieve a list of all email address that are globally suppressed.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| start_time | query | optional | integer | Refers start of the time range in unix timestamp when an unsubscribe email was created (inclusive). |
| end_time | query | optional | integer | Refers end of the time range in unix timestamp when an unsubscribe email was created (inclusive). |
| limit | query | optional | integer | The number of results to display on each page. |
| offset | query | optional | integer | The point in the list of results to begin displaying global suppressions. |
| on-behalf-of | header | optional | string | — |
GET /suppression/unsubscribes
/asm/groups/{group_id}/suppressions
This endpoint allows you to retrieve all suppressed email addresses belonging to the given group.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| group_id | path | required | string | The id of the unsubscribe group that you are adding suppressions to. |
| on-behalf-of | header | optional | string | — |
GET /asm/groups/{group_id}/suppressions
/asm/suppressions
This endpoint allows you to retrieve a list of all suppressions.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| on-behalf-of | header | optional | string | — |
GET /asm/suppressions
/asm/suppressions/{email}
This endpoint returns a list of all groups from which the given email address has been unsubscribed.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| path | required | string | The email address that you want to search suppression groups for. |
|
| on-behalf-of | header | optional | string | — |
GET /asm/suppressions/{email}
/asm/groups
This endpoint allows you to retrieve a list of all suppression groups created by this user.
This endpoint can also return information for multiple group IDs that you include in your request. To add a group ID to your request, simply append ?id=123456&id=123456, with the appropriate group IDs.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| id | query | optional | integer | — |
| on-behalf-of | header | optional | string | — |
GET /asm/groups
/asm/groups/{group_id}
This endpoint allows you to retrieve a single suppression group.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| group_id | path | required | string | The ID of the suppression group you would like to retrieve. |
| on-behalf-of | header | optional | string | — |
GET /asm/groups/{group_id}
/teammates
This endpoint allows you to retrieve a list of all current Teammates.
You can limit the number of results returned using the limit query paramater. To return results from a specific Teammate, use the offset paramter. The Response Headers will include pagination info.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| limit | query | optional | integer | Number of items to return |
| offset | query | optional | integer | Paging offset |
| on-behalf-of | header | optional | string | — |
GET /teammates
/teammates/pending
This endpoint allows you to retrieve a list of all pending Teammate invitations.
Each teammate invitation is valid for 7 days. Users may resend the invitation to refresh the expiration date.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| on-behalf-of | header | optional | string | — |
GET /teammates/pending
/teammates/{username}
This endpoint allows you to retrieve a specific Teammate by username.
You can retrieve the username’s for each of your Teammates using the “Retrieve all Teammates” endpoint.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| username | path | required | string | The username of the teammate that you want to retrieve. |
| on-behalf-of | header | optional | string | — |
GET /teammates/{username}
/scopes/requests
This endpoint allows you to retrieve a list of all recent access requests.
The Response Header’s link parameter will include pagination info.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| limit | query | optional | integer | Optional field to limit the number of results returned. |
| offset | query | optional | integer | Optional beginning point in the list to retrieve from. |
GET /scopes/requests
/templates
This endpoint allows you to retrieve all transactional templates.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| generations | query | optional | string | Comma-delimited list specifying which generations of templates to return. Options are |
| page_size | query | required | number | The number of templates to be returned in each page of results |
| page_token | query | optional | string | A token corresponding to a specific page of results, as provided by metadata |
| on-behalf-of | header | optional | string | — |
GET /templates
/templates/{template_id}
This endpoint allows you to retrieve a single transactional template.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| template_id | path | required | string | — |
| on-behalf-of | header | optional | string | — |
GET /templates/{template_id}
/templates/{template_id}/versions/{version_id}
This endpoint allows you to retrieve a specific version of a template.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| template_id | path | required | string | The ID of the original template |
| version_id | path | required | string | The ID of the template version |
| on-behalf-of | header | optional | string | — |
GET /templates/{template_id}/versions/{version_id}
/user/account
This endpoint allows you to retrieve your user account details.
Your user’s account information includes the user’s account type and reputation.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| on-behalf-of | header | optional | string | — |
GET /user/account
/user/credits
This endpoint allows you to retrieve the current credit balance for your account.
Each account has a credit balance, which is a base number of emails it can send before receiving per-email charges. For more information about credits and billing, see Billing and Plan details information.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| on-behalf-of | header | optional | string | — |
GET /user/credits
/user/email
This endpoint allows you to retrieve the email address currently on file for your account.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| on-behalf-of | header | optional | string | — |
GET /user/email
/user/profile
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| on-behalf-of | header | optional | string | — |
GET /user/profile
/user/username
This endpoint allows you to retrieve your current account username.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| on-behalf-of | header | optional | string | — |
GET /user/username
/user/webhooks/event/settings
This endpoint allows you to retrieve your current event webhook settings.
If an event type is marked as true, then the event webhook will include information about that event.
SendGrid’s Event Webhook will notify a URL of your choice via HTTP POST with information about events that occur as SendGrid processes your email.
Common uses of this data are to remove unsubscribes, react to spam reports, determine unengaged recipients, identify bounced email addresses, or create advanced analytics of your email program.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| on-behalf-of | header | optional | string | — |
GET /user/webhooks/event/settings
/user/webhooks/event/settings/signed
This endpoint allows you to retrieve your signed webhook’s public key.
Once you have enabled signing of the Event Webhook, you will need the public key provided to verify the signatures on requests coming from Twilio SendGrid. You can retrieve the public key from this endpoint at any time.
For more information about cryptographically signing the Event Webhook, see Getting Started with the Event Webhook Security Features.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| on-behalf-of | header | optional | string | — |
GET /user/webhooks/event/settings/signed
/user/webhooks/parse/settings
This endpoint allows you to retrieve all of your current inbound parse settings.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| on-behalf-of | header | optional | string | — |
GET /user/webhooks/parse/settings
/user/webhooks/parse/stats
This endpoint allows you to retrieve the statistics for your Parse Webhook useage.
SendGrid’s Inbound Parse Webhook allows you to parse the contents and attachments of incomming emails. The Parse API can then POST the parsed emails to a URL that you specify. The Inbound Parse Webhook cannot parse messages greater than 30MB in size, including all attachments.
There are a number of pre-made integrations for the SendGrid Parse Webhook which make processing events easy. You can find these integrations in the Library Index.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| limit | query | optional | string | The number of statistics to return on each page. |
| offset | query | optional | string | The number of statistics to skip. |
| aggregated_by | query | optional | string | How you would like the statistics to by grouped. |
| start_date | query | required | string | The starting date of the statistics you want to retrieve. Must be in the format YYYY-MM-DD |
| end_date | query | optional | string | The end date of the statistics you want to retrieve. Must be in the format YYYY-MM-DD |
| on-behalf-of | header | optional | string | — |
GET /user/webhooks/parse/stats
AlertsDeleteAlertByIdResponse
{
"type": "object",
"properties": {}
}
AlertsGetSpecificAlertResponse
{
"type": "object",
"required": [
"created_at",
"email_to",
"id",
"type",
"updated_at"
],
"properties": {
"id": {
"type": "integer",
"description": "The ID of the alert."
},
"type": {
"enum": [
"usage_alert",
"stats_notification"
],
"type": "string",
"description": "The type of alert."
},
"email_to": {
"type": "string",
"description": "The email address that the alert will be sent to."
},
"frequency": {
"type": "string",
"description": "If the alert is of type stats_notification, this indicates how frequently the stats notifications will be sent. For example: \"daily\", \"weekly\", or \"monthly\"."
},
"created_at": {
"type": "integer",
"description": "A Unix timestamp indicating when the alert was created."
},
"percentage": {
"type": "integer",
"description": "If the alert is of type usage_limit, this indicates the percentage of email usage that must be reached before the alert will be sent."
},
"updated_at": {
"type": "integer",
"description": "A Unix timestamp indicating when the alert was last modified."
}
}
}
AlertsUpdateAlertRequest
{
"type": "object",
"example": {
"email_to": "example@example.com"
},
"properties": {
"email_to": {
"type": "string",
"description": "The new email address you want your alert to be sent to.\nExample: test@example.com"
},
"frequency": {
"type": "string",
"description": "The new frequency at which to send the stats_notification alert.\nExample: monthly"
},
"percentage": {
"type": "integer",
"description": "The new percentage threshold at which the usage_limit alert will be sent.\nExample: 90"
}
}
}
AlertsUpdateAlertResponse
{
"type": "object",
"required": [
"created_at",
"email_to",
"id",
"type",
"updated_at"
],
"properties": {
"id": {
"type": "integer",
"description": "The ID of the alert."
},
"type": {
"enum": [
"usage_alert",
"stats_notification"
],
"type": "string",
"description": "The type of alert."
},
"email_to": {
"type": "string",
"description": "The email address that the alert will be sent to."
},
"frequency": {
"type": "string",
"description": "If the alert is of type stats_notification, this indicates how frequently the stats notifications will be sent. For example: \"daily\", \"weekly\", or \"monthly\"."
},
"created_at": {
"type": "integer",
"description": "A Unix timestamp indicating when the alert was created."
},
"percentage": {
"type": "integer",
"description": "If the alert is of type usage_limit, this indicates the percentage of email usage that must be reached before the alert will be sent."
},
"updated_at": {
"type": "integer",
"description": "A Unix timestamp indicating when the alert was last modified."
}
}
}
ApiKeysCreateKeyRequest
{
"type": "object",
"example": {
"name": "My API Key",
"scopes": [
"mail.send",
"alerts.create",
"alerts.read"
]
},
"required": [
"name"
],
"properties": {
"name": {
"type": "string",
"description": "The name you will use to describe this API Key."
},
"scopes": {
"type": "array",
"items": {
"type": "string"
},
"description": "The individual permissions that you are giving to this API Key."
}
}
}
ApiKeysCreateKeyResponse
{
"type": "object",
"properties": {
"name": {
"type": "string"
},
"scopes": {
"type": "array",
"items": {
"type": "string"
}
},
"api_key": {
"type": "string"
},
"api_key_id": {
"type": "string"
}
}
}
ApiKeysGetAllResponse
{
"type": "object",
"properties": {
"result": {
"type": "array",
"items": {
"$ref": "#/components/schemas/api_key_name_id"
}
}
}
}
ApiKeysGetByKeyIdResponse
{
"type": "object",
"properties": {
"result": {
"type": "array",
"items": {
"$ref": "#/components/schemas/api_key_name_id_scopes"
}
}
}
}
ApiKeysUpdateKeyNameRequest
{
"type": "object",
"example": {
"name": "A New Hope"
},
"required": [
"name"
],
"properties": {
"name": {
"type": "string",
"description": "The new name of the API Key."
}
}
}
ApiKeysUpdateNameAndScopesRequest
{
"type": "object",
"example": {
"name": "Profiles key",
"scopes": [
"user.profile.read",
"user.profile.update"
]
},
"required": [
"name"
],
"properties": {
"name": {
"type": "string"
},
"scopes": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
BlocksApiDeleteAllBlockedEmailsRequest
{
"type": "object",
"example": {
"emails": [
"example1@example.com",
"example2@example.com"
],
"delete_all": false
},
"properties": {
"emails": {
"type": "array",
"items": {
"type": "string"
},
"description": "The specific blocked email addresses that you want to delete."
},
"delete_all": {
"type": "boolean",
"description": "Indicates if you want to delete all blocked email addresses."
}
}
}
BlocksApiDeleteAllBlockedEmailsResponse
{
"type": "object",
"properties": {}
}
BlocksApiDeleteSpecificBlockResponse
{
"type": "object",
"properties": {}
}
BouncesApiDeleteBouncesRequest
{
"type": "object",
"example": {
"emails": [
"example@example.com",
"example2@example.com"
],
"delete_all": false
},
"properties": {
"emails": {
"type": "array",
"items": {
"type": "string"
},
"description": "Delete multiple emails from your bounce list at the same time. This should not be used with the delete_all parameter."
},
"delete_all": {
"type": "boolean",
"description": "This parameter allows you to delete **every** email in your bounce list. This should not be used with the emails parameter."
}
}
}
BouncesApiDeleteBouncesResponse
{
"type": "object",
"example": {},
"properties": {}
}
BouncesApiGetAllBouncesResponse
{
"type": "array",
"items": {
"$ref": "#/components/schemas/bounce_response"
}
}
BouncesApiGetByEmailAddressResponse
{
"type": "array",
"items": {
"$ref": "#/components/schemas/bounce_response"
}
}
BouncesApiRemoveBounceResponse
{
"type": "object",
"example": {},
"properties": {}
}
CampaignsApiDeleteCampaignById401Response
{
"type": "object",
"example": {
"errors": [
{
"field": null,
"message": "authorization required"
}
]
},
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"field": {
"type": "string",
"nullable": true,
"x-konfig-null-placeholder": true
},
"message": {
"type": "string",
"example": "authorization required"
}
}
}
}
}
}
CampaignsApiDeleteCampaignById404Response
{
"type": "object",
"example": {},
"properties": {}
}
CampaignsApiDeleteCampaignByIdResponse
{
"type": "object",
"example": {},
"properties": {}
}
CampaignsApiGetScheduledTimeResponse
{
"type": "object",
"title": "View Scheduled Time of a Campaign response",
"required": [
"send_at"
],
"properties": {
"send_at": {
"type": "integer",
"format": "int64"
}
}
}
CampaignsApiGetSingleCampaign401Response
{
"type": "object",
"example": {
"errors": [
{
"field": null,
"message": "authorization required"
}
]
},
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"field": {
"type": "string",
"nullable": true,
"x-konfig-null-placeholder": true
},
"message": {
"type": "string",
"example": "authorization required"
}
}
}
}
}
}
CampaignsApiGetSingleCampaign404Response
{
"type": "object",
"example": {
"errors": [
{
"field": null,
"message": "not found"
}
]
},
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"field": {
"type": "string",
"nullable": true,
"x-konfig-null-placeholder": true
},
"message": {
"type": "string",
"example": "not found"
}
}
}
}
}
}
CampaignsApiGetSingleCampaignResponse
{
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"title": {
"type": "string"
},
"status": {
"type": "string"
},
"ip_pool": {
"type": "string"
},
"subject": {
"type": "string"
},
"list_ids": {
"type": "array",
"items": {
"type": "integer"
}
},
"sender_id": {
"type": "integer"
},
"categories": {
"type": "array",
"items": {
"type": "string"
}
},
"segment_ids": {
"type": "array",
"items": {
"type": "integer"
}
},
"html_content": {
"type": "string"
},
"plain_content": {
"type": "string"
},
"suppression_group_id": {
"type": "integer"
},
"custom_unsubscribe_url": {
"type": "string"
}
}
}
CampaignsApiScheduleCampaignRequest
{
"type": "object",
"title": "Schedule a Campaign request",
"example": {
"send_at": 1489771528
},
"required": [
"send_at"
],
"properties": {
"send_at": {
"type": "integer",
"description": "The unix timestamp for the date and time you would like your campaign to be sent out."
}
}
}
CampaignsApiScheduleCampaignResponse
{
"type": "object",
"title": "Schedule a Campaign response",
"required": [
"id",
"send_at",
"status"
],
"properties": {
"id": {
"type": "integer",
"description": "The campaign ID."
},
"status": {
"enum": [
"Scheduled"
],
"type": "string",
"description": "The status of your campaign."
},
"send_at": {
"type": "integer",
"description": "The date time you scheduled your campaign to be sent."
}
}
}
CampaignsApiSendCampaignNowResponse
{
"type": "object",
"title": "Send a Campaign response",
"required": [
"id",
"status"
],
"properties": {
"id": {
"type": "integer",
"format": "int64"
},
"status": {
"type": "string"
}
}
}
CampaignsApiSendTestCampaignRequest
{
"type": "object",
"example": {
"to": "your.email@example.com"
},
"required": [
"to"
],
"properties": {
"to": {
"type": "string",
"format": "email",
"description": "The email address that should receive the test campaign."
}
}
}
CampaignsApiSendTestCampaignResponse
{
"type": "object",
"title": "Send a Test Campaign request",
"required": [
"to"
],
"properties": {
"to": {
"type": "string"
}
}
}
CampaignsApiUnscheduleCampaignResponse
{
"type": "object",
"example": {},
"properties": {}
}
CampaignsApiUpdateScheduledTimeRequest
{
"type": "object",
"title": "Update a Scheduled Campaign request",
"example": {
"send_at": 1489451436
},
"required": [
"send_at"
],
"properties": {
"send_at": {
"type": "integer",
"format": "int64"
}
}
}
CampaignsApiUpdateScheduledTimeResponse
{
"type": "object",
"title": "Update a Scheduled Campaign response",
"required": [
"id",
"send_at",
"status"
],
"properties": {
"id": {
"type": "integer",
"description": "The campaign ID"
},
"status": {
"type": "string",
"description": "The status of the schedule."
},
"send_at": {
"type": "integer",
"description": "The unix timestamp to send the campaign."
}
}
}
CampaignsApiUpdateSpecificCampaign403Response
{
"type": "object",
"example": {
"errors": [
{
"field": null,
"message": "You may only update a campaign when it is in draft mode."
}
]
},
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"field": {
"type": "string",
"nullable": true,
"x-konfig-null-placeholder": true
},
"message": {
"type": "string",
"example": "You may only update a campaign when it is in draft mode."
}
}
}
}
}
}
CampaignsApiUpdateSpecificCampaignRequest
{
"type": "object",
"title": "Update a Campaign request",
"example": {
"title": "May Newsletter",
"subject": "New Products for Summer!",
"categories": [
"summer line"
],
"html_content": "<html><head><title></title></head><body><p>Check out our summer line!</p></body></html>",
"plain_content": "Check out our summer line!"
},
"required": [
"title",
"subject",
"categories",
"html_content",
"plain_content"
],
"properties": {
"title": {
"type": "string",
"description": "The title of the campaign."
},
"subject": {
"type": "string",
"description": "The subject line for your campaign."
},
"categories": {
"type": "array",
"items": {
"type": "string"
},
"description": "The categories you want to tag on this campaign."
},
"html_content": {
"type": "string",
"description": "The HTML content of this campaign."
},
"plain_content": {
"type": "string",
"description": "The plain content of this campaign."
}
}
}
CampaignsApiUpdateSpecificCampaignResponse
{
"type": "object",
"example": {
"errors": [
{
"field": "title",
"message": "title can't be blank"
},
{
"field": "title",
"message": "title is too long (maximum is 100 characters)"
},
{
"field": "categories",
"message": "categories exceeds 10 category limit"
},
{
"field": "html_content",
"message": "html_content exceeds the 1MB limit"
},
{
"field": "plain_content",
"message": "plain_content exceeds the 1MB limit"
},
{
"field": "sender_id",
"message": "sender_id does not exist"
},
{
"field": "sender_id",
"message": "sender_id is not a verified sender identity"
},
{
"field": "list_ids",
"message": "list_ids do not all exist"
},
{
"field": "segment_ids",
"message": "segment_ids do not all exist"
},
{
"field": "ip_pool",
"message": "The ip pool you provided is invalid"
},
{
"field": "suppression_group_id",
"message": "suppression_group_id does not exist"
},
{
"field": "unsubscribes",
"message": "Either suppression_group_id or custom_unsubscribe_url may be set/used, but not both. Please remove one before setting the other."
},
{
"field": null,
"message": "The JSON you have submitted cannot be parsed."
}
]
},
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"field": {
"type": "string",
"example": "title",
"nullable": true
},
"message": {
"type": "string",
"example": "title can't be blank"
}
}
}
}
}
}
CancelScheduledSendsAllScheduledSendsResponse
{
"type": "array",
"items": {
"$ref": "#/components/schemas/user_scheduled_send_status"
}
}
CancelScheduledSendsByBatchIdResponse
{
"type": "array",
"items": {
"$ref": "#/components/schemas/user_scheduled_send_status"
},
"title": "Retrieve scheduled send response"
}
CancelScheduledSendsByBatchIdStatusRequest
{
"type": "object",
"title": "Cancel or pause a scheduled send request",
"example": {
"status": "pause",
"batch_id": "YOUR_BATCH_ID"
},
"required": [
"batch_id",
"status"
],
"properties": {
"status": {
"enum": [
"pause",
"cancel"
],
"type": "string",
"default": "pause",
"description": "The status of the send you would like to implement. This can be pause or cancel. To delete a pause or cancel status see DELETE /v3/user/scheduled_sends/{batch_id}"
},
"batch_id": {
"type": "string",
"pattern": "^[a-zA-Z0-9]",
"description": "The batch ID is the identifier that your scheduled mail sends share."
}
}
}
CancelScheduledSendsRequestResponse
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"help": {
"type": "object"
},
"field": {
"type": "string"
},
"message": {
"type": "string"
}
}
}
}
}
}
CancelScheduledSendsUpdateStatusRequest
{
"type": "object",
"example": {
"status": "pause"
},
"required": [
"status"
],
"properties": {
"status": {
"enum": [
"cancel",
"pause"
],
"type": "string",
"description": "The status you would like the scheduled send to have."
}
}
}
CancelScheduledSendsUpdateStatusResponse
{
"type": "object",
"example": {},
"properties": {}
}
CategoriesGetEmailStatisticsForResponse
{
"type": "array",
"items": {
"$ref": "#/components/schemas/category_stats"
}
}
CertificatesCreateSsoCertificateRequest
{
"type": "object",
"example": {
"enabled": false,
"integration_id": "b0b98502-9408-4b24-9e3d-31ed7cb15312",
"public_certificate": "<your x509 certificate>"
},
"required": [
"public_certificate",
"integration_id"
],
"properties": {
"enabled": {
"type": "boolean",
"description": "Indicates if the certificate is enabled."
},
"integration_id": {
"type": "string",
"description": "An ID that matches a certificate to a specific IdP integration. This is the `id` returned by the \"Get All SSO Integrations\" endpoint."
},
"public_certificate": {
"type": "string",
"description": "This public certificate allows SendGrid to verify that SAML requests it receives are signed by an IdP that it recognizes."
}
},
"description": ""
}
CertificatesGetByIdpConfigurationsResponse
{
"type": "array",
"items": {
"$ref": "#/components/schemas/sso-certificate-body"
}
}
CertificatesUpdateByIdRequest
{
"type": "object",
"example": {
"enabled": false,
"intergration_id": "b0b98502-9408-4b24-9e3d-31ed7cb15312",
"public_certificate": "<your x509 certificate>"
},
"properties": {
"enabled": {
"type": "boolean",
"description": "Indicates whether or not the certificate is enabled."
},
"integration_id": {
"type": "string",
"description": "An ID that matches a certificate to a specific IdP integration."
},
"public_certificate": {
"type": "string",
"description": "This public certificate allows SendGrid to verify that SAML requests it receives are signed by an IdP that it recognizes."
}
}
}
ContactsApiCustomFieldsCreateNewFieldRequest
{
"type": "object",
"example": {
"name": "pet",
"type": "text"
},
"properties": {
"name": {
"type": "string"
},
"type": {
"type": "string"
}
}
}
ContactsApiCustomFieldsGetAllResponse
{
"type": "object",
"title": "List All Custom Fields response",
"required": [
"custom_fields"
],
"properties": {
"custom_fields": {
"type": "array",
"items": {
"$ref": "#/components/schemas/contactdb_custom_field_with_id"
}
}
}
}
ContactsApiCustomFieldsGetReservedFieldsResponse
{
"type": "object",
"properties": {
"reserved_fields": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"type": {
"type": "string"
}
}
}
}
}
}
ContactsApiListsAddMultipleRecipientsToListRequest
{
"type": "array",
"items": {
"type": "integer"
},
"example": [
"recipient_id1",
"recipient_id2"
]
}
| Version | Endpoints | Schemas | Ingested | Status |
|---|---|---|---|---|
| 1.0.0 | 334 | 545 | 2026-05-11 | current |
| 1.0.0 | 334 | 545 | 2026-04-16 |