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](https://sendgrid.api-docs.io/v3.0/how-to-use-the-sendgrid-v3-api/api-authorization). 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](https://sendgrid.com/docs/ui/account-and-settings/api-keys/).
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
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 | |
| optional |
GET /api_keys
/api_keys
**This endpoint allows you to create a new API Key for the user.** To create your initial SendGrid API Key, you should [use the SendGrid App](https://app.sendgrid.com/settings/api_keys). Once you have created a first key with scopes to manage additional API keys, you can use this API for all other key management. > There is a limit of 100 API Keys on your account. A JSON request body containing a `name` property is required when making requests to this endpoint. If the number of maximum keys, 100, is reached, a `403` status will be returned. Though the `name` field is required, it does not need to be unique. A unique API key ID will be generated for each key you create and returned in the response body. It is not necessary to pass a `scopes` field to the API when creating a key, but you should be aware that omitting the `scopes` field from your request will create a key with "Full Access" permissions by default. See the [API Key Permissions List](https://sendgrid.api-docs.io/v3.0/how-to-use-the-sendgrid-v3-api/api-authorization) 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 |
|---|---|---|---|---|
| optional |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiKeysCreateKeyRequest"
}
}
}
}
POST /api_keys
/api_keys/{api_key_id}
**This endpoint allows you to revoke an existing API Key using an `api_key_id`** Authentications using a revoked API Key will fail after after some small propogation delay. If the API Key ID does not exist, a `404` status will be returned.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
DELETE /api_keys/{api_key_id}
/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](https://sendgrid.api-docs.io/v3.0/how-to-use-the-sendgrid-v3-api/api-authorization) 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 |
|---|---|---|---|---|
| optional |
GET /api_keys/{api_key_id}
/api_keys/{api_key_id}
**This endpoint allows you to update the name of an existing API Key.** You must pass this endpoint a JSON request body with a `name` property, which will be used to rename the key associated with the `api_key_id` passed in the URL.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiKeysUpdateKeyNameRequest"
}
}
}
}
PATCH /api_keys/{api_key_id}
/api_keys/{api_key_id}
**This endpoint allows you to update the name and scopes of a given API key.** You must pass this endpoint a JSON request body with a `name` field and a `scopes` array containing at least one scope. The `name` and `scopes` fields will be used to update the key associated with the `api_key_id` in the request URL. If you need to update a key's scopes only, pass the `name` field with the key's existing name; the `name` will not be modified. If you need to update a key's name only, use the "Update API key name" endpoint. See the [API Key Permissions List](https://sendgrid.api-docs.io/v3.0/how-to-use-the-sendgrid-v3-api/api-authorization) for all available scopes.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiKeysUpdateNameAndScopesRequest"
}
}
}
}
PUT /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. * Usage alerts allow you to set the threshold at which an alert will be sent. * Stats notifications allow you to set how frequently you would like to receive email statistics reports. For example, "daily", "weekly", or "monthly". For more information about alerts, please see our [Alerts documentation](https://sendgrid.com/docs/ui/account-and-settings/alerts/).
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
GET /alerts
/alerts
**This endpoint allows you to create a new alert.** Alerts allow you to specify an email address to receive notifications regarding your email usage or statistics. There are two types of alerts that can be created with this endpoint: * `usage_limit` allows you to set the threshold at which an alert will be sent. * `stats_notification` allows you to set how frequently you would like to receive email statistics reports. For example, "daily", "weekly", or "monthly". For more information about alerts, please see our [Alerts documentation](https://sendgrid.com/docs/ui/account-and-settings/alerts/).
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| on-behalf-of | header | optional | string |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PostAlertsRequest"
}
}
}
}
POST /alerts
/alerts/{alert_id}
**This endpoint allows you to delete an alert.** Alerts allow you to specify an email address to receive notifications regarding your email usage or statistics. * Usage alerts allow you to set the threshold at which an alert will be sent. * Stats notifications allow you to set how frequently you would like to receive email statistics reports. For example, "daily", "weekly", or "monthly". For more information about alerts, please see our [Alerts documentation](https://sendgrid.com/docs/ui/account-and-settings/alerts/).
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
DELETE /alerts/{alert_id}
/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. * Usage alerts allow you to set the threshold at which an alert will be sent. * Stats notifications allow you to set how frequently you would like to receive email statistics reports. For example, "daily", "weekly", or "monthly". For more information about alerts, please see our [Alerts documentation](https://sendgrid.com/docs/ui/account-and-settings/alerts/).
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
GET /alerts/{alert_id}
/alerts/{alert_id}
**This endpoint allows you to update an alert.** Alerts allow you to specify an email address to receive notifications regarding your email usage or statistics. * Usage alerts allow you to set the threshold at which an alert will be sent. * Stats notifications allow you to set how frequently you would like to receive email statistics reports. For example, "daily", "weekly", or "monthly". For more information about alerts, please see our [Alerts documentation](https://sendgrid.com/docs/ui/account-and-settings/alerts/).
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AlertsUpdateAlertRequest"
}
}
}
}
PATCH /alerts/{alert_id}
/suppression/blocks
**This endpoint allows you to delete all email addresses on your blocks list.** There are two options for deleting blocked emails: 1. You can delete all blocked emails by setting `delete_all` to `true` in the request body. 2. You can delete a selection of blocked emails by specifying the email addresses in the `emails` array of the request body.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BlocksApiDeleteAllBlockedEmailsRequest"
}
}
}
}
DELETE /suppression/blocks
/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. |
| optional |
GET /suppression/blocks
/suppression/blocks/{email}
**This endpoint allows you to delete a specific email address from your blocks list.**
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
DELETE /suppression/blocks/{email}
/suppression/blocks/{email}
**This endpoint allows you to retrieve a specific email address from your blocks list.**
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
GET /suppression/blocks/{email}
/suppression/bounces
**This endpoint allows you to delete all emails on your bounces list.** There are two options for deleting bounced emails: 1. You can delete all bounced emails by setting `delete_all` to `true` in the request body. 2. You can delete a selection of bounced emails by specifying the email addresses in the `emails` array of the request body.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BouncesApiDeleteBouncesRequest"
}
}
}
}
DELETE /suppression/bounces
/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). |
| optional |
GET /suppression/bounces
/suppression/bounces/{email}
**This endpoint allows you to remove an email address from your bounce list.**
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| email_address | query | required | string | The email address you would like to remove from the bounce list. |
| optional |
{
"$ref": "#/components/requestBodies/DELETE_contactdb-lists-list_idBody"
}
DELETE /suppression/bounces/{email}
/suppression/bounces/{email}
**This endpoint allows you to retrieve a specific bounce by email address.**
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
GET /suppression/bounces/{email}
/messages/download
This is BETA functionality. You may not have access, and we reserve the right to change functionality without notice. This request will kick off a backend process to generate a CSV file. Once generated, the worker will then send an email for the user download the file. The link will expire in 3 days. The CSV fill contain the last 1 million messages. This endpoint will be rate limited to 1 request every 12 hours (rate limit may change). This endpoint is similar to the GET Single Message endpoint - the only difference is that /download is added to indicate that this is a CSV download requests but the same query is used to determine what the CSV should contain.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| query | query | optional | string | Uses a SQL like syntax to indicate which messages to include in the CSV |
POST /messages/download
/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.**
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. |
| optional |
GET /campaigns
/campaigns
**This endpoint allows you to create a campaign.** In order to send or schedule the campaign, you will be required to provide a subject, sender ID, content (we suggest both html and plain text), and at least one list or segment ID. This information is not required when you create a campaign.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/campaign_request"
}
}
}
}
POST /campaigns
/campaigns/{campaign_id}
**This endpoint allows you to delete a specific campaign.**
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
DELETE /campaigns/{campaign_id}
/campaigns/{campaign_id}
**This endpoint allows you to retrieve a specific campaign.**
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
GET /campaigns/{campaign_id}
/campaigns/{campaign_id}
**This endpoint allows you to update a specific campaign.** This is especially useful if you only set up the campaign using POST /campaigns, but didn't set many of the parameters.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CampaignsApiUpdateSpecificCampaignRequest"
}
}
}
}
PATCH /campaigns/{campaign_id}
/campaigns/{campaign_id}/schedules
**This endpoint allows you to unschedule a campaign that has already been scheduled to be sent.** A successful unschedule will return a 204. If the specified campaign is in the process of being sent, the only option is to cancel (a different method).
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
DELETE /campaigns/{campaign_id}/schedules
/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 |
|---|---|---|---|---|
| optional |
GET /campaigns/{campaign_id}/schedules
/campaigns/{campaign_id}/schedules
**This endpoint allows to you change the scheduled time and date for a campaign to be sent.**
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CampaignsApiUpdateScheduledTimeRequest"
}
}
}
}
PATCH /campaigns/{campaign_id}/schedules
/campaigns/{campaign_id}/schedules
**This endpoint allows you to schedule a specific date and time for your campaign to be sent.** If you have the flexibility, it's better to schedule mail for off-peak times. Most emails are scheduled and sent at the top of the hour or half hour. Scheduling email to avoid those times (for example, scheduling at 10:53) can result in lower deferral rates because it won't be going through our servers at the same times as everyone else's mail.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CampaignsApiScheduleCampaignRequest"
}
}
}
}
POST /campaigns/{campaign_id}/schedules
/campaigns/{campaign_id}/schedules/now
**This endpoint allows you to immediately send an existing campaign.** Normally a POST request would have a body, but since this endpoint is telling us to send a resource that is already created, a request body is not needed.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
POST /campaigns/{campaign_id}/schedules/now
/campaigns/{campaign_id}/schedules/test
**This endpoint allows you to send a test campaign.** To send to multiple addresses, use an array for the JSON "to" value ["one@address","two@address"]
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CampaignsApiSendTestCampaignRequest"
}
}
}
}
POST /campaigns/{campaign_id}/schedules/test
/mail/batch
**This endpoint allows you to generate a new batch ID.** Once a `batch_id` is created, you can associate it with a scheduled send using the `/mail/send` endpoint. Passing the `batch_id` as a field in the `/mail/send` request body will assign the ID to the send you are creating. Once an ID is associated with a scheduled send, the send can be accessed and its send status can be modified using the `batch_id`.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
POST /mail/batch
/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 |
|---|---|---|---|---|
| optional |
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 |
|---|---|---|---|---|
| optional |
GET /user/scheduled_sends
/user/scheduled_sends
**This endpoint allows you to cancel or pause a scheduled send associated with a `batch_id`.** Passing this endpoint a `batch_id` and status will cancel or pause the scheduled send. Once a scheduled send is set to `pause` or `cancel` you must use the "Update a scheduled send" endpoint to change its status or the "Delete a cancellation or pause from a scheduled send" endpoint to remove the status. Passing a status change to a scheduled send that has already been paused or cancelled will result in a `400` level status code. If the maximum number of cancellations/pauses are added to a send, a `400` level status code will be returned.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CancelScheduledSendsByBatchIdStatusRequest"
}
}
}
}
POST /user/scheduled_sends
/user/scheduled_sends/{batch_id}
**This endpoint allows you to delete the cancellation/pause of a scheduled send.** Scheduled sends cancelled less than 10 minutes before the scheduled time are not guaranteed to be cancelled.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
DELETE /user/scheduled_sends/{batch_id}
/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 |
|---|---|---|---|---|
| optional |
GET /user/scheduled_sends/{batch_id}
/user/scheduled_sends/{batch_id}
**This endpoint allows you to update the status of a scheduled send for the given `batch_id`.** If you have already set a `cancel` or `pause` status on a scheduled send using the "Cancel or pause a scheduled send" endpoint, you can update it's status using this endpoint. Attempting to update a status once it has been set with the "Cancel or pause a scheduled send" endpoint will result in a `400` error.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CancelScheduledSendsUpdateStatusRequest"
}
}
}
}
PATCH /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. |
| optional |
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". |
| optional |
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". |
| optional |
GET /categories/stats/sums
/sso/certificates
**This endpoint allows you to create an SSO certificate.**
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CertificatesCreateSsoCertificateRequest"
}
}
}
}
POST /sso/certificates
/sso/certificates/{cert_id}
**This endpoint allows you to delete an SSO certificate.** You can retrieve a certificate's ID from the response provided by the "Get All SSO Integrations" endpoint.
DELETE /sso/certificates/{cert_id}
/sso/certificates/{cert_id}
**This endpoint allows you to retrieve an individual SSO certificate.**
GET /sso/certificates/{cert_id}
/sso/certificates/{cert_id}
**This endpoint allows you to update an existing certificate by ID.** You can retrieve a certificate's ID from the response provided by the "Get All SSO Integrations" endpoint.
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CertificatesUpdateByIdRequest"
}
}
}
}
PATCH /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.
GET /sso/integrations/{integration_id}/certificates
/marketing/contacts
**This endpoint can be used to delete one or more contacts**. The query parameter `ids` must set to a comma-separated list of contact IDs for bulk contact deletion. The query parameter `delete_all_contacts` must be set to `"true"` to delete **all** contacts. You must set either `ids` or `delete_all_contacts`. Deletion jobs are processed asynchronously. Twilio SendGrid recommends exporting your contacts regularly as a backup to avoid issues or lost data.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| delete_all_contacts | query | optional | string | Must be set to `"true"` to delete all contacts. |
| ids | query | optional | string | A comma-separated list of contact IDs. |
DELETE /marketing/contacts
/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
**This endpoint allows the [upsert](https://en.wiktionary.org/wiki/upsert) (insert or update) of up to 30,000 contacts, or 6MB of data, whichever is lower**. Because the creation and update of contacts is an asynchronous process, the response will not contain immediate feedback on the processing of your upserted contacts. Rather, it will contain an HTTP 202 response indicating the contacts are queued for processing or an HTTP 4XX error containing validation errors. Should you wish to get the resulting contact's ID or confirm your contacts have been updated or added, you can use the "Get Contacts by Emails" endpoint. Please note that custom fields need to have been already created if you wish to set their values for the contacts being upserted. To do this, please use the "Create Custom Field Definition" endpoint. You will see a `job_id` in the response to your request. This can be used to check the status of your upsert job. To do so, please use the "Import Contacts Status" endpoint. If the contact already exists in the system, any entries submitted via this endpoint will update the existing contact. The contact to update will be determined only by the `email` field and any fields omitted from the request will remain as they were. A contact's ID cannot be used to update the contact. The email field will be changed to all lower-case. If a contact is added with an email that exists but contains capital letters, the existing contact with the all lower-case email will be updated. Twilio SendGrid recommends exporting your contacts regularly as a backup to avoid issues or lost data.
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ContactsUpsertBatchContactsRequest"
}
}
}
}
PUT /marketing/contacts
/marketing/contacts/batch
**This endpoint is used to retrieve a set of contacts identified by their IDs.** This can be more efficient endpoint to get contacts than making a series of individual `GET` requests to the "Get a Contact by ID" endpoint. You can supply up to 100 IDs. Pass them into the `ids` field in your request body as an array or one or more strings. Twilio SendGrid recommends exporting your contacts regularly as a backup to avoid issues or lost data.
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ContactsGetBatchedByIdsRequest"
}
}
}
}
POST /marketing/contacts/batch
/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
**Use this endpoint to export lists or segments of contacts**. If you would just like to have a link to the exported list sent to your email set the `notifications.email` option to `true` in the `POST` payload. If you would like to download the list, take the `id` that is returned and use the "Export Contacts Status" endpoint to get the `urls`. Once you have the list of URLs, make a `GET` request to each URL provided to download your CSV file(s). You specify the segements and or/contact lists you wish to export by providing the relevant IDs in, respectively, the `segment_ids` and `list_ids` fields in the request body. The lists will be provided in either JSON or CSV files. To specify which of these you would required, set the request body `file_type` field to `json` or `csv`. You can also specify a maximum file size (in MB). If the export file is larger than this, it will be split into multiple files. Twilio SendGrid recommends exporting your contacts regularly as a backup to avoid issues or lost data.
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ContactsExportListsSegmentsRequest"
}
}
}
}
POST /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.
GET /marketing/contacts/exports/{id}
/marketing/contacts/imports
**This endpoint allows a CSV upload containing up to one million contacts or 5GB of data, whichever is smaller.** Imports take place asynchronously: the endpoint returns a URL (`upload_uri`) and HTTP headers (`upload_headers`) which can subsequently be used to `PUT` a file of contacts to be imported into our system. Uploaded CSV files may also be [gzip-compressed](https://en.wikipedia.org/wiki/Gzip). In either case, you must include the field `file_type` with the value `csv` in your request body. The `field_mappings` paramter is a respective list of field definition IDs to map the uploaded CSV columns to. It allows you to use CSVs where one or more columns are skipped (`null`) or remapped to the contact field. For example, if `field_mappings` is set to `[null, "w1", "_rf1"]`, this means skip column 0, map column 1 to the custom field with the ID `w1`, and map column 2 to the reserved field with the ID `_rf1`. See the "Get All Field Definitions" endpoint to fetch your custom and reserved field IDs to use with `field_mappings`. Once you recieve the response body you can then initiate a **second** API call where you use the supplied URL and HTTP header to upload your file. For example: `curl --upload-file "file/path.csv" "URL_GIVEN" -H 'HEADER_GIVEN'` If you'd like to monitor the status of your import job, use the `job_id` and the "Import Contacts Status" endpoint. Twilio SendGrid recommends exporting your contacts regularly as a backup to avoid issues or lost data.
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ContactsImportCsvRequest"
}
}
}
}
PUT /marketing/contacts/imports
/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.
GET /marketing/contacts/imports/{id}
/marketing/contacts/search
**Use this endpoint to locate contacts**. The request body's `query` field accepts valid [SGQL](https://sendgrid.com/docs/for-developers/sending-email/segmentation-query-language/) for searching for a contact. Because contact emails are stored in lower case, using SGQL to search by email address requires the provided email address to be in lower case. The SGQL `lower()` function can be used for this. Only the first 50 contacts that meet the search criteria will be returned. If the query takes longer than 20 seconds, a `408 Request Timeout` status will be returned. Formatting the `created_at` and `updated_at` values as Unix timestamps is deprecated. Instead they are returned as ISO format as string. Twilio SendGrid recommends exporting your contacts regularly as a backup to avoid issues or lost data.
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ContactsSearchContactsByQueryRequest"
}
}
}
}
POST /marketing/contacts/search
/marketing/contacts/search/emails
**This endpoint allows you to retrieve up to 100 contacts matching the searched `email` address(es), including any `alternate_emails`.** Email addresses are unique to a contact, meaning this endpoint can treat an email address as a primary key to search by. The contact object associated with the address, whether it is their `email` or one of their `alternate_emails` will be returned if matched. Email addresses in the search request do not need to match the case in which they're stored, but the email addresses in the result will be all lower case. Empty strings are excluded from the search and will not be returned. This endpoint should be used in place of the "Search Contacts" endpoint when you can provide exact email addresses and do not need to include other [Segmentation Query Language (SGQL)](https://sendgrid.com/docs/for-developers/sending-email/segmentation-query-language/) filters when searching. If you need to access a large percentage of your contacts, we recommend exporting your contacts with the "Export Contacts" endpoint and filtering the results client side. This endpoint returns a `200` status code when any contacts match the address(es) you supplied. When searching multiple addresses in a single request, it is possible that some addresses will match a contact while others will not. When a partially successful search like this is made, the matching contacts are returned in an object and an error message is returned for the email address(es) that are not found. This endpoint returns a `404` status code when no contacts are found for the provided email address(es). A `400` status code is returned if any searched addresses are invalid. Twilio SendGrid recommends exporting your contacts regularly as a backup to avoid issues or lost data.
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ContactsSearchByEmailsRequest"
}
}
}
}
POST /marketing/contacts/search/emails
/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.
GET /marketing/contacts/{id}
/contactdb/custom_fields
**This endpoint allows you to retrieve all custom fields.**
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
GET /contactdb/custom_fields
/contactdb/custom_fields
**This endpoint allows you to create a custom field.** **You can create up to 120 custom fields.**
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ContactsApiCustomFieldsCreateNewFieldRequest"
}
}
}
}
POST /contactdb/custom_fields
/contactdb/custom_fields/{custom_field_id}
**This endpoint allows you to delete a custom field by ID.**
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
DELETE /contactdb/custom_fields/{custom_field_id}
/contactdb/custom_fields/{custom_field_id}
**This endpoint allows you to retrieve a custom field by ID.**
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
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 |
|---|---|---|---|---|
| optional |
GET /contactdb/reserved_fields
/contactdb/lists
**This endpoint allows you to delete multiple recipient lists.**
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ContactsApiListsDeleteMultipleListsRequest"
}
}
}
}
DELETE /contactdb/lists
/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 |
|---|---|---|---|---|
| optional |
GET /contactdb/lists
/contactdb/lists
**This endpoint allows you to create a list for your recipients.**
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ContactsApiListsCreateNewListRequest"
}
}
}
}
POST /contactdb/lists
/contactdb/lists/{list_id}
**This endpoint allows you to delete a specific recipient list with the given ID.**
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| delete_contacts | query | optional | boolean | Adds the ability to delete all contacts on the list in addition to deleting the list. |
| optional |
{
"$ref": "#/components/requestBodies/DELETE_contactdb-lists-list_idBody"
}
DELETE /contactdb/lists/{list_id}
/contactdb/lists/{list_id}
**This endpoint allows you to retrieve a single recipient list.**
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| list_id | query | optional | integer | The ID of the list to retrieve. |
| optional |
GET /contactdb/lists/{list_id}
/contactdb/lists/{list_id}
**This endpoint allows you to update the name of one of your recipient lists.**
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| list_id | query | required | integer | The ID of the list you are updating. |
| optional |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ContactsApiListsUpdateListNameRequest"
}
}
}
}
PATCH /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 |
|---|---|---|---|---|
| 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. |
| optional |
GET /contactdb/lists/{list_id}/recipients
/contactdb/lists/{list_id}/recipients
**This endpoint allows you to add multiple recipients to a list.** Adds existing recipients to a list, passing in the recipient IDs to add. Recipient IDs should be passed exactly as they are returned from recipient endpoints.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ContactsApiListsAddMultipleRecipientsToListRequest"
}
}
}
}
POST /contactdb/lists/{list_id}/recipients
/contactdb/lists/{list_id}/recipients/{recipient_id}
**This endpoint allows you to delete a single recipient from a list.**
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| list_id | query | required | integer | The ID of the list you are taking this recipient away from. |
| recipient_id | query | required | integer | The ID of the recipient to take off the list. |
| optional |
{
"$ref": "#/components/requestBodies/DELETE_contactdb-lists-list_idBody"
}
DELETE /contactdb/lists/{list_id}/recipients/{recipient_id}
/contactdb/lists/{list_id}/recipients/{recipient_id}
**This endpoint allows you to add a single recipient to a list.**
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
POST /contactdb/lists/{list_id}/recipients/{recipient_id}
/contactdb/recipients
**This endpoint allows you to deletes one or more recipients.** The body of an API call to this endpoint must include an array of recipient IDs of the recipients you want to delete.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ContactsApiRecipientsDeleteMultipleRecipientsRequest"
}
}
}
}
DELETE /contactdb/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) |
| optional |
GET /contactdb/recipients
/contactdb/recipients
**This endpoint allows you to update one or more recipients.** The body of an API call to this endpoint must include an array of one or more recipient objects. It is of note that you can add custom field data as parameters on recipient objects. We have provided an example using some of the default custom fields SendGrid provides.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ContactsApiRecipientsUpdateMultipleRecipientsRequest"
}
}
}
}
PATCH /contactdb/recipients
/contactdb/recipients
**This endpoint allows you to add a Marketing Campaigns recipient.** You can add custom field data as a parameter on this endpoint. We have provided an example using some of the default custom fields SendGrid provides. The rate limit is three requests every 2 seconds. You can upload 1000 contacts per request. So the maximum upload rate is 1500 recipients per second.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ContactsApiRecipientsAddRecipientRequest"
}
}
}
}
POST /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 |
|---|---|---|---|---|
| optional |
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 |
|---|---|---|---|---|
| optional |
GET /contactdb/recipients/count
/contactdb/recipients/search
**This endpoint allows you to perform a search on all of your Marketing Campaigns recipients.** field_name: * is a variable that is substituted for your actual custom field name from your recipient. * Text fields must be url-encoded. Date fields are searchable only by unix timestamp (e.g. 2/2/2015 becomes 1422835200) * If field_name is a 'reserved' date field, such as created_at or updated_at, the system will internally convert your epoch time to a date range encompassing the entire day. For example, an epoch time of 1422835600 converts to Mon, 02 Feb 2015 00:06:40 GMT, but internally the system will search from Mon, 02 Feb 2015 00:00:00 GMT through Mon, 02 Feb 2015 23:59:59 GMT.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| {field_name} | query | optional | string | |
| optional |
GET /contactdb/recipients/search
/contactdb/recipients/search
<p> Search using segment conditions without actually creating a segment. Body contains a JSON object with <code>conditions</code>, a list of conditions as described below, and an optional <code>list_id</code>, which is a valid list ID for a list to limit the search on. </p> <p> Valid operators for create and update depend on the type of the field for which you are searching. </p> <ul> <li>Dates: <ul> <li>"eq", "ne", "lt" (before), "gt" (after) <ul> <li>You may use MM/DD/YYYY for day granularity or an epoch for second granularity.</li> </ul> </li> <li>"empty", "not_empty"</li> <li>"is within" <ul> <li>You may use an <a href="https://en.wikipedia.org/wiki/ISO_8601">ISO 8601 date format</a> or the # of days.</li> </ul> </li> </ul> </li> <li>Text: "contains", "eq" (is - matches the full field), "ne" (is not - matches any field where the entire field is not the condition value), "empty", "not_empty"</li> <li>Numbers: "eq", "lt", "gt", "empty", "not_empty"</li> <li>Email Clicks and Opens: "eq" (opened), "ne" (not opened)</li> </ul> <p> Field values must all be a string. </p> <p> Search conditions using "eq" or "ne" for email clicks and opens should provide a "field" of either <code>clicks.campaign_identifier</code> or <code>opens.campaign_identifier</code>. The condition value should be a string containing the id of a completed campaign. </p> <p> Search conditions list may contain multiple conditions, joined by an "and" or "or" in the "and_or" field. The first condition in the conditions list must have an empty "and_or", and subsequent conditions must all specify an "and_or". </p>
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ContactsApiRecipientsSearchBySegmentConditionsRequest"
}
}
}
}
POST /contactdb/recipients/search
/contactdb/recipients/{recipient_id}
**This endpoint allows you to delete a single recipient with the given ID from your contact database.** > Use this to permanently delete your recipients from all of your contact lists and all segments if required by applicable law.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
DELETE /contactdb/recipients/{recipient_id}
/contactdb/recipients/{recipient_id}
**This endpoint allows you to retrieve a single recipient by ID from your contact database.**
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
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 |
|---|---|---|---|---|
| optional |
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 |
|---|---|---|---|---|
| optional |
GET /contactdb/status
/contactdb/segments
**This endpoint allows you to retrieve all of your segments.**
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
GET /contactdb/segments
/contactdb/segments
**This endpoint allows you to create a new segment.** Valid operators for create and update depend on the type of the field for which you are searching. **Dates** - "eq", "ne", "lt" (before), "gt" (after) - You may use MM/DD/YYYY for day granularity or an epoch for second granularity. - "empty", "not_empty" - "is within" - You may use an [ISO 8601 date format](https://en.wikipedia.org/wiki/ISO_8601) or the # of days. **Text** - "contains" - "eq" (is/equals - matches the full field) - "ne" (is not/not equals - matches any field where the entire field is not the condition value) - "empty" - "not_empty" **Numbers** - "eq" (is/equals) - "lt" (is less than) - "gt" (is greater than) - "empty" - "not_empty" **Email Clicks and Opens** - "eq" (opened) - "ne" (not opened) All field values must be a string. Conditions using "eq" or "ne" for email clicks and opens should provide a "field" of either `clicks.campaign_identifier` or `opens.campaign_identifier`. The condition value should be a string containing the id of a completed campaign. The conditions list may contain multiple conditions, joined by an "and" or "or" in the "and_or" field. The first condition in the conditions list must have an empty "and_or", and subsequent conditions must all specify an "and_or".
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/contactdb_segments"
}
}
}
}
POST /contactdb/segments
/contactdb/segments/{segment_id}
**This endpoint allows you to delete a segment from your recipients database.** You also have the option to delete all the contacts from your Marketing Campaigns recipient database who were in this segment.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| delete_contacts | query | optional | boolean | True to delete all contacts matching the segment in addition to deleting the segment |
| optional |
{
"$ref": "#/components/requestBodies/DELETE_contactdb-lists-list_idBody"
}
DELETE /contactdb/segments/{segment_id}
/contactdb/segments/{segment_id}
**This endpoint allows you to retrieve a single segment with the given ID.**
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| segment_id | query | required | integer | The ID of the segment you want to request. |
| optional |
GET /contactdb/segments/{segment_id}
/contactdb/segments/{segment_id}
**This endpoint allows you to update a segment.**
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| segment_id | query | optional | string | The ID of the segment you are updating. |
| optional |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ContactsApiSegmentsUpdateSegmentRequest"
}
}
}
}
PATCH /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 |
|---|---|---|---|---|
| page | query | optional | integer | |
| page_size | query | optional | integer | |
| optional |
GET /contactdb/segments/{segment_id}/recipients
/marketing/field_definitions
**This endpoint retrieves all defined Custom Fields and Reserved Fields.**
GET /marketing/field_definitions
/marketing/field_definitions
**This endpoint creates a new custom field definition.** Custom field definitions are created with the given `name` and `field_type`. Although field names are stored in a case-sensitive manner, all field names must be case-insensitively unique. This means you may create a field named `CamelCase` or `camelcase`, but not both. Additionally, a Custom Field name cannot collide with any Reserved Field names. You should save the returned `id` value in order to update or delete the field at a later date. You can have up to 120 custom fields. The custom field name should be created using only alphanumeric characters (A-Z and 0-9) and underscores (\_). Custom fields can only begin with letters A-Z or underscores (_). The field type can be date, text, or number fields. The field type is important for creating segments from your contact database. **Note: Creating a custom field that begins with a number will cause issues with sending in Marketing Campaigns.**
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CustomFieldsCreateDefinitionRequest"
}
}
}
}
POST /marketing/field_definitions
/marketing/field_definitions/{custom_field_id}
**This endpoint deletes a defined Custom Field.** You cand delete only Custom Fields; Reserved Fields cannot be deleted.
DELETE /marketing/field_definitions/{custom_field_id}
/marketing/field_definitions/{custom_field_id}
**This endopoint allows you to update a defined Custom Field.** Only your Custom fields can be modified; Reserved Fields cannot be updated.
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CustomFieldsUpdateDefinitionRequest"
}
}
}
}
PATCH /marketing/field_definitions/{custom_field_id}
/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 |
|---|---|---|---|---|
| optional | ||||
| optional | ||||
| optional |
GET /designs
/designs
**This endpoint allows you to create a new design**. You can add a new design by passing data, including a string of HTML email content, to `/designs`. When creating designs from scratch, be aware of the styling constraints inherent to many email clients. For a list of best practices, see our guide to [Cross-Platform Email Design](https://sendgrid.com/docs/ui/sending-email/cross-platform-html-design/). The Design Library can also convert your design’s HTML elements into drag and drop modules that are editable in the Designs Library user interface. For more, visit the [Design and Code Editor documentation](https://sendgrid.com/docs/ui/sending-email/editor/#drag--drop-markup). Because the `/designs` endpoint makes it easy to add designs, you can create a design with your preferred tooling or migrate designs you already own without relying on the Design Library UI.
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/design-input"
}
}
}
}
POST /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 |
|---|---|---|---|---|
| optional | ||||
| optional | ||||
| optional |
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.
GET /designs/pre-builts/{id}
/designs/pre-builts/{id}
**This endpoint allows you to duplicate one of the pre-built Twilio SendGrid designs**. Like duplicating one of your existing designs, you are not required to pass any data in the body of a request to this endpoint. If you choose to leave the `name` field blank, your duplicate will be assigned the name of the design it was copied from with the text "Duplicate: " prepended to it. This name change is only a convenience, as the duplicate design will be assigned a unique ID that differentiates it from your other designs. You can retrieve the IDs for Twilio SendGrid pre-built designs using the "List SendGrid Pre-built Designs" endpoint. You can modify your duplicate’s name at the time of creation by passing an updated value to the `name` field when making the initial request. More on retrieving design IDs can be found above.
{
"$ref": "#/components/requestBodies/design-duplicate-input"
}
POST /designs/pre-builts/{id}
/designs/{id}
**This endpoint allows you to delete a single design**. Be sure to check the ID of the design you intend to delete before making this request; deleting a design is a permanent action.
DELETE /designs/{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.
GET /designs/{id}
/designs/{id}
**This endpoint allows you to edit a design**. The Design API supports PATCH requests, which allow you to make partial updates to a single design. Passing data to a specific field will update only the data stored in that field; all other fields will be unaltered. For example, updating a design's name requires that you make a PATCH request to this endpoint with data specified for the `name` field only. ``` { "name": "<Updated Name>" } ```
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DesignsApiUpdateDesignByIdRequest"
}
}
}
}
PATCH /designs/{id}
/designs/{id}
**This endpoint allows you to duplicate one of your existing designs**. Modifying an existing design is often the easiest way to create something new. You are not required to pass any data in the body of a request to this endpoint. If you choose to leave the `name` field blank, your duplicate will be assigned the name of the design it was copied from with the text "Duplicate: " prepended to it. This name change is only a convenience, as the duplicate will be assigned a unique ID that differentiates it from your other designs. You can modify your duplicate’s name at the time of creation by passing an updated value to the `name` field when making the initial request. More on retrieving design IDs can be found below.
{
"$ref": "#/components/requestBodies/design-duplicate-input"
}
POST /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. |
| optional |
GET /whitelabel/domains
/whitelabel/domains
**This endpoint allows you to authenticate a domain.** If you are authenticating a domain for a subuser, you have two options: 1. Use the "username" parameter. This allows you to authenticate a domain on behalf of your subuser. This means the subuser is able to see and modify the authenticated domain. 2. Use the Association workflow (see Associate Domain section). This allows you to authenticate a domain created by the parent to a subuser. This means the subuser will default to the assigned domain, but will not be able to see or modify that authenticated domain. However, if the subuser authenticates their own domain it will overwrite the assigned domain.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DomainAuthenticationPostAuthenticateDomainRequest"
}
}
}
}
POST /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. |
| optional |
GET /whitelabel/domains/default
/whitelabel/domains/subuser
**This endpoint allows you to disassociate a specific authenticated domain from a 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 | optional | string | Username for the subuser to find associated authenticated domain. |
DELETE /whitelabel/domains/subuser
/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 delete an authenticated domain.**
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
DELETE /whitelabel/domains/{domain_id}
/whitelabel/domains/{domain_id}
**This endpoint allows you to retrieve a specific authenticated domain.**
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
GET /whitelabel/domains/{domain_id}
/whitelabel/domains/{domain_id}
**This endpoint allows you to update the settings for an authenticated domain.**
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DomainAuthenticationUpdateDomainSettingsRequest"
}
}
}
}
PATCH /whitelabel/domains/{domain_id}
/whitelabel/domains/{domain_id}/subuser
**This endpoint allows you to associate a specific authenticated domain with a 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.
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DomainAuthenticationAssociateSubuserWithDomainRequest"
}
}
}
}
POST /whitelabel/domains/{domain_id}/subuser
/whitelabel/domains/{id}/ips
**This endpoint allows you to add an IP address to an authenticated domain.**
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DomainAuthenticationAddIpToDomainRequest"
}
}
}
}
POST /whitelabel/domains/{id}/ips
/whitelabel/domains/{id}/ips/{ip}
**This endpoint allows you to remove an IP address from that domain's authentication.**
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
DELETE /whitelabel/domains/{id}/ips/{ip}
/whitelabel/domains/{id}/validate
**This endpoint allows you to validate an authenticated domain. If it fails, it will return an error message describing why the domain could not be validated.**
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
POST /whitelabel/domains/{id}/validate
/validations/email
**This endpoint allows you to validate an email address.**
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/EmailAddressValidationCheckValidityRequest"
}
}
}
}
POST /validations/email
/whitelabel/dns/email
**This endpoint is used to share DNS records with a colleagues** Use this endpoint to send SendGrid-generated DNS record information to a co-worker so they can enter it into your DNS provider to validate your domain and link branding. What type of records are sent will depend on whether you have chosen Automated Security or not. When using Automated Security, SendGrid provides you with three CNAME records. If you turn Automated Security off, you are instead given TXT and MX records. If you pass a `link_id` to this endpoint, the generated email will supply the DNS records necessary to complete [Link Branding](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) setup. If you pass a `domain_id` to this endpoint, the generated email will supply the DNS records needed to complete [Domain Authentication](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Passing both IDs will generate an email with the records needed to complete both setup steps. You can retrieve all your domain IDs from the returned `id` fields for each domain using the "List all authenticated domains" endpoint. You can retrieve all of your link IDs using the "Retrieve all branded links" endpoint.
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/EmailCnameRecordsSendDnsEmailRequest"
}
}
}
}
POST /whitelabel/dns/email
/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. |
| optional |
GET /access_settings/activity
/access_settings/whitelist
**This endpoint allows you to remove one or more IP addresses from your list of allowed addresses.** To remove one or more IP addresses, pass this endpoint an array containing the ID(s) associated with the IP(s) you intend to remove. You can retrieve the IDs associated with your allowed IP addresses using the "Retrieve a list of currently allowed IPs" endpoint. It is possible to remove your own IP address, which will block access to your account. You will need to submit a [support ticket](https://sendgrid.com/docs/ui/account-and-settings/support/) if this happens. For this reason, it is important to double check that you are removing only the IPs you intend to remove when using this endpoint.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/IpAccessManagementRemoveIpAddressesRequest"
}
}
}
}
DELETE /access_settings/whitelist
/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 |
|---|---|---|---|---|
| optional |
GET /access_settings/whitelist
/access_settings/whitelist
**This endpoint allows you to add one or more allowed IP addresses.** To allow one or more IP addresses, pass them to this endpoint in an array. Once an IP address is added to your allow list, it will be assigned an `id` that can be used to remove the address. You can retrieve the ID associated with an IP using the "Retrieve a list of currently allowed IPs" endpoint.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/IpAccessManagementAddAllowedIpsRequest"
}
}
}
}
POST /access_settings/whitelist
/access_settings/whitelist/{rule_id}
**This endpoint allows you to remove a specific IP address from your list of allowed addresses.** When removing a specific IP address from your list, you must include the ID 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 |
|---|---|---|---|---|
| optional |
DELETE /access_settings/whitelist/{rule_id}
/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 |
|---|---|---|---|---|
| optional |
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
**This endpoint is for adding a(n) IP Address(es) to your account.**
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PostIpsRequest"
}
}
}
}
POST /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.
GET /ips/{ip_address}
/ips/pools
**This endpoint allows you to get all of your IP pools.**
GET /ips/pools
/ips/pools
**This endpoint allows you to create an IP pool.** Before you can create an IP pool, you need to activate the IP in your SendGrid account: 1. Log into your SendGrid account. 1. Navigate to **Settings** and then select **IP Addresses**. 1. Find the IP address you want to activate and then click **Edit**. 1. Check **Allow my account to send mail using this IP address**. 1. Click **Save**.
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/IpPoolsCreatePoolRequest"
}
}
}
}
POST /ips/pools
/ips/pools/{pool_name}
**This endpoint allows you to delete an IP pool.**
DELETE /ips/pools/{pool_name}
/ips/pools/{pool_name}
**This endpoint allows you to get all of the IP addresses that are in a specific IP pool.**
GET /ips/pools/{pool_name}
/ips/pools/{pool_name}
**This endpoint allows you to update the name of an IP pool.**
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/IpPoolsUpdateNameRequest"
}
}
}
}
PUT /ips/pools/{pool_name}
/ips/pools/{pool_name}/ips
**This endpoint allows you to add an IP address to an IP pool.** You can add the same IP address to multiple pools. It may take up to 60 seconds for your IP address to be added to a pool after your request is made. Before you can add an IP to a pool, you need to activate it in your SendGrid account: 1. Log into your SendGrid account. 1. Navigate to **Settings** and then select **IP Addresses**. 1. Find the IP address you want to activate and then click **Edit**. 1. Check **Allow my account to send mail using this IP address**. 1. Click **Save**. You can retrieve all of your available IP addresses from the "Retrieve all IP addresses" endpoint.
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/IpPoolsAddIpAddressToPoolRequest"
}
}
}
}
POST /ips/pools/{pool_name}/ips
/ips/pools/{pool_name}/ips/{ip}
**This endpoint allows you to remove an IP address from an IP pool.**
DELETE /ips/pools/{pool_name}/ips/{ip}
/ips/warmup
**This endpoint allows you to retrieve all of your IP addresses that are currently warming up.**
GET /ips/warmup
/ips/warmup
**This endpoint allows you to put an IP address into warmup mode.**
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/IpWarmupStartIpAddressWarmupRequest"
}
}
}
}
POST /ips/warmup
/ips/warmup/{ip_address}
**This endpoint allows you to remove an IP address from warmup mode.** Your request will return a 204 status code if the specified IP was successfully removed from warmup mode. To retrieve details of the IP’s warmup status *before* removing it from warmup mode, call the "Retrieve the warmpup status for a specific IP address" endpoint.
DELETE /ips/warmup/{ip_address}
/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.
GET /ips/warmup/{ip_address}
/suppression/invalid_emails
**This endpoint allows you to remove email addresses from your invalid email address list.** There are two options for deleting invalid email addresses: 1) You can delete all invalid email addresses by setting `delete_all` to true in the request body. 2) You can delete some invalid email addresses by specifying certain addresses in an array in the request body.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InvalidEmailsApiDeleteInvalidEmailsRequest"
}
}
}
}
DELETE /suppression/invalid_emails
/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. |
| optional |
GET /suppression/invalid_emails
/suppression/invalid_emails/{email}
**This endpoint allows you to remove a specific email address from the invalid email address list.**
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
DELETE /suppression/invalid_emails/{email}
/suppression/invalid_emails/{email}
**This endpoint allows you to retrieve a specific invalid email addresses.**
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
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. |
| optional |
GET /whitelabel/links
/whitelabel/links
**This endpoint allows you to create a new branded link.** To create the link branding, supply the root domain and, optionally, the subdomain — these go into separate fields in your request body. The root domain should match your FROM email address. If you provide a subdomain, it must be different from the subdomain you used for authenticating your domain. 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 |
|---|---|---|---|---|
| optional |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/LinkBrandingCreateBrandedLinkRequest"
}
}
}
}
POST /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: * The validated branded link marked as `default` (set when you call the "Create a branded link" endpoint or by calling the "Update a branded link" endpoint on an existing link) * Legacy branded links (migrated from the whitelabel wizard) * Default SendGrid-branded links (i.e., `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. |
| optional |
GET /whitelabel/links/default
/whitelabel/links/subuser
**This endpoint allows you to take a branded link away from 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 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](https://app.sendgrid.com/settings/subusers). Your request will receive a response with a 204 status code if the disassociation was successful.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| username | query | required | string | The username of the subuser account that you want to disassociate a branded link from. |
DELETE /whitelabel/links/subuser
/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](https://app.sendgrid.com/settings/subusers).
| 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 delete a branded link.** Your request will receive a response with a 204 status code if the deletion was successful. The call does not return the link's details, so if you wish to record these make sure you call the "Retrieve a branded link" endpoint *before* you request its deletion. 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 |
|---|---|---|---|---|
| optional |
DELETE /whitelabel/links/{id}
/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 |
|---|---|---|---|---|
| optional |
GET /whitelabel/links/{id}
/whitelabel/links/{id}
**This endpoint allows you to update a specific branded link. You can use this endpoint to change a branded link's default status.** 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 |
|---|---|---|---|---|
| optional |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/LinkBrandingUpdateBrandedLinkRequest"
}
}
}
}
PATCH /whitelabel/links/{id}
/whitelabel/links/{id}/validate
**This endpoint allows you to validate a branded link.** 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 |
|---|---|---|---|---|
| optional |
POST /whitelabel/links/{id}/validate
/whitelabel/links/{link_id}/subuser
**This endpoint allows you to associate a branded link with a subuser account.** 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 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](https://app.sendgrid.com/settings/subusers).
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/LinkBrandingAssociateBrandedLinkWithSubuserRequest"
}
}
}
}
POST /whitelabel/links/{link_id}/subuser
/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
**This endpoint creates a new contacts list.** Once you create a list, you can use the UI to [trigger an automation](https://sendgrid.com/docs/ui/sending-email/getting-started-with-automation/#create-an-automation) every time you add a new contact to the list. A link to the newly created object is in `_metadata`.
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ListsCreateNewListRequest"
}
}
}
}
POST /marketing/lists
/marketing/lists/{id}
**This endpoint allows you to deletes a specific list.** Optionally, you can also delete contacts associated to the list. The query parameter, `delete_contacts=true`, will delete the list and start an asynchronous job to delete associated contacts.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| delete_contacts | query | optional | boolean | Flag indicates that all contacts on the list are also to be deleted. |
DELETE /marketing/lists/{id}
/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 |
|---|---|---|---|---|
| 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}
**This endpoint updates the name of a list.**
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ListsUpdateNameRequest"
}
}
}
}
PATCH /marketing/lists/{id}
/marketing/lists/{id}/contacts
**This endpoint allows you to remove contacts from a given list.** The contacts will not be deleted. Only their list membership will be changed.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| contact_ids | query | required | string | comma separated list of contact ids |
DELETE /marketing/lists/{id}/contacts
/marketing/lists/{id}/contacts/count
**This endpoint returns the number of contacts on a specific list.**
GET /marketing/lists/{id}/contacts/count
/mail/send
The Mail Send endpoint allows you to send email over SendGrid’s v3 Web API, the most recent version of our API. If you are looking for documentation about the v2 Mail Send endpoint, see our [v2 API Reference](https://sendgrid.com/docs/API_Reference/Web_API/mail.html). ## Helper Libraries Twilio SendGrid provides libraries to help you quickly and easily integrate with the v3 Web API in 7 different languages: * [C#](https://github.com/sendgrid/sendgrid-csharp) * [Go](https://github.com/sendgrid/sendgrid-go) * [Java](https://github.com/sendgrid/sendgrid-java) * [Node JS](https://github.com/sendgrid/sendgrid-nodejs) * [PHP](https://github.com/sendgrid/sendgrid-php) * [Python](https://github.com/sendgrid/sendgrid-python) * [Ruby](https://github.com/sendgrid/sendgrid-ruby) ## Dynamic Transactional Templates and Handlebars In order to send a dynamic template, specify the template ID with the `template_id` parameter. To specify handlebar substitutions, define your substitutions in the request JSON with this syntax: ``` "dynamic_template_data": { "guest": "Jane Doe", "partysize": "4", "english": true, "date": "April 1st, 2021" } ``` For more information about Dynamic Transactional Templates and Handlebars, see our documentation and reference pages. * [How to send an email with Dynamic Transactional Templates](https://sendgrid.com/docs/ui/sending-email/how-to-send-an-email-with-dynamic-transactional-templates/) * [Using Handlebars](https://sendgrid.com/docs/for-developers/sending-email/using-handlebars/) ## Mail Body Compression Mail body compression is available to some high volume accounts. Talk to your CSM if you are interested in this functionality. Mail body compression works by setting up a JSON payload as defined on this page, then compressing it with gzip (the gzip file can be no more than 30mb). To use mail body compression: 1. Add a `Content-Encoding` header, with a value of `gzip`. a. `Content-Encoding: gzip` 2. Send the gzip as a data-binary. a. `--data-binary '@data.json.gz' ` ## Multiple Reply-To Emails Using `reply_to_list` allows senders to include more than one recipient email address to receive reply and/or bounce messages from the recipient of the email. ### Usage Considerations * `reply_to` is mutually exclusive with `reply_to_list`. If both are used, then the API call will be rejected. * The `reply_to_list` object, when used, must at least have an email parameter and may also contain a name parameter. * Each email address in the `reply_to_list` should be unique. * There is a limit of 1000 `reply_to_list` emails per mail/send request. * In SMTP calls, we will omit any invalid emails. ### Possible 400 Error Messages * `reply_to` is mutually exclusive with `reply_to_list`. * The `reply_to_list` object, when used, must at least have an email parameter and may also contain a name parameter. * Each email address in the `reply_to_list` should be unique. * There is a limit of X `reply_to` emails per mail/send request. * The `reply_to_list` email does not contain a valid address. * The `reply_to_list` email exceeds the maximum total length of X characters. * The `reply_to_list` email parameter is required.
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MailSendV3EmailSendRequest"
}
}
}
}
POST /mail/send
/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 `automation_ids` are specified. |
| optional | ||||
| optional |
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](https://en.wikipedia.org/wiki/Tz_database#Names_of_time_zones) string representing the timezone in which the stats are to be presented; i.e. `"America/Chicago"`. This parameter changes the timezone format only; it does not alter which stats are returned. |
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 |
|---|---|---|---|---|
| optional | ||||
| optional | ||||
| optional | ||||
| optional | ||||
| optional | ||||
| optional | ||||
| optional | ||||
| optional |
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 |
|---|---|---|---|---|
| optional | ||||
| optional | ||||
| optional | ||||
| optional |
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 `singlesend_ids`. |
| optional | ||||
| optional |
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](https://en.wikipedia.org/wiki/Tz_database#Names_of_time_zones) string representing the timezone in which the stats are to be presented; i.e. `"America/Chicago"`. This parameter changes the timezone format only; it does not alter which stats are returned. |
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 |
|---|---|---|---|---|
| optional | ||||
| optional | ||||
| optional | ||||
| optional | ||||
| optional | ||||
| optional | ||||
| optional |
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 |
|---|---|---|---|---|
| optional | ||||
| optional | ||||
| optional | ||||
| optional | ||||
| optional |
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](https://meyerweb.com/eric/tools/dencoder/), 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](https://docs.google.com/a/sendgrid.com/document/d/1fWoKTFNfg5UUsB6t9KuIcSo9CetKF_T0bGfWJ_gdPCs/edit?usp=sharing). 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.
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. |
| optional |
GET /whitelabel/ips
/whitelabel/ips
**This endpoint allows you to set up reverse DNS.**
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ReverseDnsSetUpReverseDnsRequest"
}
}
}
}
POST /whitelabel/ips
/whitelabel/ips/{id}
**This endpoint allows you to delete a reverse DNS record.** A call to this endpoint will respond with a 204 status code if the deletion was successful. 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 |
|---|---|---|---|---|
| optional |
DELETE /whitelabel/ips/{id}
/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 |
|---|---|---|---|---|
| optional |
GET /whitelabel/ips/{id}
/whitelabel/ips/{id}/validate
**This endpoint allows you to validate a reverse DNS record.** Always check the `valid` property of the response’s `validation_results.a_record` object. This field will indicate whether it was possible to validate the reverse DNS record. If the `validation_results.a_record.valid` is `false`, this indicates only that Twilio SendGrid could not determine the validity your reverse DNS record — it may still be valid. If validity couldn’t be determined, you can check the value of `validation_results.a_record.reason` to find out why. 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 |
|---|---|---|---|---|
| optional |
POST /whitelabel/ips/{id}/validate
/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 `true` segments with an empty value of `parent_list_id` will be returned in the filter. If the value is not present it defaults to 'false'. |
GET /marketing/segments
/marketing/segments
**This endpoint allows you to create a segment.**
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SegmentingContactsCreateNewSegmentRequest"
}
}
}
}
POST /marketing/segments
/marketing/segments/delete
This endpoint allows you to delete segments in bulk. If the segments are used by automations or the segments do not exist in the database, the segment IDs that could not be deleted along with automation IDs that are associated to those segments will be returned.
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SegmentingContactsBulkDeleteSegmentsRequest"
}
}
}
}
POST /marketing/segments/delete
/marketing/segments/{segment_id}
**This endpoint allows you to delete a segment by `segment_id`.** Note that deleting a segment does not delete the contacts associated with the segment by default. Contacts associated with a deleted segment will remain in your list of all contacts and any other segments they belong to.
DELETE /marketing/segments/{segment_id}
/marketing/segments/{segment_id}
**This endpoint allows you to retrieve a single segment by ID.**
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| query_json | query | optional | boolean | Defaults to `false`. Set to `true` to return the parsed SQL AST as a JSON object in the field `query_json` |
GET /marketing/segments/{segment_id}
/marketing/segments/{segment_id}
**This endpoint allows you to update a segment.** Segment `name` needs to be unique. A user can not update a segment name to an existing one.
{
"$ref": "#/components/requestBodies/segment_write_v2"
}
PATCH /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]({https://docs.google.com/forms/d/e/1FAIpQLSd5zwC9dRk8lAp1oTWjdGc-aSY69flW_7wnutvKBhpUluSnfQ/viewform)** 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 `true` segments with an empty value of `parent_list_id` will be returned in the filter. If the value is not present it defaults to 'false'. |
GET /marketing/segments/2.0
/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]({https://docs.google.com/forms/d/e/1FAIpQLSd5zwC9dRk8lAp1oTWjdGc-aSY69flW_7wnutvKBhpUluSnfQ/viewform)** Segment `name` has to be unique. A user can not create a new segment with an existing segment name.
{
"$ref": "#/components/requestBodies/segment_write_v2"
}
POST /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]({https://docs.google.com/forms/d/e/1FAIpQLSd5zwC9dRk8lAp1oTWjdGc-aSY69flW_7wnutvKBhpUluSnfQ/viewform)**
DELETE /marketing/segments/2.0/{segment_id}
/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]({https://docs.google.com/forms/d/e/1FAIpQLSd5zwC9dRk8lAp1oTWjdGc-aSY69flW_7wnutvKBhpUluSnfQ/viewform)**
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| contacts_sample | query | optional | boolean | Defaults to `true`. Set to `false` to exclude the contacts_sample in the response. |
GET /marketing/segments/2.0/{segment_id}
/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]({https://docs.google.com/forms/d/e/1FAIpQLSd5zwC9dRk8lAp1oTWjdGc-aSY69flW_7wnutvKBhpUluSnfQ/viewform)** Segment `name` has to be unique. A user can not create a new segment with an existing segment name.
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/segment_update"
}
}
}
}
PATCH /marketing/segments/2.0/{segment_id}
/marketing/test/send_email
**This endpoint allows you to send a test marketing email to a list of email addresses**. Before sending a marketing message, you can test it using this endpoint. You may specify up to **10 contacts** in the `emails` request body field. You must also specify a `template_id` and include either a `from_address` or `sender_id`. You can manage your templates with the [Twilio SendGrid App](https://mc.sendgrid.com/dynamic-templates) or the [Transactional Templates API](https://sendgrid.api-docs.io/v3.0/transactional-templates). > Please note that this endpoint works with Dynamic Transactional Templates only. Legacy Transactional Templates will not be delivered. For more information about managing Dynamic Transactional Templates, see [How to Send Email with Dynamic Transactional Templates](https://sendgrid.com/docs/ui/sending-email/how-to-send-an-email-with-dynamic-transactional-templates/). You can also test your Single Sends in the [Twilio SendGrid Marketing Campaigns UI](https://mc.sendgrid.com/single-sends).
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SendTestEmailToContactsRequest"
}
}
}
}
POST /marketing/test/send_email
/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 |
|---|---|---|---|---|
| optional |
GET /senders
/senders
**This endpoint allows you to create a new sender identity.** You may create up to 100 unique sender identities.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PostSendersRequest"
}
}
}
}
POST /senders
/senders/{sender_id}
**This endoint allows you to delete one of your sender identities.**
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
DELETE /senders/{sender_id}
/senders/{sender_id}
**This endpoint allows you to retrieve a specific sender identity.**
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
GET /senders/{sender_id}
/senders/{sender_id}
**This endpoint allows you to update a sender identity.** Updates to `from.email` require re-verification. Partial updates are allowed, but fields that are marked as "required" in the POST (create) endpoint must not be nil if that field is included in the PATCH request.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/sender-id-request"
}
}
}
}
PATCH /senders/{sender_id}
/senders/{sender_id}/resend_verification
**This enpdoint allows you to resend a sender identity verification email.**
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
POST /senders/{sender_id}/resend_verification
/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
**This endpoint allows you to create a new Sender Identify**. Upon successful submission of a `POST` request to this endpoint, an identity will be created, and a verification email will be sent to the address assigned to the `from_email` field. You must complete the verification process using the sent email to fully verify the sender. If you need to resend the verification email, you can do so with the Resend Verified Sender Request, `/resend/{id}`, endpoint. If you need to authenticate a domain rather than a Single Sender, see the [Domain Authentication API](https://sendgrid.api-docs.io/v3.0/domain-authentication/authenticate-a-domain).
{
"$ref": "#/components/requestBodies/verified-sender-request-schema"
}
POST /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](https://sendgrid.com/docs/for-developers/sending-email/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](https://sendgrid.com/docs/ui/sending-email/dmarc/).
GET /verified_senders/domains
/verified_senders/resend/{id}
**This endpoint allows you to resend a verification email to a specified Sender Identity**. Passing the `id` assigned to a Sender Identity to this endpoint will resend a verification email to the `from_address` associated with the Sender Identity. This can be useful if someone loses their verification email or needs to have it resent for any other reason. You can retrieve the IDs associated with Sender Identities by passing a "Get All Verified Senders" endpoint.
POST /verified_senders/resend/{id}
/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](https://sendgrid.com/docs/for-developers/sending-email/sender-identity/#domain-authentication), `domain_verified`, and [Single Sender Verification](https://sendgrid.com/docs/for-developers/sending-email/sender-identity/#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.
GET /verified_senders/verify/{token}
/verified_senders/{id}
**This endpoint allows you to delete a Sender Identity**. Pass the `id` assigned to a Sender Identity to this endpoint to delete the Sender Identity from your account. You can retrieve the IDs associated with Sender Identities using the "Get All Verified Senders" endpoint.
DELETE /verified_senders/{id}
/verified_senders/{id}
**This endpoint allows you to update an existing Sender Identity**. Pass the `id` assigned to a Sender Identity to this endpoint as a path parameter. Include any fields you wish to update in the request body in JSON format. You can retrieve the IDs associated with Sender Identities by passing a `GET` request to the Get All Verified Senders endpoint, `/verified_senders`. **Note:** Unlike a `PUT` request, `PATCH` allows you to update only the fields you wish to edit. Fields that are not passed as part of a request will remain unaltered.
{
"$ref": "#/components/requestBodies/verified-sender-request-schema"
}
PATCH /verified_senders/{id}
/marketing/senders
**This endpoint allows you to create a new sender identity.** *You may create up to 100 unique sender identities.* Sender identities are required to be verified before use. If your domain has been authenticated, a new sender identity will auto verify on creation. Otherwise an email will be sent to the `from.email`.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SendersCreateIdentityRequest"
}
}
}
}
POST /marketing/senders
/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 |
|---|---|---|---|---|
| optional |
GET /user/settings/enforced_tls
/user/settings/enforced_tls
**This endpoint allows you to update your Enforced TLS settings.** To require TLS from recipients, set `require_tls` to `true`. 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. > Twilio SendGrid supports TLS 1.1 and higher and does not support older versions of TLS due to security vulnerabilities.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/enforced-tls-request-response"
}
}
}
}
PATCH /user/settings/enforced_tls
/user/webhooks/parse/settings
**This endpoint allows you to create a new inbound parse setting.** Creating an Inbound Parse setting requires two pieces of information: a `url` and a `hostname`. The `hostname` must correspond to a domain authenticated by Twilio SendGrid on your account. If you need to complete domain authentication, you can use the [Twilio SendGrid App](https://app.sendgrid.com/settings/sender_auth) or the "Authenticate a domain" endpoint. See "[How to Set Up Domain Authentication](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/)" for instructions. Any email received by the `hostname` will be parsed when you complete this setup. You must also add a Twilio SendGrid MX record to this domain's DNS records. See "[Setting up the Inbound Parse Webhook](https://sendgrid.com/docs/for-developers/parsing-email/setting-up-the-inbound-parse-webhook/)" for full instructions. The `url` represents a location where the parsed message data will be delivered. Twilio SendGrid will make an HTTP POST request to this `url` with the message data. The `url` must be publicly reachable, and your application must return a `200` status code to signal that the message data has been received.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
{
"$ref": "#/components/requestBodies/parse-setting"
}
POST /user/webhooks/parse/settings
/user/webhooks/parse/settings/{hostname}
**This endpoint allows you to delete 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 |
|---|---|---|---|---|
| optional |
DELETE /user/webhooks/parse/settings/{hostname}
/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 |
|---|---|---|---|---|
| optional |
GET /user/webhooks/parse/settings/{hostname}
/user/webhooks/parse/settings/{hostname}
**This endpoint allows you to update 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 |
|---|---|---|---|---|
| optional |
{
"$ref": "#/components/requestBodies/parse-setting"
}
PATCH /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. |
| optional |
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 |
|---|---|---|---|---|
| optional |
GET /mail_settings/address_whitelist
/mail_settings/address_whitelist
**This endpoint allows you to update your current email address whitelist settings.** You can select whether or not this setting should be enabled by assigning the `enabled` field a `true` or `false` value. Passing only the `enabled` field to this endpoint will not alter your current `list` of whitelist entries. However, any modifications to your `list` of entries will overwrite the entire list. For this reason, you must included all existing entries you wish to retain in your `list` in addition to any new entries you intend to add. To remove one or more `list` entries, pass a `list` with only the entries you wish to retain. You should not add generic domains such as `gmail.com` or `yahoo.com` in your `list` because your emails will not honor recipients' unsubscribes. This may cause a legal violation of [CAN-SPAM](https://sendgrid.com/docs/glossary/can-spam/) and could damage your sending reputation. The Address Whitelist setting allows you to specify email addresses or domains for which mail should never be suppressed. For example, if you own the domain `example.com`, and one or more of your recipients use `email@example.com` addresses, placing `example.com` in the address whitelist setting instructs Twilio SendGrid to ignore all bounces, blocks, and unsubscribes logged for that domain. In other words, all bounces, blocks, and unsubscribes will still be sent to `example.com` as if they were sent under normal sending conditions.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SettingsMailUpdateAddressWhitelistMailSettingsRequest"
}
}
}
}
PATCH /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](https://app.sendgrid.com/settings/mail_settings). You can manage your bounces manually using the [Bounces API](https://sendgrid.api-docs.io/v3.0/bounces-api) or the [Bounces menu in the Twilio SendGrid App](https://app.sendgrid.com/suppressions/bounces).
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
GET /mail_settings/bounce_purge
/mail_settings/bounce_purge
**This endpoint allows you to update 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. The schedule is set in full days by assigning the number of days, an integer, to the `soft_bounces` and/or `hard_bounces` fields. A hard bounce occurs when an email message has been returned to the sender because the recipient's address is invalid. A hard bounce might occur because the domain name doesn't exist or because the recipient is unknown. A soft bounce occurs when an email message reaches the recipient's mail server but is bounced back undelivered before it actually reaches the recipient. A soft bounce might occur because the recipient's inbox is full. You can also manage this setting in the [Mail Settings section of the Twilio SendGrid App](https://app.sendgrid.com/settings/mail_settings). You can manage your bounces manually using the [Bounces API](https://sendgrid.api-docs.io/v3.0/bounces-api) or the [Bounces menu in the Twilio SendGrid App](https://app.sendgrid.com/suppressions/bounces).
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/mail_settings_bounce_purge"
}
}
}
}
PATCH /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](https://app.sendgrid.com/settings/mail_settings).
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
GET /mail_settings/footer
/mail_settings/footer
**This endpoint allows you to update your current Footer mail settings.** The Footer setting will insert a custom footer at the bottom of your text and HTML email message bodies. You can insert your HTML or plain text directly using this endpoint, or you can create the footer using the [Mail Settings menu in the Twilio SendGrid App](https://app.sendgrid.com/settings/mail_settings).
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/mail_settings_footer"
}
}
}
}
PATCH /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 |
|---|---|---|---|---|
| optional |
GET /mail_settings/forward_bounce
/mail_settings/forward_bounce
**This endpoint allows you to update your current bounce forwarding mail settings.** Enabling the Forward Bounce setting allows you to specify an `email` address to which bounce reports will be forwarded. You can also configure the Forward Spam mail settings in the [Mail Settings section of the Twilio SendGrid App](https://app.sendgrid.com/settings/mail_settings).
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/mail_settings_forward_bounce"
}
}
}
}
PATCH /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 |
|---|---|---|---|---|
| optional |
GET /mail_settings/forward_spam
/mail_settings/forward_spam
**This endpoint allows you to update your current Forward Spam mail settings.** Enabling the Forward Spam setting allows you to specify `email` addresses to which spam reports will be forwarded. You can set multiple addresses by passing this endpoint a comma separated list of emails in a single string. ``` { "email": "address1@example.com, address2@exapmle.com", "enabled": true } ``` The Forward Spam setting may also be used to receive emails sent to `abuse@` and `postmaster@` role addresses if you have authenticated your domain. For example, if you authenticated `example.com` as your root domain and set a custom return path of `sub` for that domain, you could turn on Forward Spam, and any emails sent to `abuse@sub.example.com` or `postmaster@sub.example.com` would be forwarded to the email address you entered in the `email` field. You can authenticate your domain using the "Authenticate a domain" endpoint or in the [Sender Authentication section of the Twilio SendGrid App](https://app.sendgrid.com/settings/sender_auth). You can also configure the Forward Spam mail settings in the [Mail Settings section of the Twilio SendGrid App](https://app.sendgrid.com/settings/mail_settings).
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/mail_settings_forward_spam"
}
}
}
}
PATCH /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](https://sendgrid.com/docs/ui/sending-email/how-to-send-an-email-with-dynamic-transactional-templates/). The legacy email template setting wraps an HTML template around your email content. This can be useful for sending out marketing email and/or other HTML formatted messages. For instructions on using legacy templates, see how to ["Create and Edit Legacy Transactional Templates](https://sendgrid.com/docs/ui/sending-email/create-and-edit-legacy-transactional-templates/). For help migrating to our current template system, see ["Migrating from Legacy Templates"](https://sendgrid.com/docs/ui/sending-email/migrating-from-legacy-templates/).
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
GET /mail_settings/template
/mail_settings/template
**This endpoint allows you to update your current legacy email template settings.** This setting refers to our original email templates. We currently support more fully featured [Dynamic Transactional Templates](https://sendgrid.com/docs/ui/sending-email/how-to-send-an-email-with-dynamic-transactional-templates/). The legacy email template setting wraps an HTML template around your email content. This can be useful for sending out marketing email and/or other HTML formatted messages. For instructions on using legacy templates, see how to ["Create and Edit Legacy Transactional Templates](https://sendgrid.com/docs/ui/sending-email/create-and-edit-legacy-transactional-templates/). For help migrating to our current template system, see ["Migrating from Legacy Templates"](https://sendgrid.com/docs/ui/sending-email/migrating-from-legacy-templates/).
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SettingsMailUpdateLegacyTemplateSettingsRequest"
}
}
}
}
PATCH /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](https://sendgrid.com/docs/ui/account-and-settings/partners/).
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| limit | query | optional | integer | The number of settings to return per page. |
| offset | query | optional | integer | The paging offset. |
| optional |
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](https://sendgrid.com/docs/ui/account-and-settings/partners/). 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](https://sendgrid.com/docs/ui/analytics-and-reporting/tracking-stats-using-new-relic/).
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
GET /partner_settings/new_relic
/partner_settings/new_relic
**This endpoint allows you to update or change your 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](https://sendgrid.com/docs/ui/account-and-settings/partners/). 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](https://sendgrid.com/docs/ui/analytics-and-reporting/tracking-stats-using-new-relic/).
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SettingsPartnerUpdateNewRelicPartnerSettingsRequest"
}
}
}
}
PATCH /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 |
|---|---|---|---|---|
| optional |
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](https://sendgrid.com/docs/glossary/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 |
|---|---|---|---|---|
| optional |
GET /tracking_settings/click
/tracking_settings/click
**This endpoint allows you to enable or disable 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](https://sendgrid.com/docs/glossary/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 |
|---|---|---|---|---|
| optional |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SettingsTrackingUpdateClickTrackingSettingRequest"
}
}
}
}
PATCH /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](https://support.google.com/analytics/answer/1033867?hl=en) and their article on ["Best Practices for Campaign Building"](https://support.google.com/analytics/answer/1037445). We default the settings to Google’s recommendations. For more information, see [Google Analytics Demystified](https://sendgrid.com/docs/ui/analytics-and-reporting/google-analytics/).
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
GET /tracking_settings/google_analytics
/tracking_settings/google_analytics
**This endpoint allows you to update 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](https://support.google.com/analytics/answer/1033867?hl=en) and their article on ["Best Practices for Campaign Building"](https://support.google.com/analytics/answer/1037445). We default the settings to Google’s recommendations. For more information, see [Google Analytics Demystified](https://sendgrid.com/docs/ui/analytics-and-reporting/google-analytics/).
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/google_analytics_settings"
}
}
}
}
PATCH /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 |
|---|---|---|---|---|
| optional |
GET /tracking_settings/open
/tracking_settings/open
**This endpoint allows you to update 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 |
|---|---|---|---|---|
| optional |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SettingsTrackingUpdateOpenTrackingSettingsRequest"
}
}
}
}
PATCH /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 |
|---|---|---|---|---|
| optional |
GET /tracking_settings/subscription
/tracking_settings/subscription
**This endpoint allows you to update 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 |
|---|---|---|---|---|
| optional |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/subscription_tracking_settings"
}
}
}
}
PATCH /tracking_settings/subscription
/marketing/singlesends
**This endpoint allows you to delete multiple Single Sends using an array of Single Sends IDs.** To first retrieve all your Single Sends' IDs, you can make a GET request to the `/marketing/singlensends` endpoint. Please note that a DELETE request is permanent, and your Single Sends will not be recoverable after deletion.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| ids | query | optional | array | Single Send IDs to delete |
DELETE /marketing/singlesends
/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
**This endpoint allows you to create a new Single Send.** Please note that if you are migrating from the previous version of Single Sends, you no longer need to pass a template ID with your request to this endpoint. Instead, you will pass all template data in the `email_config` object.
{
"$ref": "#/components/requestBodies/singlesend_request"
}
POST /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/search
**This endpoint allows you to search for Single Sends based on specified criteria.** You can search for Single Sends by passing a combination of values using the `name`, `status`, and `categories` request body fields. For example, if you want to search for all Single Sends that are "drafts" or "scheduled" and also associated with the category "shoes," your request body may look like the example below. ```javascript { "status": [ "draft", "scheduled" ], "categories": [ "shoes" ], } ```
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| page_size | query | optional | integer | |
| page_token | query | optional | string |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/singlesend_search"
}
}
}
}
POST /marketing/singlesends/search
/marketing/singlesends/{id}
**This endpoint allows you to delete one Single Send using a Single Send ID.** To first retrieve all your Single Sends' IDs, you can make a GET request to the `/marketing/singlensends` endpoint. Please note that a `DELETE` request is permanent, and your Single Send will not be recoverable after deletion.
DELETE /marketing/singlesends/{id}
/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.
GET /marketing/singlesends/{id}
/marketing/singlesends/{id}
**This endpoint allows you to update a Single Send using a Single Send ID.** You only need to pass the fields you want to update. Any blank/missing fields will remain unaltered.
{
"$ref": "#/components/requestBodies/singlesend_request"
}
PATCH /marketing/singlesends/{id}
/marketing/singlesends/{id}
**This endpoint allows you to duplicate an existing Single Send using its Single Send ID.** Duplicating a Single Send is useful when you want to create a Single Send but don't want to start from scratch. Once duplicated, you can update or edit the Single Send by making a PATCH request to the `/marketing/singlesends/{id}` endpoint. If you leave the `name` field blank, your duplicate will be assigned the name of the Single Send it was copied from with the text “Copy of ” prepended to it. The `name` field length is limited to 100 characters, so the end of the new Single Send name, including “Copy of ”, will be trimmed if the name exceeds this limit.
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SingleSendsDuplicateSingleSendRequest"
}
}
}
}
POST /marketing/singlesends/{id}
/marketing/singlesends/{id}/schedule
**This endpoint allows you to cancel a scheduled Single Send using a Single Send ID.** Making a DELETE request to this endpoint will cancel the scheduled sending of a Single Send. The request will not delete the Single Send itself. Deleting a Single Send can be done by passing a DELETE request to `/marketing/singlesends/{id}`.
DELETE /marketing/singlesends/{id}/schedule
/marketing/singlesends/{id}/schedule
**This endpoint allows you to schedule a Single Send for future delivery using a Single Send ID.** To schedule a Single Send, you must pass a date string in ISO 8601 time format (yyyy-MM-ddTHH:mm:ssZ) using the required `send_at` field. For example, the ISO 8601 format for 9:00 AM UTC on May 6, 2020 would be `2020-05-06T09:00:00Z`. You may also pass the string `"now"` to send the Single Send immediately.
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SingleSendsSchedulePutRequest"
}
}
}
}
PUT /marketing/singlesends/{id}/schedule
/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 `true`, the response will include the `completed_integration` field. |
GET /sso/integrations
/sso/integrations
**This endpoint allows you to create an SSO integration.**
{
"$ref": "#/components/requestBodies/create-integration-request"
}
POST /sso/integrations
/sso/integrations/{id}
**This endpoint allows you to delete an IdP configuration by ID.** You can retrieve the IDs for your configurations from the response provided by the "Get All SSO Integrations" endpoint.
DELETE /sso/integrations/{id}
/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 |
|---|---|---|---|---|
| si | query | optional | boolean | If this parameter is set to `true`, the response will include the `completed_integration` field. |
GET /sso/integrations/{id}
/sso/integrations/{id}
**This endpoint allows you to modify an exisiting SSO integration.** You can retrieve the IDs for your configurations from the response provided by the "Get All SSO Integrations" endpoint.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| si | query | optional | boolean | If this parameter is set to `true`, the response will include the `completed_integration` field. |
{
"$ref": "#/components/requestBodies/create-integration-request"
}
PATCH /sso/integrations/{id}
/sso/teammates
**This endpoint allows you to create an SSO Teammate.** The email provided for this user will also function as the Teammate’s username.
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/sso-teammate-request"
}
}
}
}
POST /sso/teammates
/sso/teammates/{username}
**This endpoint allows you to modify an existing SSO Teammate.** To turn a teammate into an admin, the request body should contain the `is_admin` field set to `true`. Otherwise, set `is_admin` to false and pass in all the scopes that a teammate should have. Only the parent user and Teammates with admin permissions can update another Teammate’s permissions. Admin users can only update permissions.
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SingleSignOnTeammatesEditTeammateRequest"
}
}
}
}
PATCH /sso/teammates/{username}
/suppression/spam_reports
**This endpoint allows you to delete your spam reports.** Deleting a spam report will remove the suppression, meaning email will once again be sent to the previously suppressed address. This should be avoided unless a recipient indicates they wish to receive email from you again. You can use our [bypass filters](https://sendgrid.com/docs/ui/sending-email/index-suppressions/#bypass-suppressions) to deliver messages to otherwise suppressed addresses when exceptions are required. There are two options for deleting spam reports: 1. You can delete all spam reports by setting the `delete_all` field to `true` in the request body. 2. You can delete a list of select spam reports by specifying the email addresses in the `emails` array of the request body.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SpamReportsApiDeleteReportsRequest"
}
}
}
}
DELETE /suppression/spam_reports
/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. |
| optional |
GET /suppression/spam_reports
/suppression/spam_reports/{email}
**This endpoint allows you to delete a specific spam report by email address.** Deleting a spam report will remove the suppression, meaning email will once again be sent to the previously suppressed address. This should be avoided unless a recipient indicates they wish to receive email from you again. You can use our [bypass filters](https://sendgrid.com/docs/ui/sending-email/index-suppressions/#bypass-suppressions) to deliver messages to otherwise suppressed addresses when exceptions are required.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
DELETE /suppression/spam_reports/{email}
/suppression/spam_reports/{email}
**This endpoint allows you to retrieve a specific spam report by email address.**
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
GET /suppression/spam_reports/{email}
/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](https://sendgrid.com/docs/ui/analytics-and-reporting/stats-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. |
| optional | ||||
| optional | ||||
| optional | ||||
| optional | ||||
| optional | ||||
| optional |
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](https://sendgrid.com/docs/ui/analytics-and-reporting/stats-overview/).
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional | ||||
| optional | ||||
| optional | ||||
| optional |
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. ## Available Client Types - phone - tablet - webmail - desktop 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](https://sendgrid.com/docs/ui/analytics-and-reporting/stats-overview/).
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional | ||||
| optional | ||||
| optional | ||||
| optional |
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. ## Available Device Types | **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](https://sendgrid.com/docs/ui/analytics-and-reporting/stats-overview/).
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional | ||||
| optional | ||||
| optional | ||||
| optional | ||||
| optional | ||||
| optional |
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](https://sendgrid.com/docs/User_Guide/Statistics/index.html).
| 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. |
| optional | ||||
| optional | ||||
| optional | ||||
| optional | ||||
| optional | ||||
| optional |
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](https://sendgrid.com/docs/ui/analytics-and-reporting/stats-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. |
| optional | ||||
| optional | ||||
| optional | ||||
| optional | ||||
| optional | ||||
| optional |
GET /mailbox_providers/stats
/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 |
|---|---|---|---|---|
| optional | ||||
| optional | ||||
| optional | ||||
| optional | ||||
| optional | ||||
| optional |
GET /stats
/subusers/{subuser_name}/monitor
DELETE /subusers/{subuser_name}/monitor
/subusers/{subuser_name}/monitor
GET /subusers/{subuser_name}/monitor
/subusers/{subuser_name}/monitor
{
"$ref": "#/components/requestBodies/monitor"
}
POST /subusers/{subuser_name}/monitor
/subusers/{subuser_name}/monitor
{
"$ref": "#/components/requestBodies/monitor"
}
PUT /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: `blocks`, `bounces`, `clicks`, `delivered`, `opens`, `requests`, `unique_clicks`, `unique_opens`, and `unsubscribes`.' |
| 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 |
|---|---|---|---|---|
| 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: `blocks`, `bounces`, `clicks`, `delivered`, `opens`, `requests`, `unique_clicks`, `unique_opens`, and `unsubscribes`.' |
| 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. |
GET /subusers
/subusers
**This endpoint allows you to create a new subuser.**
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PostSubusersRequest"
}
}
}
}
POST /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
/subusers/{subuser_name}
**This endpoint allows you to delete a subuser.** This is a permanent action. Once deleted, a subuser cannot be retrieved.
DELETE /subusers/{subuser_name}
/subusers/{subuser_name}
**This endpoint allows you to enable or disable a subuser.**
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SubusersApiUpdateSubuserEnableStateRequest"
}
}
}
}
PATCH /subusers/{subuser_name}
/subusers/{subuser_name}/ips
**This endpoint allows you update your subusers' assigned IP.** Each subuser should be assigned to an IP address from which all of this subuser's mail will be sent. Often, this is the same IP as the parent account, but each subuser can have one or more of their own IP addresses as well. More information: * [How to request more IPs](https://sendgrid.com/docs/ui/account-and-settings/dedicated-ip-addresses/) * [Setup Reverse DNS](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-reverse-dns/)
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SubusersApiUpdateSubuserIpsRequest"
}
}
}
}
PUT /subusers/{subuser_name}/ips
/asm/suppressions/global
**This endpoint allows you to add one or more email addresses to the global suppressions group.**
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
{
"$ref": "#/components/requestBodies/suppressions-request"
}
POST /asm/suppressions/global
/asm/suppressions/global/{email}
**This endpoint allows you to remove an email address from the global suppressions group.** Deleting a suppression group will remove the suppression, meaning email will once again be sent to the previously suppressed addresses. This should be avoided unless a recipient indicates they wish to receive email from you again. You can use our [bypass filters](https://sendgrid.com/docs/ui/sending-email/index-suppressions/#bypass-suppressions) to deliver messages to otherwise suppressed addresses when exceptions are required.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
DELETE /asm/suppressions/global/{email}
/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 |
|---|---|---|---|---|
| optional |
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. |
| optional |
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 |
|---|---|---|---|---|
| optional |
GET /asm/groups/{group_id}/suppressions
/asm/groups/{group_id}/suppressions
**This endpoint allows you to add email addresses to an unsubscribe group.** If you attempt to add suppressions to a group that has been deleted or does not exist, the suppressions will be added to the global suppressions list.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
{
"$ref": "#/components/requestBodies/suppressions-request"
}
POST /asm/groups/{group_id}/suppressions
/asm/groups/{group_id}/suppressions/search
**This endpoint allows you to search a suppression group for multiple suppressions.** When given a list of email addresses and a group ID, this endpoint will only return the email addresses that have been unsubscribed from the given group.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
{
"$ref": "#/components/requestBodies/suppressions-request"
}
POST /asm/groups/{group_id}/suppressions/search
/asm/groups/{group_id}/suppressions/{email}
**This endpoint allows you to remove a suppressed email address from the given suppression group.** Removing an address will remove the suppression, meaning email will once again be sent to the previously suppressed addresses. This should be avoided unless a recipient indicates they wish to receive email from you again. You can use our [bypass filters](https://sendgrid.com/docs/ui/sending-email/index-suppressions/#bypass-suppressions) to deliver messages to otherwise suppressed addresses when exceptions are required.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
DELETE /asm/groups/{group_id}/suppressions/{email}
/asm/suppressions
**This endpoint allows you to retrieve a list of all suppressions.**
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
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 |
|---|---|---|---|---|
| optional |
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 | |
| optional |
GET /asm/groups
/asm/groups
**This endpoint allows you to create a new suppression group.** To add an email address to the suppression group, [create a Suppression](https://sendgrid.api-docs.io/v3.0/suppressions-suppressions/add-suppressions-to-a-suppression-group).
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/suppression-group-request-base"
}
}
}
}
POST /asm/groups
/asm/groups/{group_id}
**This endpoint allows you to delete a suppression group.** If a recipient uses the "one-click unsubscribe" option on an email associated with a deleted group, that recipient will be added to the global suppression list. Deleting a suppression group will remove the suppression, meaning email will once again be sent to the previously suppressed addresses. This should be avoided unless a recipient indicates they wish to receive email from you again. You can use our [bypass filters](https://sendgrid.com/docs/ui/sending-email/index-suppressions/#bypass-suppressions) to deliver messages to otherwise suppressed addresses when exceptions are required.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
DELETE /asm/groups/{group_id}
/asm/groups/{group_id}
**This endpoint allows you to retrieve a single suppression group.**
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
GET /asm/groups/{group_id}
/asm/groups/{group_id}
**This endpoint allows you to update or change a suppression group.**
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/suppression-group-request-base"
}
}
}
}
PATCH /asm/groups/{group_id}
/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
/scopes/requests/{request_id}
**This endpoint allows you to deny an attempt to access your account.** **Note:** Only teammate admins may delete a teammate's access request.
DELETE /scopes/requests/{request_id}
/scopes/requests/{request_id}/approve
**This endpoint allows you to approve an access attempt.** **Note:** Only teammate admins may approve another teammate’s access request.
PATCH /scopes/requests/{request_id}/approve
/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 |
| optional |
GET /teammates
/teammates
**This endpoint allows you to invite a Teammate to your account via email.** You can set a Teammate's initial permissions using the `scopes` array in the request body. Teammate's will receive a minimum set of scopes from Twilio SendGrid that are necessary for the Teammate to function. **Note:** A teammate invite will expire after 7 days, but you may resend the invitation at any time to reset the expiration date.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TeammatesInviteTeammateRequest"
}
}
}
}
POST /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 |
|---|---|---|---|---|
| optional |
GET /teammates/pending
/teammates/pending/{token}
**This endpoint allows you to delete a pending teammate invite.**
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
DELETE /teammates/pending/{token}
/teammates/pending/{token}/resend
**This endpoint allows you to resend a Teammate invitation.** Teammate invitations will expire after 7 days. Resending an invitation will reset the expiration date.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
POST /teammates/pending/{token}/resend
/teammates/{username}
**This endpoint allows you to delete a teammate.** **Only the parent user or an admin teammate can delete another teammate.**
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
DELETE /teammates/{username}
/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 |
|---|---|---|---|---|
| optional |
GET /teammates/{username}
/teammates/{username}
**This endpoint allows you to update a teammate’s permissions.** To turn a teammate into an admin, the request body should contain an `is_admin` set to `true`. Otherwise, set `is_admin` to `false` and pass in all the scopes that a teammate should have. **Only the parent user or other admin teammates can update another teammate’s permissions.** **Admin users can only update permissions.**
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TeammatesUpdatePermissionsRequest"
}
}
}
}
PATCH /teammates/{username}
/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 `legacy`, `dynamic` or `legacy,dynamic`. |
| 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 |
| optional |
GET /templates
/templates
**This endpoint allows you to create a transactional template.**
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PostTemplatesRequest"
}
}
}
}
POST /templates
/templates/{template_id}
**This endpoint allows you to delete a transactional template.**
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
DELETE /templates/{template_id}
/templates/{template_id}
**This endpoint allows you to retrieve a single transactional template.**
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
GET /templates/{template_id}
/templates/{template_id}
**This endpoint allows you to edit the name of a transactional template.** To edit the template itself, [create a new transactional template version](https://sendgrid.api-docs.io/v3.0/transactional-templates-versions/create-a-new-transactional-template-version).
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TransactionalTemplatesEditTemplateNameRequest"
}
}
}
}
PATCH /templates/{template_id}
/templates/{template_id}
**This endpoint allows you to duplicate a transactional template.**
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TransactionalTemplatesDuplicateTemplateRequest"
}
}
}
}
POST /templates/{template_id}
/templates/{template_id}/versions
**This endpoint allows you to create a new version of a template.**
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
{
"$ref": "#/components/requestBodies/transactional_template_version_create"
}
POST /templates/{template_id}/versions
/templates/{template_id}/versions/{version_id}
**This endpoint allows you to delete a transactional template version.**
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
DELETE /templates/{template_id}/versions/{version_id}
/templates/{template_id}/versions/{version_id}
**This endpoint allows you to retrieve a specific version of a template.**
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
GET /templates/{template_id}/versions/{version_id}
/templates/{template_id}/versions/{version_id}
**This endpoint allows you to edit the content of your template version.**
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
{
"$ref": "#/components/requestBodies/transactional_template_version_create"
}
PATCH /templates/{template_id}/versions/{version_id}
/templates/{template_id}/versions/{version_id}/activate
**This endpoint allows you to activate a version of one of your templates.**
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
POST /templates/{template_id}/versions/{version_id}/activate
/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 |
|---|---|---|---|---|
| optional |
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](https://sendgrid.com/docs/ui/account-and-settings/billing/).
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
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 |
|---|---|---|---|---|
| optional |
GET /user/email
/user/email
**This endpoint allows you to update the email address currently on file for your account.**
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UsersApiUpdateEmailRequest"
}
}
}
}
PUT /user/email
/user/password
**This endpoint allows you to update your password.**
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UsersApiUpdatePasswordRequest"
}
}
}
}
PUT /user/password
/user/profile
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
GET /user/profile
/user/profile
**This endpoint allows you to update your current profile details.** Any one or more of the parameters can be updated via the PATCH `/user/profile` endpoint. You must include at least one when you PATCH.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/user_profile"
}
}
}
}
PATCH /user/profile
/user/username
**This endpoint allows you to retrieve your current account username.**
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
GET /user/username
/user/username
**This endpoint allows you to update the username for your account.**
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UsersApiUpdateUsernameRequest"
}
}
}
}
PUT /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 |
|---|---|---|---|---|
| optional |
GET /user/webhooks/event/settings
/user/webhooks/event/settings
**This endpoint allows you to update 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 |
|---|---|---|---|---|
| optional |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/event-webhook-update-oauth-request"
}
}
}
}
PATCH /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](https://sendgrid.com/docs/for-developers/tracking-events/getting-started-event-webhook-security-features).
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
GET /user/webhooks/event/settings/signed
/user/webhooks/event/settings/signed
**This endpoint allows you to enable or disable signing of the Event Webhook.** This endpoint takes a single boolean request parameter, `enabled`. You may either enable or disable signing of the Event Webhook using this endpoint. Once enabled, you can retrieve your public key using the `/webhooks/event/settings/signed` endpoint. For more information about cryptographically signing the Event Webhook, see [Getting Started with the Event Webhook Security Features](https://sendgrid.com/docs/for-developers/tracking-events/getting-started-event-webhook-security-features).
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/WebhooksEnableSignedWebhookRequest"
}
}
}
}
PATCH /user/webhooks/event/settings/signed
/user/webhooks/event/test
**This endpoint allows you to test your event webhook by sending a fake event notification post to the provided URL.** 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. >**Tip**: Retry logic for this endpoint differs from other endpoints, which use a rolling 24-hour retry. If your web server does not return a 2xx response type, we will retry a POST request until we receive a 2xx response or the maximum time of 10 minutes has expired.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/WebhooksTestEventNotificationSettingsRequest"
}
}
}
}
POST /user/webhooks/event/test
/user/webhooks/parse/settings
**This endpoint allows you to retrieve all of your current inbound parse settings.**
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| optional |
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](https://sendgrid.com/docs/Integrate/libraries.html#-Webhook-Libraries).
| 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 |
| optional |
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"
]
}
ContactsApiListsAddMultipleRecipientsToListResponse
{
"type": "object",
"example": {},
"properties": {}
}
ContactsApiListsAddSingleRecipientResponse
{
"type": "object",
"example": {},
"properties": {}
}
ContactsApiListsCreateNewListRequest
{
"type": "object",
"title": "Create a List request",
"example": {
"name": "your list name"
},
"required": [
"name"
],
"properties": {
"name": {
"type": "string"
}
}
}
ContactsApiListsDeleteListByIdRequest
{
"nullable": true
}
ContactsApiListsDeleteListByIdResponse
{
"type": "object",
"example": {},
"properties": {}
}
ContactsApiListsDeleteMultipleListsRequest
{
"type": "array",
"items": {
"type": "integer"
},
"example": [
1,
2,
3,
4
]
}
ContactsApiListsDeleteMultipleListsResponse
{
"type": "object",
"example": {},
"properties": {}
}
ContactsApiListsDeleteRecipientResponse
{
"type": "object",
"example": {},
"properties": {}
}
ContactsApiListsGetAllListsResponse
{
"type": "object",
"title": "List All Lists response",
"required": [
"lists"
],
"properties": {
"lists": {
"type": "array",
"items": {
"$ref": "#/components/schemas/contactdb_list"
}
}
}
}
ContactsApiListsGetAllRecipients404Response
{
"type": "object",
"example": {
"errors": [
{
"field": "list_id",
"message": "Returned if list_id is invalid"
}
]
},
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"field": {
"type": "string",
"example": "list_id"
},
"message": {
"type": "string",
"example": "Returned if list_id is invalid"
}
}
}
}
}
}
ContactsApiListsGetAllRecipientsResponse
{
"type": "object",
"properties": {
"recipients": {
"type": "array",
"items": {
"$ref": "#/components/schemas/contactdb_recipient"
}
}
}
}
ContactsApiListsUpdateListNameRequest
{
"type": "object",
"title": "Update a List request",
"example": {
"name": "newlistname"
},
"required": [
"name"
],
"properties": {
"name": {
"type": "string",
"description": "The new name for your list. "
}
}
}
ContactsApiListsUpdateListNameResponse
{
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "The ID of the list"
},
"name": {
"type": "string",
"description": "The new name for the list"
},
"recipient_count": {
"type": "integer",
"description": "The number of recipients on the list"
}
}
}
ContactsApiRecipientsAddRecipientRequest
{
"type": "array",
"items": {
"type": "object",
"required": [
"email"
],
"properties": {
"age": {
"type": "integer"
},
"email": {
"type": "string",
"format": "email",
"description": "The email address of the recipient."
},
"last_name": {
"type": "string",
"description": "The last name of the recipient."
},
"first_name": {
"type": "string",
"description": "The first name of the recipient."
}
}
},
"example": [
{
"age": 25,
"email": "example@example.com",
"last_name": "User",
"first_name": ""
},
{
"age": 25,
"email": "example2@example.com",
"last_name": "User",
"first_name": "Example"
}
]
}
ContactsApiRecipientsDeleteMultipleRecipientsRequest
{
"type": "array",
"items": {
"type": "string"
},
"example": [
"recipient_id1",
"recipient_id2"
]
}
ContactsApiRecipientsDeleteMultipleRecipientsResponse
{
"type": "object",
"example": {},
"properties": {}
}
ContactsApiRecipientsDeleteRecipientByIdResponse
{
"type": "object",
"example": {},
"properties": {}
}
ContactsApiRecipientsGetAllRecipients400Response
{
"type": "object",
"example": {},
"properties": {}
}
ContactsApiRecipientsGetAllRecipientsResponse
{
"type": "object",
"title": "List Recipients response",
"required": [
"recipients"
],
"properties": {
"recipients": {
"type": "array",
"items": {
"type": "object"
}
}
}
}
ContactsApiRecipientsGetRecipientListsResponse
{
"type": "object",
"properties": {
"lists": {
"type": "array",
"items": {
"$ref": "#/components/schemas/contactdb_list"
}
}
}
}
ContactsApiRecipientsGetSingleRecipient404Response
{
"type": "object",
"example": {},
"properties": {}
}
ContactsApiRecipientsGetSingleRecipientResponse
{
"type": "object",
"example": {},
"properties": {}
}
ContactsApiRecipientsGetUploadStatusResponse
{
"type": "object",
"properties": {
"status": {
"type": "array",
"items": {
"type": "object",
"properties": {
"": {
"type": "string"
},
"id": {
"type": "string",
"default": "",
"description": "Valid values are \"worker_delay\" and \"worker_delay_seconds\" (the second value appears only if \"worker_delay\" has a value of \"delayed\")."
},
"value": {
"type": "string",
"default": "",
"description": "Valid values for the ID \"worker_delay\" are \"OK\" or \"Delayed\". Valid values for the ID \"worker_delay_seconds\" is the time of delay to upload."
}
}
}
}
}
}
ContactsApiRecipientsSearchBySegmentConditionsRequest
{
"type": "object",
"example": {
"list_id": -27497588,
"conditions": [
{
"field": "birthday",
"value": "01/12/1985",
"and_or": "",
"operator": "eq"
},
{
"field": "birthday",
"value": "01/12/1985",
"and_or": "",
"operator": "eq"
},
{
"field": "birthday",
"value": "01/12/1985",
"and_or": "",
"operator": "eq"
},
{
"field": "birthday",
"value": "01/12/1985",
"and_or": "",
"operator": "eq"
}
]
},
"required": [
"list_id",
"conditions"
],
"properties": {
"list_id": {
"type": "integer",
"format": "int32"
},
"conditions": {
"type": "array",
"items": {
"x-field": "birthday",
"x-value": "01/12/1985",
"x-and_or": "",
"x-operator": "eq"
}
}
}
}
ContactsApiRecipientsSearchBySegmentConditionsResponse
{
"type": "object",
"properties": {
"recipients": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"email": {
"type": "string"
},
"created_at": {
"type": "integer"
},
"first_name": {
"type": "string"
},
"updated_at": {
"type": "integer"
},
"last_opened": {
"type": "integer"
},
"last_clicked": {
"type": "integer"
},
"last_emailed": {
"type": "integer"
},
"custom_fields": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"name": {
"type": "string"
},
"type": {
"type": "string"
},
"value": {
"anyOf": [
{
"type": "integer"
},
{
"type": "string"
}
]
}
}
}
}
}
}
},
"recipient_count": {
"type": "integer"
}
}
}
ContactsApiRecipientsSearchRecipientByFieldResponse
{
"type": "object",
"properties": {
"recipients": {
"type": "array",
"items": {
"$ref": "#/components/schemas/contactdb_recipient"
}
}
}
}
ContactsApiRecipientsUpdateMultipleRecipientsRequest
{
"type": "array",
"items": {
"type": "object",
"required": [
"email"
],
"properties": {
"email": {
"type": "string",
"format": "email"
},
"last_name": {
"type": "string",
"description": "The last name of the recipient. This is one of the default custom fields."
},
"first_name": {
"type": "string",
"description": "The first name of the recipient. This is one of the default custom fields."
}
}
},
"example": [
{
"email": "jones@example.com",
"last_name": "Jones",
"first_name": "Guy"
}
]
}
ContactsApiSegmentsDeleteSegmentResponse
{
"type": "object",
"example": {},
"properties": {}
}
ContactsApiSegmentsGetAllSegmentsResponse
{
"type": "object",
"title": "List All Segments response",
"required": [
"segments"
],
"properties": {
"segments": {
"type": "array",
"items": {
"$ref": "#/components/schemas/contactdb_segments"
}
}
}
}
ContactsApiSegmentsGetSegmentRecipients400Response
{
"type": "object",
"example": {},
"properties": {}
}
ContactsApiSegmentsGetSegmentRecipients404Response
{
"type": "object",
"example": {},
"properties": {}
}
ContactsApiSegmentsGetSegmentRecipientsResponse
{
"type": "object",
"title": "List Recipients On a Segment response",
"required": [
"recipients"
],
"properties": {
"recipients": {
"type": "array",
"items": {
"$ref": "#/components/schemas/contactdb_recipient"
}
}
}
}
ContactsApiSegmentsUpdateSegmentRequest
{
"type": "object",
"example": {
"name": "The Millers",
"list_id": 5,
"conditions": [
{
"field": "last_name",
"value": "Miller",
"and_or": "",
"operator": "eq"
}
]
},
"required": [
"name"
],
"properties": {
"name": {
"type": "string"
},
"list_id": {
"type": "number",
"description": "The list ID you would like this segment to be built from."
},
"conditions": {
"type": "array",
"items": {
"$ref": "#/components/schemas/contactdb_segments_conditions"
},
"description": "The conditions by which this segment should be created."
}
}
}
ContactsCheckExportStatusResponse
{
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"$ref": "#/components/schemas/error"
}
}
}
}
ContactsCheckImportStatusResponse
{
"type": "object",
"properties": {
"errors": {
"$ref": "#/components/schemas/error"
}
}
}
ContactsDeleteBulkContacts400Response
{
"type": "object",
"required": [
"errors"
],
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object"
}
}
}
}
ContactsDeleteBulkContactsResponse
{
"type": "object",
"required": [
"job_id"
],
"properties": {
"job_id": {
"type": "object",
"description": "The deletion job ID."
}
},
"description": "The deletion job has been accepted and is being processed."
}
ContactsExportListsSegments400Response
{
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"$ref": "#/components/schemas/error"
}
}
}
}
ContactsExportListsSegmentsRequest
{
"type": "object",
"properties": {
"list_ids": {
"type": "array",
"items": {
"type": "string",
"format": "uuid"
},
"description": "IDs of the contact lists you want to export."
},
"file_type": {
"enum": [
"csv",
"json"
],
"type": "string",
"default": "csv",
"description": "File type for export file. Choose from `json` or `csv`."
},
"segment_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "IDs of the contact segments you want to export."
},
"max_file_size": {
"type": "integer",
"default": 5000,
"description": "The maximum size of an export file in MB. Note that when this option is specified, multiple output files may be returned from the export."
},
"notifications": {
"type": "object",
"properties": {
"email": {
"type": "boolean"
}
}
}
}
}
ContactsExportListsSegmentsResponse
{
"type": "object",
"required": [
"_metadata"
],
"properties": {
"id": {
"type": "string",
"description": "The ID of the export job."
},
"_metadata": {
"$ref": "#/components/schemas/metadata"
}
}
}
ContactsGetAllExports400Response
{
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"required": [
"message"
],
"properties": {
"": {
"type": "string"
},
"message": {
"type": "string"
},
"error_id": {
"type": "string"
}
}
}
}
}
}
ContactsGetAllExportsResponse
{
"type": "object",
"properties": {
"result": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Export jobs ID."
},
"urls": {
"type": "array",
"items": {
"type": "string"
},
"description": "One or more download URLs for the contact file(s) if the status is `ready`."
},
"lists": {
"type": "array",
"items": {
"type": "object",
"properties": {
"ID": {
"type": "string"
},
"Name": {
"type": "string"
}
}
}
},
"status": {
"type": "string",
"description": "Allowed values: `pending`, `ready`, or `failure`."
},
"user_id": {
"type": "string",
"description": "User ID."
},
"segments": {
"type": "array",
"items": {
"type": "object",
"properties": {
"ID": {
"type": "string"
},
"Name": {
"type": "string"
}
}
}
},
"_metadata": {
"type": "object",
"properties": {
"next": {
"type": "string"
},
"prev": {
"type": "string"
},
"self": {
"type": "string"
}
}
},
"created_at": {
"type": "string",
"description": "This ISO8601 timestamp when the export was created."
},
"expires_at": {
"type": "string",
"description": "This ISO8601 timestamp when the export expires."
},
"export_type": {
"type": "string",
"description": "Allowed types: `contacts_export`, `list_export`, or `segment_export`."
},
"completed_at": {
"type": "string",
"description": "This ISO8601 timestamp when the export was completed."
}
}
}
},
"_metadata": {
"type": "object",
"properties": {
"next": {
"type": "string",
"description": "Link to next page."
},
"prev": {
"type": "string"
},
"self": {
"type": "string",
"description": "Link to this page."
}
}
}
}
}
ContactsGetBatchedByIds404Response
{
"type": "object",
"example": {},
"properties": {}
}
ContactsGetBatchedByIdsRequest
{
"type": "object",
"example": {
"ids": [
"1234",
"1235"
]
},
"required": [
"ids"
],
"properties": {
"ids": {
"type": "array",
"items": {
"type": "string"
},
"maxItems": 100
}
},
"description": "Array of IDs"
}
ContactsGetBatchedByIdsResponse
{
"type": "object",
"properties": {
"result": {
"type": "array",
"items": {
"$ref": "#/components/schemas/contact-details3"
}
}
}
}
ContactsGetRecentContacts400Response
{
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"$ref": "#/components/schemas/error"
}
}
}
}
ContactsGetRecentContacts404Response
{
"type": "object",
"example": {},
"properties": {}
}
ContactsGetRecentContactsResponse
{
"type": "object",
"properties": {
"result": {
"type": "array",
"items": {
"$ref": "#/components/schemas/contact-details3"
}
},
"_metadata": {
"$ref": "#/components/schemas/selfmetadata"
},
"contact_count": {
"type": "integer"
}
}
}
ContactsGetTotalCountResponse
{
"type": "object",
"required": [
"contact_count"
],
"properties": {
"contact_count": {
"type": "integer",
"description": "The total number of contacts."
},
"billable_count": {
"type": "integer",
"default": 0,
"minimum": 0,
"description": "The count of contacts this month for billing purposes."
},
"billable_breakdown": {
"type": "object",
"properties": {
"total": {
"type": "integer",
"description": "The sum of all the subuser's billable contacts"
},
"breakdown": {
"type": "object",
"description": "A map of each subuser's billable contact usage. Each key is the subuser's ID and each value is the usage thus far this month.",
"minProperties": 0
}
},
"description": "`billable_breakdown` will only appear to the parent user in an account with subusers."
}
}
}
ContactsImportCsv400Response
{
"type": "object",
"required": [
"errors"
],
"properties": {
"errors": {
"type": "array",
"items": {
"$ref": "#/components/schemas/error"
},
"uniqueItems": true
}
}
}
ContactsImportCsv404Response
{
"type": "object",
"required": [
"errors"
],
"properties": {
"errors": {
"type": "array",
"items": {
"$ref": "#/components/schemas/error"
},
"uniqueItems": true
}
},
"description": "If any of the specified lists do not exist."
}
ContactsImportCsvRequest
{
"type": "object",
"required": [
"file_type",
"field_mappings"
],
"properties": {
"list_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "All contacts will be added to each of the specified lists."
},
"file_type": {
"enum": [
"csv"
],
"type": "string",
"description": "Upload file type."
},
"field_mappings": {
"type": "array",
"items": {
"anyOf": [
{
"type": "string"
},
{
"nullable": true
}
]
},
"minItems": 1,
"description": "Import file header to reserved/custom field mapping.",
"uniqueItems": false
}
}
}
ContactsImportCsvResponse
{
"type": "object",
"properties": {
"job_id": {
"type": "string",
"description": "The ID of the import job."
},
"upload_uri": {
"type": "string",
"description": "The URI to PUT the upload file to."
},
"upload_headers": {
"type": "array",
"items": {
"type": "object",
"required": [
"header",
"value"
],
"properties": {
"value": {
"type": "string"
},
"header": {
"type": "string"
}
}
},
"description": "A list of headers that must be included in PUT request."
}
}
}
ContactsSearchByEmails500Response
{
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"message": {
"type": "string"
}
}
}
}
}
}
ContactsSearchByEmailsRequest
{
"type": "object",
"example": {
"emails": [
"jane_doe@example.com",
"john_doe@example.com",
"joann_doe@example.com"
]
},
"required": [
"emails"
],
"properties": {
"emails": {
"type": "array",
"items": {
"type": "string",
"maxLength": 100
},
"description": "One or more primary emails and/or alternate emails to search through your contacts for."
}
},
"description": ""
}
ContactsSearchByEmailsResponse
{
"type": "object",
"properties": {
"result": {
"type": "object",
"x-patternProperties": {
"^[A-Za-z0-9\\._%\\+-]+@[A-Za-z0-9\\.-]+\\.[A-Za-z]{2,6}$": {
"type": "object",
"properties": {
"error": {
"type": "string"
},
"contact": {
"$ref": "#/components/schemas/contact-details3"
}
},
"description": "This will be one of the specified email adresses."
}
}
}
}
}
ContactsSearchContactsByQuery400Response
{
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"field": {
"type": "string"
},
"message": {
"type": "string"
}
}
}
}
}
}
ContactsSearchContactsByQuery500Response
{
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"message": {
"type": "string"
}
}
}
}
}
}
ContactsSearchContactsByQueryRequest
{
"type": "object",
"example": {
"query": "email LIKE 'ENTER_COMPLETE_OR_PARTIAL_EMAIL_ADDRESS_HERE%' AND CONTAINS(list_ids, 'YOUR_LIST_IDs')"
},
"required": [
"query"
],
"properties": {
"query": {
"type": "string",
"x-Description": "An SGQL search string or other pattern."
}
}
}
ContactsSearchContactsByQueryResponse
{
"type": "object",
"required": [
"contact_count"
],
"properties": {
"result": {
"type": "array",
"items": {
"$ref": "#/components/schemas/contact-details3"
}
},
"_metadata": {
"$ref": "#/components/schemas/selfmetadata"
},
"contact_count": {
"type": "number",
"description": "The total number of contacts matched."
}
}
}
ContactsUpsertBatchContacts400Response
{
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"$ref": "#/components/schemas/error"
}
}
}
}
ContactsUpsertBatchContactsRequest
{
"type": "object",
"required": [
"contacts"
],
"properties": {
"contacts": {
"type": "array",
"items": {
"$ref": "#/components/schemas/contact-request"
},
"maxItems": 30000,
"minItems": 1,
"description": "One or more contacts objects that you intend to upsert. The available fields for a contact, including the required `email` field are described below."
},
"list_ids": {
"type": "array",
"items": {
"type": "string",
"format": "uuid"
},
"description": "An array of List ID strings that this contact will be added to."
}
}
}
ContactsUpsertBatchContactsResponse
{
"type": "object",
"properties": {
"job_id": {
"type": "string",
"description": "Indicates that the contacts are queued for processing. Check the job status with the \"Import Contacts Status\" endpoint."
}
}
}
CsvUiOnlyGenerateCsvDownloadUrl404Response
{
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"message": {
"type": "string"
}
}
}
}
}
}
CsvUiOnlyGenerateCsvDownloadUrl500Response
{
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"message": {
"type": "string"
}
}
}
}
}
}
CsvUiOnlyGenerateCsvDownloadUrlResponse
{
"type": "object",
"required": [
"csv"
],
"properties": {
"csv": {
"type": "string",
"pattern": "^((http[s]?|ftp):\\/)?\\/?([^:\\/\\s]+)((\\/\\w+)*\\/)([\\w\\-\\.]+[^#?\\s]+)(.*)?(#[\\w\\-]+)?$",
"minLength": 5,
"description": "Returns the aws signed link to the csv file which mako UI should perform a get on to trigger the csv download for the user"
},
"presigned_url": {
"type": "string",
"format": "uri",
"description": "A signed link that will allow you to download the CSV file requested by the Request a CSV endpoint."
}
}
}
CsvUiOnlyRequestCsvDownload400Response
{
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"message": {
"type": "string"
}
}
}
}
}
}
CsvUiOnlyRequestCsvDownload429Response
{
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"message": {
"type": "string"
}
}
}
}
}
}
CsvUiOnlyRequestCsvDownload500Response
{
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"message": {
"type": "string"
}
}
}
}
}
}
CsvUiOnlyRequestCsvDownloadResponse
{
"type": "object",
"properties": {
"status": {
"enum": [
"pending"
],
"type": "string"
},
"message": {
"type": "string"
}
}
}
CustomFieldsCreateDefinition400Response
{
"type": "object",
"required": [
"errors"
],
"properties": {
"errors": {
"type": "array",
"items": {
"$ref": "#/components/schemas/error"
},
"uniqueItems": true
}
}
}
CustomFieldsCreateDefinitionRequest
{
"type": "object",
"example": {
"name": "custom_field_name",
"field_type": "Text"
},
"required": [
"name",
"field_type"
],
"properties": {
"name": {
"type": "string",
"maxLength": 100,
"minLength": 1
},
"field_type": {
"enum": [
"Text",
"Number",
"Date"
],
"type": "string"
}
}
}
CustomFieldsCreateDefinitionResponse
{
"allOf": [
{
"$ref": "#/components/schemas/custom_field_definitions_response"
},
{
"type": "object",
"properties": {
"_metadata": {
"$ref": "#/components/schemas/_metadata"
}
}
}
]
}
CustomFieldsDeleteDefinitionResponse
{
"type": "object",
"required": [
"errors"
],
"properties": {
"errors": {
"type": "array",
"items": {
"$ref": "#/components/schemas/error"
},
"uniqueItems": true
}
}
}
CustomFieldsGetAllFieldDefinitionsResponse
{
"type": "object",
"required": [
"custom_fields",
"reserved_fields"
],
"properties": {
"_metadata": {
"$ref": "#/components/schemas/_metadata"
},
"custom_fields": {
"type": "array",
"items": {
"$ref": "#/components/schemas/custom_field_definitions_response"
}
},
"reserved_fields": {
"$ref": "#/components/schemas/reserved_field_definitions_response"
}
},
"maxProperties": 120,
"minProperties": 0
}
CustomFieldsUpdateDefinition400Response
{
"type": "object",
"required": [
"errors"
],
"properties": {
"errors": {
"type": "array",
"items": {
"$ref": "#/components/schemas/error"
},
"uniqueItems": true
}
}
}
CustomFieldsUpdateDefinition404Response
{
"type": "object",
"required": [
"errors"
],
"properties": {
"errors": {
"type": "array",
"items": {
"$ref": "#/components/schemas/error"
},
"uniqueItems": true
}
}
}
CustomFieldsUpdateDefinitionRequest
{
"type": "object",
"example": {
"name": "new_custom_field_name"
},
"required": [
"name"
],
"properties": {
"name": {
"type": "string",
"maxLength": 100,
"minLength": 1
}
}
}
CustomFieldsUpdateDefinitionResponse
{
"allOf": [
{
"$ref": "#/components/schemas/custom_field_definitions_response"
},
{
"type": "object",
"properties": {
"_metadata": {
"$ref": "#/components/schemas/_metadata"
}
}
}
]
}
DesignsApiDeleteDesignByIdResponse
{
"type": "object",
"example": {},
"properties": {}
}
DesignsApiGetListResponse
{
"type": "object",
"properties": {
"result": {
"type": "array",
"items": {
"$ref": "#/components/schemas/design-output-summary"
}
},
"_metadata": {
"$ref": "#/components/schemas/_metadata"
}
}
}
DesignsApiListPreBuiltDesignsResponse
{
"type": "object",
"properties": {
"result": {
"type": "array",
"items": {
"$ref": "#/components/schemas/design-output-summary"
}
},
"_metadata": {
"$ref": "#/components/schemas/_metadata"
}
}
}
DesignsApiUpdateDesignByIdRequest
{
"type": "object",
"example": {
"name": "Ahoy, World!",
"subject": "Getting Started",
"categories": [
"promotions"
],
"html_content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n<html data-editor-version=\"2\" class=\"sg-campaigns\" xmlns=\"http://www.w3.org/1999/xhtml\">\n <head>\n <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1\">\n <!--[if !mso]><!-->\n <meta http-equiv=\"X-UA-Compatible\" content=\"IE=Edge\">\n <!--<![endif]-->\n <!--[if (gte mso 9)|(IE)]>\n <xml>\n <o:OfficeDocumentSettings>\n <o:AllowPNG/>\n <o:PixelsPerInch>96</o:PixelsPerInch>\n </o:OfficeDocumentSettings>\n </xml>\n <![endif]-->\n <!--[if (gte mso 9)|(IE)]>\n <style type=\"text/css\">\n body {width: 600px;margin: 0 auto;}\n table {border-collapse: collapse;}\n table, td {mso-table-lspace: 0pt;mso-table-rspace: 0pt;}\n img {-ms-interpolation-mode: bicubic;}\n </style>\n<![endif]-->\n <style type=\"text/css\">\n body, p, div {\n font-family: arial,helvetica,sans-serif;\n font-size: 14px;\n }\n body {\n color: #000000;\n }\n body a {\n color: #1188E6;\n text-decoration: none;\n }\n p { margin: 0; padding: 0; }\n table.wrapper {\n width:100% !important;\n table-layout: fixed;\n -webkit-font-smoothing: antialiased;\n -webkit-text-size-adjust: 100%;\n -moz-text-size-adjust: 100%;\n -ms-text-size-adjust: 100%;\n }\n img.max-width {\n max-width: 100% !important;\n }\n .column.of-2 {\n width: 50%;\n }\n .column.of-3 {\n width: 33.333%;\n }\n .column.of-4 {\n width: 25%;\n }\n ul ul ul ul {\n list-style-type: disc !important;\n }\n ol ol {\n list-style-type: lower-roman !important;\n }\n ol ol ol {\n list-style-type: lower-latin !important;\n }\n ol ol ol ol {\n list-style-type: decimal !important;\n }\n @media screen and (max-width:480px) {\n .preheader .rightColumnContent,\n .footer .rightColumnContent {\n text-align: left !important;\n }\n .preheader .rightColumnContent div,\n .preheader .rightColumnContent span,\n .footer .rightColumnContent div,\n .footer .rightColumnContent span {\n text-align: left !important;\n }\n .preheader .rightColumnContent,\n .preheader .leftColumnContent {\n font-size: 80% !important;\n padding: 5px 0;\n }\n table.wrapper-mobile {\n width: 100% !important;\n table-layout: fixed;\n }\n img.max-width {\n height: auto !important;\n max-width: 100% !important;\n }\n a.bulletproof-button {\n display: block !important;\n width: auto !important;\n font-size: 80%;\n padding-left: 0 !important;\n padding-right: 0 !important;\n }\n .columns {\n width: 100% !important;\n }\n .column {\n display: block !important;\n width: 100% !important;\n padding-left: 0 !important;\n padding-right: 0 !important;\n margin-left: 0 !important;\n margin-right: 0 !important;\n }\n .social-icon-column {\n display: inline-block !important;\n }\n }\n </style>\n <!--user entered Head Start--><!--End Head user entered-->\n </head>\n <body>\n <center class=\"wrapper\" data-link-color=\"#1188E6\" data-body-style=\"font-size:14px; font-family:arial,helvetica,sans-serif; color:#000000; background-color:#FFFFFF;\">\n <div class=\"webkit\">\n <table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"100%\" class=\"wrapper\" bgcolor=\"#FFFFFF\">\n <tr>\n <td valign=\"top\" bgcolor=\"#FFFFFF\" width=\"100%\">\n <table width=\"100%\" role=\"content-container\" class=\"outer\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\n <tr>\n <td width=\"100%\">\n <table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\n <tr>\n <td>\n <!--[if mso]>\n <center>\n <table><tr><td width=\"600\">\n <![endif]-->\n <table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" style=\"width:100%; max-width:600px;\" align=\"center\">\n <tr>\n <td role=\"modules-container\" style=\"padding:0px 0px 0px 0px; color:#000000; text-align:left;\" bgcolor=\"#FFFFFF\" width=\"100%\" align=\"left\"><table class=\"module preheader preheader-hide\" role=\"module\" data-type=\"preheader\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" style=\"display: none !important; mso-hide: all; visibility: hidden; opacity: 0; color: transparent; height: 0; width: 0;\">\n <tr>\n <td role=\"module-content\">\n <p></p>\n </td>\n </tr>\n </table><table class=\"module\" role=\"module\" data-type=\"text\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" style=\"table-layout: fixed;\" data-muid=\"41f90842-501c-4f08-96c9-17c0f74cb841\" data-mc-module-version=\"2019-10-22\">\n <tbody>\n <tr>\n <td style=\"padding:18px 0px 18px 0px; line-height:22px; text-align:inherit;\" height=\"100%\" valign=\"top\" bgcolor=\"\" role=\"module-content\"><div><div style=\"font-family: inherit; text-align: inherit\">Ahoy, World!</div><div></div></div></td>\n </tr>\n </tbody>\n </table><div data-role=\"module-unsubscribe\" class=\"module\" role=\"module\" data-type=\"unsubscribe\" style=\"color:#444444; font-size:12px; line-height:20px; padding:16px 16px 16px 16px; text-align:Center;\" data-muid=\"4e838cf3-9892-4a6d-94d6-170e474d21e5\"><div class=\"Unsubscribe--addressLine\"><p class=\"Unsubscribe--senderName\" style=\"font-size:12px; line-height:20px;\">{{Sender_Name}}</p><p style=\"font-size:12px; line-height:20px;\"><span class=\"Unsubscribe--senderAddress\">{{Sender_Address}}</span>, <span class=\"Unsubscribe--senderCity\">{{Sender_City}}</span>, <span class=\"Unsubscribe--senderState\">{{Sender_State}}</span> <span class=\"Unsubscribe--senderZip\">{{Sender_Zip}}</span></p></div><p style=\"font-size:12px; line-height:20px;\"><a class=\"Unsubscribe--unsubscribeLink\" href=\"{{{unsubscribe}}}\" target=\"_blank\" style=\"\">Unsubscribe</a> - <a href=\"{{{unsubscribe_preferences}}}\" target=\"_blank\" class=\"Unsubscribe--unsubscribePreferences\" style=\"\">Unsubscribe Preferences</a></p></div></td>\n </tr>\n </table>\n <!--[if mso]>\n </td>\n </tr>\n </table>\n </center>\n <![endif]-->\n </td>\n </tr>\n </table>\n </td>\n </tr>\n </table>\n </td>\n </tr>\n </table>\n </div>\n </center>\n </body>\n </html>",
"generate_plain_content": false
},
"properties": {
"name": {
"type": "string",
"default": "My Design",
"maxLength": 100,
"description": "Name of the Design."
},
"subject": {
"type": "string",
"maxLength": 5000,
"description": "Subject of the Design."
},
"categories": {
"type": "array",
"items": {
"type": "string",
"maxLength": 255
},
"maxItems": 10,
"description": "The list of categories applied to the design",
"uniqueItems": true
},
"html_content": {
"type": "string",
"maxLength": 1048576,
"description": "The HTML content of the Design."
},
"plain_content": {
"type": "string",
"default": "<generated from html_content if left empty>",
"maxLength": 1048576,
"description": "Plain text content of the Design."
},
"generate_plain_content": {
"type": "boolean",
"default": true,
"description": "If true, plain_content is always generated from html_content. If false, plain_content is not altered."
}
}
}
DomainAuthenticationAddIpToDomainRequest
{
"type": "object",
"example": {
"ip": "192.168.0.1"
},
"required": [
"ip"
],
"properties": {
"ip": {
"type": "string",
"description": "IP to associate with the domain. Used for manually specifying IPs for custom SPF."
}
}
}
DomainAuthenticationAssociateSubuserWithDomainRequest
{
"type": "object",
"example": {
"username": "jdoe"
},
"required": [
"username"
],
"properties": {
"username": {
"type": "string",
"description": "Username to associate with the authenticated domain."
}
}
}
DomainAuthenticationDeleteAuthenticatedDomainResponse
{
"type": "object",
"example": {},
"properties": {}
}
DomainAuthenticationDisassociateDomainFromSubuserResponse
{
"type": "object",
"example": {},
"properties": {}
}
DomainAuthenticationPostAuthenticateDomainRequest
{
"type": "object",
"example": {
"ips": [
"192.168.1.1",
"192.168.1.2"
],
"domain": "example.com",
"default": true,
"username": "john@example.com",
"subdomain": "news",
"custom_spf": true,
"automatic_security": false
},
"required": [
"domain"
],
"properties": {
"ips": {
"type": "array",
"items": {
"type": "string"
},
"description": "The IP addresses that will be included in the custom SPF record for this authenticated domain."
},
"domain": {
"type": "string",
"description": "Domain being authenticated."
},
"default": {
"type": "boolean",
"description": "Whether to use this authenticated domain as the fallback if no authenticated domains match the sender's domain."
},
"username": {
"type": "string",
"description": "The username associated with this domain."
},
"subdomain": {
"type": "string",
"description": "The subdomain to use for this authenticated domain."
},
"custom_spf": {
"type": "boolean",
"description": "Specify whether to use a custom SPF or allow SendGrid to manage your SPF. This option is only available to authenticated domains set up for manual security."
},
"automatic_security": {
"type": "boolean",
"description": "Whether to allow SendGrid to manage your SPF records, DKIM keys, and DKIM key rotation."
},
"custom_dkim_selector": {
"type": "string",
"description": "Add a custom DKIM selector. Accepts three letters or numbers."
}
}
}
DomainAuthenticationUpdateDomainSettingsRequest
{
"type": "object",
"example": {
"default": false,
"custom_spf": true
},
"properties": {
"default": {
"type": "boolean",
"default": false,
"description": "Indicates whether this is the default authenticated domain."
},
"custom_spf": {
"type": "boolean",
"default": false,
"description": "Indicates whether to generate a custom SPF record for manual security."
}
}
}
DomainAuthenticationValidateDomain500Response
{
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"required": [
"message"
],
"properties": {
"message": {
"type": "string",
"description": "A message explaining the reason for the error."
}
}
}
}
}
}
DomainAuthenticationValidateDomainResponse
{
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "The ID of the authenticated domain."
},
"valid": {
"type": "boolean",
"description": "Indicates if this is a valid authenticated domain."
},
"validation_results": {
"type": "object",
"properties": {
"spf": {
"type": "object",
"properties": {
"valid": {
"type": "boolean",
"description": "Indicates if the SPF record is valid."
},
"reason": {
"type": "string",
"nullable": true
}
},
"description": "The SPF record for the authenticated domain."
},
"dkim1": {
"type": "object",
"properties": {
"valid": {
"type": "boolean",
"description": "Indicates if the DNS record is valid."
},
"reason": {
"type": "string",
"nullable": true
}
},
"description": "A DNS record for this authenticated domain."
},
"dkim2": {
"type": "object",
"properties": {
"valid": {
"type": "boolean",
"description": "Indicates if the DNS record is valid."
},
"reason": {
"type": "string",
"nullable": true
}
},
"description": "A DNS record for this authenticated domain."
},
"mail_cname": {
"type": "object",
"properties": {
"valid": {
"type": "boolean",
"description": "Indicates if this DNS record is valid."
},
"reason": {
"type": "string",
"nullable": true,
"description": "The reason this record is invalid."
}
},
"description": "The CNAME record for the authenticated domain."
}
},
"description": "The individual DNS records that are checked when validating, including the reason for any invalid DNS records."
}
}
}
EmailAddressValidationCheckValidityRequest
{
"type": "object",
"example": {
"email": "example@example.com",
"source": "signup"
},
"required": [
"email"
],
"properties": {
"email": {
"type": "string",
"description": "The email address that you want to validate."
},
"source": {
"type": "string",
"description": "A one-word classifier for where this validation originated."
}
}
}
EmailAddressValidationCheckValidityResponse
{
"type": "object",
"required": [
"result"
],
"properties": {
"result": {
"type": "object",
"required": [
"email",
"verdict",
"score",
"local",
"host",
"checks",
"ip_address"
],
"properties": {
"host": {
"type": "string",
"format": "hostname",
"description": "The domain of the email address."
},
"email": {
"type": "string",
"format": "email",
"description": "The email being validated"
},
"local": {
"type": "string",
"description": "The local part of the email address."
},
"score": {
"type": "number",
"description": "A numeric representation of the email validity."
},
"checks": {
"type": "object",
"required": [
"domain",
"local_part",
"additional"
],
"properties": {
"domain": {
"type": "object",
"required": [
"has_valid_address_syntax",
"has_mx_or_a_record",
"is_suspected_disposable_address"
],
"properties": {
"has_mx_or_a_record": {
"type": "boolean",
"description": "Whether the email has appropriate DNS records to deliver a message. "
},
"has_valid_address_syntax": {
"type": "boolean",
"description": "Whether the email address syntax is valid."
},
"is_suspected_disposable_address": {
"type": "boolean",
"description": "Whether the domain appears to be from a disposable email address service."
}
},
"description": "Checks on the domain portion of the email address."
},
"additional": {
"type": "object",
"required": [
"has_known_bounces",
"has_suspected_bounces"
],
"properties": {
"has_known_bounces": {
"type": "boolean",
"description": "WHether email sent to this address from your account has bounced."
},
"has_suspected_bounces": {
"type": "boolean",
"description": "Whether our model predicts that the email address might bounce."
}
},
"description": "Additional checks on the email address."
},
"local_part": {
"type": "object",
"required": [
"is_suspected_role_address"
],
"properties": {
"is_suspected_role_address": {
"type": "boolean",
"description": "Whether the local part of email appears to be a role or group (e.g., hr, admin)"
}
},
"description": "Checks on the local part of the email address."
}
},
"description": "Granular checks for email address validity."
},
"source": {
"type": "string",
"description": "The source of the validation, as per the API request."
},
"verdict": {
"enum": [
"Valid",
"Risky",
"Invalid"
],
"type": "string",
"description": "A generic classification of whether or not the email address is valid."
},
"ip_address": {
"type": "string",
"description": "The IP address associated with this email."
},
"suggestion": {
"type": "string",
"description": "A suggested correction in the event of domain name typos (e.g., gmial.com)"
}
}
}
}
}
EmailCnameRecordsSendDnsEmailRequest
{
"type": "object",
"example": {
"email": "my_colleague@example.com",
"link_id": 29719392,
"message": "DNS Record for verification",
"domain_id": 46873408
},
"required": [
"link_id",
"domain_id",
"email"
],
"properties": {
"email": {
"type": "string",
"format": "email",
"description": "The email address to send the DNS information to."
},
"link_id": {
"type": "integer",
"x-desc": "The ID of the branded link.",
"minimum": 0
},
"message": {
"type": "string",
"default": "Please set these DNS records in our hosting solution.",
"description": "A custom text block to include in the email body sent with the records."
},
"domain_id": {
"type": "integer",
"minimum": 0,
"description": "The ID of your SendGrid domain record."
}
}
}
EmailCnameRecordsSendDnsEmailResponse
{
"type": "object",
"properties": {
"errors": {
"type": "object",
"properties": {
"error": {
"type": "string"
},
"field": {
"type": "string"
}
}
}
}
}
GetAlertsResponse
{
"type": "array",
"items": {
"type": "object",
"required": [
"created_at",
"email_to",
"id",
"type"
],
"properties": {
"id": {
"type": "integer",
"description": "The ID of the alert."
},
"type": {
"enum": [
"usage_limit",
"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."
}
}
},
"description": "The list of alerts."
}
GetCampaignsResponse
{
"type": "object",
"properties": {
"result": {
"type": "array",
"items": {
"$ref": "#/components/schemas/campaign_response"
}
}
}
}
GetCategories400Response
{
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"required": [
"field",
"message"
],
"properties": {
"field": {
"type": "string"
},
"message": {
"type": "string",
"description": "A message explaining why your categories could not be retrieved."
}
}
},
"description": "The error returned."
}
}
}
GetCategoriesResponse
{
"type": "array",
"items": {
"type": "object",
"required": [
"category"
],
"properties": {
"category": {
"type": "string",
"description": "A category used to group emails by broad topic."
}
}
}
}
GetIpsResponse
{
"type": "array",
"items": {
"type": "object",
"required": [
"ip",
"subusers",
"pools",
"warmup",
"start_date",
"whitelabeled",
"assigned_at"
],
"properties": {
"ip": {
"type": "string",
"description": "An IP address."
},
"rdns": {
"type": "string",
"description": "The reverse DNS record for this IP address."
},
"pools": {
"type": "array",
"items": {
"type": "string"
},
"description": "The IP pools that this IP has been added to."
},
"warmup": {
"type": "boolean",
"description": "Indicates if this IP address is currently warming up."
},
"subusers": {
"type": "array",
"items": {
"type": "string"
},
"description": "The subusers that are able to send email from this IP."
},
"start_date": {
"type": "number",
"nullable": true,
"description": "The date that the IP address was entered into warmup."
},
"assigned_at": {
"type": "integer",
"nullable": true,
"description": "The date that the IP address was assigned to the user."
},
"whitelabeled": {
"type": "boolean",
"description": "Indicates if this IP address is associated with a reverse DNS record."
}
}
}
}
GetScopes401Response
{
"type": "object",
"required": [
"errors"
],
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"required": [
"message"
],
"properties": {
"field": {
"nullable": true,
"description": "This empty field is returned instead of the list of scopes if the user making the call doesn't have the authorization required."
},
"message": {
"type": "string",
"description": "Explains why the scopes cannot be returned."
}
}
},
"description": "This 401 response indicates that the user making the call doesn't have the authorization to view the list of scopes."
}
}
}
GetScopesResponse
{
"type": "object",
"required": [
"scopes"
],
"properties": {
"scopes": {
"type": "array",
"items": {
"type": "string"
},
"description": "The list of scopes for which this user has access.",
"uniqueItems": true
}
}
}
GetStatsResponse
{
"type": "array",
"items": {
"type": "object",
"required": [
"date",
"stats"
],
"properties": {
"date": {
"type": "string",
"description": "The date the stats were gathered."
},
"stats": {
"type": "array",
"items": {
"type": "object",
"properties": {
"metrics": {
"$ref": "#/components/schemas/stats-advanced-global-stats"
}
}
},
"description": "The individual email activity stats."
}
}
}
}
GetSubusersResponse
{
"type": "array",
"items": {
"$ref": "#/components/schemas/subuser"
}
}
GetTemplates400Response
{
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"": {
"type": "string"
},
"message": {
"type": "string"
},
"error_id": {
"type": "string"
}
}
}
}
}
}
GetTemplatesResponse
{
"type": "object",
"properties": {
"result": {
"type": "array",
"items": {
"$ref": "#/components/schemas/transactional-templates-template-lean"
},
"description": ""
},
"_metadata": {
"$ref": "#/components/schemas/_metadata"
}
}
}
InvalidEmailsApiDeleteInvalidEmailsRequest
{
"type": "object",
"example": {
"emails": [
"example1@example.com",
"example2@example.com"
],
"delete_all": false
},
"properties": {
"emails": {
"type": "array",
"items": {
"type": "string",
"format": "email"
},
"description": "The list of specific email addresses that you want to remove."
},
"delete_all": {
"type": "boolean",
"description": "Indicates if you want to remove all email address from the invalid emails list."
}
}
}
InvalidEmailsApiDeleteInvalidEmailsResponse
{
"type": "object",
"properties": {}
}
InvalidEmailsApiGetAllInvalidEmailsResponse
{
"type": "array",
"items": {
"$ref": "#/components/schemas/invalid-email"
},
"description": "The list of invalid email addresses."
}
InvalidEmailsApiGetSpecificInvalidEmailResponse
{
"type": "array",
"items": {
"$ref": "#/components/schemas/invalid-email"
},
"maxItems": 1,
"minItems": 0,
"description": "A specific invalid email."
}
InvalidEmailsApiRemoveSpecificEmailResponse
{
"type": "object",
"properties": {}
}
IpAccessManagementAddAllowedIpsRequest
{
"type": "object",
"example": {
"ips": [
{
"ip": "192.168.1.1"
},
{
"ip": "192.*.*.*"
},
{
"ip": "192.168.1.3/32"
}
]
},
"required": [
"ips"
],
"properties": {
"ips": {
"type": "array",
"items": {
"type": "object",
"required": [
"ip"
],
"properties": {
"ip": {
"type": "string",
"description": "An IP address that you want to allow."
}
}
},
"description": "An array containing the IP(s) you want to allow."
}
}
}
IpAccessManagementGetRecentAccessAttempts500Response
{
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"message": {
"type": "string"
}
}
}
}
}
}
IpAccessManagementGetRecentAccessAttemptsResponse
{
"type": "object",
"required": [
"result"
],
"properties": {
"result": {
"type": "array",
"items": {
"type": "object",
"required": [
"allowed",
"auth_method",
"first_at",
"ip",
"last_at",
"location"
],
"properties": {
"ip": {
"type": "string",
"description": "The IP addressed used during the access attempt."
},
"allowed": {
"type": "boolean",
"description": "Indicates if the IP address was granted access to the account."
},
"last_at": {
"type": "integer",
"description": "A Unix timestamp indicating when the most recent access attempt was made"
},
"first_at": {
"type": "integer",
"description": "A Unix timestamp indicating when the first access attempt was made."
},
"location": {
"type": "string",
"description": "The geographic location from which the access attempt originated."
},
"auth_method": {
"type": "string",
"description": "The authentication method used when attempting access."
}
}
},
"description": "An array containing the IPs that recently attempted to access your account."
}
}
}
IpAccessManagementRemoveIpAddressesRequest
{
"type": "object",
"example": {
"ids": [
1,
2,
3
]
},
"properties": {
"ids": {
"type": "array",
"items": {
"type": "integer"
},
"description": "An array of the IDs of the IP address that you want to remove from your allow list."
}
}
}
IpAccessManagementRemoveIpAddressesResponse
{
"type": "object",
"properties": {}
}
IpAccessManagementRemoveSpecificIpFromAllowedListResponse
{
"type": "object",
"properties": {}
}
IpAddressesGetAssignedIpsResponse
{
"type": "array",
"items": {
"type": "object",
"required": [
"ip",
"pools",
"warmup",
"start_date"
],
"properties": {
"ip": {
"type": "string",
"description": "The IP address."
},
"pools": {
"type": "array",
"items": {
"type": "string"
},
"description": "The IP pools that this IP address has been added to."
},
"warmup": {
"type": "boolean",
"description": "Indicates if this IP address is currently warming up."
},
"start_date": {
"type": "integer",
"description": "The start date that this IP address was entered into warmup."
}
}
},
"title": "List all assigned IPs response"
}
IpAddressesGetIpPoolsByAddressResponse
{
"type": "object",
"required": [
"ip",
"subusers",
"rdns",
"pools",
"warmup",
"start_date",
"whitelabeled"
],
"properties": {
"ip": {
"type": "string",
"description": "The IP address."
},
"rdns": {
"type": "string",
"description": "The reverse DNS record for this IP address."
},
"pools": {
"type": "array",
"items": {
"type": "string"
},
"description": "The list of IP pools that this IP address belongs to."
},
"warmup": {
"type": "boolean",
"description": "Indicates if this IP address is currently warming up."
},
"subusers": {
"type": "array",
"items": {
"type": "string"
},
"description": "The subusers that can send email using this IP address."
},
"start_date": {
"type": "integer",
"nullable": true,
"description": "The date that the IP address was entered into warmup."
},
"whitelabeled": {
"type": "boolean",
"description": "Indicates if this IP address is associated with a reverse DNS record."
}
}
}
IpAddressesGetRemainingIPsCountResponse
{
"type": "object",
"required": [
"results"
],
"properties": {
"results": {
"type": "array",
"items": {
"type": "object",
"required": [
"remaining",
"period",
"price_per_ip"
],
"properties": {
"period": {
"type": "string",
"description": "The length of time until user can add more IPs."
},
"remaining": {
"type": "integer",
"description": "The number of IPs that can still be added to the user."
},
"price_per_ip": {
"type": "number",
"description": "The current cost to add an IP."
}
}
}
}
}
}
IpPoolsAddIpAddressToPool404Response
{
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"field": {
"nullable": true
},
"message": {
"type": "string",
"description": "A message explaining why the IP address could not be added to the IP Pool."
}
}
},
"description": "The error returned."
}
}
}
IpPoolsAddIpAddressToPoolRequest
{
"type": "object",
"example": {
"ip": "0.0.0.0"
},
"properties": {
"ip": {
"type": "string",
"description": "The IP address that you want to add to the named pool."
}
}
}
IpPoolsAddIpAddressToPoolResponse
{
"type": "object",
"required": [
"ip",
"pools",
"start_date",
"warmup"
],
"properties": {
"ip": {
"type": "string",
"description": "The IP address."
},
"pools": {
"type": "array",
"items": {
"type": "string"
},
"description": "The IP pools that this IP address has been added to."
},
"warmup": {
"type": "boolean",
"description": "Indicates if the IP address is in warmup."
},
"start_date": {
"type": "integer",
"description": "A Unix timestamp indicating when the warmup process began for the added IP address."
}
}
}
IpPoolsCreatePoolRequest
{
"type": "object",
"example": {
"name": "marketing"
},
"required": [
"name"
],
"properties": {
"name": {
"type": "string",
"maxLength": 64,
"description": "The name of your new IP pool."
}
}
}
IpPoolsDeletePool404Response
{
"type": "object",
"properties": {
"error": {
"type": "string",
"description": "An error explaining why the pool could not be deleted."
}
}
}
IpPoolsDeletePoolResponse
{
"type": "object",
"example": {},
"properties": {}
}
IpPoolsGetAllResponse
{
"type": "array",
"items": {
"$ref": "#/components/schemas/ip_pool_response"
}
}
IpPoolsGetPoolIps404Response
{
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "The name of the error."
},
"message": {
"type": "string",
"description": "A message explaining why the IP addresses could not be listed."
}
}
}
}
}
}
IpPoolsGetPoolIpsResponse
{
"type": "object",
"properties": {
"ips": {
"type": "array",
"items": {
"type": "string"
},
"description": "The IP addresses that belong to this pool."
},
"pool_name": {
"type": "string",
"maxLength": 64,
"description": "The name of the IP pool."
}
}
}
IpPoolsRemoveIpAddressFromPool404Response
{
"type": "object",
"properties": {
"error": {
"type": "string",
"description": "An error explaining why the IP address could not be removed from the IP pool."
}
}
}
IpPoolsRemoveIpAddressFromPoolResponse
{
"type": "object",
"example": {},
"properties": {}
}
IpPoolsUpdateNameRequest
{
"type": "object",
"example": {
"name": "new_pool_name"
},
"properties": {
"name": {
"type": "string",
"maxLength": 64,
"description": "The new name for your IP pool."
}
}
}
IpPoolsUpdateNameResponse
{
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"field": {
"nullable": true
},
"message": {
"type": "string",
"description": "A message explaining why the name of your IP pool could not be updated."
}
}
}
}
}
}
IpWarmupGetWarmupStatusForIpAddressResponse
{
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"field": {
"nullable": true
},
"message": {
"type": "string",
"description": "A message explaining why the warmup status could not be retrieved."
}
}
},
"description": "The errors that were encountered."
}
}
}
IpWarmupStartIpAddressWarmupRequest
{
"type": "object",
"example": {
"ip": "0.0.0.0"
},
"properties": {
"ip": {
"type": "string",
"description": "The IP address that you want to begin warming up."
}
}
}
IpWarmupStartIpAddressWarmupResponse
{
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"field": {
"nullable": true
},
"message": {
"type": "string",
"description": "A message explaining why the IP couldn't entered into warmup mode."
}
}
},
"description": "The errors that were encountered."
}
}
}
IpWarmupStopIpAddressWarmup404Response
{
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"field": {
"nullable": true
},
"message": {
"type": "string",
"description": "A message explaining why the IP couldn't be removed from warmup."
}
}
},
"description": "The errors that were encountered."
}
}
}
IpWarmupStopIpAddressWarmupResponse
{
"type": "object",
"example": {},
"properties": {}
}
LinkBrandingAssociateBrandedLinkWithSubuserRequest
{
"type": "object",
"example": {
"username": "jane@example.com"
},
"properties": {
"username": {
"type": "string",
"description": "The username of the subuser account that you want to associate the branded link with."
}
}
}
LinkBrandingCreateBrandedLinkRequest
{
"type": "object",
"example": {
"domain": "example.com",
"default": true,
"subdomain": "mail"
},
"required": [
"domain"
],
"properties": {
"domain": {
"type": "string",
"description": "The root domain for the subdomain that you are creating the link branding for. This should match your FROM email address."
},
"default": {
"enum": [
true,
false
],
"type": "boolean",
"description": "Indicates if you want to use this link branding as the default or fallback. When setting a new default, the existing default link branding will have its default status removed automatically."
},
"subdomain": {
"type": "string",
"description": "The subdomain to create the link branding for. Must be different from the subdomain you used for authenticating your domain."
}
}
}
LinkBrandingDeleteBrandedLinkResponse
{
"type": "object",
"example": {},
"properties": {}
}
LinkBrandingDisassociateBrandedLinkFromSubuserResponse
{
"type": "object",
"example": {},
"properties": {}
}
LinkBrandingGetBrandedLinksResponse
{
"type": "array",
"items": {
"$ref": "#/components/schemas/link_branding_200_response"
}
}
LinkBrandingUpdateBrandedLinkRequest
{
"type": "object",
"example": {
"default": true
},
"properties": {
"default": {
"enum": [
true,
false
],
"type": "boolean",
"description": "Indicates if the branded link is set as the default. When setting a new default, the existing default link branding will have its default status removed automatically."
}
}
}
LinkBrandingValidateBrandedLink500Response
{
"type": "object",
"required": [
"errors"
],
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"required": [
"message"
],
"properties": {
"message": {
"type": "string",
"description": "The reason why the link whitelabel could not be validated."
}
}
},
"description": "The reasons why the validation failed."
}
}
}
LinkBrandingValidateBrandedLinkResponse
{
"type": "object",
"required": [
"id",
"valid",
"validation_results"
],
"properties": {
"id": {
"type": "integer",
"description": "The ID of the branded link."
},
"valid": {
"enum": [
true,
false
],
"type": "boolean",
"description": "Indicates if the link branding is valid."
},
"validation_results": {
"type": "object",
"required": [
"domain_cname"
],
"properties": {
"owner_cname": {
"type": "object",
"required": [
"valid",
"reason"
],
"properties": {
"valid": {
"enum": [
true,
false
],
"type": "boolean",
"description": "Indicates if the DNS record is valid."
},
"reason": {
"type": "string",
"nullable": true,
"description": "Null if valid. If the DNS record is invalid, this will explain why."
}
},
"description": "The DNS record created to verify the branded link."
},
"domain_cname": {
"type": "object",
"required": [
"valid",
"reason"
],
"properties": {
"valid": {
"enum": [
true,
false
],
"type": "boolean",
"description": "Indicates if this DNS record is valid."
},
"reason": {
"type": "string",
"nullable": true,
"description": "Null if the DNS record is valid. If the DNS record is invalid, this will explain why."
}
},
"description": "The DNS record generated for the sending domain used for this branded link."
}
},
"description": "The individual validation results for each of the DNS records associated with this branded link."
}
}
}
ListsContactCountGet404Response
{
"type": "object",
"example": {},
"properties": {}
}
ListsContactCountGetResponse
{
"type": "object",
"properties": {
"contact_count": {
"type": "integer"
},
"billable_count": {
"type": "integer"
}
}
}
ListsCreateNewListRequest
{
"type": "object",
"example": {
"name": "list-name"
},
"required": [
"name"
],
"properties": {
"name": {
"type": "string",
"maxLength": 100,
"minLength": 1,
"description": "Your name for your list"
}
}
}
ListsCreateNewListResponse
{
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"$ref": "#/components/schemas/error"
}
}
}
}
ListsDeleteList204Response
{
"type": "string",
"description": "The delete has been processed. "
}
ListsDeleteList404Response
{
"type": "object",
"required": [
"errors"
],
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object"
}
}
}
}
ListsDeleteListResponse
{
"type": "object",
"properties": {
"job_id": {
"type": "string",
"description": "job_id of the async job"
}
},
"description": "The delete has been accepted and is processing."
}
ListsGetAllResponse
{
"type": "object",
"properties": {
"result": {
"type": "array",
"items": {
"$ref": "#/components/schemas/list"
}
},
"_metadata": {
"$ref": "#/components/schemas/metadata"
}
}
}
ListsGetListById404Response
{
"type": "array",
"items": {
"$ref": "#/components/schemas/error"
}
}
ListsGetListByIdResponse
{
"allOf": [
{
"$ref": "#/components/schemas/list"
},
{
"type": "object",
"properties": {
"contact_sample": {
"$ref": "#/components/schemas/contact-details2"
}
}
}
]
}
ListsRemoveContactsFromList404Response
{
"type": "object",
"example": {},
"properties": {}
}
ListsRemoveContactsFromListResponse
{
"type": "object",
"properties": {
"job_id": {
"type": "string",
"description": "job_id of the async job"
}
},
"description": "The removal is accepted and processing."
}
ListsUpdateName404Response
{
"type": "object",
"example": {},
"properties": {}
}
ListsUpdateNameRequest
{
"type": "object",
"example": {
"name": "updated-list-name"
},
"properties": {
"name": {
"type": "string",
"description": "Your name for your list."
}
}
}
ListsUpdateNameResponse
{
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"$ref": "#/components/schemas/error"
}
}
}
}
MailSendV3EmailSendRequest
{
"type": "object",
"example": {
"asm": {
"group_id": 12345,
"groups_to_display": [
12345
]
},
"from": {
"name": "Example Order Confirmation",
"email": "orders@example.com"
},
"content": [
{
"type": "text/html",
"value": "<p>Hello from Twilio SendGrid!</p><p>Sending with the email service trusted by developers and marketers for <strong>time-savings</strong>, <strong>scalability</strong>, and <strong>delivery expertise</strong>.</p><p>%open-track%</p>"
}
],
"send_at": 1617260400,
"subject": "Your Example Order Confirmation",
"batch_id": "AsdFgHjklQweRTYuIopzXcVBNm0aSDfGHjklmZcVbNMqWert1znmOP2asDFjkl",
"reply_to": {
"name": "Example Customer Service Team",
"email": "customer_service@example.com"
},
"categories": [
"cake",
"pie",
"baking"
],
"attachments": [
{
"type": "text/html",
"content": "PCFET0NUWVBFIGh0bWw+CjxodG1sIGxhbmc9ImVuIj4KCiAgICA8aGVhZD4KICAgICAgICA8bWV0YSBjaGFyc2V0PSJVVEYtOCI+CiAgICAgICAgPG1ldGEgaHR0cC1lcXVpdj0iWC1VQS1Db21wYXRpYmxlIiBjb250ZW50PSJJRT1lZGdlIj4KICAgICAgICA8bWV0YSBuYW1lPSJ2aWV3cG9ydCIgY29udGVudD0id2lkdGg9ZGV2aWNlLXdpZHRoLCBpbml0aWFsLXNjYWxlPTEuMCI+CiAgICAgICAgPHRpdGxlPkRvY3VtZW50PC90aXRsZT4KICAgIDwvaGVhZD4KCiAgICA8Ym9keT4KCiAgICA8L2JvZHk+Cgo8L2h0bWw+Cg==",
"filename": "index.html",
"disposition": "attachment"
}
],
"ip_pool_name": "transactional email",
"mail_settings": {
"footer": {
"enable": false
},
"sandbox_mode": {
"enable": false
},
"bypass_list_management": {
"enable": false
}
},
"personalizations": [
{
"cc": [
{
"name": "Jane Doe",
"email": "jane_doe@example.com"
}
],
"to": [
{
"name": "John Doe",
"email": "john_doe@example.com"
},
{
"name": "Julia Doe",
"email": "julia_doe@example.com"
}
],
"bcc": [
{
"name": "Jim Doe",
"email": "james_doe@example.com"
}
]
},
{
"to": [
{
"name": "Janice Doe",
"email": "janice_doe@example.com"
}
],
"bcc": [
{
"name": "Jordan Doe",
"email": "jordan_doe@example.com"
}
],
"from": {
"name": "Example Sales Team",
"email": "sales@example.com"
}
}
],
"tracking_settings": {
"open_tracking": {
"enable": true,
"substitution_tag": "%open-track%"
},
"click_tracking": {
"enable": true,
"enable_text": false
},
"subscription_tracking": {
"enable": false
}
}
},
"required": [
"personalizations",
"from",
"subject",
"content"
],
"properties": {
"asm": {
"type": "object",
"required": [
"group_id"
],
"properties": {
"group_id": {
"type": "integer",
"description": "The unsubscribe group to associate with this email."
},
"groups_to_display": {
"type": "array",
"items": {
"type": "integer"
},
"maxItems": 25,
"description": "An array containing the unsubscribe groups that you would like to be displayed on the unsubscribe preferences page."
}
},
"description": "An object allowing you to specify how to handle unsubscribes."
},
"from": {
"$ref": "#/components/schemas/from_email_object"
},
"content": {
"type": "array",
"items": {
"type": "object",
"required": [
"type",
"value"
],
"properties": {
"type": {
"type": "string",
"minLength": 1,
"description": "The MIME type of the content you are including in your email (e.g., `“text/plain”` or `“text/html”`)."
},
"value": {
"type": "string",
"minLength": 1,
"description": "The actual content of the specified MIME type that you are including in your email."
}
}
},
"description": "An array where you can specify the content of your email. You can include multiple [MIME types](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of content, but you must specify at least one MIME type. To include more than one MIME type, add another object to the array containing the `type` and `value` parameters."
},
"headers": {
"type": "object",
"description": "An object containing key/value pairs of header names and the value to substitute for them. The key/value pairs must be strings. You must ensure these are properly encoded if they contain unicode characters. These headers cannot be one of the reserved headers."
},
"send_at": {
"type": "integer",
"description": "A unix timestamp allowing you to specify when you want your email to be delivered. This may be overridden by the `send_at` parameter set at the personalizations level. Delivery cannot be scheduled more than 72 hours in advance. If you have the flexibility, it's better to schedule mail for off-peak times. Most emails are scheduled and sent at the top of the hour or half hour. Scheduling email to avoid peak times — for example, scheduling at 10:53 — can result in lower deferral rates due to the reduced traffic during off-peak times."
},
"subject": {
"type": "string",
"minLength": 1,
"description": "The global or 'message level' subject of your email. This may be overridden by subject lines set in personalizations."
},
"batch_id": {
"type": "string",
"description": "An ID representing a batch of emails to be sent at the same time. Including a `batch_id` in your request allows you include this email in that batch. It also enables you to cancel or pause the delivery of that batch. For more information, see the [Cancel Scheduled Sends API](https://sendgrid.com/docs/api-reference/)."
},
"reply_to": {
"$ref": "#/components/schemas/reply_to_email_object"
},
"categories": {
"type": "array",
"items": {
"type": "string",
"maxLength": 255
},
"maxItems": 10,
"description": "An array of category names for this message. Each category name may not exceed 255 characters. ",
"uniqueItems": true
},
"attachments": {
"type": "array",
"items": {
"type": "object",
"required": [
"content",
"filename"
],
"properties": {
"type": {
"type": "string",
"minLength": 1,
"description": "The MIME type of the content you are attaching (e.g., `“text/plain”` or `“text/html”`)."
},
"content": {
"type": "string",
"minLength": 1,
"description": "The Base64 encoded content of the attachment."
},
"filename": {
"type": "string",
"description": "The attachment's filename."
},
"content_id": {
"type": "string",
"description": "The attachment's content ID. This is used when the disposition is set to `“inline”` and the attachment is an image, allowing the file to be displayed within the body of your email."
},
"disposition": {
"enum": [
"inline",
"attachment"
],
"type": "string",
"default": "attachment",
"description": "The attachment's content-disposition, specifying how you would like the attachment to be displayed. For example, `“inline”` results in the attached file are displayed automatically within the message while `“attachment”` results in the attached file require some action to be taken before it is displayed, such as opening or downloading the file."
}
}
},
"description": "An array of objects where you can specify any attachments you want to include."
},
"custom_args": {
"type": "string",
"description": "Values that are specific to the entire send that will be carried along with the email and its activity data. Key/value pairs must be strings. Substitutions will not be made on custom arguments, so any string that is entered into this parameter will be assumed to be the custom argument that you would like to be used. This parameter is overridden by `custom_args` set at the personalizations level. Total `custom_args` size may not exceed 10,000 bytes."
},
"template_id": {
"type": "string",
"description": "An email template ID. A template that contains a subject and content — either text or html — will override any subject and content values specified at the personalizations or message level."
},
"ip_pool_name": {
"type": "string",
"maxLength": 64,
"minLength": 2,
"description": "The IP Pool that you would like to send this email from."
},
"mail_settings": {
"type": "object",
"properties": {
"footer": {
"type": "object",
"properties": {
"html": {
"type": "string",
"description": "The HTML content of your footer."
},
"text": {
"type": "string",
"description": "The plain text content of your footer."
},
"enable": {
"type": "boolean",
"description": "Indicates if this setting is enabled."
}
},
"description": "The default footer that you would like included on every email."
},
"sandbox_mode": {
"type": "object",
"properties": {
"enable": {
"type": "boolean",
"description": "Indicates if this setting is enabled."
}
},
"description": "Sandbox Mode allows you to send a test email to ensure that your request body is valid and formatted correctly."
},
"bypass_list_management": {
"type": "object",
"properties": {
"enable": {
"type": "boolean",
"description": "Indicates if this setting is enabled."
}
},
"description": "Allows you to bypass all unsubscribe groups and suppressions to ensure that the email is delivered to every single recipient. This should only be used in emergencies when it is absolutely necessary that every recipient receives your email. This filter cannot be combined with any other bypass filters. See our [documentation](https://sendgrid.com/docs/ui/sending-email/index-suppressions/#bypass-suppressions) for more about bypass filters."
},
"bypass_spam_management": {
"type": "object",
"properties": {
"enable": {
"type": "boolean",
"description": "Indicates if this setting is enabled."
}
},
"description": "Allows you to bypass the spam report list to ensure that the email is delivered to recipients. Bounce and unsubscribe lists will still be checked; addresses on these other lists will not receive the message. This filter cannot be combined with the `bypass_list_management` filter. See our [documentation](https://sendgrid.com/docs/ui/sending-email/index-suppressions/#bypass-suppressions) for more about bypass filters."
},
"bypass_bounce_management": {
"type": "object",
"properties": {
"enable": {
"type": "boolean",
"description": "Indicates if this setting is enabled."
}
},
"description": "Allows you to bypass the bounce list to ensure that the email is delivered to recipients. Spam report and unsubscribe lists will still be checked; addresses on these other lists will not receive the message. This filter cannot be combined with the `bypass_list_management` filter. See our [documentation](https://sendgrid.com/docs/ui/sending-email/index-suppressions/#bypass-suppressions) for more about bypass filters."
},
"bypass_unsubscribe_management": {
"type": "object",
"properties": {
"enable": {
"type": "boolean",
"description": "Indicates if this setting is enabled."
}
},
"description": "Allows you to bypass the global unsubscribe list to ensure that the email is delivered to recipients. Bounce and spam report lists will still be checked; addresses on these other lists will not receive the message. This filter applies only to global unsubscribes and will not bypass group unsubscribes. This filter cannot be combined with the `bypass_list_management` filter. See our [documentation](https://sendgrid.com/docs/ui/sending-email/index-suppressions/#bypass-suppressions) for more about bypass filters."
}
},
"description": "A collection of different mail settings that you can use to specify how you would like this email to be handled."
},
"reply_to_list": {
"type": "array",
"items": {
"type": "object",
"required": [
"email"
],
"properties": {
"name": {
"type": "string",
"description": "A name or title associated with the `reply_to_list` email address."
},
"email": {
"type": "string",
"format": "email",
"description": "The email address where any replies or bounces will be returned."
}
}
},
"maxItems": 1000,
"description": "An array of recipients who will receive replies and/or bounces. Each object in this array must contain the recipient's email address. Each object in the array may optionally contain the recipient's name. You can either choose to use “reply_to” field or “reply_to_list” but not both.",
"uniqueItems": true
},
"personalizations": {
"type": "array",
"items": {
"type": "object",
"required": [
"to"
],
"properties": {
"cc": {
"type": "array",
"items": {
"$ref": "#/components/schemas/cc_bcc_email_object"
},
"maxItems": 1000,
"description": "An array of recipients who will receive a copy of your email. Each object in this array must contain the recipient's email address. Each object in the array may optionally contain the recipient's name."
},
"to": {
"$ref": "#/components/schemas/to_email_array"
},
"bcc": {
"type": "array",
"items": {
"$ref": "#/components/schemas/cc_bcc_email_object"
},
"maxItems": 1000,
"description": "An array of recipients who will receive a blind carbon copy of your email. Each object in this array must contain the recipient's email address. Each object in the array may optionally contain the recipient's name."
},
"from": {
"$ref": "#/components/schemas/from_email_object"
},
"headers": {
"type": "object",
"description": "A collection of JSON key/value pairs allowing you to specify handling instructions for your email. You may not overwrite the following headers: `x-sg-id`, `x-sg-eid`, `received`, `dkim-signature`, `Content-Type`, `Content-Transfer-Encoding`, `To`, `From`, `Subject`, `Reply-To`, `CC`, `BCC`"
},
"send_at": {
"type": "integer",
"description": "A unix timestamp allowing you to specify when your email should be delivered. Scheduling delivery more than 72 hours in advance is forbidden."
},
"subject": {
"type": "string",
"minLength": 1,
"description": "The subject of your email. See character length requirements according to [RFC 2822](http://stackoverflow.com/questions/1592291/what-is-the-email-subject-length-limit#answer-1592310)."
},
"custom_args": {
"type": "object",
"description": "Values that are specific to this personalization that will be carried along with the email and its activity data. Substitutions will not be made on custom arguments, so any string that is entered into this parameter will be assumed to be the custom argument that you would like to be used. This field may not exceed 10,000 bytes.",
"maxProperties": 10000
},
"substitutions": {
"type": "object",
"description": "Substitutions allow you to insert data without using Dynamic Transactional Templates. This field should **not** be used in combination with a Dynamic Transactional Template, which can be identified by a `template_id` starting with `d-`. This field is a collection of key/value pairs following the pattern \"substitution_tag\":\"value to substitute\". The key/value pairs must be strings. These substitutions will apply to the text and html content of the body of your email, in addition to the `subject` and `reply-to` parameters. The total collective size of your substitutions may not exceed 10,000 bytes per personalization object.",
"maxProperties": 10000
},
"dynamic_template_data": {
"type": "object",
"description": "Dynamic template data is available using Handlebars syntax in Dynamic Transactional Templates. This field should be used in combination with a Dynamic Transactional Template, which can be identified by a `template_id` starting with `d-`. This field is a collection of key/value pairs following the pattern \"variable_name\":\"value to insert\"."
}
}
},
"maxItems": 1000,
"description": "An array of messages and their metadata. Each object within personalizations can be thought of as an envelope - it defines who should receive an individual message and how that message should be handled. See our [Personalizations documentation](https://sendgrid.com/docs/for-developers/sending-email/personalizations/) for examples.",
"uniqueItems": false
},
"tracking_settings": {
"type": "object",
"properties": {
"ganalytics": {
"type": "object",
"properties": {
"enable": {
"type": "boolean",
"description": "Indicates if this setting is enabled."
},
"utm_term": {
"type": "string",
"description": "Used to identify any paid keywords."
},
"utm_medium": {
"type": "string",
"description": "Name of the marketing medium. (e.g. Email)"
},
"utm_source": {
"type": "string",
"description": "Name of the referrer source. (e.g. Google, SomeDomain.com, or Marketing Email)"
},
"utm_content": {
"type": "string",
"description": "Used to differentiate your campaign from advertisements."
},
"utm_campaign": {
"type": "string",
"description": "The name of the campaign."
}
},
"description": "Allows you to enable tracking provided by Google Analytics."
},
"open_tracking": {
"type": "object",
"properties": {
"enable": {
"type": "boolean",
"description": "Indicates if this setting is enabled."
},
"substitution_tag": {
"type": "string",
"description": "Allows you to specify a substitution tag that you can insert in the body of your email at a location that you desire. This tag will be replaced by the open tracking pixel."
}
},
"description": "Allows you to track if the email was opened by including a single pixel image in the body of the content. When the pixel is loaded, Twilio SendGrid can log that the email was opened."
},
"click_tracking": {
"type": "object",
"properties": {
"enable": {
"type": "boolean",
"description": "Indicates if this setting is enabled."
},
"enable_text": {
"type": "boolean",
"description": "Indicates if this setting should be included in the `text/plain` portion of your email."
}
},
"description": "Allows you to track if a recipient clicked a link in your email."
},
"subscription_tracking": {
"type": "object",
"properties": {
"html": {
"type": "string",
"description": "HTML to be appended to the email with the subscription tracking link. You may control where the link is by using the tag <% %>"
},
"text": {
"type": "string",
"description": "Text to be appended to the email with the subscription tracking link. You may control where the link is by using the tag <% %>"
},
"enable": {
"type": "boolean",
"description": "Indicates if this setting is enabled."
},
"substitution_tag": {
"type": "string",
"description": "A tag that will be replaced with the unsubscribe URL. for example: `[unsubscribe_url]`. If this parameter is used, it will override both the `text` and `html` parameters. The URL of the link will be placed at the substitution tag’s location with no additional formatting."
}
},
"description": "Allows you to insert a subscription management link at the bottom of the text and HTML bodies of your email. If you would like to specify the location of the link within your email, you may use the `substitution_tag`."
}
},
"description": "Settings to determine how you would like to track the metrics of how your recipients interact with your email."
}
}
}
MarketingCampaignsStatsExportAutomationStatsResponse
{
"type": "string",
"description": "CSV data"
}
MarketingCampaignsStatsExportSingleSendStatsResponse
{
"type": "string",
"description": "CSV data"
}
MarketingCampaignsStatsGetSingleSendLinkStatByIdResponse
{
"type": "object",
"example": {},
"properties": {}
}
PostAlerts400Response
{
"type": "object",
"properties": {
"field": {
"type": "string"
},
"message": {
"type": "string"
}
}
}
PostAlertsRequest
{
"type": "object",
"example": {
"type": "stats_notification",
"email_to": "example@example.com",
"frequency": "daily"
},
"required": [
"type",
"email_to"
],
"properties": {
"type": {
"enum": [
"stats_notification",
"usage_limit"
],
"type": "string",
"description": "The type of alert you want to create. Can be either usage_limit or stats_notification.\nExample: usage_limit"
},
"email_to": {
"type": "string",
"format": "email",
"nullable": true,
"description": "The email address the alert will be sent to.\nExample: test@example.com"
},
"frequency": {
"type": "string",
"description": "Required for stats_notification. How frequently the alert will be sent.\nExample: daily"
},
"percentage": {
"type": "integer",
"description": "Required for usage_alert. When this usage threshold is reached, the alert will be sent.\nExample: 90"
}
}
}
PostAlertsResponse
{
"type": "object",
"required": [
"created_at",
"email_to",
"id",
"type",
"updated_at"
],
"properties": {
"id": {
"type": "integer",
"description": "The ID of the alert."
},
"type": {
"type": "string",
"description": "The type of alert."
},
"email_to": {
"type": "string",
"format": "email",
"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."
}
}
}
PostCampaignsResponse
{
"type": "object",
"example": {},
"properties": {}
}
PostIpsRequest
{
"type": "object",
"example": {
"count": 90323478,
"warmup": true,
"subusers": [
"subuser1",
"subuser2"
],
"user_can_send": true
},
"required": [
"count"
],
"properties": {
"count": {
"type": "integer",
"description": "The amount of IPs to add to the account."
},
"warmup": {
"type": "boolean",
"default": false,
"description": "Whether or not to warmup the IPs being added."
},
"subusers": {
"type": "array",
"items": {
"type": "string"
},
"description": "Array of usernames to be assigned a send IP."
}
}
}
PostIpsResponse
{
"type": "object",
"required": [
"ips",
"remaining_ips",
"warmup"
],
"properties": {
"ips": {
"type": "array",
"items": {
"type": "object",
"required": [
"ip",
"subusers"
],
"properties": {
"ip": {
"type": "string",
"description": "IP added to account."
},
"subusers": {
"type": "array",
"items": {
"type": "string"
},
"description": "Array of usernames assigned a send IP."
}
}
},
"description": "List of IP objects."
},
"warmup": {
"type": "boolean",
"description": "Whether or not the IPs are being warmed up."
},
"remaining_ips": {
"type": "integer",
"description": "The number of IPs that can still be added to the user."
}
}
}
PostSendersRequest
{
"allOf": [
{
"$ref": "#/components/schemas/sender-id-request"
},
{
"type": "object",
"required": [
"nickname",
"address",
"city",
"country"
],
"properties": {
"from": {
"type": "object",
"required": [
"email"
]
},
"reply_to": {
"type": "object",
"required": [
"email"
]
}
}
}
],
"example": {
"zip": "80202",
"city": "Denver",
"from": {
"name": "Example INC",
"email": "from@example.com"
},
"state": "Colorado",
"address": "123 Elm St.",
"country": "United States",
"nickname": "My Sender ID",
"reply_to": {
"name": "Example INC",
"email": "replyto@example.com"
},
"address_2": "Apt. 456"
}
}
PostSendersResponse
{
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"field": {
"type": "string"
},
"message": {
"type": "string"
}
}
}
}
}
}
PostSubusersRequest
{
"type": "object",
"example": {
"ips": [
"1.1.1.1",
"2.2.2.2"
],
"email": "John@example.com",
"password": "johns_password",
"username": "John@example.com"
},
"required": [
"username",
"email",
"password",
"ips"
],
"properties": {
"ips": {
"type": "array",
"items": {
"type": "string",
"format": "ipv4"
},
"description": "The IP addresses that should be assigned to this subuser."
},
"email": {
"type": "string",
"format": "email",
"description": "The email address of the subuser."
},
"password": {
"type": "string",
"description": "The password this subuser will use when logging into SendGrid."
},
"username": {
"type": "string",
"description": "The username for this subuser."
}
}
}
PostSubusersResponse
{
"type": "object",
"example": {
"errors": [
{
"message": "unable to validate IPs at this time"
}
]
},
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"message": {
"type": "string",
"example": "unable to validate IPs at this time"
}
}
}
}
}
}
PostTemplatesRequest
{
"type": "object",
"example": {
"name": "example_name",
"generation": "dynamic"
},
"required": [
"name"
],
"properties": {
"name": {
"type": "string",
"maxLength": 100,
"description": "The name for the new transactional template."
},
"generation": {
"enum": [
"legacy",
"dynamic"
],
"type": "string",
"default": "legacy",
"description": "Defines whether the template supports dynamic replacement."
}
}
}
QueryFilterMessages400Response
{
"type": "object",
"required": [
"errors"
],
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"required": [
"message"
],
"properties": {
"message": {
"type": "string"
}
}
}
}
}
}
QueryFilterMessages429Response
{
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"message": {
"type": "string"
}
}
}
}
}
}
QueryFilterMessagesResponse
{
"type": "object",
"properties": {
"messages": {
"type": "array",
"items": {
"type": "object",
"allOf": [
{
"$ref": "#/components/schemas/email-activity-response-common-fields"
},
{
"type": "object",
"properties": {
"opens_count": {
"type": "integer",
"description": "The number of times the message was opened."
},
"clicks_count": {
"type": "integer",
"description": "The number of times links in the message were clicked."
},
"last_event_time": {
"type": "integer",
"description": "A timestamp of the last event received for the specific message."
}
}
}
],
"title": "Abbv. Message",
"example": {
"msg_id": "abc123",
"status": "processed",
"subject": "anim Duis sint veniam",
"to_email": "test@test.com",
"from_email": "from@test.com",
"opens_count": 1,
"clicks_count": 2,
"last_event_time": "2017-10-13T18:56:21.000Z"
},
"required": [
"from_email",
"msg_id",
"subject",
"to_email",
"status",
"opens_count",
"clicks_count",
"last_event_time"
],
"properties": {
"msg_id": {
"type": "string"
},
"status": {
"enum": [
"processed",
"delivered",
"not_delivered"
],
"type": "string"
},
"subject": {
"type": "string"
},
"to_email": {
"type": "string"
},
"from_email": {
"type": "string"
},
"opens_count": {
"type": "integer"
},
"clicks_count": {
"type": "integer"
},
"last_event_time": {
"type": "string",
"description": "iso 8601 format"
}
}
}
}
}
}
QueryMessageDetails400Response
{
"type": "object",
"example": {},
"properties": {}
}
QueryMessageDetails404Response
{
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"field": {
"type": "string"
},
"message": {
"type": "string"
}
}
}
}
}
}
QueryMessageDetails429Response
{
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"message": {
"type": "string"
}
}
}
}
}
}
QueryMessageDetailsResponse
{
"type": "object",
"allOf": [
{
"$ref": "#/components/schemas/email-activity-response-common-fields"
},
{
"type": "object",
"example": {
"events": [
{
"processed": 1492453589,
"event_name": "bounced",
"server_response": "some error message"
}
],
"msg_id": "in aliquip id aliqua",
"status": "not delivered",
"subject": "est incididunt adipisicing pariatur",
"teammate": "",
"to_email": "send@test.com",
"api_key_id": "sdfsdfsdf123",
"categories": [
"hi",
"bye"
],
"from_email": "jane_doe@example.com",
"outbound_ip": "1.2.3.4",
"template_id": "123e4567-e89b-12d3-a456-426655440000",
"unique_args": "{'key': 'value'}",
"asm_group_id": 11376349,
"originating_ip": "2.3.4.5",
"outbound_ip_type": "dedicated"
},
"required": [
"template_id",
"asm_group_id",
"teammate",
"api_key_id",
"events",
"originating_ip",
"categories",
"unique_args",
"outbound_ip",
"outbound_ip_type"
],
"properties": {
"events": {
"type": "array",
"items": {
"type": "object",
"title": "Event",
"example": {
"url": "http://3LX,MU}N=B8'd,K}>bEma{l~!ad%peIF}y>qHfLPWQ$l9b\\!6.1H?$Z9H\"il-_gZD>/JPYsGqH4x4_3v090TCtnFalXGFiAdooDxgrDAYNXShUywSxwYr8gKeyc/4sal4VJ3IxEWsG74V5MYQ0mz27jhy7n5DHsUtApQ6zXHS13uO5vYBlJHpJRfuT6/F5nIpkHre2w3eTtN7M6pg9V5stjnnsavKkzQxyTv15CMSDLFwR_BTZwofhWpyBU7B9ypYL79vT97N3LDZyoaM/fNsOLPIqfGBer_Mx9_StergbQYANyOmOSjR6pZof01ky/ZcNDhpu3CkSl4MTtQ3NMCX780pOKQ5SYIPigyvz9IC9WtrCNcOkTxdOPdY0_4MJU4EuTTPmGvO/14KaJCDjIjgrbIqpzuUEL5mET0t2VeVlwvtnOnlHaBE8sic20ze2E0Xt3ETqXyzVJRjLDKh/LWkW8OVp_xkLBCCW7LQngRukKcOiWjMXeCEhYI9HoZ0RsMEWZC8KzRaHc4OI0uXPD4M9pav1LGrI/_0t_RnBnfnqGKsBJr0kdQi/Y6QN_aeawIqX5hDNIU3MF/wWKVWLS0ZFbDfK6KVv5oAid83EpwKoazAMA8MTfEXvHQLO7k7XYWX1Il3eGXL6/wCA96I1SOabzJkZHo2HsFpIC/VBk52Lnpp0xtDH/OCdlQ5e4PpxXQeklp70LPOndr7QKSYEQNUc48n36ixvTjhgpgO8wHsFFYqGcuBMHg9oaCARppQomiQDWYuVPVDynJHdsM1_gWl4/NSs8Y9PL7DrQXOu0UiFRRE0TUsvgqyUgJzlGjUnRziyYeROO75D0K_3aTtbGbCmhaxecos40a1w0PDCNkFp1W/iHwY7922drhsoM6ShwqqwGpAh5HLuU6Q5gqyckeai6YN7HCh9DdHPhhJcatgtMHZDKfQUBVt9ecUlDgiCFF_OnRX/GpzttcsL8E2FoXL9_eAWvSqjodROqx7MZCA/ORdnR/IssPCYP1kTHTIL5mZxv4UGEpyNjUzt4GdSJJTm0nztltWDYX8_Ezl2JvpLVnGVTJxobb4yQIJhe3n64khbOFyFLKHWEniIolm/AxpZQYmseWlVqrIz3YXU59XaSbTTrdCHNhvwF1ogXiiggN6TZ2B3QY_mBEtAp/SD0ONPVqEUkTNAFWTgnnlv6ZIMdMbTw5uZwtFRlB7qDvQouml9kujGmRu6k7zZMTOwWowRNtpboLUcL2NzkVgK6N1Zi2vq/Nt4NJvM5_l1dpIIbwJv_CIcZQZOqPtRWULa2iVxfmJJQaqgLQPwSHQH1zuRJMhraEsPjqVQRC0pZpSt/24VBDN8y31Ye/y_ekWxMdZCvr978C/WrdcTi29kxjJLyT9BII7BsgT5vLuI2l7ntqRAhAUWMs/h9JR0i8RbX5OfB46q41/TfmSdgi97bCR2HfgflyypXwKhRfKYU2MVpu2Dd90WQUlm7hZV8dSfGusuMj/nPMpRVWcbnvlAdsehJCPbLv6n4qdLSPeoMBo32acAGgu1BwBG8JsBgbH43yYi5X7UdGRWKqm_ZbqaDEKH3ncU/uA8EOJb41VfGho4LUeOi1IeYwVAhFEyO6YbteYZecEubrNFZrWWjZUqhzouzY95TeWU8E4StCXVPKlYPiFiwUSX20kG0lVtDbAy/7u4f4x0cYlFOvI1UN1qoOExmNxnxzQQFeM5exWfW2JrRXq5e0UdAJr4q2o9Y_0WaGfhL/nP6Ei06YajDKr11dK5H0LX/9CGTC37HFZeopyopzP_7fvGFkqIRoGTS48pLaIFz3gwpQNlWXUFCsd/PnRlsqJ3SBQSgp_AQe2cP6iBNy2bJI8lkxwY5YVDDdjxusuCcafdjfs2aUa/4tr_iMnNBnd27GxjQI28_JGJlfbOaajVJOxuPMT4ELpYCfPiFjdSbJyE0/gCwtj0rgDKSLWJnOPJ5TAJ935gCqeIsBhOhfcZX413GdilBZRRYEjCVKfOuWzHZ3GW/8yjyk5e_WMNv5F6xggl07w90DBwpx/Q/iWfncqMuSfoeFeqHQkDL9F5W19j1cGuAcyfIYMAXztHXpgTKh9vZcsLYC7LcgKr4FQj3JjEvtnDG2PjcMjGF/MnbCRCz22Ho410_vE9M1Hpq0wdk_i5DbZKNoSwlPgey9URkpuX146TcDdsx_VWDenCepY5HwMr9CPOY9hzUs/c5AWeUMXk/gvsI81Jkv5rHpEnNBUZXYzfqkwQfffhmrc/StLCtzRRlja8dpsEWdkzoKR9Kdxq1qAs5f0sdrGjVRLTT_s1Q2P59zhA/QmS4bubi64cYot3gSIgdNnkjA2GjCp1ETVa548_U9B6boTKDVmaKJlVIDvqL84RC3WI7Er/8opi2lZ48W83Ur47BRh38oOnI0agrCyZz8bp1w_gfVRlSO8PS0i/l_/qxq5xpLbhPkdxVoyZVsNAZchfnmkIHyIk5IK6EUDXdMR21y6OvKW50ZbooAtk9ymynBj4dAYMsd25RV7FE1I1vRTsiDw52/.E5WC0Ymo2zn.qelSbhzr-4laArYiWP.dwJB6qm_6rs0Rm5UXYaYtUNbh76_jJp_X1xQUCDSgbr2KOkDU0\"Q/-4dV\"Yk3QGg[(O86=Pf\"e17K4'r{)kicofHSXcMmP@>VF^`~4j4F*L/1]tD+Lw!WI!@]*OZm6C`M$u96}*O<U;_cZ84k.|nIqpAaeiroItOenDBL",
"reason": "some reason",
"mx_server": "quis proident",
"processed": "2017-10-13T18:56:21.000Z",
"event_name": "bounced",
"bounce_type": "blocked",
"http_user_agent": "in tempor ex dolore est"
},
"required": [
"event_name",
"processed",
"bounce_type",
"http_user_agent",
"mx_server"
],
"properties": {
"url": {
"type": "string",
"pattern": "^((http[s]?|ftp):\\/)?\\/?([^:\\/\\s]+)((\\/\\w+)*\\/)([\\w\\-\\.]+[^#?\\s]+)(.*)?(#[\\w\\-]+)?$",
"description": "Used with \"clicked\" event to indicate which url the user clicked."
},
"reason": {
"type": "string",
"maxLength": 1024,
"description": "Explanation of what caused the message to be \"bounced\", \"deferred\", or \"blocked\". Usually contains error message from the server - e.g. message from gmail why mail was deferred."
},
"mx_server": {
"type": "string",
"description": "The MX server that received the email. For example, mx.gmail.com"
},
"processed": {
"type": "string",
"description": "The date when the event was processed"
},
"event_name": {
"enum": [
"bounced",
"opened",
"clicked",
"processed",
"dropped",
"delivered",
"deferred",
"spam_report",
"unsubscribe",
"group_unsubscribe",
"group_resubscribe"
],
"type": "string",
"description": "Name of event"
},
"attempt_num": {
"type": "integer",
"maximum": 10,
"minimum": 1,
"description": "Used with \"deferred\" events to indicate the attempt number out of 10. One \"deferred\" entry will exists under events array for each time a message was deferred with error message from the server. "
},
"bounce_type": {
"enum": [
"soft",
"hard"
],
"type": "string",
"description": "Use to distinguish between types of bounces"
},
"http_user_agent": {
"type": "string",
"description": "Client recipient used to click or open message"
}
}
},
"description": "List of events related to email message"
},
"teammate": {
"type": "string",
"pattern": "^$|^[A-Za-z0-9]+",
"maxLength": 64,
"minLength": 0,
"description": "Teammate's username"
},
"api_key_id": {
"type": "string",
"pattern": "^[A-Za-z0-9]+",
"maxLength": 50,
"minLength": 3,
"description": "The ID of the API Key used to authenticate the sending request for the message."
},
"categories": {
"type": "array",
"items": {
"type": "string"
},
"description": "Categories users associated to the message"
},
"outbound_ip": {
"type": "string",
"format": "ipv4",
"description": "IP used to send to the remote Mail Transfer Agent."
},
"template_id": {
"type": "string",
"description": "The ID associated with a Twilio SendGrid email template used to format the message."
},
"unique_args": {
"type": "string",
"default": "Null",
"description": "JSON hash of key-value pairs associated with the message."
},
"asm_group_id": {
"type": "integer",
"minimum": 1,
"description": "The unsubscribe group associated with this email."
},
"originating_ip": {
"type": "string",
"format": "ipv4",
"description": "This is the IP of the user who sent the message."
},
"outbound_ip_type": {
"enum": [
"dedicated",
"shared"
],
"type": "string",
"description": "Whether or not the outbound IP is dedicated vs shared"
}
}
}
],
"title": "Message",
"example": {
"events": [
{
"processed": 1492453589,
"event_name": "bounced",
"server_response": "some error message"
}
],
"msg_id": "in aliquip id aliqua",
"status": "not delivered",
"subject": "est incididunt adipisicing pariatur",
"teammate": "",
"to_email": "send@test.com",
"api_key_id": "sdfsdfsdf123",
"categories": [
"hi",
"bye"
],
"from_email": "test@test.com",
"outbound_ip": "1.2.3.4",
"template_id": "123e4567-e89b-12d3-a456-426655440000",
"unique_args": "{'key': 'value'}",
"asm_group_id": 11376349,
"originating_ip": "2.3.4.5",
"outbound_ip_type": "dedicated"
},
"required": [
"from_email",
"msg_id",
"subject",
"to_email",
"status",
"template_id",
"asm_group_id",
"teammate",
"api_key_id",
"events",
"originating_ip",
"categories",
"unique_args",
"outbound_ip",
"outbound_ip_type"
],
"properties": {
"events": {
"type": "array",
"items": {
"type": "object",
"title": "Event",
"example": {
"url": "http://3LX,MU}N=B8'd,K}>bEma{l~!ad%peIF}y>qHfLPWQ$l9b\\!6.1H?$Z9H\"il-_gZD>/JPYsGqH4x4_3v090TCtnFalXGFiAdooDxgrDAYNXShUywSxwYr8gKeyc/4sal4VJ3IxEWsG74V5MYQ0mz27jhy7n5DHsUtApQ6zXHS13uO5vYBlJHpJRfuT6/F5nIpkHre2w3eTtN7M6pg9V5stjnnsavKkzQxyTv15CMSDLFwR_BTZwofhWpyBU7B9ypYL79vT97N3LDZyoaM/fNsOLPIqfGBer_Mx9_StergbQYANyOmOSjR6pZof01ky/ZcNDhpu3CkSl4MTtQ3NMCX780pOKQ5SYIPigyvz9IC9WtrCNcOkTxdOPdY0_4MJU4EuTTPmGvO/14KaJCDjIjgrbIqpzuUEL5mET0t2VeVlwvtnOnlHaBE8sic20ze2E0Xt3ETqXyzVJRjLDKh/LWkW8OVp_xkLBCCW7LQngRukKcOiWjMXeCEhYI9HoZ0RsMEWZC8KzRaHc4OI0uXPD4M9pav1LGrI/_0t_RnBnfnqGKsBJr0kdQi/Y6QN_aeawIqX5hDNIU3MF/wWKVWLS0ZFbDfK6KVv5oAid83EpwKoazAMA8MTfEXvHQLO7k7XYWX1Il3eGXL6/wCA96I1SOabzJkZHo2HsFpIC/VBk52Lnpp0xtDH/OCdlQ5e4PpxXQeklp70LPOndr7QKSYEQNUc48n36ixvTjhgpgO8wHsFFYqGcuBMHg9oaCARppQomiQDWYuVPVDynJHdsM1_gWl4/NSs8Y9PL7DrQXOu0UiFRRE0TUsvgqyUgJzlGjUnRziyYeROO75D0K_3aTtbGbCmhaxecos40a1w0PDCNkFp1W/iHwY7922drhsoM6ShwqqwGpAh5HLuU6Q5gqyckeai6YN7HCh9DdHPhhJcatgtMHZDKfQUBVt9ecUlDgiCFF_OnRX/GpzttcsL8E2FoXL9_eAWvSqjodROqx7MZCA/ORdnR/IssPCYP1kTHTIL5mZxv4UGEpyNjUzt4GdSJJTm0nztltWDYX8_Ezl2JvpLVnGVTJxobb4yQIJhe3n64khbOFyFLKHWEniIolm/AxpZQYmseWlVqrIz3YXU59XaSbTTrdCHNhvwF1ogXiiggN6TZ2B3QY_mBEtAp/SD0ONPVqEUkTNAFWTgnnlv6ZIMdMbTw5uZwtFRlB7qDvQouml9kujGmRu6k7zZMTOwWowRNtpboLUcL2NzkVgK6N1Zi2vq/Nt4NJvM5_l1dpIIbwJv_CIcZQZOqPtRWULa2iVxfmJJQaqgLQPwSHQH1zuRJMhraEsPjqVQRC0pZpSt/24VBDN8y31Ye/y_ekWxMdZCvr978C/WrdcTi29kxjJLyT9BII7BsgT5vLuI2l7ntqRAhAUWMs/h9JR0i8RbX5OfB46q41/TfmSdgi97bCR2HfgflyypXwKhRfKYU2MVpu2Dd90WQUlm7hZV8dSfGusuMj/nPMpRVWcbnvlAdsehJCPbLv6n4qdLSPeoMBo32acAGgu1BwBG8JsBgbH43yYi5X7UdGRWKqm_ZbqaDEKH3ncU/uA8EOJb41VfGho4LUeOi1IeYwVAhFEyO6YbteYZecEubrNFZrWWjZUqhzouzY95TeWU8E4StCXVPKlYPiFiwUSX20kG0lVtDbAy/7u4f4x0cYlFOvI1UN1qoOExmNxnxzQQFeM5exWfW2JrRXq5e0UdAJr4q2o9Y_0WaGfhL/nP6Ei06YajDKr11dK5H0LX/9CGTC37HFZeopyopzP_7fvGFkqIRoGTS48pLaIFz3gwpQNlWXUFCsd/PnRlsqJ3SBQSgp_AQe2cP6iBNy2bJI8lkxwY5YVDDdjxusuCcafdjfs2aUa/4tr_iMnNBnd27GxjQI28_JGJlfbOaajVJOxuPMT4ELpYCfPiFjdSbJyE0/gCwtj0rgDKSLWJnOPJ5TAJ935gCqeIsBhOhfcZX413GdilBZRRYEjCVKfOuWzHZ3GW/8yjyk5e_WMNv5F6xggl07w90DBwpx/Q/iWfncqMuSfoeFeqHQkDL9F5W19j1cGuAcyfIYMAXztHXpgTKh9vZcsLYC7LcgKr4FQj3JjEvtnDG2PjcMjGF/MnbCRCz22Ho410_vE9M1Hpq0wdk_i5DbZKNoSwlPgey9URkpuX146TcDdsx_VWDenCepY5HwMr9CPOY9hzUs/c5AWeUMXk/gvsI81Jkv5rHpEnNBUZXYzfqkwQfffhmrc/StLCtzRRlja8dpsEWdkzoKR9Kdxq1qAs5f0sdrGjVRLTT_s1Q2P59zhA/QmS4bubi64cYot3gSIgdNnkjA2GjCp1ETVa548_U9B6boTKDVmaKJlVIDvqL84RC3WI7Er/8opi2lZ48W83Ur47BRh38oOnI0agrCyZz8bp1w_gfVRlSO8PS0i/l_/qxq5xpLbhPkdxVoyZVsNAZchfnmkIHyIk5IK6EUDXdMR21y6OvKW50ZbooAtk9ymynBj4dAYMsd25RV7FE1I1vRTsiDw52/.E5WC0Ymo2zn.qelSbhzr-4laArYiWP.dwJB6qm_6rs0Rm5UXYaYtUNbh76_jJp_X1xQUCDSgbr2KOkDU0\"Q/-4dV\"Yk3QGg[(O86=Pf\"e17K4'r{)kicofHSXcMmP@>VF^`~4j4F*L/1]tD+Lw!WI!@]*OZm6C`M$u96}*O<U;_cZ84k.|nIqpAaeiroItOenDBL",
"reason": "some reason",
"mx_server": "quis proident",
"processed": "2017-10-13T18:56:21.000Z",
"event_name": "bounced",
"bounce_type": "blocked",
"http_user_agent": "in tempor ex dolore est"
},
"required": [
"event_name",
"processed",
"url",
"bounce_type",
"http_user_agent",
"mx_server"
],
"properties": {
"url": {
"type": "string",
"pattern": "^((http[s]?|ftp):\\/)?\\/?([^:\\/\\s]+)((\\/\\w+)*\\/)([\\w\\-\\.]+[^#?\\s]+)(.*)?(#[\\w\\-]+)?$",
"description": "Used with \"clicked\" event to indicate which url the user clicked."
},
"reason": {
"type": "string",
"maxLength": 1024,
"description": "Explanation of what caused \"bounced\", \"deferred\", or \"blocked\". Usually contains error message from the server - e.g. message from gmail why mail was deferred"
},
"mx_server": {
"type": "string",
"description": "For example mx.gmail.com"
},
"processed": {
"type": "string",
"description": "Date of when event occurred"
},
"event_name": {
"enum": [
"bounced",
"opened",
"clicked",
"processed",
"dropped",
"delivered",
"deferred",
"spam_report",
"unsubscribe",
"group_unsubscribe",
"group_resubscribe"
],
"type": "string",
"description": "Name of event"
},
"attempt_num": {
"type": "integer",
"maximum": 10,
"minimum": 1,
"description": "Used with \"deferred\" events to indicate the attempt number out of 10. One \"deferred\" entry will exists under events array for each time a message was deferred with error message from the server. "
},
"bounce_type": {
"enum": [
"bounced",
"blocked",
"expired"
],
"type": "string",
"description": "Use to distinguish between types of bounces"
},
"http_user_agent": {
"type": "string",
"description": "Client recipient used to click or open message"
}
}
},
"description": "List of events related to email message"
},
"msg_id": {
"type": "string",
"pattern": "^[A-Za-z0-9]+",
"maxLength": 50,
"minLength": 5
},
"status": {
"enum": [
"processed",
"not delivered",
"delivered"
],
"type": "string",
"description": "Quick summary of the status of a message"
},
"subject": {
"type": "string",
"maxLength": 255,
"minLength": 3
},
"teammate": {
"type": "string",
"pattern": "^$|^[A-Za-z0-9]+",
"maxLength": 64,
"minLength": 0,
"description": "Teammate's username"
},
"to_email": {
"type": "string",
"pattern": "\\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,}\\b"
},
"api_key_id": {
"type": "string",
"pattern": "^[A-Za-z0-9]+",
"maxLength": 50,
"minLength": 3
},
"categories": {
"type": "array",
"items": {
"type": "string"
},
"description": "Categories users associated to the message"
},
"from_email": {
"type": "string",
"pattern": "\\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,}\\b"
},
"outbound_ip": {
"type": "string",
"format": "ipv4",
"description": "IP used to send to the remote MTA. Used by UI to display IP in detailed view"
},
"template_id": {
"type": "string",
"format": "uuid"
},
"unique_args": {
"type": "string",
"default": "Null",
"description": "JSON hash of arbitrary key-value pairs"
},
"asm_group_id": {
"type": "integer",
"minimum": 1
},
"originating_ip": {
"type": "string",
"format": "ipv4",
"description": "This is the IP of the user who sent the message."
},
"outbound_ip_type": {
"enum": [
"dedicated",
"shared"
],
"type": "string",
"description": "Whether or not the outbound IP is dedicated vs shared"
}
}
}
ReverseDnsDeleteReverseDnsRecordResponse
{
"type": "object",
"example": {},
"properties": {}
}
ReverseDnsGetAllReverseDnsRecordsResponse
{
"type": "array",
"items": {
"$ref": "#/components/schemas/reverse_dns"
}
}
ReverseDnsSetUpReverseDnsRequest
{
"type": "object",
"example": {
"ip": "192.168.1.1",
"domain": "example.com",
"subdomain": "email"
},
"required": [
"ip",
"domain"
],
"properties": {
"ip": {
"type": "string",
"description": "The IP address for which you want to set up reverse DNS."
},
"domain": {
"type": "string",
"description": "The root, or sending, domain that will be used to send message from the IP address."
},
"subdomain": {
"type": "string",
"description": "The subdomain that will be used to send emails from the IP address. This should be the same as the subdomain used to set up an authenticated domain."
}
}
}
ReverseDnsValidateRecord404Response
{
"type": "object",
"required": [
"errors"
],
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"required": [
"message"
],
"properties": {
"message": {
"type": "string",
"description": "A message describing why the reverse DNS could not be validated."
}
}
},
"description": "The error messages for the failed validation."
}
}
}
ReverseDnsValidateRecord500Response
{
"type": "object",
"required": [
"errors"
],
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"required": [
"message"
],
"properties": {
"message": {
"type": "string",
"description": "A message describing why the IP whitelabel could not be validated."
}
}
},
"description": "The error messages for the failed validation."
}
}
}
ReverseDnsValidateRecordResponse
{
"type": "object",
"required": [
"id",
"valid",
"validation_results"
],
"properties": {
"id": {
"type": "integer",
"description": "The ID of the reverse DNS record."
},
"valid": {
"enum": [
true,
false
],
"type": "boolean",
"description": "Indicates if the reverse DNS record is valid."
},
"validation_results": {
"type": "object",
"properties": {
"a_record": {
"type": "object",
"required": [
"valid",
"reason"
],
"properties": {
"valid": {
"enum": [
true,
false
],
"type": "boolean",
"description": "Indicates if the reverse DNS record could be validated."
},
"reason": {
"type": "string",
"nullable": true,
"description": "The reason the reverse DNS record could not be validated. Is `null` if the reverse DNS record was validated."
}
}
}
},
"description": "The specific results of the validation."
}
}
}
SegmentingContactsBulkDeleteSegments202Response
{
"type": "object",
"example": {},
"properties": {}
}
SegmentingContactsBulkDeleteSegments400Response
{
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"field": {
"type": "string"
},
"message": {
"type": "string"
}
}
}
}
}
}
SegmentingContactsBulkDeleteSegmentsRequest
{
"type": "object",
"example": {
"ids": [
"a14dcc63-d651-4c57-9826-4a3705f5c78d",
"f3de551e-dc5c-4d42-bd08-c7f87f87f0e8",
"1b8107b5-adf4-401c-8865-fa84ba178fb9",
"d7900715-c904-4728-acff-9ab79627579e",
"16641f5b-cfa3-41b9-9626-244488ee85b1"
]
},
"properties": {
"ids": {
"type": "array",
"items": {
"type": "string",
"format": "uuid"
}
}
}
}
SegmentingContactsBulkDeleteSegmentsResponse
{
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Segment ID"
},
"error": {
"type": "string",
"description": "error message that indicates why segment cannot be deleted (\"in-use\", \"segment not found\", \"invalid uuid\")"
},
"resources": {
"type": "object",
"properties": {
"ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "the resource ids"
},
"type": {
"type": "string",
"description": "the type of resource in use (e.g., \"automation\")"
}
},
"description": "resources in which segment is being used"
}
}
}
}
}
}
SegmentingContactsCreateNewSegmentRequest
{
"allOf": [
{
"$ref": "#/components/schemas/segment_write_v2"
},
{
"type": "object",
"properties": {
"parent_list_id": {
"type": "string",
"format": "uuid",
"maxLength": 36,
"minLength": 36,
"description": "The id of the list if this segment is a child of a list. This implies the query is rewritten as `(${query_dsl}) AND CONTAINS(list_ids, ${parent_list_id})`"
}
}
}
]
}
SegmentingContactsCreateNewSegmentResponse
{
"type": "object",
"required": [
"errors"
],
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"required": [
"message"
],
"properties": {
"message": {
"type": "string"
}
}
}
}
}
}
SegmentingContactsDeleteById404Response
{
"type": "object",
"required": [
"errors"
],
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"required": [
"message",
"field"
],
"properties": {
"field": {
"type": "string"
},
"message": {
"type": "string"
}
}
}
}
}
}
SegmentingContactsDeleteById500Response
{
"type": "object",
"required": [
"errors"
],
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"required": [
"message"
],
"properties": {
"message": {
"type": "string"
}
}
}
}
}
}
SegmentingContactsDeleteByIdResponse
{
"type": "object",
"example": {},
"properties": {}
}
SegmentingContactsGetById500Response
{
"type": "object",
"required": [
"errors"
],
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"required": [
"message"
],
"properties": {
"message": {
"type": "string"
}
}
}
}
}
}
SegmentingContactsGetByIdResponse
{
"type": "object",
"required": [
"errors"
],
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"required": [
"message",
"field"
],
"properties": {
"field": {
"type": "string"
},
"message": {
"type": "string"
}
}
}
}
}
}
SegmentingContactsListSegments500Response
{
"type": "object",
"required": [
"errors"
],
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"required": [
"message"
],
"properties": {
"message": {
"type": "string"
}
}
}
}
}
}
SegmentingContactsListSegmentsResponse
{
"type": "object",
"required": [
"results"
],
"properties": {
"results": {
"type": "array",
"items": {
"$ref": "#/components/schemas/segment_summary"
},
"minItems": 0,
"uniqueItems": true
}
}
}
SegmentingContactsUpdateSegmentById500Response
{
"type": "object",
"required": [
"errors"
],
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"required": [
"message"
],
"properties": {
"message": {
"type": "string"
}
}
}
}
}
}
SegmentingContactsUpdateSegmentByIdResponse
{
"type": "object",
"required": [
"errors"
],
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"required": [
"message",
"field"
],
"properties": {
"field": {
"type": "string"
},
"message": {
"type": "string"
}
}
}
}
}
}
SendTestEmailToContactsRequest
{
"type": "object",
"example": {
"emails": [
"janedoe@example.com",
"tiramisu@example.com",
"bundt@example.com"
],
"sender_id": 6060664,
"template_id": "f8f77db8-b9fa-4b3c-9ee8-de3d582016b8",
"version_id_override": "7734f757-8eb8-4d22-b7f0-779a72f32986",
"suppression_group_id": 21865513,
"custom_unsubscribe_url": "https://example.com/unsubscribe"
},
"required": [
"template_id",
"emails"
],
"properties": {
"emails": {
"type": "array",
"items": {
"type": "string",
"format": "email"
},
"maxItems": 10,
"minItems": 1,
"description": "An array of email addresses you want to send the test message to.",
"uniqueItems": true
},
"sender_id": {
"type": "integer",
"description": "This ID must belong to a verified sender. Alternatively, you may supply a `from_address` email."
},
"template_id": {
"type": "string",
"format": "uuid",
"description": "The ID of the template that you would like to use. If you use a template that contains a subject and content (either text or HTML), then those values specified at the personalizations or message level will not be used."
},
"from_address": {
"type": "string",
"format": "email",
"description": "You can either specify this address or specify a verified sender ID."
},
"version_id_override": {
"type": "string",
"format": "uuid",
"description": " You can override the active template with an alternative template version by passing the version ID in this field. If this field is blank, the active template version will be used."
},
"suppression_group_id": {
"type": "integer"
},
"custom_unsubscribe_url": {
"type": "string",
"description": "A custom unsubscribe URL."
}
}
}
SendTestEmailToContactsResponse
{
"type": "object",
"example": {},
"properties": {}
}
SenderIdentitiesApiDeleteSenderIdentity403Response
{
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"field": {
"type": "string"
},
"message": {
"type": "string"
}
}
}
}
}
}
SenderIdentitiesApiDeleteSenderIdentity404Response
{
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"field": {
"type": "string"
},
"message": {
"type": "string"
}
}
}
}
}
}
SenderIdentitiesApiDeleteSenderIdentityResponse
{
"type": "object",
"properties": {}
}
SenderIdentitiesApiGetAllResponse
{
"type": "object",
"properties": {
"result": {
"type": "array",
"items": {
"$ref": "#/components/schemas/senderID"
}
}
}
}
SenderIdentitiesApiResendVerificationEmail400Response
{
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"field": {
"type": "string"
},
"message": {
"type": "string"
}
}
}
}
}
}
SenderIdentitiesApiResendVerificationEmail404Response
{
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"field": {
"type": "string"
},
"message": {
"type": "string"
}
}
}
}
}
}
SenderIdentitiesApiResendVerificationEmailResponse
{
"type": "object",
"properties": {}
}
SenderIdentitiesApiUpdateSenderIdentity403Response
{
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"field": {
"type": "string"
},
"message": {
"type": "string"
}
}
}
}
}
}
SenderIdentitiesApiUpdateSenderIdentity404Response
{
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"field": {
"type": "string"
},
"message": {
"type": "string"
}
}
}
}
}
}
SenderIdentitiesApiUpdateSenderIdentityResponse
{
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"field": {
"type": "string"
},
"message": {
"type": "string"
}
}
}
}
}
}
SenderIdentitiesApiViewSenderIdentityResponse
{
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"field": {
"type": "string"
},
"message": {
"type": "string"
}
}
}
}
}
}
SenderVerificationCreateVerifiedSenderRequestResponse
{
"type": "object",
"required": [
"errors"
],
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"required": [
"message",
"error_id"
],
"properties": {
"field": {
"type": "string"
},
"message": {
"type": "string"
},
"error_id": {
"type": "string"
}
}
}
}
}
}
SenderVerificationDeleteVerifiedSender403Response
{
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"required": [
"message",
"error_id"
],
"properties": {
"message": {
"type": "string"
},
"error_id": {
"type": "string"
}
}
}
}
}
}
SenderVerificationDeleteVerifiedSender404Response
{
"type": "object",
"required": [
"errors"
],
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"required": [
"message",
"error_id"
],
"properties": {
"message": {
"type": "string"
},
"error_id": {
"type": "string"
}
}
}
}
}
}
SenderVerificationDeleteVerifiedSenderResponse
{
"type": "object",
"example": {},
"properties": {}
}
SenderVerificationDetermineVerificationStatusResponse
{
"type": "object",
"properties": {
"results": {
"type": "object",
"properties": {
"domain_verified": {
"type": "boolean"
},
"sender_verified": {
"type": "boolean"
}
}
}
}
}
SenderVerificationGetAllSenderIdentitiesResponse
{
"type": "object",
"properties": {
"results": {
"type": "array",
"items": {
"$ref": "#/components/schemas/verified-sender-response-schema"
}
}
}
}
SenderVerificationListDomainWarnResponse
{
"type": "object",
"required": [
"results"
],
"properties": {
"results": {
"type": "object",
"required": [
"soft_failures",
"hard_failures"
],
"properties": {
"hard_failures": {
"type": "array",
"items": {
"type": "string"
}
},
"soft_failures": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
}
SenderVerificationRequestVerificationTokenResponse
{
"type": "object",
"required": [
"errors"
],
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"required": [
"message",
"error_id"
],
"properties": {
"message": {
"type": "string"
},
"error_id": {
"type": "string"
}
}
}
}
}
}
SenderVerificationResendVerificationEmail400Response
{
"type": "object",
"required": [
"errors"
],
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"required": [
"message",
"error_id"
],
"properties": {
"message": {
"type": "string"
},
"error_id": {
"type": "string"
}
}
}
}
}
}
SenderVerificationResendVerificationEmail404Response
{
"type": "object",
"required": [
"errors"
],
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"required": [
"message",
"error_id"
],
"properties": {
"message": {
"type": "string"
},
"error_id": {
"type": "string"
}
}
}
}
}
}
SenderVerificationResendVerificationEmailResponse
{
"type": "object",
"example": {},
"properties": {}
}
SenderVerificationUpdateSenderIdentity403Response
{
"type": "object",
"required": [
"errors"
],
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"required": [
"message",
"error_id"
],
"properties": {
"message": {
"type": "string"
},
"error_id": {
"type": "string"
}
}
}
}
}
}
SenderVerificationUpdateSenderIdentity404Response
{
"type": "object",
"required": [
"errors"
],
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"required": [
"message",
"error_id"
],
"properties": {
"message": {
"type": "string"
},
"error_id": {
"type": "string"
}
}
}
}
}
}
SenderVerificationUpdateSenderIdentityResponse
{
"type": "object",
"required": [
"errors"
],
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"required": [
"message",
"error_id"
],
"properties": {
"field": {
"type": "string"
},
"message": {
"type": "string"
},
"error_id": {
"type": "string"
}
}
}
}
}
}
SendersCreateIdentityRequest
{
"type": "object",
"example": {
"zip": "94105",
"city": "San Francisco",
"from": {
"name": "Example Orders",
"email": "orders@example.com"
},
"state": "CA",
"address": "1234 Fake St.",
"country": "United States",
"nickname": "Example Orders",
"reply_to": {
"name": "Example Support",
"email": "support@example.com"
},
"address_2": ""
},
"required": [
"nickname",
"from",
"address",
"city",
"country"
],
"properties": {
"zip": {
"type": "string",
"description": "The zipcode of the sender identity."
},
"city": {
"type": "string",
"description": "The city of the sender identity."
},
"from": {
"type": "object",
"required": [
"email",
"name"
],
"properties": {
"name": {
"type": "string",
"description": "This is the name appended to the from email field. IE - Your name or company name."
},
"email": {
"type": "string",
"description": "This is where the email will appear to originate from for your recipient"
}
}
},
"state": {
"type": "string",
"description": "The state of the sender identity."
},
"address": {
"type": "string",
"description": "The physical address of the sender identity."
},
"country": {
"type": "string",
"description": "The country of the sender identity."
},
"nickname": {
"type": "string",
"description": "A nickname for the sender identity. Not used for sending."
},
"reply_to": {
"type": "object",
"required": [
"email"
],
"properties": {
"name": {
"type": "string",
"description": "This is the name appended to the reply to email field. IE - Your name or company name."
},
"email": {
"type": "string",
"description": "This is the email that your recipient will reply to."
}
}
},
"address_2": {
"type": "string",
"description": "Additional sender identity address information."
}
}
}
SettingsInboundParseDeleteSettingByHostnameResponse
{
"type": "object",
"example": {},
"properties": {}
}
SettingsMailGetAllMailSettings400Response
{
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"required": [
"message"
],
"properties": {
"field": {
"type": "string",
"nullable": true,
"description": "The field that generated the error."
},
"message": {
"type": "string",
"description": "The error message."
},
"error_id": {
"type": "string",
"description": "The ID associated with the error."
},
"parameter": {
"type": "string"
}
}
}
}
}
}
SettingsMailGetAllMailSettings401Response
{
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"required": [
"message"
],
"properties": {
"field": {
"type": "string",
"nullable": true,
"description": "The field that generated the error."
},
"message": {
"type": "string",
"description": "The error message."
},
"error_id": {
"type": "string",
"description": "The ID associated with the error."
},
"parameter": {
"type": "string"
}
}
}
}
}
}
SettingsMailGetAllMailSettings403Response
{
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"required": [
"message"
],
"properties": {
"field": {
"type": "string",
"nullable": true,
"description": "The field that generated the error."
},
"message": {
"type": "string",
"description": "The error message."
},
"error_id": {
"type": "string",
"description": "The ID associated with the error."
},
"parameter": {
"type": "string"
}
}
}
}
}
}
SettingsMailGetAllMailSettings404Response
{
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"required": [
"message"
],
"properties": {
"field": {
"type": "string",
"nullable": true,
"description": "The field that generated the error."
},
"message": {
"type": "string",
"description": "The error message."
},
"error_id": {
"type": "string",
"description": "The ID associated with the error."
},
"parameter": {
"type": "string"
}
}
}
}
}
}
SettingsMailGetAllMailSettings500Response
{
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"required": [
"message"
],
"properties": {
"field": {
"type": "string",
"nullable": true,
"description": "The field that generated the error."
},
"message": {
"type": "string",
"description": "The error message."
},
"error_id": {
"type": "string",
"description": "The ID associated with the error."
},
"parameter": {
"type": "string"
}
}
}
}
}
}
SettingsMailGetAllMailSettingsResponse
{
"type": "object",
"required": [
"result"
],
"properties": {
"result": {
"type": "array",
"items": {
"type": "object",
"required": [
"title",
"enabled",
"name",
"description"
],
"properties": {
"name": {
"type": "string",
"description": "The name of the mail setting."
},
"title": {
"type": "string",
"description": "The title of the mail setting."
},
"enabled": {
"type": "boolean",
"description": "Indicates if this mail setting is currently enabled."
},
"description": {
"type": "string",
"description": "A description of the mail setting."
}
}
},
"description": "The list of all mail settings."
}
}
}
SettingsMailUpdateAddressWhitelistMailSettingsRequest
{
"type": "object",
"example": {
"list": [
"email1@example.com",
"example.com"
],
"enabled": true
},
"properties": {
"list": {
"type": "array",
"items": {
"type": "string"
},
"description": "Either a single email address that you want whitelisted or a domain, for which all email addresses belonging to this domain will be whitelisted."
},
"enabled": {
"type": "boolean",
"description": "Indicates if your email address whitelist is enabled."
}
}
}
SettingsMailUpdateLegacyTemplateSettingsRequest
{
"type": "object",
"example": {
"enabled": true,
"html_content": "<% body %>"
},
"properties": {
"enabled": {
"type": "boolean",
"description": "Indicates if you want to enable the legacy email template mail setting."
},
"html_content": {
"type": "string",
"description": "The new HTML content for your legacy email template."
}
}
}
SettingsMailUpdateLegacyTemplateSettingsResponse
{
"type": "object",
"required": [
"enabled",
"html_content"
],
"properties": {
"enabled": {
"type": "boolean",
"description": "Indicates if the legacy email template mail setting is enabled."
},
"html_content": {
"type": "string",
"description": "The HTML content of your legacy email template."
}
}
}
SettingsPartnerListPartnerSettingsResponse
{
"type": "object",
"properties": {
"result": {
"type": "array",
"items": {
"type": "object",
"required": [
"title",
"enabled",
"name",
"description"
],
"properties": {
"name": {
"type": "string",
"description": "The name of the partner setting."
},
"title": {
"type": "string",
"description": "The title of the partner."
},
"enabled": {
"type": "boolean",
"description": "Indicates if this partner setting has been enabled."
},
"description": {
"type": "string",
"description": "A description of this partner setting."
}
}
}
}
}
}
SettingsPartnerUpdateNewRelicPartnerSettingsRequest
{
"type": "object",
"example": {
"enabled": true,
"license_key": "",
"enable_subuser_statistics": true
},
"properties": {
"enabled": {
"type": "boolean",
"description": "Indicates if this partner setting is enabled."
},
"license_key": {
"type": "string",
"description": "The license key for your New Relic account."
},
"enable_subuser_statistics": {
"type": "boolean",
"description": "Indicates if your subuser statistics will be sent to your New Relic Dashboard."
}
}
}
SettingsTrackingGetAllTrackingResponse
{
"type": "object",
"properties": {
"result": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The name of the event being tracked."
},
"title": {
"type": "string",
"description": "The title of the tracking setting."
},
"enabled": {
"type": "boolean",
"description": "Indicates if this tracking setting is currently enabled."
},
"description": {
"type": "string",
"description": "A description about the event that is being tracked."
}
}
},
"description": "The list of all tracking settings."
}
}
}
SettingsTrackingGetOpenSettingsResponse
{
"type": "object",
"required": [
"enabled"
],
"properties": {
"enabled": {
"type": "boolean",
"description": "Indicates if open tracking is enabled."
}
}
}
SettingsTrackingUpdateClickTrackingSettingRequest
{
"type": "object",
"example": {
"enabled": true
},
"properties": {
"enabled": {
"type": "boolean",
"description": "The setting you want to use for click tracking."
}
}
}
SettingsTrackingUpdateOpenTrackingSettingsRequest
{
"type": "object",
"example": {
"enabled": true
},
"properties": {
"enabled": {
"type": "boolean",
"description": "The new status that you want to set for open tracking."
}
}
}
SettingsTrackingUpdateOpenTrackingSettingsResponse
{
"type": "object",
"required": [
"enabled"
],
"properties": {
"enabled": {
"type": "boolean",
"description": "Indicates if open tracking is enabled."
}
}
}
SingleSendsBulkDelete500Response
{
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"field": {
"type": "string"
},
"message": {
"type": "string"
},
"error_id": {
"type": "string"
}
}
}
}
}
}
SingleSendsBulkDeleteResponse
{
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"field": {
"type": "string"
},
"message": {
"type": "string"
},
"error_id": {
"type": "string"
}
}
}
}
}
}
SingleSendsCancelScheduledSend500Response
{
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"field": {
"type": "string"
},
"message": {
"type": "string"
},
"error_id": {
"type": "string"
}
}
}
}
}
}
SingleSendsCancelScheduledSendResponse
{
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"field": {
"type": "string"
},
"message": {
"type": "string"
},
"error_id": {
"type": "string"
}
}
}
}
}
}
SingleSendsCreateNewSingleSend500Response
{
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"field": {
"type": "string"
},
"message": {
"type": "string"
},
"error_id": {
"type": "string"
}
}
}
}
}
}
SingleSendsCreateNewSingleSendResponse
{
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"field": {
"type": "string"
},
"message": {
"type": "string"
},
"error_id": {
"type": "string"
}
}
}
}
}
}
SingleSendsDeleteById500Response
{
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"field": {
"type": "string"
},
"message": {
"type": "string"
},
"error_id": {
"type": "string"
}
}
}
}
}
}
SingleSendsDeleteByIdResponse
{
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"field": {
"type": "string"
},
"message": {
"type": "string"
},
"error_id": {
"type": "string"
}
}
}
}
}
}
SingleSendsDuplicateSingleSend500Response
{
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"field": {
"type": "string"
},
"message": {
"type": "string"
},
"error_id": {
"type": "string"
}
}
}
}
}
}
SingleSendsDuplicateSingleSendRequest
{
"type": "object",
"properties": {
"name": {
"type": "string",
"maxLength": 100,
"minLength": 1,
"description": "The name of the duplicate Single Send. If you choose to leave the name field blank, your duplicate will be assigned the name of the Single Send it was copied from with the text 'Copy of ' prepended to it. The end of the new Single Send name, including 'Copy of ', will be trimmed if the name exceeds the character limit."
}
}
}
SingleSendsDuplicateSingleSendResponse
{
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"field": {
"type": "string"
},
"message": {
"type": "string"
},
"error_id": {
"type": "string"
}
}
}
}
}
}
SingleSendsGetAllCategories500Response
{
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"field": {
"type": "string"
},
"message": {
"type": "string"
},
"error_id": {
"type": "string"
}
}
}
}
}
}
SingleSendsGetAllCategoriesResponse
{
"type": "object",
"properties": {
"categories": {
"type": "array",
"items": {
"type": "string"
},
"maxItems": 1000,
"description": "list of latest one thousand unique categories associated with all Single Sends in ascending order",
"uniqueItems": true
}
}
}
SingleSendsGetAllSinglesends500Response
{
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"field": {
"type": "string"
},
"message": {
"type": "string"
},
"error_id": {
"type": "string"
}
}
}
}
}
}
SingleSendsGetAllSinglesendsResponse
{
"type": "object",
"properties": {
"result": {
"type": "array",
"items": {
"$ref": "#/components/schemas/singlesend_response_short"
}
},
"_metadata": {
"$ref": "#/components/schemas/_metadata"
}
}
}
SingleSendsGetDetailsById500Response
{
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"field": {
"type": "string"
},
"message": {
"type": "string"
},
"error_id": {
"type": "string"
}
}
}
}
}
}
SingleSendsGetDetailsByIdResponse
{
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"field": {
"type": "string"
},
"message": {
"type": "string"
},
"error_id": {
"type": "string"
}
}
}
}
}
}
SingleSendsSchedulePut404Response
{
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"field": {
"type": "string"
},
"message": {
"type": "string"
},
"error_id": {
"type": "string"
}
}
}
}
}
}
SingleSendsSchedulePut500Response
{
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"field": {
"type": "string"
},
"message": {
"type": "string"
},
"error_id": {
"type": "string"
}
}
}
}
}
}
SingleSendsSchedulePutRequest
{
"type": "object",
"example": {
"send_at": "3752-01-28T23:21:52.575Z"
},
"required": [
"send_at"
],
"properties": {
"send_at": {
"enum": [
"now"
],
"type": "string",
"format": "date-time",
"description": "This is the ISO 8601 time at which to send the Single Send; must be in future, or the string \"now\""
}
}
}
SingleSendsSchedulePutResponse
{
"type": "object",
"properties": {
"status": {
"enum": [
"scheduled"
],
"type": "string"
},
"send_at": {
"type": "string",
"format": "date-time",
"description": ""
}
}
}
SingleSendsSearchByCriteria404Response
{
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"field": {
"type": "string"
},
"message": {
"type": "string"
},
"error_id": {
"type": "string"
}
}
}
}
}
}
SingleSendsSearchByCriteriaResponse
{
"type": "object",
"properties": {
"result": {
"type": "array",
"items": {
"$ref": "#/components/schemas/singlesend_response_short"
}
},
"_metadata": {
"$ref": "#/components/schemas/_metadata"
}
}
}
SingleSendsUpdateById404Response
{
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"field": {
"type": "string"
},
"message": {
"type": "string"
},
"error_id": {
"type": "string"
}
}
}
}
}
}
SingleSendsUpdateById500Response
{
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"field": {
"type": "string"
},
"message": {
"type": "string"
},
"error_id": {
"type": "string"
}
}
}
}
}
}
SingleSendsUpdateByIdResponse
{
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"field": {
"type": "string"
},
"message": {
"type": "string"
},
"error_id": {
"type": "string"
}
}
}
}
}
}
SingleSignOnSettingsGetAllSsoIntegrationsResponse
{
"type": "array",
"items": {
"$ref": "#/components/schemas/sso-integration"
}
}
SingleSignOnTeammatesEditTeammateRequest
{
"type": "object",
"example": {
"email": "jane_doe@example.com",
"scopes": [
"mail.batch.create",
"mail.batch.delete",
"mail.batch.read",
"mail.batch.update",
"mail.send"
],
"is_admin": false,
"last_name": "Doe",
"first_name": "Jane"
},
"properties": {
"scopes": {
"type": "array",
"items": {
"type": "string"
}
},
"is_admin": {
"type": "boolean"
},
"last_name": {
"type": "string"
},
"first_name": {
"type": "string"
}
}
}
SpamReportsApiDeleteReportsRequest
{
"type": "object",
"example": {
"emails": [
"example1@example.com",
"example2@example.com"
],
"delete_all": false
},
"properties": {
"emails": {
"type": "array",
"items": {
"type": "string"
},
"description": "A list of specific email addresses that you want to remove from the spam report list."
},
"delete_all": {
"type": "boolean",
"description": "Indicates if you want to delete all email addresses on the spam report list."
}
}
}
SpamReportsApiDeleteReportsResponse
{
"type": "object",
"properties": {}
}
SpamReportsApiDeleteSpecificReportByEmailAddressResponse
{
"type": "object",
"properties": {}
}
StatsGetEmailStatisticsByBrowserResponse
{
"type": "array",
"items": {
"type": "object",
"properties": {
"date": {
"type": "string",
"description": "The date that the statistics were gathered."
},
"stats": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The name of the specific segmentation."
},
"type": {
"type": "string",
"description": "The type of segmentation."
},
"metrics": {
"$ref": "#/components/schemas/advanced_stats_clicks"
}
}
},
"description": "The list of statistics."
}
}
}
}
StatsGetEmailStatisticsByClientTypeResponse
{
"type": "array",
"items": {
"type": "object",
"properties": {
"date": {
"type": "string",
"description": "The date that the statistics were gathered."
},
"stats": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The name of the specific segmentation."
},
"type": {
"type": "string",
"description": "The type of segmentation."
},
"metrics": {
"$ref": "#/components/schemas/advanced_stats_opens"
}
}
},
"description": "The list of statistics."
}
}
}
}
StatsGetEmailStatisticsByCountryAndStateProvinceResponse
{
"type": "array",
"items": {
"type": "object",
"properties": {
"date": {
"type": "string",
"description": "The date that the statistics were gathered."
},
"stats": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The name of the specific segmentation."
},
"type": {
"type": "string",
"description": "The type of segmentation."
},
"metrics": {
"$ref": "#/components/schemas/advanced_stats_clicks_opens"
}
}
},
"description": "The list of statistics."
}
}
}
}
StatsGetEmailStatisticsByDeviceTypeResponse
{
"type": "array",
"items": {
"type": "object",
"properties": {
"date": {
"type": "string",
"description": "The date that the statistics were gathered."
},
"stats": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The name of the specific segmentation."
},
"type": {
"type": "string",
"description": "The type of segmentation."
},
"metrics": {
"$ref": "#/components/schemas/advanced_stats_opens"
}
}
},
"description": "The list of statistics."
}
}
}
}
StatsGetEmailStatisticsByMailboxProviderResponse
{
"type": "array",
"items": {
"type": "object",
"properties": {
"date": {
"type": "string",
"description": "The date that the statistics were gathered."
},
"stats": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The name of the specific segmentation."
},
"type": {
"type": "string",
"description": "The type of segmentation."
},
"metrics": {
"$ref": "#/components/schemas/advanced_stats_mailbox_provider"
}
}
},
"description": "The list of statistics."
}
}
}
}
StatsGetStatsByClientTypeResponse
{
"type": "array",
"items": {
"type": "object",
"properties": {
"date": {
"type": "string",
"description": "The date that the statistics were gathered."
},
"stats": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The name of the specific segmentation."
},
"type": {
"type": "string",
"description": "The type of segmentation."
},
"metrics": {
"$ref": "#/components/schemas/advanced_stats_opens"
}
}
},
"description": "The list of statistics."
}
}
}
}
SubuserMonitorSettingsDeleteMonitorSettingsResponse
{
"type": "object",
"properties": {}
}
SubusersApiDeleteSubuserResponse
{
"type": "object",
"properties": {}
}
SubusersApiGetSubuserReputationsResponse
{
"type": "array",
"items": {
"type": "object",
"required": [
"reputation",
"username"
],
"properties": {
"username": {
"type": "string",
"description": "The subuser that has this reputation.f"
},
"reputation": {
"type": "number",
"description": "The sender reputation this subuser has attained."
}
}
}
}
SubusersApiUpdateSubuserEnableStateRequest
{
"type": "object",
"example": {
"disabled": false
},
"properties": {
"disabled": {
"type": "boolean",
"description": "Whether or not this subuser is disabled. True means disabled, False means enabled."
}
}
}
SubusersApiUpdateSubuserEnableStateResponse
{
"type": "object",
"properties": {}
}
SubusersApiUpdateSubuserIpsRequest
{
"type": "array",
"items": {
"type": "string",
"format": "ipv4"
},
"example": [
"127.0.0.1"
],
"description": "The IP addresses you would like to assign to the subuser."
}
SubusersApiUpdateSubuserIpsResponse
{
"type": "object",
"properties": {
"ips": {
"type": "array",
"items": {
"type": "string",
"format": "ipv4"
},
"description": "The IP addresses that are assigned to the subuser."
}
}
}
SuppressionsGlobalSuppressionsAddRecipientAddressesResponse
{
"type": "object",
"required": [
"recipient_emails"
],
"properties": {
"recipient_emails": {
"type": "array",
"items": {
"type": "string",
"format": "email"
},
"description": "The email addresses that are globally suppressed"
}
}
}
SuppressionsGlobalSuppressionsGetAllAddressesResponse
{
"type": "array",
"items": {
"type": "object",
"required": [
"created",
"email"
],
"properties": {
"email": {
"type": "string",
"format": "email",
"description": "The email address of the recipient who is globally suppressed."
},
"created": {
"type": "integer",
"description": "A Unix timestamp indicating when the recipient was added to the global suppression list."
}
}
}
}
SuppressionsGlobalSuppressionsGetGlobalSuppressionResponse
{
"type": "object",
"title": "Retrieve a Global Suppression response",
"required": [
"recipient_email"
],
"properties": {
"recipient_email": {
"type": "string",
"format": "email",
"description": "The email address that is globally suppressed. This will be an empty object if the email address you included in your call is not globally suppressed."
}
}
}
SuppressionsGlobalSuppressionsRemoveEmailResponse
{
"type": "object",
"example": {},
"properties": {}
}
SuppressionsSuppressionsAddToGroupResponse
{
"type": "object",
"properties": {
"recipient_emails": {
"type": "array",
"items": {
"type": "string",
"format": "email"
},
"description": "The email addresses you added to the unsubscribe group"
}
}
}
SuppressionsSuppressionsGetAllSuppressedEmailsResponse
{
"type": "array",
"items": {
"type": "string",
"format": "email"
},
"description": "The list of email addresses belonging to the given suppression group."
}
SuppressionsSuppressionsGetAllSuppressionsResponse
{
"type": "array",
"items": {
"type": "object",
"required": [
"email",
"group_id",
"group_name",
"created_at"
],
"properties": {
"email": {
"type": "string",
"description": "The email address that was suppressed."
},
"group_id": {
"type": "integer",
"description": "The id of the suppression group that this email address belongs to."
},
"created_at": {
"type": "integer",
"description": "A UNIX timestamp indicating when the suppression was created."
},
"group_name": {
"type": "string",
"description": "The name of the suppression group that this email address belongs to."
}
}
}
}
SuppressionsSuppressionsGetUnsubscribeGroupsByEmailResponse
{
"type": "object",
"required": [
"suppressions"
],
"properties": {
"suppressions": {
"type": "array",
"items": {
"type": "object",
"required": [
"description",
"id",
"is_default",
"name",
"suppressed"
],
"properties": {
"id": {
"type": "integer",
"description": "The id of the suppression group."
},
"name": {
"type": "string",
"description": "The name of the suppression group."
},
"is_default": {
"type": "boolean",
"description": "Indicates if the suppression group is set as the default."
},
"suppressed": {
"type": "boolean",
"description": "Indicates if the given email address is suppressed for this group."
},
"description": {
"type": "string",
"description": "The description of the suppression group."
}
}
},
"description": "The array of suppression groups."
}
}
}
SuppressionsSuppressionsRemoveSuppressionFromGroupResponse
{
"type": "object",
"example": {},
"properties": {}
}
SuppressionsSuppressionsSearchWithinGroupResponse
{
"type": "array",
"items": {
"type": "string",
"format": "email"
},
"description": "The email address from your search that do exist in the suppression group."
}
SuppressionsUnsubscribeGroupsCreateNewGroupResponse
{
"type": "object",
"required": [
"id",
"name",
"description",
"is_default"
],
"properties": {
"id": {
"type": "integer",
"description": "The ID of the suppression group."
},
"name": {
"type": "string",
"description": "The name of the suppression group."
},
"is_default": {
"type": "boolean",
"description": "Indicates if this is the default suppression group."
},
"description": {
"type": "string",
"description": "A brief description of the suppression group."
}
}
}
SuppressionsUnsubscribeGroupsDeleteGroupResponse
{
"type": "object",
"example": {},
"properties": {}
}
SuppressionsUnsubscribeGroupsGetAllResponse
{
"type": "array",
"items": {
"$ref": "#/components/schemas/suppression_group"
}
}
SuppressionsUnsubscribeGroupsGetSingleGroupResponse
{
"allOf": [
{
"$ref": "#/components/schemas/suppression-group-request-base"
},
{
"type": "object",
"required": [
"id"
],
"properties": {
"id": {
"type": "integer",
"description": "The ID of the suppression group."
},
"unsubscribes": {
"type": "integer",
"description": "The number of unsubscribes, or suppressions, in this group."
},
"last_email_sent_at": {
"type": "string",
"nullable": true
}
}
}
]
}
TNE-senderID
{
"allOf": [
{
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "The unique identifier of the sender."
}
}
},
{
"$ref": "#/components/schemas/senders-id-request-body"
},
{
"type": "object",
"properties": {
"locked": {
"type": "boolean",
"description": "A sender identity is locked when it is associated with a campaign in the Draft, Scheduled, or In Progress state. You can't update or delete a locked sender identity."
},
"verified": {
"type": "object",
"properties": {
"reason": {
"type": "string",
"nullable": true,
"description": "The reason for a verification failure, or null if verification succeeeded or has yet to take place."
},
"status": {
"type": "boolean",
"description": "Whether the sender identity has been verified. Only verified sender identities can be used to send email."
}
},
"description": "Only verified sender identities can be used to send email."
},
"created_at": {
"type": "integer",
"description": "The time the sender identity was created."
},
"updated_at": {
"type": "integer",
"description": "The time the sender identity was last updated."
}
}
}
],
"title": "Sender ID Response Body"
}
TeammatesApproveAccessRequest401Response
{
"type": "object",
"example": {},
"properties": {}
}
TeammatesApproveAccessRequest404Response
{
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"field": {
"type": "string"
},
"message": {
"type": "string"
}
}
}
}
}
}
TeammatesApproveAccessRequestResponse
{
"type": "object",
"properties": {
"scope_group_name": {
"type": "string",
"description": "name of feature teammate will be given access to"
}
}
}
TeammatesDeletePendingTeammateResponse
{
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"field": {
"type": "string"
},
"message": {
"type": "string"
}
}
}
}
}
}
TeammatesDenyAccessRequestResponse
{
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"field": {
"type": "string"
},
"message": {
"type": "string"
}
}
}
}
}
}
TeammatesGetAccessRequestsResponse
{
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "Request ID"
},
"email": {
"type": "string",
"description": "Teammate's email"
},
"username": {
"type": "string",
"description": "Teammate's username"
},
"last_name": {
"type": "string",
"description": "Teammate's last name"
},
"first_name": {
"type": "string",
"description": "Teammate's first name"
},
"scope_group_name": {
"type": "string",
"description": "Name of group of scopes associated to page teammate is requesting access to"
}
}
}
}
TeammatesGetAllPendingResponse
{
"type": "object",
"properties": {
"result": {
"type": "array",
"items": {
"type": "object",
"properties": {
"email": {
"type": "string",
"description": "Email address teammate invite will be sent to"
},
"token": {
"type": "string",
"description": "Invitation token used to identify user"
},
"scopes": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of permissions to give teammate if they accept"
},
"is_admin": {
"type": "boolean",
"description": "Set to true to indicate teammate should have the same set of permissions as parent user"
},
"expiration_date": {
"type": "integer",
"description": "timestamp indicates when invite will expire. Expiration is 7 days after invite creation"
}
}
}
}
}
}
TeammatesGetAllTeammatesResponse
{
"type": "object",
"properties": {
"result": {
"type": "array",
"items": {
"type": "object",
"properties": {
"zip": {
"type": "string",
"description": "(optional) Teammate's zip"
},
"city": {
"type": "string",
"description": "(optional) Teammate's city"
},
"email": {
"type": "string",
"description": "Teammate's email"
},
"phone": {
"type": "string",
"description": "(optional) Teammate's phone number"
},
"state": {
"type": "string",
"description": "(optional) Teammate's state"
},
"address": {
"type": "string",
"description": "(optional) Teammate's address"
},
"country": {
"type": "string",
"description": "(optional) Teammate's country"
},
"website": {
"type": "string",
"description": "(optional) Teammate's website"
},
"address2": {
"type": "string",
"description": "(optional) Teammate's address"
},
"is_admin": {
"type": "boolean",
"description": "Set to true if teammate has admin privileges"
},
"username": {
"type": "string",
"description": "Teammate's username"
},
"last_name": {
"type": "string",
"description": "Teammate's last name"
},
"user_type": {
"enum": [
"admin",
"owner",
"teammate"
],
"type": "string",
"description": "Indicate the type of user: owner user, teammate admin user, or normal teammate"
},
"first_name": {
"type": "string",
"description": "Teammate's first name"
}
}
}
}
}
}
TeammatesGetByUsernameResponse
{
"type": "object",
"properties": {
"zip": {
"type": "string",
"description": "(optional) Teammate's zip"
},
"city": {
"type": "string",
"description": "(optional) Teammate's city"
},
"email": {
"type": "string",
"description": "Teammate's email"
},
"phone": {
"type": "string",
"description": "(optional) Teammate's phone number"
},
"state": {
"type": "string",
"description": "(optional) Teammate's state"
},
"scopes": {
"type": "array",
"items": {},
"description": "Scopes associated to teammate"
},
"address": {
"type": "string",
"description": "(optional) Teammate's address"
},
"country": {
"type": "string",
"description": "(optional) Teammate's country"
},
"website": {
"type": "string",
"description": "(optional) Teammate's website"
},
"address2": {
"type": "string",
"description": "(optional) Teammate's address"
},
"is_admin": {
"type": "boolean",
"description": "Set to true if teammate has admin privileges"
},
"username": {
"type": "string",
"description": "Teammate's username"
},
"last_name": {
"type": "string",
"description": "Teammate's last name"
},
"user_type": {
"enum": [
"admin",
"owner",
"teammate"
],
"type": "string",
"description": "Indicate the type of user: account owner, teammate admin user, or normal teammate"
},
"first_name": {
"type": "string",
"description": "Teammate's first name"
}
}
}
TeammatesInviteTeammate400Response
{
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"field": {
"type": "string"
},
"message": {
"type": "string"
}
}
}
}
}
}
TeammatesInviteTeammateRequest
{
"type": "object",
"example": {
"email": "teammate1@example.com",
"scopes": [
"user.profile.read",
"user.profile.update"
],
"is_admin": false
},
"required": [
"email",
"scopes",
"is_admin"
],
"properties": {
"email": {
"type": "string",
"pattern": "^.*@.*\\..*",
"maxLength": 255,
"minLength": 5,
"description": "New teammate's email"
},
"scopes": {
"type": "array",
"items": {
"type": "string"
},
"description": "Set to specify list of scopes that teammate should have. Should be empty if teammate is an admin."
},
"is_admin": {
"type": "boolean",
"default": false,
"description": "Set to true if teammate should be an admin user"
}
}
}
TeammatesInviteTeammateResponse
{
"type": "object",
"properties": {
"email": {
"type": "string",
"description": "Teammate's email address"
},
"token": {
"type": "string",
"description": "Token to identify invite"
},
"scopes": {
"type": "array",
"items": {},
"description": "Initial set of permissions to give to teammate if they accept the invite"
},
"is_admin": {
"type": "boolean",
"description": "Set to true if teammate should have admin privileges"
}
}
}
TeammatesRemoveTeammate404Response
{
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"field": {
"type": "string"
},
"message": {
"type": "string"
}
}
}
}
}
}
TeammatesRemoveTeammateResponse
{
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"field": {
"type": "string"
},
"message": {
"type": "string"
}
}
}
}
}
}
TeammatesResendTeammateInvite404Response
{
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"field": {
"type": "string"
},
"message": {
"type": "string"
}
}
}
}
}
}
TeammatesResendTeammateInviteResponse
{
"type": "object",
"properties": {
"email": {
"type": "string",
"description": "Teammate's email address"
},
"token": {
"type": "string",
"description": "ID to identify invite"
},
"scopes": {
"type": "array",
"items": {
"type": "string"
},
"description": "Initial set of permissions to give to teammate if they accept the invite"
},
"is_admin": {
"type": "boolean",
"description": "Set to true if teammate should have admin privileges"
}
}
}
TeammatesUpdatePermissions400Response
{
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"field": {
"type": "string"
},
"message": {
"type": "string"
}
}
}
}
}
}
TeammatesUpdatePermissions404Response
{
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"field": {
"type": "string"
},
"message": {
"type": "string"
}
}
}
}
}
}
TeammatesUpdatePermissionsRequest
{
"type": "object",
"example": {
"scopes": [
"user.profile.read",
"user.profile.edit"
],
"is_admin": false
},
"required": [
"scopes",
"is_admin"
],
"properties": {
"scopes": {
"type": "array",
"items": {
"type": "string"
},
"description": "Provide list of scopes that should be given to teammate. If specifying list of scopes, is_admin should be set to False."
},
"is_admin": {
"type": "boolean",
"description": "Set to True if this teammate should be promoted to an admin user. If True, scopes should be an empty array."
}
}
}
TeammatesUpdatePermissionsResponse
{
"type": "object",
"properties": {
"zip": {
"type": "string",
"description": "(optional) Teammate's zip"
},
"city": {
"type": "string",
"description": "(optional) Teammate's city"
},
"email": {
"type": "string",
"description": "Teammate's email address"
},
"phone": {
"type": "string",
"description": "(optional) Teammate's phone number"
},
"state": {
"type": "string",
"description": "(optional) Teammate's state"
},
"scopes": {
"type": "array",
"items": {
"type": "string"
},
"description": "Scopes given to teammate"
},
"address": {
"type": "string",
"description": "(optional) Teammate's address"
},
"country": {
"type": "string",
"description": "(optional) Teammate's country"
},
"website": {
"type": "string",
"description": "(optional) Teammate's website"
},
"address2": {
"type": "string",
"description": "(optional) Teammate's address"
},
"is_admin": {
"type": "boolean",
"description": "Set to true if teammate has admin priveleges"
},
"username": {
"type": "string",
"description": "Teammate's username"
},
"last_name": {
"type": "string",
"description": "Teammate's last name"
},
"user_type": {
"enum": [
"admin",
"owner",
"teammate"
],
"type": "string",
"description": "Indicate the type of user: owner user, teammate admin user, or normal teammate"
},
"first_name": {
"type": "string",
"description": "Teammate's first name"
}
}
}
TransactionalTemplatesDeleteTemplateResponse
{
"type": "object",
"example": {},
"properties": {}
}
TransactionalTemplatesDuplicateTemplateRequest
{
"type": "object",
"example": {
"name": "example_name"
},
"properties": {
"name": {
"type": "string",
"maxLength": 100,
"description": "The name for the new transactional template."
}
}
}
TransactionalTemplatesEditTemplateNameRequest
{
"type": "object",
"example": {
"name": "new_example_name"
},
"properties": {
"name": {
"type": "string",
"maxLength": 100,
"description": "The name of the transactional template."
}
}
}
UsersApiGetAccountEmailAddressResponse
{
"type": "object",
"required": [
"email"
],
"properties": {
"email": {
"type": "string",
"format": "email",
"description": "The email address currently on file for your account."
}
}
}
UsersApiGetCreditBalanceResponse
{
"type": "object",
"required": [
"remain",
"total",
"overage",
"used",
"last_reset",
"next_reset",
"reset_frequency"
],
"properties": {
"used": {
"type": "integer",
"description": "The number of credits that you have used."
},
"total": {
"type": "integer",
"description": "The total number of credits assigned to your account."
},
"remain": {
"type": "integer",
"description": "The remaining number of credits available on your account."
},
"overage": {
"type": "integer",
"description": "The number of overdrawn credits for your account."
},
"last_reset": {
"type": "string",
"description": "The date that your credit balance was last reset."
},
"next_reset": {
"type": "string",
"description": "The next date that your credit balance will be reset."
},
"reset_frequency": {
"type": "string",
"description": "The frequency at which your credit balance will be reset."
}
}
}
UsersApiGetUserAccountInformationResponse
{
"type": "object",
"title": "GET User Account response",
"required": [
"type",
"reputation"
],
"properties": {
"type": {
"enum": [
"free",
"paid"
],
"type": "string",
"description": "The type of account for this user."
},
"reputation": {
"type": "number",
"description": "The sender reputation for this user."
}
}
}
UsersApiGetUserProfileResponse
{
"type": "object",
"title": "GET User Profile response",
"required": [
"address",
"city",
"company",
"country",
"first_name",
"last_name",
"phone",
"state",
"website",
"zip"
],
"properties": {
"zip": {
"type": "string",
"description": "The user's zip code."
},
"city": {
"type": "string",
"description": "The user's city."
},
"phone": {
"type": "string",
"description": "The user's phone number."
},
"state": {
"type": "string",
"description": "The user's state."
},
"address": {
"type": "string",
"description": "The user's address."
},
"company": {
"type": "string",
"description": "The name of the user's company."
},
"country": {
"type": "string",
"description": "The user's country."
},
"website": {
"type": "string",
"description": "The user's website URL."
},
"address2": {
"type": "string",
"description": "The second line of the user's address."
},
"last_name": {
"type": "string",
"description": "The user's last name."
},
"first_name": {
"type": "string",
"description": "The user's first name."
}
}
}
UsersApiGetUsernameResponse
{
"type": "object",
"required": [
"username",
"user_id"
],
"properties": {
"user_id": {
"type": "integer",
"description": "The user ID for your account."
},
"username": {
"type": "string",
"description": "Your account username."
}
}
}
UsersApiUpdateEmailRequest
{
"type": "object",
"example": {
"email": "example@example.com"
},
"properties": {
"email": {
"type": "string",
"description": "The new email address that you would like to use for your account."
}
}
}
UsersApiUpdateEmailResponse
{
"type": "object",
"required": [
"email"
],
"properties": {
"email": {
"type": "string",
"format": "email",
"description": "The current email address on file for your account."
}
}
}
UsersApiUpdatePasswordRequest
{
"type": "object",
"example": {
"new_password": "new_password",
"old_password": "old_password"
},
"required": [
"new_password",
"old_password"
],
"properties": {
"new_password": {
"type": "string",
"description": "The new password you would like to use for your account."
},
"old_password": {
"type": "string",
"description": "The old password for your account."
}
}
}
UsersApiUpdatePasswordResponse
{
"type": "object",
"properties": {}
}
UsersApiUpdateUsernameRequest
{
"type": "object",
"example": {
"username": "test_username"
},
"properties": {
"username": {
"type": "string",
"description": "The new username you would like to use for your account."
}
}
}
UsersApiUpdateUsernameResponse
{
"type": "object",
"required": [
"username"
],
"properties": {
"username": {
"type": "string",
"description": "The current username on file for your account."
}
}
}
WebhooksEnableSignedWebhook400Response
{
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"required": [
"message"
],
"properties": {
"field": {
"type": "string",
"nullable": true
},
"message": {
"type": "string"
}
}
}
}
}
}
WebhooksEnableSignedWebhook401Response
{
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"required": [
"message"
],
"properties": {
"field": {
"type": "string",
"nullable": true
},
"message": {
"type": "string"
}
}
}
}
}
}
WebhooksEnableSignedWebhook500Response
{
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"required": [
"message"
],
"properties": {
"field": {
"type": "string",
"nullable": true
},
"message": {
"type": "string"
}
}
}
}
}
}
WebhooksEnableSignedWebhookRequest
{
"type": "object",
"example": {
"enabled": true
},
"required": [
"enabled"
],
"properties": {
"enabled": {
"type": "boolean"
}
}
}
WebhooksEnableSignedWebhookResponse
{
"type": "object",
"required": [
"public_key"
],
"properties": {
"public_key": {
"type": "string",
"description": "The public key you can use to verify the Twilio SendGrid signature."
}
}
}
WebhooksGetParseSettingsResponse
{
"type": "object",
"properties": {
"result": {
"type": "array",
"items": {
"$ref": "#/components/schemas/parse-setting"
},
"description": "The list of your current inbound parse settings."
}
}
}
WebhooksGetParseStatsResponse
{
"type": "array",
"items": {
"type": "object",
"required": [
"date",
"stats"
],
"properties": {
"date": {
"type": "string",
"description": "The date that the stats were collected."
},
"stats": {
"type": "array",
"items": {
"type": "object",
"properties": {
"metrics": {
"type": "object",
"required": [
"received"
],
"properties": {
"received": {
"type": "number",
"description": "The number of emails received and parsed by the Parse Webhook."
}
}
}
}
},
"description": "The Parse Webhook usage statistics."
}
}
}
}
WebhooksGetSignedWebhookPublicKeyResponse
{
"type": "object",
"required": [
"public_key"
],
"properties": {
"public_key": {
"type": "string",
"description": "The public key you can use to verify the Twilio SendGrid signature."
}
}
}
WebhooksTestEventNotificationSettingsRequest
{
"type": "object",
"example": {
"url": "mollit non ipsum magna",
"oauth_client_id": "nisi",
"oauth_token_url": "dolor Duis",
"oauth_client_secret": "veniam commodo ex sunt"
},
"properties": {
"url": {
"type": "string",
"description": "The URL where you would like the test notification to be sent."
},
"oauth_client_id": {
"type": "string",
"description": "The client ID Twilio SendGrid sends to your OAuth server or service provider to generate an OAuth access token. When passing data in this field, you must also include the oauth_client_secret and oauth_token_url fields."
},
"oauth_token_url": {
"type": "string",
"description": "The URL where Twilio SendGrid sends the Client ID and Client Secret to generate an access token. This should be your OAuth server or service provider. When passing data in this field, you must also include the oauth_client_id and oauth_client_secret fields."
},
"oauth_client_secret": {
"type": "string",
"description": "This secret is needed only once to create an access token. SendGrid will store this secret, allowing you to update your Client ID and Token URL without passing the secret to SendGrid again. When passing data in this field, you must also include the oauth_client_id and oauth_token_url fields."
}
}
}
_metadata
{
"type": "object",
"title": "_metadata",
"properties": {
"next": {
"type": "string",
"format": "uri"
},
"prev": {
"type": "string",
"format": "uri"
},
"self": {
"type": "string",
"format": "uri"
},
"count": {
"type": "integer",
"minimum": 0
}
}
}
abbv-message
{
"type": "object",
"title": "Abbv. Message",
"example": {
"msg_id": "abc123",
"status": "processed",
"subject": "anim Duis sint veniam",
"to_email": "test@test.com",
"from_email": "from@test.com",
"opens_count": 1,
"clicks_count": 2,
"last_event_time": "2017-10-13T18:56:21.000Z"
},
"required": [
"from_email",
"msg_id",
"subject",
"to_email",
"status",
"opens_count",
"clicks_count",
"last_event_time"
],
"properties": {
"msg_id": {
"type": "string"
},
"status": {
"enum": [
"processed",
"delivered",
"not_delivered"
],
"type": "string"
},
"subject": {
"type": "string"
},
"to_email": {
"type": "string"
},
"from_email": {
"type": "string"
},
"opens_count": {
"type": "integer"
},
"clicks_count": {
"type": "integer"
},
"last_event_time": {
"type": "string",
"description": "iso 8601 format"
}
}
}
abtest_summary
{
"type": "object",
"title": "abTest_summary",
"nullable": true,
"required": [
"type",
"winner_criteria",
"test_percentage",
"duration",
"winning_template_id",
"winner_selected_at",
"expiration_date"
],
"properties": {
"type": {
"enum": [
"subject",
"content"
],
"type": "string",
"description": "What differs between the A/B tests"
},
"duration": {
"type": "string",
"description": "How long the A/B Testing will last"
},
"expiration_date": {
"type": "string",
"nullable": true,
"description": "Last day to select an A/B Test Winner"
},
"test_percentage": {
"type": "integer",
"description": "What percentage of your recipient will be included in your A/B testing"
},
"winner_criteria": {
"enum": [
"open",
"click",
"manual"
],
"type": "string",
"description": "How the winner will be decided"
},
"winner_selected_at": {
"type": "string",
"nullable": true,
"description": "When the winner was selected"
},
"winning_template_id": {
"type": "string",
"description": "Winner of the A/B Test"
}
}
}
advanced_stats_clicks
{
"type": "object",
"title": "Stats: Advanced Stats with Clicks",
"properties": {
"clicks": {
"type": "integer",
"description": "The number of links that were clicked in your emails."
},
"unique_clicks": {
"type": "integer",
"description": "The number of unique recipients who clicked links in your emails."
}
},
"description": "The individual events and their stats."
}
advanced_stats_clicks_opens
{
"allOf": [
{
"$ref": "#/components/schemas/advanced_stats_clicks"
},
{
"$ref": "#/components/schemas/advanced_stats_opens"
}
],
"title": "Stats: Advanced Stats with Clicks and Opens",
"description": "The individual events and their stats."
}
advanced_stats_mailbox_provider
{
"allOf": [
{
"$ref": "#/components/schemas/advanced_stats_clicks_opens"
},
{
"type": "object",
"properties": {
"drops": {
"type": "integer",
"description": "The number of emails that were not delivered due to the recipient email address being on a suppression list."
},
"blocks": {
"type": "integer",
"description": "The number of emails that were not allowed to be delivered by ISPs."
},
"bounces": {
"type": "integer",
"description": "The number of emails that bounced instead of being delivered."
},
"deferred": {
"type": "integer",
"description": "The number of emails that temporarily could not be delivered."
},
"requests": {
"type": "integer",
"description": "The number of emails that were requested to be delivered."
},
"delivered": {
"type": "integer",
"description": "The number of emails SendGrid was able to confirm were actually delivered to a recipient."
},
"processed": {
"type": "integer",
"description": "Requests from your website, application, or mail client via SMTP Relay or the Web API that SendGrid processed."
},
"spam_reports": {
"type": "integer",
"description": "The number of recipients who marked your email as spam."
}
},
"description": "The individual events and their stats."
}
],
"title": "Stats: Advanced Stats for Mailbox Provider",
"description": "The individual events and their stats."
}
advanced_stats_opens
{
"type": "object",
"title": "Stats: Advanced Stats with Opens",
"properties": {
"opens": {
"type": "integer",
"description": "The total number of times your emails were opened by recipients."
},
"unique_opens": {
"type": "integer",
"description": "The number of unique recipients who opened your emails."
}
},
"description": "The individual events and their stats."
}
all_segments_response
{
"type": "object",
"title": "all_segments_response",
"required": [
"id",
"name",
"contacts_count",
"created_at",
"updated_at",
"sample_updated_at",
"next_sample_update",
"parent_list_ids",
"query_version",
"status"
],
"properties": {
"id": {
"type": "string",
"format": "uuid",
"maxLength": 36,
"minLength": 36,
"description": "ID assigned to the segment when created."
},
"name": {
"type": "string",
"maxLength": 100,
"minLength": 1,
"description": "Name of the segment."
},
"status": {
"$ref": "#/components/schemas/segment_status_response"
},
"_metadata": {
"$ref": "#/components/schemas/_metadata"
},
"created_at": {
"type": "string",
"description": "ISO8601 timestamp of when the object was created"
},
"updated_at": {
"type": "string",
"description": "ISO8601 timestamp of when the object was last updated"
},
"query_version": {
"type": "string",
"description": "If not set, segment contains a query for use with Segment v1 APIs. If set to '2', segment contains a SQL query for use in v2."
},
"contacts_count": {
"type": "integer",
"description": "Total number of contacts present in the segment"
},
"parent_list_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "The array of list ids to filter contacts on when building this segment. It allows only one such list id for now. We will support more in future",
"uniqueItems": true
},
"sample_updated_at": {
"type": "string",
"description": "ISO8601 timestamp of when the samples were last updated"
},
"next_sample_update": {
"type": "string",
"description": "ISO8601 timestamp of when the samples will be next updated"
}
}
}
api-error
{
"type": "object",
"title": "error",
"required": [
"message",
"field",
"error_id"
],
"properties": {
"field": {
"type": "string"
},
"message": {
"type": "string"
},
"error_id": {
"type": "string"
}
}
}
api-errors
{
"type": "object",
"title": "errors",
"properties": {
"errors": {
"type": "array",
"items": {
"$ref": "#/components/schemas/api-error"
}
}
}
}
api_key_name_id
{
"type": "object",
"title": "API Key Name and ID",
"example": {
"name": "Mail Send",
"api_key_id": "qfTQ6KG0QBiwWdJ0-pCLCA"
},
"properties": {
"name": {
"type": "string",
"description": "The name of your API Key."
},
"api_key_id": {
"type": "string",
"description": "The ID of your API Key. "
}
}
}
api_key_name_id_scopes
{
"allOf": [
{
"type": "object",
"properties": {
"scopes": {
"type": "array",
"items": {
"type": "string"
},
"description": "The permissions this API Key has access to."
}
}
},
{
"$ref": "#/components/schemas/api_key_name_id"
}
],
"title": "API Key Name, ID, and Scopes",
"example": {
"name": "Mail Send",
"scopes": [
"mail.send",
"mail.batch.create",
"mail.batch.read",
"mail.batch.update",
"mail.batch.delete",
"user.scheduled_sends.create",
"user.scheduled_sends.read",
"user.scheduled_sends.update",
"user.scheduled_sends.delete",
"sender_verification_eligible",
"sender_verification_legacy",
"2fa_required"
],
"api_key_id": "qfTQ6KG0QBiwWdJ0-pCLCA"
}
}
authentication_domain
{
"type": "object",
"title": "Domain Authentication - Mandatory Subdomain",
"example": {
"id": 45373692,
"dns": {
"dkim1": {
"data": "s1._domainkey.u7.wl.sendgrid.net",
"host": "s1._domainkey.example.com",
"type": "cname",
"valid": true
},
"dkim2": {
"data": "s2._domainkey.u7.wl.sendgrid.net",
"host": "s2._domainkey.example.com",
"type": "cname",
"valid": true
},
"mail_cname": {
"data": "u7.wl.sendgrid.net",
"host": "mail.example.com",
"type": "cname",
"valid": true
}
},
"ips": [
"127.0.0.1"
],
"valid": true,
"domain": "example.com",
"legacy": false,
"default": true,
"user_id": 66036447,
"username": "jdoe",
"subdomain": "sub",
"custom_spf": false,
"automatic_security": true
},
"required": [
"id",
"user_id",
"subdomain",
"domain",
"username",
"ips",
"custom_spf",
"default",
"legacy",
"automatic_security",
"valid",
"dns"
],
"properties": {
"id": {
"type": "number",
"description": "The ID of the authenticated domain."
},
"dns": {
"type": "object",
"required": [
"mail_cname",
"dkim1",
"dkim2"
],
"properties": {
"dkim1": {
"type": "object",
"required": [
"valid",
"type",
"host",
"data"
],
"properties": {
"data": {
"type": "string",
"description": "The DNS record."
},
"host": {
"type": "string",
"description": "The domain that this DNS record was created for."
},
"type": {
"type": "string",
"description": "The type of DNS record."
},
"valid": {
"type": "boolean",
"description": "Indicates if this is a valid DNS record."
}
},
"description": "A DNS record."
},
"dkim2": {
"type": "object",
"required": [
"valid",
"type",
"host",
"data"
],
"properties": {
"data": {
"type": "string",
"description": "The DNS record."
},
"host": {
"type": "string",
"description": "The domain that this DNS record was created for."
},
"type": {
"type": "string",
"description": "The type of DNS record."
},
"valid": {
"type": "boolean",
"description": "Indicates if this is a valid DNS record."
}
},
"description": "A DNS record."
},
"mail_cname": {
"type": "object",
"required": [
"valid",
"type",
"host",
"data"
],
"properties": {
"data": {
"type": "string",
"description": "The CNAME record."
},
"host": {
"type": "string",
"format": "hostname",
"description": "The domain that this CNAME is created for."
},
"type": {
"type": "string",
"description": "The type of DNS record."
},
"valid": {
"type": "boolean",
"description": "Indicates if this is a valid CNAME."
}
},
"description": "The CNAME for your sending domain that points to sendgrid.net."
}
},
"description": "The DNS records used to authenticate the sending domain."
},
"ips": {
"type": "array",
"items": {
"type": "string"
},
"description": "The IPs to be included in the custom SPF record for this authenticated domain."
},
"valid": {
"type": "boolean",
"description": "Indicates if this is a valid authenticated domain."
},
"domain": {
"type": "string",
"description": "The domain to be authenticated."
},
"legacy": {
"type": "boolean",
"description": "Indicates if this authenticated domain was created using the legacy whitelabel tool. If it is a legacy whitelabel, it will still function, but you'll need to create a new authenticated domain if you need to update it."
},
"default": {
"type": "boolean",
"description": "Indicates if this is the default authenticated domain."
},
"user_id": {
"type": "number",
"description": "The ID of the user that this domain is associated with."
},
"username": {
"type": "string",
"description": "The username that this domain will be associated with."
},
"subdomain": {
"type": "string",
"description": "The subdomain to use for this authenticated domain."
},
"custom_spf": {
"type": "boolean",
"description": "Indicates whether this authenticated domain uses custom SPF."
},
"automatic_security": {
"type": "boolean",
"description": "Indicates if this authenticated domain uses automated security."
}
}
}
automations-link-stats-response
{
"type": "object",
"title": "automations-link-stats-response",
"required": [
"results",
"total_clicks",
"_metadata"
],
"properties": {
"results": {
"type": "array",
"items": {
"type": "object",
"required": [
"url",
"step_id",
"clicks"
],
"properties": {
"url": {
"type": "string",
"format": "uri",
"description": "This is the URL of the link clicked. If `{{custom_fields}}` are part of the URL, they will be included."
},
"clicks": {
"type": "integer",
"minimum": 1,
"description": "The number of clicks on this particular link."
},
"step_id": {
"type": "string",
"format": "uuid",
"description": "This is the ID of the step if the stats were requested to be grouped by `step_id`."
},
"url_location": {
"type": "integer",
"minimum": 0,
"description": "This is the location of the link clicked in each Automation step. Links are located according to their position within the message; the topmost link has index `0`."
}
}
},
"description": ""
},
"_metadata": {
"$ref": "#/components/schemas/link-tracking-metadata"
},
"total_clicks": {
"type": "integer"
}
}
}
automations-response
{
"type": "object",
"title": "automations-response",
"required": [
"results"
],
"properties": {
"results": {
"type": "array",
"items": {
"type": "object",
"required": [
"id",
"aggregation",
"step_id"
],
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "This is the ID of the Automation you are requesting stats for."
},
"stats": {
"$ref": "#/components/schemas/metrics"
},
"step_id": {
"type": "string",
"default": "all",
"description": "This is the ID of the step if the stats were requested to be grouped by `step_id`."
},
"aggregation": {
"type": "string",
"default": "total",
"description": "This describes the time unit to which the stat is rolled up. It is based on the `aggregated_by` parameter included in the request. It can be \"total\" or the date (in YYYY-MM-DD format) the stats are for."
}
}
}
},
"_metadata": {
"$ref": "#/components/schemas/metadata"
}
}
}
blocks-response
{
"type": "array",
"items": {
"type": "object",
"required": [
"created",
"email",
"reason",
"status"
],
"properties": {
"email": {
"type": "string",
"format": "email",
"description": "The email address that was added to the block list."
},
"reason": {
"type": "string",
"description": "An explanation for the reason of the block."
},
"status": {
"type": "string",
"description": "The status of the block."
},
"created": {
"type": "integer",
"description": "A Unix timestamp indicating when the email address was added to the blocks list."
}
}
},
"title": "Blocks Response",
"example": [
{
"email": "example@example.com",
"reason": "error dialing remote address: dial tcp 10.57.152.165:25: no route to host",
"status": "4.0.0",
"created": 1443651154
}
]
}
bounce_response
{
"type": "object",
"title": "Bounce Response",
"example": {
"email": "example@example.com",
"reason": "550 5.1.1 The email account that you tried to reach does not exist. Please try double-checking the recipient's email address for typos or unnecessary spaces. Learn more at https://support.google.com/mail/answer/6596 o186si2389584ioe.63 - gsmtp ",
"status": "5.1.1",
"created": 1250337600
},
"properties": {
"email": {
"type": "string",
"format": "email",
"description": "The email address that was added to the bounce list."
},
"reason": {
"type": "string",
"description": "The reason for the bounce. This typically will be a bounce code, an enhanced code, and a description."
},
"status": {
"type": "string",
"description": "Enhanced SMTP bounce response"
},
"created": {
"type": "number",
"description": "The unix timestamp for when the bounce record was created at SendGrid."
}
}
}
campaign_request
{
"type": "object",
"title": "Campaigns Request",
"example": {
"id": 986724,
"title": "May Newsletter",
"status": "Draft",
"ip_pool": "marketing",
"subject": "New Products for Summer!",
"list_ids": [
110,
124
],
"sender_id": 124451,
"categories": [
"summer line"
],
"segment_ids": [
110
],
"html_content": "<html><head><title></title></head><body><p>Check out our summer line!</p></body></html>",
"plain_content": "Check out our summer line!",
"suppression_group_id": 42,
"custom_unsubscribe_url": ""
},
"required": [
"title"
],
"properties": {
"title": {
"type": "string",
"description": "The display title of your campaign. This will be viewable by you in the Marketing Campaigns UI."
},
"editor": {
"enum": [
"code",
"design"
],
"type": "string",
"description": "The editor used in the UI."
},
"ip_pool": {
"type": "string",
"nullable": true,
"description": "The pool of IPs that you would like to send this email from."
},
"subject": {
"type": "string",
"nullable": true,
"description": "The subject of your campaign that your recipients will see."
},
"list_ids": {
"type": "array",
"items": {
"type": "integer"
},
"nullable": true,
"description": "The IDs of the lists you are sending this campaign to. You can have both segment IDs and list IDs"
},
"sender_id": {
"type": "integer",
"nullable": true,
"description": "The ID of the \"sender\" identity that you have created. Your recipients will see this as the \"from\" on your marketing emails."
},
"categories": {
"type": "array",
"items": {
"type": "string"
},
"nullable": true,
"description": "The categories you would like associated to this campaign."
},
"segment_ids": {
"type": "array",
"items": {
"type": "integer"
},
"nullable": true,
"description": "The segment IDs that you are sending this list to. You can have both segment IDs and list IDs. Segments are limited to 10 segment IDs."
},
"html_content": {
"type": "string",
"nullable": true,
"description": "The HTML of your marketing email."
},
"plain_content": {
"type": "string",
"nullable": true,
"description": "The plain text content of your emails."
},
"suppression_group_id": {
"type": "integer",
"nullable": true,
"description": "The suppression group that this marketing email belongs to, allowing recipients to opt-out of emails of this type."
},
"custom_unsubscribe_url": {
"type": "string",
"nullable": true,
"description": "This is the url of the custom unsubscribe page that you provide for customers to unsubscribe from your suppression groups."
}
}
}
campaign_response
{
"allOf": [
{
"$ref": "#/components/schemas/campaign_request"
},
{
"type": "object",
"required": [
"status"
],
"properties": {
"id": {
"type": "integer"
},
"status": {
"type": "string",
"description": "The status of your campaign."
}
}
}
],
"title": "Campaigns Response"
}
category_stats
{
"type": "object",
"title": "Stats: Category Stats",
"example": {
"date": "2015-01-01T00:00:00.000Z",
"stats": [
{
"name": "cat1",
"type": "category",
"metrics": {
"opens": 0,
"blocks": 0,
"clicks": 0,
"bounces": 0,
"deferred": 0,
"requests": 0,
"delivered": 0,
"processed": 0,
"bounce_drops": 0,
"spam_reports": 0,
"unique_opens": 0,
"unsubscribes": 0,
"unique_clicks": 0,
"invalid_emails": 0,
"spam_report_drops": 0,
"unsubscribe_drops": 0
}
},
{
"name": "cat2",
"type": "category",
"metrics": {
"opens": 0,
"blocks": 0,
"clicks": 0,
"bounces": 0,
"deferred": 0,
"requests": 0,
"delivered": 0,
"processed": 0,
"bounce_drops": 0,
"spam_reports": 0,
"unique_opens": 0,
"unsubscribes": 0,
"unique_clicks": 0,
"invalid_emails": 0,
"spam_report_drops": 0,
"unsubscribe_drops": 0
}
}
]
},
"required": [
"date"
],
"properties": {
"date": {
"type": "string",
"description": "The date the statistics were gathered."
},
"stats": {
"type": "array",
"items": {
"type": "object",
"required": [
"type"
],
"properties": {
"name": {
"type": "string",
"description": "The name of the category."
},
"type": {
"type": "string",
"description": "How you are segmenting your statistics."
},
"metrics": {
"type": "object",
"required": [
"blocks",
"bounce_drops",
"bounces",
"clicks",
"deferred",
"delivered",
"invalid_emails",
"opens",
"processed",
"requests",
"spam_report_drops",
"spam_reports",
"unique_clicks",
"unique_opens",
"unsubscribe_drops",
"unsubscribes"
],
"properties": {
"opens": {
"type": "integer",
"description": "The total number of times your emails were opened by recipients."
},
"blocks": {
"type": "integer",
"description": "The number of emails that were not allowed to be delivered by ISPs."
},
"clicks": {
"type": "integer",
"description": "The number of links that were clicked."
},
"bounces": {
"type": "integer",
"description": "The number of emails that bounced instead of being delivered."
},
"deferred": {
"type": "integer",
"description": "The number of emails that temporarily could not be delivered."
},
"requests": {
"type": "integer",
"description": "The number of emails that were requested to be delivered."
},
"delivered": {
"type": "integer",
"description": "The number of emails SendGrid was able to confirm were actually delivered to a recipient."
},
"processed": {
"type": "integer",
"description": "Requests from your website, application, or mail client via SMTP Relay or the API that SendGrid processed."
},
"bounce_drops": {
"type": "integer",
"description": "The number of emails that were dropped because of a bounce."
},
"spam_reports": {
"type": "integer",
"description": "The number of recipients who marked your email as spam."
},
"unique_opens": {
"type": "integer",
"description": "The number of unique recipients who opened your emails."
},
"unsubscribes": {
"type": "integer",
"description": "The number of recipients who unsubscribed from your emails."
},
"unique_clicks": {
"type": "integer",
"description": "The number of unique recipients who clicked links in your emails."
},
"invalid_emails": {
"type": "integer",
"description": "The number of recipients who had malformed email addresses or whose mail provider reported the address as invalid."
},
"spam_report_drops": {
"type": "integer",
"description": "The number of emails that were dropped due to a recipient previously marking your emails as spam."
},
"unsubscribe_drops": {
"type": "integer",
"description": "The number of emails dropped due to a recipient unsubscribing from your emails."
}
}
}
}
}
}
}
}
cc_bcc_email_object
{
"type": "object",
"title": "CC BCC Email Object",
"example": {
"name": "Jane Doe",
"email": "jane_doe@example.com"
},
"required": [
"email"
],
"properties": {
"name": {
"type": "string",
"description": "The intended recipient's name."
},
"email": {
"type": "string",
"format": "email",
"description": "The intended recipient's email address."
}
}
}
click-tracking
{
"type": "object",
"title": "Settings: Click Tracking",
"example": {
"enabled": false,
"enable_text": false
},
"required": [
"enable_text",
"enabled"
],
"properties": {
"enabled": {
"type": "boolean",
"description": "Indicates if click tracking is enabled or disabled."
},
"enable_text": {
"type": "boolean",
"description": "Indicates if click tracking is enabled for plain text emails."
}
}
}
contact-details
{
"type": "object",
"title": "contact-details",
"required": [
"id",
"list_ids",
"created_at",
"updated_at"
],
"properties": {
"id": {
"type": "string"
},
"city": {
"type": "string"
},
"email": {
"type": "string"
},
"country": {
"type": "string"
},
"list_ids": {
"type": "array",
"items": {
"type": "string"
}
},
"_metadata": {
"$ref": "#/components/schemas/selfmetadata"
},
"last_name": {
"type": "string"
},
"created_at": {
"type": "string",
"description": "The ISO8601 timestamp when the contact was created."
},
"first_name": {
"type": "string"
},
"updated_at": {
"type": "string",
"description": "The ISO8601 timestamp when the contact was updated."
},
"postal_code": {
"type": "string"
},
"custom_fields": {
"$ref": "#/components/schemas/custom-fields-by-name"
},
"address_line_1": {
"type": "string"
},
"address_line_2": {
"type": "string"
},
"alternate_emails": {
"type": "array",
"items": {
"type": "string"
}
},
"state_province_region": {
"type": "string"
}
}
}
contact-details2
{
"type": "object",
"title": "contact-details2",
"required": [
"id",
"list_ids",
"created_at",
"updated_at"
],
"properties": {
"id": {
"type": "string",
"format": "uuid",
"maxLength": 36,
"minLength": 36
},
"city": {
"type": "string"
},
"line": {
"type": "string"
},
"email": {
"type": "string",
"format": "email"
},
"country": {
"type": "string"
},
"facebook": {
"type": "string"
},
"list_ids": {
"type": "array",
"items": {
"type": "string",
"format": "uuid"
}
},
"whatsapp": {
"type": "string"
},
"_metadata": {
"$ref": "#/components/schemas/selfmetadata"
},
"last_name": {
"type": "string"
},
"created_at": {
"type": "string",
"format": "date-time"
},
"first_name": {
"type": "string"
},
"updated_at": {
"type": "string",
"format": "date-time"
},
"postal_code": {
"type": "string"
},
"segment_ids": {
"type": "array",
"items": {
"type": "string",
"format": "uuid"
}
},
"unique_name": {
"type": "string"
},
"phone_number": {
"type": "string"
},
"custom_fields": {
"type": "object"
},
"address_line_1": {
"type": "string"
},
"address_line_2": {
"type": "string"
},
"alternate_emails": {
"type": "array",
"items": {
"type": "string",
"format": "email"
},
"nullable": true
},
"state_province_region": {
"type": "string"
}
}
}
contact-details3
{
"type": "object",
"title": "contact-details3",
"required": [
"id",
"list_ids",
"segment_ids",
"created_at",
"updated_at"
],
"properties": {
"id": {
"type": "string"
},
"city": {
"type": "string"
},
"line": {
"type": "string"
},
"email": {
"type": "string"
},
"country": {
"type": "string"
},
"facebook": {
"type": "string"
},
"list_ids": {
"type": "array",
"items": {
"type": "string"
}
},
"whatsapp": {
"type": "string"
},
"_metadata": {
"$ref": "#/components/schemas/selfmetadata"
},
"last_name": {
"type": "string"
},
"created_at": {
"type": "string"
},
"first_name": {
"type": "string"
},
"updated_at": {
"type": "string"
},
"postal_code": {
"type": "string"
},
"segment_ids": {
"type": "array",
"items": {
"type": "string"
}
},
"unique_name": {
"type": "string"
},
"phone_number": {
"type": "string"
},
"custom_fields": {
"type": "object"
},
"address_line_1": {
"type": "string"
},
"address_line_2": {
"type": "string"
},
"alternate_emails": {
"type": "array",
"items": {
"type": "string"
}
},
"state_province_region": {
"type": "string"
}
}
}
contact-export
{
"type": "object",
"title": "contact-export",
"required": [
"id",
"status",
"created_at",
"updated_at",
"expires_at"
],
"properties": {
"id": {
"type": "string"
},
"urls": {
"type": "array",
"items": {
"type": "string"
},
"description": "One or more download URLs for the contact file if the status is `ready`."
},
"status": {
"enum": [
"pending",
"ready",
"failure"
],
"type": "string",
"description": "The export job's status. Allowed values: `pending`, `ready`, or `failure`."
},
"message": {
"type": "string",
"description": "A human readable message if the status is `failure`."
},
"_metadata": {
"$ref": "#/components/schemas/metadata"
},
"created_at": {
"type": "string",
"description": "The ISO8601 timestamp when the export was begun."
},
"expires_at": {
"type": "string",
"description": "The ISO8601 timestamp when the exported file on S3 will expire."
},
"updated_at": {
"type": "string",
"description": "The ISO8601 timestamp when the export was updated."
},
"completed_at": {
"type": "string",
"description": "The ISO8601 timestamp when the export was completed."
},
"contact_count": {
"type": "integer",
"description": "The total number of exported contacts."
}
}
}
contact-import
{
"type": "object",
"title": "contact-import",
"properties": {
"id": {
"type": "string",
"description": "The job ID."
},
"status": {
"type": "string",
"description": "The job state. Allowed values: `pending`, `completed`, `errored`, or `failed`."
},
"results": {
"type": "object",
"properties": {
"errors_url": {
"type": "string",
"description": "The download URL of the file which provides information about any errors."
},
"created_count": {
"type": "number",
"description": "Created contact count from the import."
},
"deleted_count": {
"type": "number",
"description": "Count of deleted contacts that resulted in error."
},
"errored_count": {
"type": "number",
"description": "Count of imported contacts that resulted in error."
},
"updated_count": {
"type": "number",
"description": "Updated contact count from the import."
},
"requested_count": {
"type": "number",
"description": "Requested contact count from the import."
}
},
"description": "Result map of the import job."
},
"job_type": {
"type": "string",
"description": "The job type. Allowed values: `upsert`, or `delete`."
},
"started_at": {
"type": "string",
"description": "The ISO8601 timestamp when the job was created."
},
"finished_at": {
"type": "string",
"description": "The ISO8601 timestamp when the job was finished."
}
}
}
contact-request
{
"type": "object",
"title": "contact-request",
"required": [
"email"
],
"properties": {
"city": {
"type": "string",
"maxLength": 60,
"description": "The contact's city."
},
"email": {
"type": "string",
"maxLength": 254,
"description": "The contact's primary email. This is required to be a valid email."
},
"country": {
"type": "string",
"maxLength": 50,
"description": "The contact's country. Can be a full name or an abbreviation."
},
"last_name": {
"type": "string",
"maxLength": 50,
"description": "The contact's family name."
},
"first_name": {
"type": "string",
"maxLength": 50,
"description": "The contact's personal name."
},
"postal_code": {
"type": "string",
"description": "The contact's ZIP code or other postal code."
},
"custom_fields": {
"$ref": "#/components/schemas/custom-fields-by-id"
},
"address_line_1": {
"type": "string",
"maxLength": 100,
"description": "The first line of the address."
},
"address_line_2": {
"type": "string",
"maxLength": 100,
"description": "An optional second line for the address."
},
"alternate_emails": {
"type": "array",
"items": {
"type": "string",
"maxLength": 254
},
"maxItems": 5,
"minItems": 0,
"description": "Additional emails associated with the contact."
},
"state_province_region": {
"type": "string",
"maxLength": 50,
"description": "The contact's state, province, or region."
}
}
}
contact-summary
{
"type": "object",
"title": "contact-summary",
"required": [
"id",
"list_ids",
"created_at",
"updated_at"
],
"properties": {
"id": {
"type": "string",
"description": "Contact UUID."
},
"email": {
"type": "string",
"description": "Primary email address."
},
"list_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "List UUID linked with this contact."
},
"_metadata": {
"$ref": "#/components/schemas/selfmetadata"
},
"last_name": {
"type": "string"
},
"created_at": {
"type": "number",
"description": "Unix Epoch Timestamp."
},
"first_name": {
"type": "string"
},
"updated_at": {
"type": "number",
"description": "Unix Epoch Timestamp."
}
}
}
contact_response
{
"type": "object",
"title": "contact_response",
"example": {
"id": "47d23ab0-d895-4359-a0d1-ffc7a6fc7e70",
"city": "Redwood City",
"email": "abcd@gmail.com",
"country": "USA",
"last_name": "Cd",
"first_name": "Ab",
"postal_code": 94063,
"custom_fields": {
"custom_field_name1": "custom_field_value1",
"custom_field_name2": "custom_field_value2"
},
"address_line_1": "street address / P.O. box / CompanyName / c/o",
"address_line_2": "apartment, suite, unit, building, floor etc",
"alternate_emails": [
"abcd@yahoo.com",
"abcd@hotmail.com"
],
"state_province_region": "CA"
},
"required": [
"id",
"email",
"alternate_emails",
"first_name",
"last_name",
"address_line_1",
"address_line_2",
"city",
"state_province_region",
"postal_code",
"country",
"custom_fields"
],
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}",
"maxLength": 36,
"description": "ID assigned to a contact when added to the system."
},
"city": {
"type": "string",
"pattern": "^[a-zA-Z\\u0080-\\u024F\\s\\/\\-\\)\\(\\`\\.\\\"\\']+$",
"minLength": 0,
"description": "City associated with the contact. This is a reserved field."
},
"email": {
"type": "string",
"format": "email",
"maxLength": 254,
"minLength": 3,
"description": "Email of the contact. This is a reserved field."
},
"country": {
"type": "string",
"minLength": 0,
"description": "Country associated with the address of the contact. This is a reserved field."
},
"list_ids": {
"type": "array",
"items": {
"type": "string",
"format": "uuid"
},
"description": "IDs of all lists the contact is part of",
"uniqueItems": true
},
"last_name": {
"type": "string",
"minLength": 1,
"description": "Last name of the contact. This is a reserved field."
},
"first_name": {
"type": "string",
"minLength": 1,
"description": "First name of the contact. This is a reserved field."
},
"postal_code": {
"type": "integer",
"description": "Zipcode associated with the address of the contact. This is a reserved field."
},
"segment_ids": {
"type": "array",
"items": {
"type": "string",
"format": "uuid"
},
"description": "IDs of all segments the contact is part of",
"uniqueItems": true
},
"custom_fields": {
"type": "object",
"properties": {
"": {
"type": "string"
},
"custom_field_name1": {
"type": "string",
"minLength": 0
},
"custom_field_name2": {
"type": "string",
"minLength": 0
}
},
"description": "The user may choose to create up to 120 custom fields or none at all. This is not a reserved field.",
"minProperties": 0
},
"address_line_1": {
"type": "string",
"minLength": 0,
"description": "First line of address of the contact. This is a reserved field."
},
"address_line_2": {
"type": "string",
"minLength": 0,
"description": "Second line of address of the contact. This is a reserved field."
},
"alternate_emails": {
"type": "array",
"items": {
"type": "string",
"format": "email",
"maxLength": 254,
"minLength": 3
},
"minItems": 0,
"description": "Alternate emails of the contact. This is a reserved field.",
"uniqueItems": true
},
"state_province_region": {
"type": "string",
"minLength": 0,
"description": "State associated with the contact. This is a reserved field."
}
}
}
contactdb_custom_field
{
"type": "object",
"title": "ContactDB Custom field schema.",
"example": {
"name": "first_name",
"type": "text"
},
"properties": {
"name": {
"type": "string",
"description": "The name of the field"
},
"type": {
"enum": [
"date",
"text",
"number"
],
"type": "string",
"description": "The type of the field."
}
}
}
contactdb_custom_field_with_id
{
"allOf": [
{
"$ref": "#/components/schemas/contactdb_custom_field"
},
{
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "The ID of the custom field."
}
}
}
],
"title": "ContactDB Custom field schema with ID."
}
contactdb_custom_field_with_id_value
{
"allOf": [
{
"$ref": "#/components/schemas/contactdb_custom_field_with_id"
},
{
"type": "object",
"properties": {
"value": {
"type": "string",
"nullable": true,
"description": "The value of this recipient's custom field"
}
}
}
],
"title": "ContactDB Custom field schema."
}
contactdb_list
{
"type": "object",
"title": "ContactDB lists",
"example": {
"id": 1,
"name": "listname",
"recipient_count": 0
},
"required": [
"id",
"name",
"recipient_count"
],
"properties": {
"id": {
"type": "integer",
"description": "The reference ID of your list."
},
"name": {
"type": "string",
"description": "The name of your list. Must be unique against all other list and segment names."
},
"recipient_count": {
"type": "integer",
"description": "The count of recipients currently in the list."
}
}
}
contactdb_recipient
{
"type": "object",
"title": "ContactDB: Recipient",
"properties": {
"recipients": {
"type": "array",
"items": {
"type": "object",
"required": [
"email"
],
"properties": {
"id": {
"type": "string",
"description": "The ID of this recipient."
},
"email": {
"type": "string",
"format": "email",
"description": "The email address of this recipient. This is a default custom field that SendGrid provides."
},
"last_name": {
"type": "string",
"nullable": true,
"description": "The last name of the recipient."
},
"created_at": {
"type": "number",
"description": "The time this record was created in your contactdb, in unixtime."
},
"first_name": {
"type": "string",
"nullable": true,
"description": "The first name of this recipient. This is a default custom field that SendGrid provides."
},
"updated_at": {
"type": "number",
"description": "The last update date for this recipient's record."
},
"last_opened": {
"type": "number",
"nullable": true,
"description": "The last time this recipient opened an email from you, in unixtime."
},
"last_clicked": {
"type": "number",
"nullable": true,
"description": "The last time this recipient clicked a link from one of your campaigns, in unixtime."
},
"last_emailed": {
"type": "number",
"nullable": true,
"description": "The last time this user was emailed by one of your campaigns, in unixtime."
},
"custom_fields": {
"type": "array",
"items": {
"$ref": "#/components/schemas/contactdb_custom_field_with_id_value"
},
"description": "The custom fields assigned to this recipient and their values."
}
}
}
}
}
}
contactdb_recipient_count
{
"type": "object",
"title": "ContactDB: Recipient Count",
"example": {
"recipient_count": 1234
},
"required": [
"recipient_count"
],
"properties": {
"recipient_count": {
"type": "number",
"description": "The count of recipients."
}
}
}
contactdb_recipient_response
{
"type": "object",
"title": "ContactDB: Recipient response",
"example": {
"errors": [
{
"message": "Invalid email.",
"error_indices": [
2
]
}
],
"new_count": 2,
"error_count": 1,
"error_indices": [
2
],
"updated_count": 0,
"persisted_recipients": [
"YUBh",
"bWlsbGVyQG1pbGxlci50ZXN0"
]
},
"required": [
"error_count",
"new_count",
"persisted_recipients",
"updated_count"
],
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"message": {
"type": "string"
},
"error_indices": {
"type": "array",
"items": {
"type": "number"
}
}
}
}
},
"new_count": {
"type": "number",
"default": 0,
"description": "The count of new recipients added to the contactdb."
},
"error_count": {
"type": "number",
"default": 0,
"description": "The number of errors found while adding recipients."
},
"error_indices": {
"type": "array",
"items": {
"type": "number"
},
"default": [],
"description": "The indices of the recipient(s) sent that caused the error. "
},
"updated_count": {
"type": "number",
"default": 0,
"description": "The recipients who were updated from this request."
},
"persisted_recipients": {
"type": "array",
"items": {
"type": "string"
},
"default": [],
"description": "The recipient IDs of the recipients that already existed from this request."
}
}
}
contactdb_segments
{
"type": "object",
"title": "Create a Segment request",
"example": {
"name": "Last Name Miller",
"list_id": 4,
"conditions": [
{
"field": "last_name",
"value": "Miller",
"and_or": "",
"operator": "eq"
},
{
"field": "last_clicked",
"value": "01/02/2015",
"and_or": "and",
"operator": "gt"
},
{
"field": "clicks.campaign_identifier",
"value": "513",
"and_or": "or",
"operator": "eq"
}
],
"recipient_count": 1234
},
"required": [
"name",
"conditions"
],
"properties": {
"name": {
"type": "string",
"description": "The name of this segment."
},
"list_id": {
"type": "integer",
"description": "The list id from which to make this segment. Not including this ID will mean your segment is created from the main contactdb rather than a list."
},
"conditions": {
"type": "array",
"items": {
"$ref": "#/components/schemas/contactdb_segments_conditions"
},
"description": "The conditions for a recipient to be included in this segment."
},
"recipient_count": {
"type": "number",
"description": "The count of recipients in this list. This is not included on creation of segments."
}
}
}
contactdb_segments_conditions
{
"type": "object",
"title": "ContactDB: Segments: Conditions",
"required": [
"field",
"value",
"operator"
],
"properties": {
"field": {
"type": "string"
},
"value": {
"type": "string"
},
"and_or": {
"enum": [
"and",
"or",
""
],
"type": "string"
},
"operator": {
"enum": [
"eq",
"ne",
"lt",
"gt",
"contains"
],
"type": "string"
}
}
}
contactdb_segments_with_id
{
"allOf": [
{
"type": "object",
"required": [
"id"
],
"properties": {
"id": {
"type": "number",
"description": "The ID of the segment."
}
}
},
{
"$ref": "#/components/schemas/contactdb_segments"
}
],
"title": "ContactDB:: Segments with ID"
}
contacts
{
"type": "object",
"title": "Contacts",
"properties": {
"zip": {
"type": "string"
},
"city": {
"type": "string"
},
"email": {
"type": "string"
},
"phone": {
"type": "string"
},
"state": {
"type": "string"
},
"address": {
"type": "string"
},
"company": {
"type": "string"
},
"country": {
"type": "string"
},
"address2": {
"type": "object"
},
"last_name": {
"type": "string"
},
"first_name": {
"type": "string"
}
}
}
create-integration-request
{
"type": "object",
"title": "Create Integration Request",
"required": [
"name",
"enabled",
"signin_url",
"signout_url",
"entity_id"
],
"properties": {
"name": {
"type": "string",
"description": "The name of your integration. This name can be anything that makes sense for your organization (eg. Twilio SendGrid)"
},
"enabled": {
"type": "boolean",
"description": "Indicates if the integration is enabled."
},
"entity_id": {
"type": "string",
"description": "An identifier provided by your IdP to identify Twilio SendGrid in the SAML interaction. This is called the \"SAML Issuer ID\" in the Twilio SendGrid UI."
},
"signin_url": {
"type": "string",
"description": "The IdP's SAML POST endpoint. This endpoint should receive requests and initiate an SSO login flow. This is called the \"Embed Link\" in the Twilio SendGrid UI."
},
"signout_url": {
"type": "string",
"description": "This URL is relevant only for an IdP-initiated authentication flow. If a user authenticates from their IdP, this URL will return them to their IdP when logging out."
},
"completed_integration": {
"type": "boolean",
"description": "Indicates if the integration is complete."
}
}
}
credentials
{
"type": "object",
"title": "Credentials",
"example": {
"zip": "55555",
"city": "Denver",
"email": "example@example.com",
"phone": "(555) 555-5555",
"state": "CO",
"address": "1234 example street",
"company": "Company name",
"country": "US",
"address2": null,
"last_name": "User",
"first_name": "Example"
},
"properties": {
"username": {
"type": "string"
},
"permissions": {
"type": "object",
"properties": {
"api": {
"type": "string"
},
"web": {
"type": "string"
},
"mail": {
"type": "string"
}
}
}
}
}
custom-fields-by-id
{
"type": "object",
"title": "custom-fields-by-id",
"example": {
"e2": "Coffee is a beverage that puts one to sleep when not drank.",
"w1": "2002-10-02T15:00:00.000Z",
"w33": 9.5
}
}
custom-fields-by-name
{
"type": "object",
"title": "custom-fields-by-name",
"example": {
"birthday": "2002-10-02T15:00:00.000Z",
"shoe_size": 9.5,
"favoriteQuote": "Coffee is a beverage that puts one to sleep when not drank."
}
}
custom_field_definitions_response
{
"type": "object",
"title": "custom_field_definitions_response",
"example": {
"id": "a1_D",
"name": "custom_field_name",
"field_type": "Date"
},
"required": [
"id",
"name",
"field_type"
],
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string",
"maxLength": 100,
"minLength": 1
},
"field_type": {
"enum": [
"Text",
"Number",
"Date"
],
"type": "string"
}
}
}
design-common-fields
{
"allOf": [
{
"$ref": "#/components/schemas/design-duplicate-input"
},
{
"type": "object",
"properties": {
"subject": {
"type": "string",
"maxLength": 5000,
"description": "Subject of the Design."
},
"categories": {
"type": "array",
"items": {
"type": "string",
"maxLength": 255
},
"maxItems": 10,
"description": "The list of categories applied to the design",
"uniqueItems": true
},
"generate_plain_content": {
"type": "boolean",
"default": true,
"description": "If true, plain_content is always generated from html_content. If false, plain_content is not altered."
}
}
}
],
"title": "Design Common Fields"
}
design-duplicate-input
{
"type": "object",
"title": "Design Duplicate Design Input",
"example": {
"name": "Ahoy, Cake or Pie Cafe!",
"editor": "design"
},
"properties": {
"name": {
"type": "string",
"default": "Duplicate: <original design name>",
"description": "The name of the new design."
},
"editor": {
"enum": [
"code",
"design"
],
"type": "string",
"description": "The editor used in the UI."
}
}
}
design-input
{
"allOf": [
{
"$ref": "#/components/schemas/design-duplicate-input"
},
{
"$ref": "#/components/schemas/design-common-fields"
},
{
"type": "object",
"required": [
"html_content"
],
"properties": {
"html_content": {
"type": "string",
"maxLength": 1048576,
"description": "The HTML content of the Design."
},
"plain_content": {
"type": "string",
"default": "<generated from html_content if left empty>",
"maxLength": 1048576,
"description": "Plain text content of the Design."
}
}
}
],
"title": "Design Input",
"example": {
"name": "Ahoy, World!",
"editor": "design",
"subject": "Getting Started",
"html_content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n<html data-editor-version=\"2\" class=\"sg-campaigns\" xmlns=\"http://www.w3.org/1999/xhtml\">\n <head>\n <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1\">\n <!--[if !mso]><!-->\n <meta http-equiv=\"X-UA-Compatible\" content=\"IE=Edge\">\n <!--<![endif]-->\n <!--[if (gte mso 9)|(IE)]>\n <xml>\n <o:OfficeDocumentSettings>\n <o:AllowPNG/>\n <o:PixelsPerInch>96</o:PixelsPerInch>\n </o:OfficeDocumentSettings>\n </xml>\n <![endif]-->\n <!--[if (gte mso 9)|(IE)]>\n <style type=\"text/css\">\n body {width: 600px;margin: 0 auto;}\n table {border-collapse: collapse;}\n table, td {mso-table-lspace: 0pt;mso-table-rspace: 0pt;}\n img {-ms-interpolation-mode: bicubic;}\n </style>\n<![endif]-->\n <style type=\"text/css\">\n body, p, div {\n font-family: arial,helvetica,sans-serif;\n font-size: 14px;\n }\n body {\n color: #000000;\n }\n body a {\n color: #1188E6;\n text-decoration: none;\n }\n p { margin: 0; padding: 0; }\n table.wrapper {\n width:100% !important;\n table-layout: fixed;\n -webkit-font-smoothing: antialiased;\n -webkit-text-size-adjust: 100%;\n -moz-text-size-adjust: 100%;\n -ms-text-size-adjust: 100%;\n }\n img.max-width {\n max-width: 100% !important;\n }\n .column.of-2 {\n width: 50%;\n }\n .column.of-3 {\n width: 33.333%;\n }\n .column.of-4 {\n width: 25%;\n }\n ul ul ul ul {\n list-style-type: disc !important;\n }\n ol ol {\n list-style-type: lower-roman !important;\n }\n ol ol ol {\n list-style-type: lower-latin !important;\n }\n ol ol ol ol {\n list-style-type: decimal !important;\n }\n @media screen and (max-width:480px) {\n .preheader .rightColumnContent,\n .footer .rightColumnContent {\n text-align: left !important;\n }\n .preheader .rightColumnContent div,\n .preheader .rightColumnContent span,\n .footer .rightColumnContent div,\n .footer .rightColumnContent span {\n text-align: left !important;\n }\n .preheader .rightColumnContent,\n .preheader .leftColumnContent {\n font-size: 80% !important;\n padding: 5px 0;\n }\n table.wrapper-mobile {\n width: 100% !important;\n table-layout: fixed;\n }\n img.max-width {\n height: auto !important;\n max-width: 100% !important;\n }\n a.bulletproof-button {\n display: block !important;\n width: auto !important;\n font-size: 80%;\n padding-left: 0 !important;\n padding-right: 0 !important;\n }\n .columns {\n width: 100% !important;\n }\n .column {\n display: block !important;\n width: 100% !important;\n padding-left: 0 !important;\n padding-right: 0 !important;\n margin-left: 0 !important;\n margin-right: 0 !important;\n }\n .social-icon-column {\n display: inline-block !important;\n }\n }\n </style>\n <!--user entered Head Start--><!--End Head user entered-->\n </head>\n <body>\n <center class=\"wrapper\" data-link-color=\"#1188E6\" data-body-style=\"font-size:14px; font-family:arial,helvetica,sans-serif; color:#000000; background-color:#FFFFFF;\">\n <div class=\"webkit\">\n <table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"100%\" class=\"wrapper\" bgcolor=\"#FFFFFF\">\n <tr>\n <td valign=\"top\" bgcolor=\"#FFFFFF\" width=\"100%\">\n <table width=\"100%\" role=\"content-container\" class=\"outer\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\n <tr>\n <td width=\"100%\">\n <table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\n <tr>\n <td>\n <!--[if mso]>\n <center>\n <table><tr><td width=\"600\">\n <![endif]-->\n <table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" style=\"width:100%; max-width:600px;\" align=\"center\">\n <tr>\n <td role=\"modules-container\" style=\"padding:0px 0px 0px 0px; color:#000000; text-align:left;\" bgcolor=\"#FFFFFF\" width=\"100%\" align=\"left\"><table class=\"module preheader preheader-hide\" role=\"module\" data-type=\"preheader\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" style=\"display: none !important; mso-hide: all; visibility: hidden; opacity: 0; color: transparent; height: 0; width: 0;\">\n <tr>\n <td role=\"module-content\">\n <p></p>\n </td>\n </tr>\n </table><table class=\"module\" role=\"module\" data-type=\"text\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" style=\"table-layout: fixed;\" data-muid=\"41f90842-501c-4f08-96c9-17c0f74cb841\" data-mc-module-version=\"2019-10-22\">\n <tbody>\n <tr>\n <td style=\"padding:18px 0px 18px 0px; line-height:22px; text-align:inherit;\" height=\"100%\" valign=\"top\" bgcolor=\"\" role=\"module-content\"><div><div style=\"font-family: inherit; text-align: inherit\">Ahoy, World!</div><div></div></div></td>\n </tr>\n </tbody>\n </table><div data-role=\"module-unsubscribe\" class=\"module\" role=\"module\" data-type=\"unsubscribe\" style=\"color:#444444; font-size:12px; line-height:20px; padding:16px 16px 16px 16px; text-align:Center;\" data-muid=\"4e838cf3-9892-4a6d-94d6-170e474d21e5\"><div class=\"Unsubscribe--addressLine\"><p class=\"Unsubscribe--senderName\" style=\"font-size:12px; line-height:20px;\">{{Sender_Name}}</p><p style=\"font-size:12px; line-height:20px;\"><span class=\"Unsubscribe--senderAddress\">{{Sender_Address}}</span>, <span class=\"Unsubscribe--senderCity\">{{Sender_City}}</span>, <span class=\"Unsubscribe--senderState\">{{Sender_State}}</span> <span class=\"Unsubscribe--senderZip\">{{Sender_Zip}}</span></p></div><p style=\"font-size:12px; line-height:20px;\"><a class=\"Unsubscribe--unsubscribeLink\" href=\"{{{unsubscribe}}}\" target=\"_blank\" style=\"\">Unsubscribe</a> - <a href=\"{{{unsubscribe_preferences}}}\" target=\"_blank\" class=\"Unsubscribe--unsubscribePreferences\" style=\"\">Unsubscribe Preferences</a></p></div></td>\n </tr>\n </table>\n <!--[if mso]>\n </td>\n </tr>\n </table>\n </center>\n <![endif]-->\n </td>\n </tr>\n </table>\n </td>\n </tr>\n </table>\n </td>\n </tr>\n </table>\n </div>\n </center>\n </body>\n </html>",
"plain_content": "Ahoy, World!\n\n{{Sender_Name}}\n\n{{Sender_Address}} , {{Sender_City}} , {{Sender_State}} {{Sender_Zip}}\n\nUnsubscribe ( {{{unsubscribe}}} ) - Unsubscribe Preferences ( {{{unsubscribe_preferences}}} )"
}
}
design-output
{
"allOf": [
{
"$ref": "#/components/schemas/design-output-summary"
},
{
"$ref": "#/components/schemas/design-input"
}
],
"title": "Design Output"
}
design-output-summary
{
"allOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "ID of the Design."
},
"created_at": {
"type": "string",
"format": "ISO 8601 date-time",
"description": "Datetime that Design was created."
},
"updated_at": {
"type": "string",
"format": "ISO 8601 date-time",
"description": "Datetime that Design was last updated."
},
"thumbnail_url": {
"type": "string",
"description": "A Thumbnail preview of the template's html content."
}
}
},
{
"$ref": "#/components/schemas/design-duplicate-input"
},
{
"$ref": "#/components/schemas/design-common-fields"
}
],
"title": "Design Output - Summary",
"example": {
"result": [
{
"id": "3247eaea-c912-42a3-b0bc-60bdaf210396X",
"name": "Welcome Email",
"editor": "code",
"subject": "Welcom to the Cake or Pie Cafe",
"categories": [
"welcome",
"new customer"
],
"created_at": "2021-04-09T17:29:46.000Z",
"updated_at": "2021-04-09T17:29:55.000Z",
"thumbnail_url": "//us-east-2-production-thumbnail-bucket.s3.amazonaws.com/llny8o5b3m636z92p7hbjnmq1jvpka39p370jwtin2s1wxv7x1sgm0y5fk518d0s.png",
"generate_plain_content": true
},
{
"id": "02dfd792-f31f-439a-a79e-5c47fbcfdbacX",
"name": "Monthly Promo",
"editor": "design",
"subject": "Free Dozen Cupcakes",
"categories": [
"promo",
"coupon"
],
"created_at": "2021-04-09T17:29:21.000Z",
"updated_at": "2021-04-09T17:29:42.000Z",
"thumbnail_url": "//us-east-2-production-thumbnail-bucket.s3.amazonaws.com/hfyxahd7ues2ajuoeoqq2xe6ibdasl1q89ox0y9ncya2ftpoicssmtf9ddus4c39.png",
"generate_plain_content": true
},
{
"id": "e54be823-19ef-4c6f-8b60-efd7514f492dX",
"name": "Duplicate: Ingrid & Anders",
"editor": "design",
"subject": "Welcome to Ingrid & Anders!",
"categories": [],
"created_at": "2020-10-09T17:33:46.000Z",
"updated_at": "2021-04-07T19:57:52.000Z",
"thumbnail_url": "//us-east-2-production-thumbnail-bucket.s3.amazonaws.com/12kni9gjpyb9uxmwr9vk7unycjr70u95zoyhe9sg2zounul2zg7dih1s20k13q2z.png",
"generate_plain_content": true
}
],
"_metadata": {
"self": "https://api.sendgrid.com/v3/designs?page_token=vHdvHCg0w1F-TmWJcPNpTEnFY2aPEmRBHONwOgZ6TgJbX2_I",
"count": 3
}
}
}
domain-authentication-200-response
{
"type": "array",
"items": {
"allOf": [
{
"$ref": "#/components/schemas/authentication_domain"
},
{
"type": "object",
"properties": {
"subusers": {
"type": "array",
"items": {
"type": "object",
"properties": {
"user_id": {
"type": "integer",
"description": "The ID of the subuser that this authenticated domain will be associated with."
},
"username": {
"type": "string",
"description": "The username of the subuser that this authenticated domain is associated with."
}
}
}
},
"last_validation_attempt_at": {
"type": "integer",
"description": "A Unix epoch timestamp representing the last time of a validation attempt."
}
}
}
]
},
"title": "Domain Authentication 200 Response",
"example": [
{
"id": 1,
"dns": {
"dkim1": {
"data": "s1._domainkey.u7.wl.sendgrid.net",
"host": "s1._domainkey.example.com",
"type": "cname",
"valid": true
},
"dkim2": {
"data": "s2._domainkey.u7.wl.sendgrid.net",
"host": "s2._domainkey.example.com",
"type": "cname",
"valid": true
},
"mail_cname": {
"data": "u7.wl.sendgrid.net",
"host": "mail.example.com",
"type": "cname",
"valid": true
}
},
"ips": [
"192.168.1.1",
"192.168.1.2"
],
"valid": true,
"domain": "example.com",
"legacy": false,
"default": true,
"user_id": 7,
"username": "jane@example.com",
"subdomain": "mail",
"custom_spf": true,
"automatic_security": true
},
{
"id": 2,
"dns": {
"dkim1": {
"data": "k=rsa; t=s; p=publicKey",
"host": "example2.com",
"type": "txt",
"valid": false
},
"dkim2": {
"data": "k=rsa; t=s p=publicKey",
"host": "example2.com",
"type": "txt",
"valid": false
},
"mail_cname": {
"data": "sendgrid.net",
"host": "news.example2.com",
"type": "mx",
"valid": false
}
},
"ips": [],
"valid": false,
"domain": "example2.com",
"legacy": false,
"default": true,
"user_id": 8,
"username": "john@example2.com",
"subdomain": "new",
"custom_spf": false,
"automatic_security": true
}
]
}
domain_authentication_domain_spf
{
"type": "object",
"title": "Domain Authentication",
"required": [
"id",
"domain",
"username",
"user_id",
"ips",
"custom_spf",
"default",
"legacy",
"automatic_security",
"valid",
"dns"
],
"properties": {
"id": {
"type": "integer",
"description": "The ID of the authenticated domain."
},
"dns": {
"type": "object",
"required": [
"mail_server",
"subdomain_spf",
"domain_spf",
"dkim"
],
"properties": {
"dkim": {
"type": "object",
"required": [
"host",
"type",
"data",
"valid"
],
"properties": {
"data": {
"type": "string",
"description": "The DKIM record."
},
"host": {
"type": "string",
"description": "The DNS labels for the DKIM signature."
},
"type": {
"type": "string",
"description": "The type of data in the DKIM record."
},
"valid": {
"type": "boolean",
"description": "Indicates if the DKIM record is valid."
}
},
"description": "The DKIM record for messages sent using this authenticated domain."
},
"domain_spf": {
"type": "object",
"required": [
"host",
"type",
"data",
"valid"
],
"properties": {
"data": {
"type": "string",
"description": "The SPF record."
},
"host": {
"type": "string",
"description": "The root domain that this SPF record will be used to authenticate."
},
"type": {
"type": "string",
"description": "The type of data in the SPF record."
},
"valid": {
"type": "boolean",
"description": "Indicates if the SPF record is valid."
}
},
"description": "The SPF record for the root domain."
},
"mail_server": {
"type": "object",
"required": [
"host",
"type",
"data",
"valid"
],
"properties": {
"data": {
"type": "string",
"description": "The mail server responsible for accepting messages from the sending domain."
},
"host": {
"type": "string",
"description": "The domain sending the messages."
},
"type": {
"type": "string",
"description": "They type of DNS record."
},
"valid": {
"type": "boolean",
"description": "Indicates if this is a valid DNS record."
}
},
"description": "Designates which mail server is responsible for accepting messages from a domain."
},
"subdomain_spf": {
"type": "object",
"required": [
"host",
"type",
"data",
"valid"
],
"properties": {
"data": {
"type": "string",
"description": "The SPF record."
},
"host": {
"type": "string",
"description": "The domain that this SPF record will be used to authenticate."
},
"type": {
"type": "string",
"description": "The type of data in the SPF record."
},
"valid": {
"type": "boolean",
"description": "Indicates if this is a valid SPF record."
}
},
"description": "The SPF record for the subdomain used to create this authenticated domain."
}
},
"description": "The DNS records for this authenticated domain."
},
"ips": {
"type": "array",
"items": {},
"description": "The IP addresses that are included in the SPF record for this authenticated domain."
},
"valid": {
"type": "boolean",
"description": "Indicates if this is a valid authenticated domain ."
},
"domain": {
"type": "string",
"description": "The domain authenticated."
},
"legacy": {
"type": "boolean",
"description": "Indicates if this authenticated domain was created using the legacy whitelabel tool. If it is a legacy whitelabel, it will still function, but you'll need to create a new authenticated domain if you need to update it."
},
"default": {
"type": "boolean",
"description": "Indicates if this is the default domain."
},
"user_id": {
"type": "integer",
"description": "The user_id of the account that this authenticated domain is associated with."
},
"username": {
"type": "string",
"description": "The username of the account that this authenticated domain is associated with."
},
"subdomain": {
"type": "string",
"description": "The subdomain that was used to create this authenticated domain."
},
"custom_spf": {
"type": "boolean",
"description": "Indicates if this authenticated domain uses custom SPF."
},
"automatic_security": {
"type": "boolean",
"description": "Indicates if this authenticated domain uses automated security."
}
}
}
email-activity-response-common-fields
{
"type": "object",
"title": "Email Activity Response Common Fields",
"properties": {
"msg_id": {
"type": "string",
"description": "A unique ID assigned to the message. This ID can be used to retrieve activity data for the specific message."
},
"status": {
"enum": [
"processed",
"delivered",
"not delivered"
],
"type": "string",
"description": "The message's status."
},
"subject": {
"type": "string",
"description": "The email's subject line."
},
"to_email": {
"type": "string",
"format": "email",
"description": "The intended recipient's email address."
},
"from_email": {
"type": "string",
"format": "email",
"default": "",
"description": "The 'From' email address used to deliver the message. This address should be a verified sender in your Twilio SendGrid account."
}
}
}
enforced-tls-request-response
{
"type": "object",
"title": "Enforced TLS Request Response",
"example": {
"require_tls": true,
"require_valid_cert": true
},
"properties": {
"require_tls": {
"type": "boolean",
"description": "Indicates if you want to require your recipients to support TLS. "
},
"require_valid_cert": {
"type": "boolean",
"description": "Indicates if you want to require your recipients to have a valid certificate."
}
}
}
error
{
"type": "object",
"title": "error",
"required": [
"message"
],
"properties": {
"field": {
"type": "string"
},
"message": {
"type": "string"
},
"error_id": {
"type": "string"
},
"parameter": {
"type": "string"
}
}
}
errors
{
"type": "object",
"title": "Errors",
"required": [
"errors"
],
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"required": [
"parameter",
"message"
],
"properties": {
"field": {
"type": "string",
"nullable": true
},
"message": {
"type": "string",
"nullable": true,
"description": "A description of what is wrong with the field passed in the request."
},
"parameter": {
"type": "string",
"description": "The parameter in the request body that is incorrect."
}
}
}
}
},
"description": "If the request is incorrect, an array of errors will be returned."
}
errors-seg-v2
{
"type": "object",
"title": "errors-seg",
"required": [
"errors"
],
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"required": [
"field",
"message"
],
"properties": {
"field": {
"type": "string",
"description": "the field in the request body that is incorrect"
},
"message": {
"type": "string",
"description": "a description of what is specifically wrong with the field passed in the request"
}
}
}
}
},
"description": "If the request is incorrect, an array of errors will be returned."
}
event-webhook-response
{
"type": "object",
"title": "Webhooks: Event Webhook Response",
"required": [
"enabled",
"url",
"group_resubscribe",
"delivered",
"group_unsubscribe",
"spam_report",
"bounce",
"deferred",
"unsubscribe",
"processed",
"open",
"click",
"dropped"
],
"properties": {
"url": {
"type": "string",
"description": "The URL that you want the event webhook to POST to."
},
"open": {
"type": "boolean",
"description": "Recipient has opened the HTML message. You need to enable Open Tracking for getting this type of event."
},
"click": {
"type": "boolean",
"description": "Recipient clicked on a link within the message. You need to enable Click Tracking for getting this type of event."
},
"bounce": {
"type": "boolean",
"description": "Receiving server could not or would not accept message."
},
"dropped": {
"type": "boolean",
"description": "You may see the following drop reasons: Invalid SMTPAPI header, Spam Content (if spam checker app enabled), Unsubscribed Address, Bounced Address, Spam Reporting Address, Invalid, Recipient List over Package Quota"
},
"enabled": {
"type": "boolean",
"description": "Indicates if the event webhook is enabled."
},
"deferred": {
"type": "boolean",
"description": "Recipient's email server temporarily rejected message."
},
"delivered": {
"type": "boolean",
"description": "Message has been successfully delivered to the receiving server."
},
"processed": {
"type": "boolean",
"description": "Message has been received and is ready to be delivered."
},
"spam_report": {
"type": "boolean",
"description": "Recipient marked a message as spam."
},
"unsubscribe": {
"type": "boolean",
"description": "Recipient clicked on message's subscription management link. You need to enable Subscription Tracking for getting this type of event."
},
"oauth_client_id": {
"type": "string",
"description": "The client ID Twilio SendGrid sends to your OAuth server or service provider to generate an OAuth access token."
},
"oauth_token_url": {
"type": "string",
"description": "The URL where Twilio SendGrid sends the Client ID and Client Secret to generate an access token. This should be your OAuth server or service provider."
},
"group_resubscribe": {
"type": "boolean",
"description": "Recipient resubscribes to specific group by updating preferences. You need to enable Subscription Tracking for getting this type of event."
},
"group_unsubscribe": {
"type": "boolean",
"description": "Recipient unsubscribe from specific group, by either direct link or updating preferences. You need to enable Subscription Tracking for getting this type of event."
}
}
}
event-webhook-update-oauth-request
{
"type": "object",
"title": "Webhooks: Event Webhook Update with OAuth Request",
"required": [
"enabled",
"url",
"group_resubscribe",
"delivered",
"group_unsubscribe",
"spam_report",
"bounce",
"deferred",
"unsubscribe",
"processed",
"open",
"click",
"dropped"
],
"properties": {
"url": {
"type": "string",
"description": "The URL that you want the event webhook to POST to."
},
"open": {
"type": "boolean",
"description": "Recipient has opened the HTML message. You need to enable Open Tracking for getting this type of event."
},
"click": {
"type": "boolean",
"description": "Recipient clicked on a link within the message. You need to enable Click Tracking for getting this type of event."
},
"bounce": {
"type": "boolean",
"description": "Receiving server could not or would not accept message."
},
"dropped": {
"type": "boolean",
"description": "You may see the following drop reasons: Invalid SMTPAPI header, Spam Content (if spam checker app enabled), Unsubscribed Address, Bounced Address, Spam Reporting Address, Invalid, Recipient List over Package Quota"
},
"enabled": {
"type": "boolean",
"description": "Indicates if the event webhook is enabled."
},
"deferred": {
"type": "boolean",
"description": "Recipient's email server temporarily rejected message."
},
"delivered": {
"type": "boolean",
"description": "Message has been successfully delivered to the receiving server."
},
"processed": {
"type": "boolean",
"description": "Message has been received and is ready to be delivered."
},
"spam_report": {
"type": "boolean",
"description": "Recipient marked a message as spam."
},
"unsubscribe": {
"type": "boolean",
"description": "Recipient clicked on message's subscription management link. You need to enable Subscription Tracking for getting this type of event."
},
"oauth_client_id": {
"type": "string",
"description": "The client ID Twilio SendGrid sends to your OAuth server or service provider to generate an OAuth access token. When passing data in this field, you must also include the oauth_token_url field."
},
"oauth_token_url": {
"type": "string",
"description": "The URL where Twilio SendGrid sends the Client ID and Client Secret to generate an access token. This should be your OAuth server or service provider. When passing data in this field, you must also include the oauth_client_id field."
},
"group_resubscribe": {
"type": "boolean",
"description": "Recipient resubscribes to specific group by updating preferences. You need to enable Subscription Tracking for getting this type of event."
},
"group_unsubscribe": {
"type": "boolean",
"description": "Recipient unsubscribe from specific group, by either direct link or updating preferences. You need to enable Subscription Tracking for getting this type of event."
},
"oauth_client_secret": {
"type": "string",
"description": "This secret is needed only once to create an access token. SendGrid will store this secret, allowing you to update your Client ID and Token URL without passing the secret to SendGrid again. When passing data in this field, you must also include the oauth_client_id and oauth_token_url fields."
}
}
}
from_email_object
{
"type": "object",
"title": "From Email Object",
"example": {
"name": "Jane Doe",
"email": "jane_doe@example.com"
},
"required": [
"email"
],
"properties": {
"name": {
"type": "string",
"description": "A name or title associated with the sending email address."
},
"email": {
"type": "string",
"format": "email",
"description": "The 'From' email address used to deliver the message. This address should be a verified sender in your Twilio SendGrid account."
}
}
}
full-segment
{
"allOf": [
{
"$ref": "#/components/schemas/segment_summary"
},
{
"type": "object",
"required": [
"contacts_sample"
],
"properties": {
"query_json": {
"type": "object",
"description": "AST representation of the query DSL"
},
"contacts_sample": {
"type": "array",
"items": {
"$ref": "#/components/schemas/contact_response"
}
}
}
},
{
"$ref": "#/components/schemas/segment_write_v2"
}
],
"title": "full_segment",
"example": {
"id": "58567a46-305e-48d1-b4f8-a006c906920e",
"name": "culpa",
"query_dsl": "cillum eiusmod",
"created_at": "2085-08-08T21:07:05.692Z",
"updated_at": "4431-05-07T22:23:22.352Z",
"contacts_count": 9266921,
"parent_list_id": "2357714d-3d82-4c80-826c-b44a4147f81c",
"contacts_sample": [
{
"city": "ȎţȸÛ\tč\u000bCŁ",
"country": "do reprehenderit qui",
"last_name": "eiusmod in laboris velit cupidatat",
"contact_id": "c1183ada-b784-49ac-9b1f-50e73578a6dc",
"first_name": "est",
"postal_code": 30296612,
"custom_fields": {
"custom_field_name1": "esse",
"custom_field_name2": "in consectetur ut aliqua sint"
},
"primary_email": "ft88@d.izxx",
"address_line_1": "sunt aliqua",
"address_line_2": "sit proident Lorem veniam labore",
"alternate_emails": [
"yKDUP11FDch@QoU.vwy",
"ZNSN5@czAMqPi.at",
"7wr51kFVVKlcBSH@DWxOueOZepetzBrku.qosk",
"iib-ObtO7Fxz5@vLJPRIFKPOqJGCEqcIDab.ypn"
],
"state_province_region": "ut proident"
}
],
"sample_updated_at": "3407-09-25T04:25:02.140Z",
"next_sample_update": ""
}
}
global_empty_request
{
"title": "Global: Request Empty Body",
"nullable": true
}
global_error_response_schema
{
"type": "object",
"title": "Global Error Response Schema",
"example": {
"errors": [
{
"field": "field_name",
"message": "error message"
}
]
},
"properties": {
"id": {
"type": "string"
},
"errors": {
"type": "array",
"items": {
"type": "object",
"required": [
"message"
],
"properties": {
"help": {
"type": "object",
"description": "helper text or docs for troubleshooting"
},
"field": {
"type": "string",
"nullable": true,
"description": "the field that generated the error"
},
"message": {
"type": "string",
"description": "the error message"
}
}
}
}
}
}
global_id
{
"type": "integer",
"title": "Global: ID"
}
google_analytics_settings
{
"type": "object",
"title": "Settings: Google Analytics",
"example": {
"enabled": true,
"utm_term": "",
"utm_medium": "email",
"utm_source": "sendgrid.com",
"utm_content": "",
"utm_campaign": "website"
},
"properties": {
"enabled": {
"type": "boolean",
"description": "Indicates if Google Analytics is enabled."
},
"utm_term": {
"type": "string",
"description": "Any paid keywords."
},
"utm_medium": {
"type": "string",
"description": "Name of the marketing medium (e.g. \"Email\")."
},
"utm_source": {
"type": "string",
"description": "Name of the referrer source. "
},
"utm_content": {
"type": "string",
"description": "Used to differentiate ads"
},
"utm_campaign": {
"type": "string",
"description": "The name of the campaign."
}
}
}
invalid-email
{
"type": "object",
"title": "Invalid Email",
"example": {
"email": "invalid@example.com",
"reason": "Mail domain mentioned in email address is unknown",
"created": 1620141015
},
"properties": {
"email": {
"type": "string",
"format": "email",
"description": "The email address that was marked as invalid."
},
"reason": {
"type": "string",
"description": "The reason that the email address was marked as invalid."
},
"created": {
"type": "integer",
"description": "A Unix timestamp indicating when the email address was added to the invalid emails list."
}
}
}
ip-access-response
{
"type": "object",
"title": "IP Access Response",
"example": {
"result": [
{
"id": 1,
"ip": "192.168.1.1/32",
"created_at": 1441824715,
"updated_at": 1441824715
},
{
"id": 2,
"ip": "192.0.0.0/8",
"created_at": 1441824715,
"updated_at": 1441824715
},
{
"id": 3,
"ip": "192.168.1.3/32",
"created_at": 1441824715,
"updated_at": 1441824715
}
]
},
"properties": {
"result": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "The ID of the allowed IP."
},
"ip": {
"type": "string",
"description": "The allowed IP."
},
"created_at": {
"type": "integer",
"description": "A Unix timestamp indicating when the IP was added to the allow list."
},
"updated_at": {
"type": "integer",
"description": "A Unix timestamp indicating when the IPs allow status was most recently updated."
}
}
},
"description": "An array listing all of your allowed IPs."
}
}
}
ip_pool
{
"type": "object",
"title": "IP Pools: Pool",
"required": [
"name"
],
"properties": {
"name": {
"type": "string",
"maxLength": 64,
"description": "The name of the IP pool."
}
}
}
ip_pool_response
{
"type": "object",
"title": "IP Pools: Pool Resp",
"example": {
"name": "sunt sint enim"
},
"properties": {
"name": {
"type": "string",
"description": "The name of the IP pool."
}
}
}
ip_warmup_response
{
"type": "array",
"items": {
"type": "object",
"required": [
"ip",
"start_date"
],
"properties": {
"ip": {
"type": "string",
"description": "The IP address."
},
"start_date": {
"type": "integer",
"description": "A Unix timestamp indicating when the IP address entered warmup mode."
}
}
},
"title": "IP Warmup: IP",
"example": [
{
"ip": "0.0.0.0",
"start_date": 1409616000
}
]
}
link
{
"type": "object",
"title": "Link",
"properties": {
"rel": {
"type": "string"
},
"href": {
"type": "string"
}
}
}
link-tracking-metadata
{
"type": "object",
"title": "link tracking metadata",
"properties": {
"next": {
"type": "string",
"format": "uri",
"description": "The URL of the next page of results. If this field isn't present, you're at the end of the list."
},
"prev": {
"type": "string",
"format": "uri",
"description": "The URL of the previous page of results. If this field isn't present, you're at the start of the list."
},
"self": {
"type": "string",
"format": "uri",
"description": "The URL of the current page of results."
},
"count": {
"type": "number",
"description": "The number of items in the entire list, i.e., across all pages."
}
}
}
link_branding_200_response
{
"type": "object",
"title": "Link Branding 200 Response",
"required": [
"id",
"domain",
"username",
"user_id",
"default",
"valid",
"legacy",
"dns"
],
"properties": {
"id": {
"type": "integer",
"description": "The ID of the branded link."
},
"dns": {
"type": "object",
"required": [
"domain_cname"
],
"properties": {
"owner_cname": {
"type": "object",
"required": [
"valid",
"host",
"data"
],
"properties": {
"data": {
"type": "string",
"description": "The domain that the DNS record points to."
},
"host": {
"type": "string",
"description": "Used to verify the link branding. The subdomain of this domain is the ID of the user who created the link branding."
},
"type": {
"enum": [
"cname",
"txt",
"mx"
],
"type": "string",
"description": "The type of DNS record generated."
},
"valid": {
"enum": [
true,
false
],
"type": "boolean",
"description": "Indicates if the DNS record is valid."
}
},
"description": "The DNS record generated to verify who created the link branding."
},
"domain_cname": {
"type": "object",
"required": [
"valid",
"type",
"host",
"data"
],
"properties": {
"data": {
"type": "string",
"description": "The domain that the DNS record points to."
},
"host": {
"type": "string",
"description": "The domain that this link branding will use for the links in your email."
},
"type": {
"enum": [
"cname",
"txt",
"mx"
],
"type": "string",
"description": "The type of DNS record that was generated."
},
"valid": {
"enum": [
true,
false
],
"type": "boolean",
"description": "Indicates if the DNS record is valid."
}
},
"description": "The DNS record generated to point to your link branding subdomain."
}
},
"description": "The DNS records generated for this link branding."
},
"valid": {
"enum": [
true,
false
],
"type": "boolean",
"description": "Indicates if this link branding is valid."
},
"domain": {
"type": "string",
"description": "The root domain of the branded link."
},
"legacy": {
"enum": [
true,
false
],
"type": "boolean",
"description": "Indicates if this link branding was created using the legacy whitelabel tool. If it is a legacy whitelabel, it will still function, but you'll need to create new link branding if you need to update it."
},
"default": {
"enum": [
true,
false
],
"type": "boolean",
"description": "Indicates if this is the default link branding."
},
"user_id": {
"type": "integer",
"description": "The ID of the user that this link branding is associated with."
},
"username": {
"type": "string",
"description": "The username of the account that this link branding is associated with."
},
"subdomain": {
"type": "string",
"description": "The subdomain used to generate the DNS records for this link branding. This subdomain must be different from the subdomain used for your authenticated domain."
}
}
}
list
{
"type": "object",
"title": "list",
"properties": {
"id": {
"type": "string",
"maxLength": 36,
"minLength": 36,
"description": "The generated ID for your list."
},
"name": {
"type": "string",
"description": "The name you gave your list."
},
"_metadata": {
"$ref": "#/components/schemas/selfmetadata"
},
"contact_count": {
"type": "integer",
"description": "The number of contacts currently stored on the list."
}
}
}
mail_batch_id
{
"type": "object",
"title": "Mail Batch ID",
"example": {
"batch_id": "HkJ5yLYULb7Rj8GKSx7u025ouWVlMgAi"
},
"required": [
"batch_id"
],
"properties": {
"batch_id": {
"type": "string",
"pattern": "^[a-zA-Z0-9\\-\\_]"
}
}
}
mail_settings_address_whitelabel
{
"type": "object",
"title": "Mail Settings: Address Whitelabel",
"example": {
"list": [
"email1@example.com",
"example.com"
],
"enabled": true
},
"properties": {
"list": {
"type": "array",
"items": {
"type": "string"
},
"description": "All email addresses that are currently on the whitelist."
},
"enabled": {
"type": "boolean",
"description": "Indicates if you have an email address whitelist enabled. "
}
}
}
mail_settings_bounce_purge
{
"type": "object",
"title": "Mail Settings: Bounce Purge",
"example": {
"enabled": false,
"hard_bounces": null,
"soft_bounces": 1234
},
"properties": {
"enabled": {
"type": "boolean",
"description": "Indicates if the bounce purge mail setting is enabled."
},
"hard_bounces": {
"type": "integer",
"nullable": true,
"description": "The number of days after which SendGrid will purge all contacts from your hard bounces suppression lists."
},
"soft_bounces": {
"type": "integer",
"nullable": true,
"description": "The number of days after which SendGrid will purge all contacts from your soft bounces suppression lists."
}
}
}
mail_settings_footer
{
"type": "object",
"title": "Mail Settings: Footer",
"example": {
"enabled": true,
"html_content": "Example HTML content",
"plain_content": "Example plain content"
},
"properties": {
"enabled": {
"type": "boolean",
"description": "Indicates if the Footer mail setting is currently enabled."
},
"html_content": {
"type": "string",
"description": "The custom HTML content of your email footer."
},
"plain_content": {
"type": "string",
"description": "The plain text content of your email footer."
}
}
}
mail_settings_forward_bounce
{
"type": "object",
"title": "Mail Settings: Forward Bounce",
"example": {
"email": null,
"enabled": false
},
"properties": {
"email": {
"type": "string",
"nullable": true,
"description": "The email address that you would like your bounce reports forwarded to."
},
"enabled": {
"type": "boolean",
"description": "Indicates if the bounce forwarding mail setting is enabled."
}
}
}
mail_settings_forward_spam
{
"type": "object",
"title": "Mail Settings: Forward Spam",
"example": {
"email": "",
"enabled": true
},
"properties": {
"email": {
"type": "string",
"description": "The email address where you would like the spam reports to be forwarded."
},
"enabled": {
"type": "boolean",
"description": "Indicates if the Forward Spam setting is enabled."
}
}
}
mail_settings_patch
{
"type": "object",
"title": "Mail Settings: Patch",
"example": {
"email": "email@example.com",
"enabled": true
},
"properties": {
"email": {
"type": "string",
"description": "The email address of the recipient."
},
"enabled": {
"type": "boolean",
"description": "Indicates if the mail setting is enabled."
}
}
}
mail_settings_template
{
"type": "object",
"title": "Mail Settings: Template",
"example": {
"enabled": false,
"html_content": "<p><% body %>Example</p>\n"
},
"properties": {
"enabled": {
"type": "boolean",
"description": "Indicates if the legacy email template setting is enabled."
},
"html_content": {
"type": "string",
"description": "The HTML content that you want to use for your legacy email template."
}
}
}
mako_event
{
"type": "object",
"title": "Event",
"example": {
"url": "http://3LX,MU}N=B8'd,K}>bEma{l~!ad%peIF}y>qHfLPWQ$l9b\\!6.1H?$Z9H\"il-_gZD>/JPYsGqH4x4_3v090TCtnFalXGFiAdooDxgrDAYNXShUywSxwYr8gKeyc/4sal4VJ3IxEWsG74V5MYQ0mz27jhy7n5DHsUtApQ6zXHS13uO5vYBlJHpJRfuT6/F5nIpkHre2w3eTtN7M6pg9V5stjnnsavKkzQxyTv15CMSDLFwR_BTZwofhWpyBU7B9ypYL79vT97N3LDZyoaM/fNsOLPIqfGBer_Mx9_StergbQYANyOmOSjR6pZof01ky/ZcNDhpu3CkSl4MTtQ3NMCX780pOKQ5SYIPigyvz9IC9WtrCNcOkTxdOPdY0_4MJU4EuTTPmGvO/14KaJCDjIjgrbIqpzuUEL5mET0t2VeVlwvtnOnlHaBE8sic20ze2E0Xt3ETqXyzVJRjLDKh/LWkW8OVp_xkLBCCW7LQngRukKcOiWjMXeCEhYI9HoZ0RsMEWZC8KzRaHc4OI0uXPD4M9pav1LGrI/_0t_RnBnfnqGKsBJr0kdQi/Y6QN_aeawIqX5hDNIU3MF/wWKVWLS0ZFbDfK6KVv5oAid83EpwKoazAMA8MTfEXvHQLO7k7XYWX1Il3eGXL6/wCA96I1SOabzJkZHo2HsFpIC/VBk52Lnpp0xtDH/OCdlQ5e4PpxXQeklp70LPOndr7QKSYEQNUc48n36ixvTjhgpgO8wHsFFYqGcuBMHg9oaCARppQomiQDWYuVPVDynJHdsM1_gWl4/NSs8Y9PL7DrQXOu0UiFRRE0TUsvgqyUgJzlGjUnRziyYeROO75D0K_3aTtbGbCmhaxecos40a1w0PDCNkFp1W/iHwY7922drhsoM6ShwqqwGpAh5HLuU6Q5gqyckeai6YN7HCh9DdHPhhJcatgtMHZDKfQUBVt9ecUlDgiCFF_OnRX/GpzttcsL8E2FoXL9_eAWvSqjodROqx7MZCA/ORdnR/IssPCYP1kTHTIL5mZxv4UGEpyNjUzt4GdSJJTm0nztltWDYX8_Ezl2JvpLVnGVTJxobb4yQIJhe3n64khbOFyFLKHWEniIolm/AxpZQYmseWlVqrIz3YXU59XaSbTTrdCHNhvwF1ogXiiggN6TZ2B3QY_mBEtAp/SD0ONPVqEUkTNAFWTgnnlv6ZIMdMbTw5uZwtFRlB7qDvQouml9kujGmRu6k7zZMTOwWowRNtpboLUcL2NzkVgK6N1Zi2vq/Nt4NJvM5_l1dpIIbwJv_CIcZQZOqPtRWULa2iVxfmJJQaqgLQPwSHQH1zuRJMhraEsPjqVQRC0pZpSt/24VBDN8y31Ye/y_ekWxMdZCvr978C/WrdcTi29kxjJLyT9BII7BsgT5vLuI2l7ntqRAhAUWMs/h9JR0i8RbX5OfB46q41/TfmSdgi97bCR2HfgflyypXwKhRfKYU2MVpu2Dd90WQUlm7hZV8dSfGusuMj/nPMpRVWcbnvlAdsehJCPbLv6n4qdLSPeoMBo32acAGgu1BwBG8JsBgbH43yYi5X7UdGRWKqm_ZbqaDEKH3ncU/uA8EOJb41VfGho4LUeOi1IeYwVAhFEyO6YbteYZecEubrNFZrWWjZUqhzouzY95TeWU8E4StCXVPKlYPiFiwUSX20kG0lVtDbAy/7u4f4x0cYlFOvI1UN1qoOExmNxnxzQQFeM5exWfW2JrRXq5e0UdAJr4q2o9Y_0WaGfhL/nP6Ei06YajDKr11dK5H0LX/9CGTC37HFZeopyopzP_7fvGFkqIRoGTS48pLaIFz3gwpQNlWXUFCsd/PnRlsqJ3SBQSgp_AQe2cP6iBNy2bJI8lkxwY5YVDDdjxusuCcafdjfs2aUa/4tr_iMnNBnd27GxjQI28_JGJlfbOaajVJOxuPMT4ELpYCfPiFjdSbJyE0/gCwtj0rgDKSLWJnOPJ5TAJ935gCqeIsBhOhfcZX413GdilBZRRYEjCVKfOuWzHZ3GW/8yjyk5e_WMNv5F6xggl07w90DBwpx/Q/iWfncqMuSfoeFeqHQkDL9F5W19j1cGuAcyfIYMAXztHXpgTKh9vZcsLYC7LcgKr4FQj3JjEvtnDG2PjcMjGF/MnbCRCz22Ho410_vE9M1Hpq0wdk_i5DbZKNoSwlPgey9URkpuX146TcDdsx_VWDenCepY5HwMr9CPOY9hzUs/c5AWeUMXk/gvsI81Jkv5rHpEnNBUZXYzfqkwQfffhmrc/StLCtzRRlja8dpsEWdkzoKR9Kdxq1qAs5f0sdrGjVRLTT_s1Q2P59zhA/QmS4bubi64cYot3gSIgdNnkjA2GjCp1ETVa548_U9B6boTKDVmaKJlVIDvqL84RC3WI7Er/8opi2lZ48W83Ur47BRh38oOnI0agrCyZz8bp1w_gfVRlSO8PS0i/l_/qxq5xpLbhPkdxVoyZVsNAZchfnmkIHyIk5IK6EUDXdMR21y6OvKW50ZbooAtk9ymynBj4dAYMsd25RV7FE1I1vRTsiDw52/.E5WC0Ymo2zn.qelSbhzr-4laArYiWP.dwJB6qm_6rs0Rm5UXYaYtUNbh76_jJp_X1xQUCDSgbr2KOkDU0\"Q/-4dV\"Yk3QGg[(O86=Pf\"e17K4'r{)kicofHSXcMmP@>VF^`~4j4F*L/1]tD+Lw!WI!@]*OZm6C`M$u96}*O<U;_cZ84k.|nIqpAaeiroItOenDBL",
"reason": "some reason",
"mx_server": "quis proident",
"processed": "2017-10-13T18:56:21.000Z",
"event_name": "bounced",
"bounce_type": "blocked",
"http_user_agent": "in tempor ex dolore est"
},
"required": [
"event_name",
"processed",
"url",
"bounce_type",
"http_user_agent",
"mx_server"
],
"properties": {
"url": {
"type": "string",
"pattern": "^((http[s]?|ftp):\\/)?\\/?([^:\\/\\s]+)((\\/\\w+)*\\/)([\\w\\-\\.]+[^#?\\s]+)(.*)?(#[\\w\\-]+)?$",
"description": "Used with \"clicked\" event to indicate which url the user clicked."
},
"reason": {
"type": "string",
"maxLength": 1024,
"description": "Explanation of what caused \"bounced\", \"deferred\", or \"blocked\". Usually contains error message from the server - e.g. message from gmail why mail was deferred"
},
"mx_server": {
"type": "string",
"description": "For example mx.gmail.com"
},
"processed": {
"type": "string",
"description": "Date of when event occurred"
},
"event_name": {
"enum": [
"bounced",
"opened",
"clicked",
"processed",
"dropped",
"delivered",
"deferred",
"spam_report",
"unsubscribe",
"group_unsubscribe",
"group_resubscribe"
],
"type": "string",
"description": "Name of event"
},
"attempt_num": {
"type": "integer",
"maximum": 10,
"minimum": 1,
"description": "Used with \"deferred\" events to indicate the attempt number out of 10. One \"deferred\" entry will exists under events array for each time a message was deferred with error message from the server. "
},
"bounce_type": {
"enum": [
"bounced",
"blocked",
"expired"
],
"type": "string",
"description": "Use to distinguish between types of bounces"
},
"http_user_agent": {
"type": "string",
"description": "Client recipient used to click or open message"
}
}
}
message
{
"type": "object",
"title": "Message",
"example": {
"events": [
{
"processed": 1492453589,
"event_name": "bounced",
"server_response": "some error message"
}
],
"msg_id": "in aliquip id aliqua",
"status": "not delivered",
"subject": "est incididunt adipisicing pariatur",
"teammate": "",
"to_email": "send@test.com",
"api_key_id": "sdfsdfsdf123",
"categories": [
"hi",
"bye"
],
"from_email": "test@test.com",
"outbound_ip": "1.2.3.4",
"template_id": "123e4567-e89b-12d3-a456-426655440000",
"unique_args": "{'key': 'value'}",
"asm_group_id": 11376349,
"originating_ip": "2.3.4.5",
"outbound_ip_type": "dedicated"
},
"required": [
"from_email",
"msg_id",
"subject",
"to_email",
"status",
"template_id",
"asm_group_id",
"teammate",
"api_key_id",
"events",
"originating_ip",
"categories",
"unique_args",
"outbound_ip",
"outbound_ip_type"
],
"properties": {
"events": {
"type": "array",
"items": {
"type": "object",
"title": "Event",
"example": {
"url": "http://3LX,MU}N=B8'd,K}>bEma{l~!ad%peIF}y>qHfLPWQ$l9b\\!6.1H?$Z9H\"il-_gZD>/JPYsGqH4x4_3v090TCtnFalXGFiAdooDxgrDAYNXShUywSxwYr8gKeyc/4sal4VJ3IxEWsG74V5MYQ0mz27jhy7n5DHsUtApQ6zXHS13uO5vYBlJHpJRfuT6/F5nIpkHre2w3eTtN7M6pg9V5stjnnsavKkzQxyTv15CMSDLFwR_BTZwofhWpyBU7B9ypYL79vT97N3LDZyoaM/fNsOLPIqfGBer_Mx9_StergbQYANyOmOSjR6pZof01ky/ZcNDhpu3CkSl4MTtQ3NMCX780pOKQ5SYIPigyvz9IC9WtrCNcOkTxdOPdY0_4MJU4EuTTPmGvO/14KaJCDjIjgrbIqpzuUEL5mET0t2VeVlwvtnOnlHaBE8sic20ze2E0Xt3ETqXyzVJRjLDKh/LWkW8OVp_xkLBCCW7LQngRukKcOiWjMXeCEhYI9HoZ0RsMEWZC8KzRaHc4OI0uXPD4M9pav1LGrI/_0t_RnBnfnqGKsBJr0kdQi/Y6QN_aeawIqX5hDNIU3MF/wWKVWLS0ZFbDfK6KVv5oAid83EpwKoazAMA8MTfEXvHQLO7k7XYWX1Il3eGXL6/wCA96I1SOabzJkZHo2HsFpIC/VBk52Lnpp0xtDH/OCdlQ5e4PpxXQeklp70LPOndr7QKSYEQNUc48n36ixvTjhgpgO8wHsFFYqGcuBMHg9oaCARppQomiQDWYuVPVDynJHdsM1_gWl4/NSs8Y9PL7DrQXOu0UiFRRE0TUsvgqyUgJzlGjUnRziyYeROO75D0K_3aTtbGbCmhaxecos40a1w0PDCNkFp1W/iHwY7922drhsoM6ShwqqwGpAh5HLuU6Q5gqyckeai6YN7HCh9DdHPhhJcatgtMHZDKfQUBVt9ecUlDgiCFF_OnRX/GpzttcsL8E2FoXL9_eAWvSqjodROqx7MZCA/ORdnR/IssPCYP1kTHTIL5mZxv4UGEpyNjUzt4GdSJJTm0nztltWDYX8_Ezl2JvpLVnGVTJxobb4yQIJhe3n64khbOFyFLKHWEniIolm/AxpZQYmseWlVqrIz3YXU59XaSbTTrdCHNhvwF1ogXiiggN6TZ2B3QY_mBEtAp/SD0ONPVqEUkTNAFWTgnnlv6ZIMdMbTw5uZwtFRlB7qDvQouml9kujGmRu6k7zZMTOwWowRNtpboLUcL2NzkVgK6N1Zi2vq/Nt4NJvM5_l1dpIIbwJv_CIcZQZOqPtRWULa2iVxfmJJQaqgLQPwSHQH1zuRJMhraEsPjqVQRC0pZpSt/24VBDN8y31Ye/y_ekWxMdZCvr978C/WrdcTi29kxjJLyT9BII7BsgT5vLuI2l7ntqRAhAUWMs/h9JR0i8RbX5OfB46q41/TfmSdgi97bCR2HfgflyypXwKhRfKYU2MVpu2Dd90WQUlm7hZV8dSfGusuMj/nPMpRVWcbnvlAdsehJCPbLv6n4qdLSPeoMBo32acAGgu1BwBG8JsBgbH43yYi5X7UdGRWKqm_ZbqaDEKH3ncU/uA8EOJb41VfGho4LUeOi1IeYwVAhFEyO6YbteYZecEubrNFZrWWjZUqhzouzY95TeWU8E4StCXVPKlYPiFiwUSX20kG0lVtDbAy/7u4f4x0cYlFOvI1UN1qoOExmNxnxzQQFeM5exWfW2JrRXq5e0UdAJr4q2o9Y_0WaGfhL/nP6Ei06YajDKr11dK5H0LX/9CGTC37HFZeopyopzP_7fvGFkqIRoGTS48pLaIFz3gwpQNlWXUFCsd/PnRlsqJ3SBQSgp_AQe2cP6iBNy2bJI8lkxwY5YVDDdjxusuCcafdjfs2aUa/4tr_iMnNBnd27GxjQI28_JGJlfbOaajVJOxuPMT4ELpYCfPiFjdSbJyE0/gCwtj0rgDKSLWJnOPJ5TAJ935gCqeIsBhOhfcZX413GdilBZRRYEjCVKfOuWzHZ3GW/8yjyk5e_WMNv5F6xggl07w90DBwpx/Q/iWfncqMuSfoeFeqHQkDL9F5W19j1cGuAcyfIYMAXztHXpgTKh9vZcsLYC7LcgKr4FQj3JjEvtnDG2PjcMjGF/MnbCRCz22Ho410_vE9M1Hpq0wdk_i5DbZKNoSwlPgey9URkpuX146TcDdsx_VWDenCepY5HwMr9CPOY9hzUs/c5AWeUMXk/gvsI81Jkv5rHpEnNBUZXYzfqkwQfffhmrc/StLCtzRRlja8dpsEWdkzoKR9Kdxq1qAs5f0sdrGjVRLTT_s1Q2P59zhA/QmS4bubi64cYot3gSIgdNnkjA2GjCp1ETVa548_U9B6boTKDVmaKJlVIDvqL84RC3WI7Er/8opi2lZ48W83Ur47BRh38oOnI0agrCyZz8bp1w_gfVRlSO8PS0i/l_/qxq5xpLbhPkdxVoyZVsNAZchfnmkIHyIk5IK6EUDXdMR21y6OvKW50ZbooAtk9ymynBj4dAYMsd25RV7FE1I1vRTsiDw52/.E5WC0Ymo2zn.qelSbhzr-4laArYiWP.dwJB6qm_6rs0Rm5UXYaYtUNbh76_jJp_X1xQUCDSgbr2KOkDU0\"Q/-4dV\"Yk3QGg[(O86=Pf\"e17K4'r{)kicofHSXcMmP@>VF^`~4j4F*L/1]tD+Lw!WI!@]*OZm6C`M$u96}*O<U;_cZ84k.|nIqpAaeiroItOenDBL",
"reason": "some reason",
"mx_server": "quis proident",
"processed": "2017-10-13T18:56:21.000Z",
"event_name": "bounced",
"bounce_type": "blocked",
"http_user_agent": "in tempor ex dolore est"
},
"required": [
"event_name",
"processed",
"url",
"bounce_type",
"http_user_agent",
"mx_server"
],
"properties": {
"url": {
"type": "string",
"pattern": "^((http[s]?|ftp):\\/)?\\/?([^:\\/\\s]+)((\\/\\w+)*\\/)([\\w\\-\\.]+[^#?\\s]+)(.*)?(#[\\w\\-]+)?$",
"description": "Used with \"clicked\" event to indicate which url the user clicked."
},
"reason": {
"type": "string",
"maxLength": 1024,
"description": "Explanation of what caused \"bounced\", \"deferred\", or \"blocked\". Usually contains error message from the server - e.g. message from gmail why mail was deferred"
},
"mx_server": {
"type": "string",
"description": "For example mx.gmail.com"
},
"processed": {
"type": "string",
"description": "Date of when event occurred"
},
"event_name": {
"enum": [
"bounced",
"opened",
"clicked",
"processed",
"dropped",
"delivered",
"deferred",
"spam_report",
"unsubscribe",
"group_unsubscribe",
"group_resubscribe"
],
"type": "string",
"description": "Name of event"
},
"attempt_num": {
"type": "integer",
"maximum": 10,
"minimum": 1,
"description": "Used with \"deferred\" events to indicate the attempt number out of 10. One \"deferred\" entry will exists under events array for each time a message was deferred with error message from the server. "
},
"bounce_type": {
"enum": [
"bounced",
"blocked",
"expired"
],
"type": "string",
"description": "Use to distinguish between types of bounces"
},
"http_user_agent": {
"type": "string",
"description": "Client recipient used to click or open message"
}
}
},
"description": "List of events related to email message"
},
"msg_id": {
"type": "string",
"pattern": "^[A-Za-z0-9]+",
"maxLength": 50,
"minLength": 5
},
"status": {
"enum": [
"processed",
"not delivered",
"delivered"
],
"type": "string",
"description": "Quick summary of the status of a message"
},
"subject": {
"type": "string",
"maxLength": 255,
"minLength": 3
},
"teammate": {
"type": "string",
"pattern": "^$|^[A-Za-z0-9]+",
"maxLength": 64,
"minLength": 0,
"description": "Teammate's username"
},
"to_email": {
"type": "string",
"pattern": "\\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,}\\b"
},
"api_key_id": {
"type": "string",
"pattern": "^[A-Za-z0-9]+",
"maxLength": 50,
"minLength": 3
},
"categories": {
"type": "array",
"items": {
"type": "string"
},
"description": "Categories users associated to the message"
},
"from_email": {
"type": "string",
"pattern": "\\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,}\\b"
},
"outbound_ip": {
"type": "string",
"format": "ipv4",
"description": "IP used to send to the remote MTA. Used by UI to display IP in detailed view"
},
"template_id": {
"type": "string",
"format": "uuid"
},
"unique_args": {
"type": "string",
"default": "Null",
"description": "JSON hash of arbitrary key-value pairs"
},
"asm_group_id": {
"type": "integer",
"minimum": 1
},
"originating_ip": {
"type": "string",
"format": "ipv4",
"description": "This is the IP of the user who sent the message."
},
"outbound_ip_type": {
"enum": [
"dedicated",
"shared"
],
"type": "string",
"description": "Whether or not the outbound IP is dedicated vs shared"
}
}
}
metadata
{
"type": "object",
"title": "metadata",
"properties": {
"next": {
"type": "string",
"format": "uri",
"description": "The URL of the next page of results. If this field isn't present, you're at the end of the list."
},
"prev": {
"type": "string",
"format": "uri",
"description": "The URL of the previous page of results. If this field isn't present, you're at the start of the list."
},
"self": {
"type": "string",
"format": "uri",
"description": "The URL of the current page of results."
},
"count": {
"type": "number",
"description": "The number of items in the entire list, i.e., across all pages."
}
}
}
metrics
{
"type": "object",
"title": "metrics",
"required": [
"bounce_drops",
"bounces",
"clicks",
"delivered",
"invalid_emails",
"opens",
"requests",
"spam_report_drops",
"spam_reports",
"unique_clicks",
"unique_opens",
"unsubscribes"
],
"properties": {
"opens": {
"type": "integer"
},
"clicks": {
"type": "integer"
},
"bounces": {
"type": "integer"
},
"requests": {
"type": "integer"
},
"delivered": {
"type": "integer"
},
"bounce_drops": {
"type": "integer"
},
"spam_reports": {
"type": "integer"
},
"unique_opens": {
"type": "integer"
},
"unsubscribes": {
"type": "integer"
},
"unique_clicks": {
"type": "integer"
},
"invalid_emails": {
"type": "integer"
},
"spam_report_drops": {
"type": "integer"
}
}
}
monitor
{
"type": "object",
"title": "Create monitor settings request",
"example": {
"email": "example@example.com",
"frequency": 50000
},
"required": [
"email",
"frequency"
],
"properties": {
"email": {
"type": "string",
"format": "email",
"description": "The email address to which Sendgrid should send emails for monitoring."
},
"frequency": {
"type": "number",
"description": "The frequency at which to forward monitoring emails. An email will be sent when your subuser sends this many (e.g., 1,000) emails."
}
}
}
parse-setting
{
"type": "object",
"title": "Parse Setting",
"example": {
"url": "http://email.myhostname.com",
"hostname": "myhostname.com",
"send_raw": true,
"spam_check": false
},
"properties": {
"url": {
"type": "string",
"description": "The public URL where you would like SendGrid to POST the data parsed from your email. Any emails sent with the given hostname provided (whose MX records have been updated to point to SendGrid) will be parsed and POSTed to this URL."
},
"hostname": {
"type": "string",
"description": "A specific and unique domain or subdomain that you have created to use exclusively to parse your incoming email. For example, `parse.yourdomain.com`."
},
"send_raw": {
"type": "boolean",
"description": "Indicates if you would like SendGrid to post the original MIME-type content of your parsed email. When this parameter is set to `true`, SendGrid will send a JSON payload of the content of your email."
},
"spam_check": {
"type": "boolean",
"description": "Indicates if you would like SendGrid to check the content parsed from your emails for spam before POSTing them to your domain."
}
}
}
partner_settings_new_relic
{
"type": "object",
"title": "Partner Settings: New Relic",
"required": [
"enabled",
"license_key"
],
"properties": {
"enabled": {
"type": "boolean",
"description": "Indicates if this setting is enabled. "
},
"license_key": {
"type": "string",
"description": "The license key provided with your New Relic account."
},
"enable_subuser_statistics": {
"type": "boolean",
"description": "Indicates if your subuser statistics will be sent to your New Relic Dashboard."
}
}
}
reply_to_email_object
{
"type": "object",
"title": "Reply_to Email Object",
"example": {
"name": "Jane Doe",
"email": "jane_doe@example.com"
},
"required": [
"email"
],
"properties": {
"name": {
"type": "string",
"description": "A name or title associated with the `reply_to` email address."
},
"email": {
"type": "string",
"format": "email",
"description": "The email address where any replies or bounces will be returned."
}
}
}
reserved_field_definitions_response
{
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"maxLength": 100,
"minLength": 1
},
"read_only": {
"type": "boolean",
"default": false,
"description": "When `true` this means API consumers are unable to set the value of this field on contacts."
},
"field_type": {
"enum": [
"Text",
"Number",
"Date"
],
"type": "string"
}
}
},
"title": "reserved_field_definitions_response",
"example": [
{
"id": "_rf20_TX",
"name": "automation_id",
"read_only": true,
"field_type": "Text"
}
],
"required": [
"name",
"field_type"
]
}
reverse_dns
{
"type": "object",
"title": "Reverse DNS",
"example": {
"id": 1,
"ip": "192.168.1.1",
"rdns": "o1.email.example.com",
"users": [
{
"user_id": 7,
"username": "john@example.com"
},
{
"user_id": 8,
"username": "jane@example.com"
}
],
"valid": true,
"domain": "example.com",
"legacy": false,
"a_record": {
"data": "192.168.1.1",
"host": "o1.email.example.com",
"type": "a",
"valid": true
},
"subdomain": "email"
},
"required": [
"id",
"ip",
"rdns",
"users",
"domain",
"valid",
"legacy",
"a_record"
],
"properties": {
"id": {
"type": "integer",
"description": "The ID of the Reverse DNS."
},
"ip": {
"type": "string",
"description": "The IP address that this Reverse DNS was created for."
},
"rdns": {
"type": "string",
"description": "The reverse DNS record for the IP address. This points to the Reverse DNS subdomain."
},
"users": {
"type": "array",
"items": {
"type": "object",
"required": [
"username",
"user_id"
],
"properties": {
"user_id": {
"type": "integer",
"description": "The ID of a user who can send mail from the IP address."
},
"username": {
"type": "string",
"description": "The username of a user who can send mail from the IP address."
}
}
},
"description": "The users who are able to send mail from the IP address."
},
"valid": {
"type": "boolean",
"description": "Indicates if this is a valid Reverse DNS."
},
"domain": {
"type": "string",
"description": "The root, or sending, domain."
},
"legacy": {
"type": "boolean",
"description": "Indicates if this Reverse DNS was created using the legacy whitelabel tool. If it is a legacy whitelabel, it will still function, but you'll need to create a new Reverse DNS if you need to update it."
},
"a_record": {
"type": "object",
"required": [
"valid",
"type",
"host",
"data"
],
"properties": {
"data": {
"type": "string",
"description": "The IP address being set up with Reverse DNS."
},
"host": {
"type": "string",
"description": "This is the web address that will be mapped to the IP address."
},
"type": {
"type": "string",
"description": "The type of DNS record."
},
"valid": {
"type": "boolean",
"description": "Indicates if the a_record is valid."
}
}
},
"subdomain": {
"type": "string",
"description": "The subdomain created for this reverse DNS. This is where the rDNS record points."
},
"last_validation_attempt_at": {
"type": "integer",
"description": "A Unix epoch timestamp representing the last time of a validation attempt."
}
}
}
segment_query_json
{
"type": "object",
"title": "segment_query_json",
"properties": {
"contacts": {
"type": "object",
"properties": {
"l": {
"type": "object",
"properties": {
"l": {
"type": "object",
"properties": {
"l": {
"type": "object",
"properties": {
"t": {
"type": "string"
},
"v": {
"type": "string"
}
}
},
"r": {
"type": "object",
"properties": {
"t": {
"type": "string"
},
"v": {
"type": "string"
}
}
},
"op": {
"type": "string"
}
}
},
"r": {
"type": "object",
"properties": {
"l": {
"type": "object",
"properties": {
"t": {
"type": "string"
},
"v": {
"type": "string"
},
"args": {
"type": "array",
"items": {
"type": "object",
"properties": {
"t": {
"type": "string"
},
"v": {
"type": "string"
}
}
}
}
}
},
"r": {
"type": "object",
"properties": {
"t": {
"type": "string"
},
"v": {
"type": "string"
}
}
},
"op": {
"type": "string"
}
}
},
"op": {
"type": "string"
}
}
},
"r": {
"type": "object",
"properties": {
"l": {
"type": "object",
"properties": {
"t": {
"type": "string"
},
"v": {
"type": "string"
}
}
},
"r": {
"type": "object",
"properties": {
"t": {
"type": "string"
},
"v": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"op": {
"type": "string"
}
}
},
"op": {
"type": "string"
}
}
}
}
}
segment_response
{
"type": "object",
"title": "segment_response",
"required": [
"id",
"name",
"query_dsl",
"contacts_count",
"contacts_sample",
"created_at",
"updated_at",
"sample_updated_at",
"next_sample_update",
"parent_list_ids",
"query_version",
"status"
],
"properties": {
"id": {
"type": "string",
"format": "uuid",
"maxLength": 36,
"minLength": 36,
"description": "ID assigned to the segment when created."
},
"name": {
"type": "string",
"maxLength": 100,
"minLength": 1,
"description": "Name of the segment."
},
"status": {
"$ref": "#/components/schemas/segment_status_response"
},
"query_dsl": {
"type": "string",
"description": "SQL query which will filter contacts based on the conditions provided"
},
"created_at": {
"type": "string",
"description": "ISO8601 timestamp of when the object was created"
},
"updated_at": {
"type": "string",
"description": "ISO8601 timestamp of when the object was last updated"
},
"query_version": {
"type": "string",
"description": "If not set, segment contains a Query for use with Segment v1 APIs. If set to '2', segment contains a SQL query for use in v2."
},
"contacts_count": {
"type": "integer",
"description": "Total number of contacts present in the segment"
},
"contacts_sample": {
"type": "array",
"items": {
"$ref": "#/components/schemas/contact_response"
},
"description": "A subset of all contacts that are in this segment"
},
"parent_list_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "The array of list ids to filter contacts on when building this segment. It allows only one such list id for now. We will support more in future",
"uniqueItems": true
},
"sample_updated_at": {
"type": "string",
"description": "ISO8601 timestamp of when the samples were last updated"
},
"next_sample_update": {
"type": "string",
"description": "ISO8601 timestamp of when the samples will be next updated"
}
}
}
segment_status_response
{
"type": "object",
"title": "segment_status_response",
"required": [
"query_validation"
],
"properties": {
"error_message": {
"type": "string",
"description": "Describes any errors that were encountered during query validation"
},
"query_validation": {
"type": "string",
"description": "Status of query validation. PENDING, VALID, or INVALID"
}
},
"description": "Segment status indicates whether the segment's contacts will be updated periodically"
}
segment_summary
{
"type": "object",
"title": "segment_summary",
"required": [
"id",
"contacts_count",
"created_at",
"sample_updated_at",
"updated_at"
],
"properties": {
"id": {
"type": "string",
"format": "uuid",
"maxLength": 36,
"minLength": 36
},
"name": {
"type": "string",
"maxLength": 100,
"minLength": 1
},
"created_at": {
"type": "string",
"format": "date-time",
"description": "ISO8601 of created timestamp\n"
},
"updated_at": {
"type": "string",
"format": "date-time",
"description": "ISO8601 timestamp the object was last updated"
},
"contacts_count": {
"type": "integer"
},
"parent_list_id": {
"type": "string",
"format": "uuid",
"maxLength": 36,
"minLength": 36,
"description": "The id of the list if this segment is a child of a list. This implies the query `AND CONTAINS(list_ids, ${parent_list_id})`"
},
"sample_updated_at": {
"type": "string",
"format": "date-time",
"description": "ISO8601 timestamp the sample was last updated"
},
"next_sample_update": {
"type": "string",
"description": "ISO8601 string that is equal to `sample_updated_at` plus an internally calculated offset that depends on how often contacts enter or exit segments as the scheduled pipeline updates the samples."
}
}
}
segment_summary_v2
{
"type": "object",
"title": "segment_summary",
"properties": {
"results": {
"type": "array",
"items": {
"$ref": "#/components/schemas/segment_summary"
}
}
},
"description": ""
}
segment_update
{
"type": "object",
"title": "segment_update",
"properties": {
"name": {
"type": "string",
"maxLength": 100,
"minLength": 1,
"description": "Name of the segment."
},
"query_dsl": {
"type": "string",
"description": "SQL query which will filter contacts based on the conditions provided"
}
}
}
segment_write
{
"type": "object",
"title": "segment_write",
"required": [
"name",
"query_dsl"
],
"properties": {
"name": {
"type": "string",
"maxLength": 100,
"minLength": 1
},
"query_dsl": {
"type": "string",
"description": "Use this field for adding your query string."
}
}
}
segment_write_v2
{
"type": "object",
"title": "segment_write",
"required": [
"name",
"query_dsl"
],
"properties": {
"name": {
"type": "string",
"maxLength": 100,
"minLength": 1,
"description": "Name of the segment."
},
"query_dsl": {
"type": "string",
"description": "SQL query which will filter contacts based on the conditions provided"
},
"parent_list_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "The array of list ids to filter contacts on when building this segment. It allows only one such list id for now. We will support more in future",
"uniqueItems": true
}
}
}
selfmetadata
{
"type": "object",
"title": "selfMetadata",
"properties": {
"self": {
"type": "string",
"description": "A link to this object."
}
}
}
sender-id-request
{
"type": "object",
"title": "Sender ID Request",
"example": {
"zip": "80202",
"city": "Denver",
"from": {
"name": "Example INC",
"email": "from@example.com"
},
"state": "Colorado",
"address": "123 Elm St.",
"country": "United States",
"nickname": "My Sender ID",
"reply_to": {
"name": "Example INC",
"email": "replyto@example.com"
},
"address_2": "Apt. 456"
},
"properties": {
"zip": {
"type": "string",
"description": "The zipcode of the sender identity."
},
"city": {
"type": "string",
"description": "The city of the sender identity."
},
"from": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The name appended to the from email field. Typically your name or company name."
},
"email": {
"type": "string",
"description": "The email address from which your recipient will receive emails."
}
}
},
"state": {
"type": "string",
"description": "The state of the sender identity."
},
"address": {
"type": "string",
"description": "The physical address of the sender identity."
},
"country": {
"type": "string",
"description": "The country of the sender identity."
},
"nickname": {
"type": "string",
"description": "A nickname for the sender identity. Not used for sending."
},
"reply_to": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The name appended to the reply to email field. Typically your name or company name."
},
"email": {
"type": "string",
"description": "The email address to which your recipient will reply."
}
}
},
"address_2": {
"type": "string",
"description": "Additional sender identity address information."
}
}
}
senderID
{
"allOf": [
{
"$ref": "#/components/schemas/sender-id-request"
},
{
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "The unique identifier of the sender identity."
},
"locked": {
"type": "boolean",
"description": "True when the sender id is associated to a campaign in the Draft, Scheduled, or In Progress status. You cannot update or delete a locked sender identity."
},
"verified": {
"type": "boolean",
"description": "If the sender identity is verified or not. Only verified sender identities can be used to send email."
},
"created_at": {
"type": "integer",
"description": "The time the sender identity was created."
},
"updated_at": {
"type": "integer",
"description": "The time the sender identity was last updated."
}
}
},
{
"type": "object",
"required": [
"nickname",
"address",
"city",
"country"
]
}
],
"title": "Sender ID",
"example": {
"id": 1,
"zip": "80202",
"city": "Denver",
"from": {
"name": "Example INC",
"email": "from@example.com"
},
"state": "Colorado",
"locked": false,
"address": "123 Elm St.",
"country": "United States",
"nickname": "My Sender ID",
"reply_to": {
"name": "Example INC",
"email": "replyto@example.com"
},
"verified": true,
"address_2": "Apt. 456",
"created_at": 1449872165,
"updated_at": 1449872165
}
}
senders-id-request-body
{
"type": "object",
"title": "Senders ID Request Body",
"required": [
"nickname",
"from",
"address",
"city",
"country"
],
"properties": {
"zip": {
"type": "string",
"description": "The zipcode of the sender identity."
},
"city": {
"type": "string",
"description": "The city of the sender identity."
},
"from": {
"type": "object",
"required": [
"email",
"name"
],
"properties": {
"name": {
"type": "string",
"description": "This is the name appended to the from email field. IE - Your name or company name."
},
"email": {
"type": "string",
"description": "This is where the email will appear to originate from for your recipient"
}
}
},
"state": {
"type": "string",
"description": "The state of the sender identity."
},
"address": {
"type": "string",
"description": "The physical address of the sender identity."
},
"country": {
"type": "string",
"description": "The country of the sender identity."
},
"nickname": {
"type": "string",
"description": "A nickname for the sender identity. Not used for sending."
},
"reply_to": {
"type": "object",
"required": [
"email"
],
"properties": {
"name": {
"type": "string",
"description": "This is the name appended to the reply to email field. IE - Your name or company name."
},
"email": {
"type": "string",
"description": "This is the email that your recipient will reply to."
}
}
},
"address_2": {
"type": "string",
"description": "Additional sender identity address information."
}
}
}
single-contact-request
{
"type": "object",
"title": "single contact request",
"properties": {
"contact": {
"type": "object",
"properties": {
"city": {
"type": "string"
},
"country": {
"type": "string"
},
"last_name": {
"type": "string"
},
"first_name": {
"type": "string"
},
"postal_code": {
"type": "string"
},
"custom_fields": {
"type": "object",
"properties": {
"custom_field_name1": {
"type": "string"
},
"custom_field_name2": {
"type": "string"
}
}
},
"primary_email": {
"type": "string"
},
"address_line_1": {
"type": "string"
},
"address_line_2": {
"type": "string"
},
"alternate_emails": {
"type": "string"
},
"state_province_region": {
"type": "string"
}
}
},
"list_ids": {
"type": "array",
"items": {
"type": "string",
"format": "uuid"
},
"maxItems": 100,
"minItems": 0,
"description": "The contact's list IDs."
}
}
}
singlesend_request
{
"type": "object",
"title": "singlesend_request",
"required": [
"name"
],
"properties": {
"name": {
"type": "string",
"maxLength": 100,
"minLength": 1,
"description": "The name of the Single Send."
},
"send_at": {
"type": "string",
"format": "date-time",
"description": "The ISO 8601 time at which to send the Single Send — this must be set for a future time."
},
"send_to": {
"type": "object",
"properties": {
"all": {
"type": "boolean",
"default": false,
"description": "Set to `true` to send to All Contacts. If set to `false`, at least one `list_ids` or `segment_ids` value must be provided before the Single Send is scheduled to be sent to recipients."
},
"list_ids": {
"type": "array",
"items": {
"type": "string",
"format": "uuid"
},
"maxItems": 10,
"description": "The recipient List IDs that will receive the Single Send."
},
"segment_ids": {
"type": "array",
"items": {
"type": "string",
"format": "uuid"
},
"maxItems": 10,
"description": "The recipient Segment IDs that will receive the Single Send."
}
}
},
"categories": {
"type": "array",
"items": {
"type": "string"
},
"maxItems": 10,
"description": "The categories to associate with this Single Send.",
"uniqueItems": true
},
"email_config": {
"type": "object",
"properties": {
"editor": {
"enum": [
"code",
"design"
],
"type": "string",
"default": "code",
"description": "The editor — `\"design\"` or `\"code\"` — used to modify the Single Send's design in the Marketing Campaigns App."
},
"ip_pool": {
"type": "string",
"nullable": true,
"description": "The name of the IP Pool from which the Single Send emails are sent."
},
"subject": {
"type": "string",
"description": "The subject line of the Single Send. Do not include this field when using a `design_id`."
},
"design_id": {
"type": "string",
"description": "A `design_id` can be used in place of `html_content`, `plain_content`, and/or `subject`. You can retrieve a design's ID from the [\"List Designs\" endpoint](https://sendgrid.api-docs.io/v3.0/designs-api/list-designs) or by pulling it from the design's detail page URL in the Marketing Campaigns App."
},
"sender_id": {
"type": "integer",
"nullable": true,
"description": "The ID of the verified Sender. You can retrieve a verified Sender's ID from the [\"Get Verified Senders\" endpoint](https://sendgrid.api-docs.io/v3.0/sender-verification/get-verified-senders) or by pulling it from the Sender's detail page URL in the SendGrid App."
},
"html_content": {
"type": "string",
"description": "The HTML content of the Single Send. Do not include this field when using a `design_id`."
},
"plain_content": {
"type": "string",
"description": "The plain text content of the Single Send. Do not include this field when using a `design_id`."
},
"suppression_group_id": {
"type": "integer",
"nullable": true,
"description": "The ID of the Suppression Group to allow recipients to unsubscribe — you must provide this or the `custom_unsubscribe_url`."
},
"custom_unsubscribe_url": {
"type": "string",
"format": "uri",
"nullable": true,
"description": "The URL allowing recipients to unsubscribe — you must provide this or the `suppression_group_id`."
},
"generate_plain_content": {
"type": "boolean",
"default": true,
"description": "If set to `true`, `plain_content` is always generated from `html_content`. If set to false, `plain_content` is not altered."
}
}
}
}
}
singlesend_response
{
"allOf": [
{
"$ref": "#/components/schemas/singlesend_request"
},
{
"type": "object",
"required": [
"id",
"status",
"created_at"
],
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"status": {
"enum": [
"draft",
"scheduled",
"triggered"
],
"type": "string",
"description": "current status of the Single Send"
},
"warnings": {
"type": "array",
"items": {
"type": "object",
"properties": {
"field": {
"type": "string"
},
"message": {
"type": "string"
},
"warning_id": {
"type": "string"
}
}
}
},
"created_at": {
"type": "string",
"format": "date-time",
"description": "the ISO 8601 time at which the Single Send was created"
},
"updated_at": {
"type": "string",
"format": "date-time",
"description": "the ISO 8601 time at which the Single Send was last updated"
}
}
}
],
"title": "singlesend_response",
"example": {
"id": "27c21bbf-a12c-440b-b8bf-c526975328caX",
"name": "Example API Created Single Send",
"status": "scheduled",
"send_at": "2020-06-16T00:19:55.106Z",
"send_to": {
"list_ids": [
"f2fe66a1-43f3-4e3a-87b1-c6a600d805f0"
]
},
"categories": [
"unique opens"
],
"created_at": "2020-05-18T17:28:27.272Z",
"email_config": {
"editor": "code",
"ip_pool": null,
"subject": "",
"sender_id": null,
"html_content": "",
"plain_content": "",
"suppression_group_id": null,
"custom_unsubscribe_url": null,
"generate_plain_content": true
}
}
}
singlesend_response_short
{
"type": "object",
"title": "singlesend_response_short",
"required": [
"id",
"name",
"abtest",
"status",
"categories",
"is_abtest",
"updated_at",
"created_at"
],
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"name": {
"type": "string",
"maxLength": 100,
"minLength": 1,
"description": "name of the Single Send"
},
"abtest": {
"$ref": "#/components/schemas/abtest_summary"
},
"status": {
"enum": [
"draft",
"scheduled",
"triggered"
],
"type": "string",
"description": "current status of the Single Send"
},
"send_at": {
"type": "string",
"format": "date-time",
"description": "the ISO 8601 time at which to send the Single Send; must be in future"
},
"is_abtest": {
"type": "boolean",
"description": "true if the Single Send's AB Test functionality has been toggled on"
},
"categories": {
"type": "array",
"items": {
"type": "string"
},
"maxItems": 10,
"description": "categories to associate with this Single Send",
"uniqueItems": true
},
"created_at": {
"type": "string",
"format": "date-time",
"description": "the ISO 8601 time at which the Single Send was created"
},
"updated_at": {
"type": "string",
"format": "date-time",
"description": "the ISO 8601 time at which the Single Send was last updated"
}
}
}
singlesend_schedule
{
"type": "object",
"title": "singlesend-schedule",
"required": [
"send_at"
],
"properties": {
"status": {
"enum": [
"draft",
"scheduled",
"triggered"
],
"type": "string"
},
"send_at": {
"type": "string",
"format": "date-time",
"description": "This is the ISO 8601 time at which to send the Single Send; must be in future, or the string \"now\""
}
}
}
singlesend_search
{
"type": "object",
"title": "singlesend_search",
"properties": {
"name": {
"type": "string",
"maxLength": 100,
"minLength": 1,
"description": "leading and trailing wildcard search on name of the Single Send"
},
"status": {
"type": "array",
"items": {
"enum": [
"draft",
"scheduled",
"triggered"
],
"type": "string"
},
"description": "current status of the Single Send",
"uniqueItems": true
},
"categories": {
"type": "array",
"items": {
"type": "string"
},
"description": "categories to associate with this Single Send, match any single send that has at least one of the categories",
"uniqueItems": true
}
}
}
singlesend_warning
{
"type": "object",
"title": "singlesend_warning",
"properties": {
"warnings": {
"type": "array",
"items": {
"type": "object",
"properties": {
"field": {
"type": "string"
},
"message": {
"type": "string"
},
"warning_id": {
"type": "string"
}
}
}
}
}
}
singlesends-link-stats-response
{
"type": "object",
"title": "singlesends-link-stats-response",
"required": [
"results",
"_metadata"
],
"properties": {
"results": {
"type": "array",
"items": {
"type": "object",
"required": [
"url",
"ab_variation",
"ab_phase",
"clicks"
],
"properties": {
"url": {
"type": "string",
"format": "uri",
"description": "This is the URL of the link clicked. If `{{custom_fields}}` are part of the URL, they will be included."
},
"clicks": {
"type": "integer",
"minimum": 1,
"description": "the number of clicks on this particular link"
},
"ab_phase": {
"enum": [
"send",
"test",
"all"
],
"type": "string",
"description": "This is the A/B phase of the Single Send stat returned. If the `ab_phase` query parameter was not provided, it will return `\"all\"`."
},
"ab_variation": {
"type": "string",
"format": "uuid",
"description": "This is the A/B variation of the Single Send stat returned. It is set to `\"all\"` if the `ab_variation` query parameter was not set in the request and `group_by` doesn't contain `ab_variation`."
},
"url_location": {
"type": "integer",
"minimum": 0,
"description": "This is the location of the link clicked in each Single Send A/B variation, or in the Single Send itself if there are no variations. Links are numbered from the top down; the topmost link is index `0`."
}
}
},
"description": "This is the index of the link's location in the email contents."
},
"_metadata": {
"$ref": "#/components/schemas/link-tracking-metadata"
},
"total_clicks": {
"type": "integer"
}
}
}
singlesends-response
{
"type": "object",
"title": "singlesends-response",
"required": [
"results",
"_metadata"
],
"properties": {
"results": {
"type": "array",
"items": {
"type": "object",
"required": [
"id",
"ab_variation",
"ab_phase"
],
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "This is the ID of the Single Dend you require stats for."
},
"stats": {
"$ref": "#/components/schemas/metrics"
},
"ab_phase": {
"enum": [
"send",
"test",
"all"
],
"type": "string",
"default": "all",
"description": "This is the A/B phase of the Single Send stat returned. If the `group_by` parameter doesn't include `ab_phase` in the request, then the value is \"all\"."
},
"aggregation": {
"type": "string",
"default": "total",
"description": "This describes the time unit to which the stat is rolled up. It is based on the `aggregated_by` parameter included in the request. It can be \"total\" or the date (in YYYY-MM-DD format) the stats are for."
},
"ab_variation": {
"type": "string",
"format": "uuid",
"default": "all",
"description": "This is the A/B variation of the Single Send stat returned. If the `group_by` parameter doesn't include `ab_variation` in the request, then the value is \"all\"."
}
}
}
},
"_metadata": {
"$ref": "#/components/schemas/metadata"
}
}
}
spam-reports-response
{
"type": "array",
"items": {
"type": "object",
"required": [
"created",
"email",
"ip"
],
"properties": {
"ip": {
"type": "string",
"description": "The IP address that the message was sent from."
},
"email": {
"type": "string",
"format": "email",
"description": "The email address of the recipient that marked your message as spam."
},
"created": {
"type": "integer",
"description": "A Unix timestamp that indicates when the recipient marked your message as spam."
}
}
},
"title": "Spam Reports Response",
"example": [
{
"ip": "10.63.202.100",
"email": "user1@example.com",
"created": 1443651141
},
{
"ip": "10.63.202.100",
"email": "user2@example.com",
"created": 1443651154
}
]
}
sso-certificate-body
{
"type": "object",
"title": "Single Sign-On Certificate Body",
"example": {
"id": 66138975,
"not_after": 1621289880,
"not_before": 1621289880,
"intergration_id": "b0b98502-9408-4b24-9e3d-31ed7cb15312",
"public_certificate": "<your x509 certificate>"
},
"properties": {
"id": {
"type": "number",
"description": "A unique ID assigned to the certificate by SendGrid."
},
"not_after": {
"type": "number",
"description": "A unix timestamp (e.g., 1603915954) that indicates the time after which the certificate is no longer valid."
},
"not_before": {
"type": "number",
"description": "A unix timestamp (e.g., 1603915954) that indicates the time before which the certificate is not valid."
},
"intergration_id": {
"type": "string",
"description": "An ID that matches a certificate to a specific IdP integration."
},
"public_certificate": {
"type": "string",
"description": "This certificate is used by Twilio SendGrid to verify that SAML requests are coming from Okta. This is called the X509 certificate in the Twilio SendGrid UI."
}
}
}
sso-error-response
{
"type": "array",
"items": {
"type": "object",
"properties": {
"field": {
"type": "string",
"nullable": true
},
"message": {
"type": "string"
},
"error_id": {
"type": "string"
}
}
},
"title": "SSO Error Response"
}
sso-integration
{
"allOf": [
{
"$ref": "#/components/schemas/create-integration-request"
},
{
"type": "object",
"required": [
"last_updated"
],
"properties": {
"id": {
"type": "string",
"description": "A unique ID assigned to the configuration by SendGrid."
},
"audience_url": {
"type": "string",
"description": "The URL where your IdP should POST its SAML response. This is the Twilio SendGrid URL that is responsible for receiving and parsing a SAML assertion. This is the same URL as the Single Sign-On URL when using SendGrid."
},
"last_updated": {
"type": "number",
"description": "A timestamp representing the last time the configuration was modified."
},
"single_signon_url": {
"type": "string",
"description": "The URL where your IdP should POST its SAML response. This is the Twilio SendGrid URL that is responsible for receiving and parsing a SAML assertion. This is the same URL as the Audience URL when using SendGrid."
}
}
}
],
"title": "Single Sign-On Integration"
}
sso-teammate-common-fields
{
"type": "object",
"title": "Single Sing-On Teammate Common Fields",
"required": [
"first_name",
"last_name",
"email"
],
"properties": {
"email": {
"type": "string",
"format": "email",
"description": "The Teammate’s email address. This email address will also function as the Teammate’s username and must match the address assigned to the user in your IdP. This address cannot be changed after the Teammate is created."
},
"is_admin": {
"type": "boolean",
"description": "Indicates if the Teammate has admin permissions."
},
"last_name": {
"type": "string",
"description": "The Teammate’s last name."
},
"first_name": {
"type": "string",
"description": "The Teammate’s first name."
},
"is_read_only": {
"type": "boolean",
"description": "Indicates if the Teammate has read_only permissions."
}
}
}
sso-teammate-request
{
"allOf": [
{
"$ref": "#/components/schemas/sso-teammate-common-fields"
},
{
"type": "object",
"required": [
"scopes"
],
"properties": {
"scopes": {
"type": "array",
"items": {
"type": "string"
},
"description": "The permission scopes assigned to the Teammate."
}
}
}
],
"title": "Single Sign-On Teammate Request"
}
sso-teammate-response
{
"allOf": [
{
"$ref": "#/components/schemas/sso-teammate-common-fields"
},
{
"type": "object",
"properties": {
"is_sso": {
"type": "boolean",
"description": "Indicates if the Teammate authenticates with SendGrid using SSO or with a username and password."
},
"username": {
"type": "string",
"description": "This should be set to the Teammate's email address."
}
}
}
],
"title": "Single Sign-On Teammate Response"
}
sso-teammates-patch-response
{
"allOf": [
{
"$ref": "#/components/schemas/sso-teammate-response"
},
{
"type": "object",
"properties": {
"zip": {
"type": "string",
"description": "The Teammate’s zip code."
},
"city": {
"type": "string",
"description": "The Teammate's city."
},
"email": {
"type": "string",
"format": "email"
},
"phone": {
"type": "string",
"description": "The Teammate’s stored phone number."
},
"state": {
"type": "string",
"description": "The Teammate’s state or province."
},
"scopes": {
"type": "array",
"items": {
"type": "string"
},
"description": "The permission scopes assigned to the Teammate."
},
"address": {
"type": "string",
"description": "The Teammate’s street address."
},
"company": {
"type": "string",
"description": "The Teammate’s company name."
},
"country": {
"type": "string",
"description": "The Teammate’s country of residence."
},
"website": {
"type": "string",
"description": "A website associated with the Teammate"
},
"address2": {
"type": "string",
"description": "The Teammate’s apartment number, suite number, or other secondary address information that is not part of the physical street address."
},
"user_type": {
"enum": [
"admin",
"owner",
"teammate"
],
"type": "string",
"description": "A Teammate can be an “admin,” “owner,” or “teammate.” Each role is associated with the scope of the Teammate’s permissions."
}
}
}
],
"title": "Single Sign-On Teammates PATCH Response"
}
stats-advanced-global-stats
{
"allOf": [
{
"$ref": "#/components/schemas/advanced_stats_clicks_opens"
},
{
"type": "object",
"properties": {
"blocks": {
"type": "integer",
"description": "The number of emails that were not allowed to be delivered by ISPs."
},
"bounces": {
"type": "integer",
"description": "The number of emails that bounced instead of being delivered."
},
"deferred": {
"type": "integer",
"description": "The number of emails that temporarily could not be delivered. "
},
"requests": {
"type": "integer",
"description": "The number of emails that were requested to be delivered."
},
"delivered": {
"type": "integer",
"description": "The number of emails SendGrid was able to confirm were actually delivered to a recipient."
},
"processed": {
"type": "integer",
"description": "Requests from your website, application, or mail client via SMTP Relay or the API that SendGrid processed."
},
"bounce_drops": {
"type": "integer",
"description": "The number of emails that were dropped because of a bounce."
},
"spam_reports": {
"type": "integer",
"description": "The number of recipients who marked your email as spam."
},
"unsubscribes": {
"type": "integer",
"description": "The number of recipients who unsubscribed from your emails."
},
"invalid_emails": {
"type": "integer",
"description": "The number of recipients who had malformed email addresses or whose mail provider reported the address as invalid."
},
"spam_report_drops": {
"type": "integer",
"description": "The number of emails that were dropped due to a recipient previously marking your emails as spam."
},
"unsubscribe_drops": {
"type": "integer",
"description": "The number of emails dropped due to a recipient unsubscribing from your emails."
}
}
}
],
"title": "Stats: Advanced Global Stats"
}
stats-advanced-stats-base-schema
{
"type": "array",
"items": {
"type": "object",
"properties": {
"date": {
"type": "string",
"description": "The date the stats were gathered."
},
"stats": {
"type": "array",
"items": {
"type": "object",
"properties": {
"metrics": {
"type": "object"
}
}
},
"description": "The individual email activity stats."
}
}
},
"title": "Stats: Advanced Stats Base Schema"
}
subscription_tracking_settings
{
"type": "object",
"title": "Settings: Subscription Tracking",
"properties": {
"url": {
"type": "string",
"format": "uri",
"description": "The URL where you would like your users sent to unsubscribe."
},
"enabled": {
"type": "boolean",
"description": "Indicates if subscription tracking is enabled."
},
"landing": {
"type": "string",
"description": "The HTML that will be displayed on the page that your customers will see after clicking unsubscribe, hosted on SendGrid’s server."
},
"replace": {
"type": "string",
"description": "Your custom defined replacement tag for your templates. Use this tag to place your unsubscribe content anywhere in your emailtemplate."
},
"html_content": {
"type": "string",
"description": "The information and HTML for your unsubscribe link. "
},
"plain_content": {
"type": "string",
"description": "The information in plain text for your unsubscribe link. You should have the “<% %>” tag in your content, otherwise the user will have no URL for unsubscribing."
}
}
}
subuser
{
"type": "object",
"title": "List all Subusers for a parent response",
"example": {
"id": 1234,
"email": "example@example.com",
"disabled": false,
"username": "example_subuser"
},
"required": [
"disabled",
"id",
"username",
"email"
],
"properties": {
"id": {
"type": "number",
"description": "The ID of this subuser."
},
"email": {
"type": "string",
"format": "email",
"description": "The email address to contact this subuser."
},
"disabled": {
"type": "boolean",
"description": "Whether or not the user is enabled or disabled."
},
"username": {
"type": "string",
"description": "The name by which this subuser will be referred."
}
}
}
subuser_post
{
"type": "object",
"title": "Subuser::POST",
"example": {
"email": "example@example.com",
"user_id": 1234,
"username": "example_subuser",
"credit_allocation": {
"type": "unlimited"
},
"authorization_token": "",
"signup_session_token": ""
},
"required": [
"username",
"user_id",
"email"
],
"properties": {
"email": {
"type": "string",
"format": "email",
"description": "The email address for this subuser."
},
"user_id": {
"type": "number",
"description": "The user ID for this subuser."
},
"username": {
"type": "string",
"description": "The username of the subuser."
},
"credit_allocation": {
"type": "object",
"properties": {
"type": {
"type": "string"
}
}
},
"authorization_token": {
"type": "string"
},
"signup_session_token": {
"type": "string"
}
}
}
subuser_stats
{
"type": "object",
"title": "subuser_stats",
"example": {
"date": "2016-02-01T00:00:00.000Z",
"stats": [
{
"name": "user1",
"type": "subuser",
"metrics": {
"opens": 10,
"blocks": 0,
"clicks": 5,
"bounces": 0,
"deferred": 0,
"requests": 10,
"delivered": 0,
"processed": 10,
"bounce_drops": 0,
"spam_reports": 0,
"unique_opens": 0,
"unsubscribes": 0,
"unique_clicks": 0,
"invalid_emails": 0,
"spam_report_drops": 0,
"unsubscribe_drops": 0
},
"last_name": "Doe",
"first_name": "John"
}
]
},
"properties": {
"date": {
"type": "string",
"description": "The date the statistics were gathered."
},
"stats": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The username of the subuser."
},
"type": {
"type": "string",
"description": "The type of account."
},
"metrics": {
"type": "object",
"properties": {
"opens": {
"type": "integer",
"description": "The total number of times your emails were opened by recipients."
},
"blocks": {
"type": "integer",
"description": "The number of emails that were not allowed to be delivered by ISPs."
},
"clicks": {
"type": "integer",
"description": "The number of links that were clicked in your emails."
},
"bounces": {
"type": "integer",
"description": "The number of emails that bounced instead of being delivered."
},
"deferred": {
"type": "integer",
"description": "The number of emails that temporarily could not be delivered."
},
"requests": {
"type": "integer",
"description": "The number of emails that were requested to be delivered."
},
"delivered": {
"type": "integer",
"description": "The number of emails SendGrid was able to confirm were actually delivered to a recipient."
},
"processed": {
"type": "integer",
"description": "Requests from your website, application, or mail client via SMTP Relay or the API that SendGrid processed."
},
"bounce_drops": {
"type": "integer",
"description": "The number of emails that were dropped because of a bounce."
},
"spam_reports": {
"type": "integer",
"description": "The number of recipients who marked your email as spam."
},
"unique_opens": {
"type": "integer",
"description": "The number of unique recipients who opened your emails."
},
"unsubscribes": {
"type": "integer",
"description": "The number of recipients who unsubscribed from your emails."
},
"unique_clicks": {
"type": "integer",
"description": "The number of unique recipients who clicked links in your emails."
},
"invalid_emails": {
"type": "integer",
"description": "The number of recipients who had malformed email addresses or whose mail provider reported the address as invalid."
},
"spam_report_drops": {
"type": "integer",
"description": "The number of emails that were dropped due to a recipient previously marking your emails as spam."
},
"unsubscribe_drops": {
"type": "integer",
"description": "The number of emails dropped due to a recipient unsubscribing from your emails."
}
}
},
"last_name": {
"type": "string",
"description": "The last name of the subuser."
},
"first_name": {
"type": "string",
"description": "The first name of the subuser."
}
}
},
"description": "The list of statistics."
}
}
}
suppression-group-request-base
{
"type": "object",
"title": "Suppression Group Request Base",
"properties": {
"name": {
"type": "string",
"maxLength": 30,
"description": "The name of your suppression group. Required when creating a group."
},
"is_default": {
"type": "boolean",
"description": "Indicates if you would like this to be your default suppression group."
},
"description": {
"type": "string",
"maxLength": 100,
"description": "A brief description of your suppression group. Required when creating a group."
}
}
}
suppression_group
{
"type": "object",
"title": "Suppressions: Suppression Group",
"required": [
"id",
"name",
"description"
],
"properties": {
"id": {
"type": "number",
"description": "The id of the suppression group."
},
"name": {
"type": "string",
"maxLength": 30,
"description": "The name of the suppression group. Each group created by a user must have a unique name."
},
"is_default": {
"type": "boolean",
"default": false,
"description": "Indicates if this is the default suppression group."
},
"description": {
"type": "string",
"maxLength": 100,
"description": "A description of the suppression group."
},
"unsubscribes": {
"type": "integer",
"description": "The unsubscribes associated with this group."
},
"last_email_sent_at": {
"nullable": true
}
}
}
suppressions-request
{
"type": "object",
"title": "Suppressions Request Body",
"example": {
"recipient_emails": [
"test1@example.com",
"test2@example.com"
]
},
"required": [
"recipient_emails"
],
"properties": {
"recipient_emails": {
"type": "array",
"items": {
"type": "string",
"format": "email"
},
"description": "The array of email addresses to add or find."
}
}
}
to_email_array
{
"type": "array",
"items": {
"type": "object",
"required": [
"email"
],
"properties": {
"name": {
"type": "string",
"description": "The intended recipient's name."
},
"email": {
"type": "string",
"format": "email",
"description": "The intended recipient's email address."
}
}
},
"title": "To Email Array",
"example": [
{
"name": "John Doe",
"email": "john_doe@example.com"
}
]
}
transactional-template-warning
{
"type": "object",
"title": "Warning",
"example": {
"message": "A sample warning message."
},
"properties": {
"message": {
"type": "string",
"description": "Warning message for the user"
}
}
}
transactional-templates-template-lean
{
"type": "object",
"title": "Transactional Templates: Template Lean",
"example": {
"id": "0c314114-a2b7-4523-8cbc-a293d7d19007",
"name": "example_name",
"versions": [],
"generation": "legacy",
"updated_at ": "2021-04-28T13:12:46.000Z"
},
"required": [
"id",
"name",
"generation",
"updated_at "
],
"properties": {
"id": {
"type": "string",
"format": "uuid",
"maxLength": 36,
"minLength": 36,
"description": "The ID of the transactional template."
},
"name": {
"type": "string",
"maxLength": 100,
"description": "The name for the transactional template."
},
"versions": {
"type": "array",
"items": {
"$ref": "#/components/schemas/transactional-templates-version-output-lean"
},
"description": "The different versions of this transactional template."
},
"generation": {
"enum": [
"legacy",
"dynamic"
],
"type": "string",
"description": "Defines the generation of the template."
},
"updated_at ": {
"type": "string",
"pattern": "^(\\d{4}-\\d{2}-\\d{2}) ((\\d{2}):(\\d{2}):(\\d{2}))$",
"description": "The date and time that this transactional template version was updated."
}
}
}
transactional-templates-version-output-lean
{
"type": "object",
"title": "Transactional Templates: Version Output Lean",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "ID of the transactional template version."
},
"name": {
"type": "string",
"maxLength": 100,
"description": "Name of the transactional template version."
},
"active": {
"enum": [
0,
1
],
"type": "integer",
"description": "Set the version as the active version associated with the template. Only one version of a template can be active. The first version created for a template will automatically be set to Active."
},
"editor": {
"enum": [
"code",
"design"
],
"type": "string",
"description": "The editor used in the UI."
},
"subject": {
"type": "string",
"maxLength": 255,
"description": "Subject of the new transactional template version."
},
"updated_at": {
"type": "string",
"description": "The date and time that this transactional template version was updated."
},
"template_id": {
"type": "string",
"description": "ID of the transactional template."
},
"thumbnail_url": {
"type": "string",
"description": "A Thumbnail preview of the template's html content."
},
"generate_plain_content": {
"type": "boolean",
"default": true,
"description": "If true, plain_content is always generated from html_content. If false, plain_content is not altered."
}
}
}
transactional_template
{
"allOf": [
{
"$ref": "#/components/schemas/transactional-templates-template-lean"
},
{
"type": "object",
"properties": {
"warning": {
"$ref": "#/components/schemas/transactional-template-warning"
}
}
}
],
"title": "Transactional Templates: Template",
"example": {
"id": "33feeff2-5069-43fe-8853-428651e5be79",
"name": "example_name",
"warning": {
"message": "Sample warning message"
},
"generation": "legacy",
"updated_at ": "2021-04-28T13:12:46.000Z"
}
}
transactional_template_version_create
{
"type": "object",
"title": "Transactional Templates: Version Create",
"example": {
"name": "pariatur non incididunt commodo",
"active": 1,
"editor": "design",
"subject": "aliquip nulla Ut",
"template_id": "Excepteur Ut qui",
"html_content": "dolor",
"plain_content": "labore dolore",
"generate_plain_content": false
},
"required": [
"name",
"subject"
],
"properties": {
"name": {
"type": "string",
"maxLength": 100,
"description": "Name of the transactional template version."
},
"active": {
"enum": [
0,
1
],
"type": "integer",
"description": "Set the version as the active version associated with the template (0 is inactive, 1 is active). Only one version of a template can be active. The first version created for a template will automatically be set to Active."
},
"editor": {
"enum": [
"code",
"design"
],
"type": "string",
"description": "The editor used in the UI."
},
"subject": {
"type": "string",
"maxLength": 255,
"description": "Subject of the new transactional template version."
},
"test_data": {
"type": "string",
"description": "For dynamic templates only, the mock json data that will be used for template preview and test sends."
},
"html_content": {
"type": "string",
"maxLength": 1048576,
"description": "The HTML content of the version. Maximum of 1048576 bytes allowed."
},
"plain_content": {
"type": "string",
"default": "<generated from html_content if left empty>",
"maxLength": 1048576,
"description": "Text/plain content of the transactional template version. Maximum of 1048576 bytes allowed."
},
"generate_plain_content": {
"type": "boolean",
"default": true,
"description": "If true, plain_content is always generated from html_content. If false, plain_content is not altered."
}
}
}
transactional_template_version_output
{
"allOf": [
{
"type": "object",
"properties": {
"warnings": {
"type": "array",
"items": {
"$ref": "#/components/schemas/transactional-template-warning"
}
}
}
},
{
"$ref": "#/components/schemas/transactional_template_version_create"
},
{
"$ref": "#/components/schemas/transactional-templates-version-output-lean"
}
],
"title": "Transactional Templates: Version Output"
}
user_profile
{
"type": "object",
"title": "User: Profile",
"example": {
"zip": "80202",
"city": "Denver, CO",
"phone": "7208788003",
"state": "CO",
"address": "1451 Larimer Street, 3rd floor",
"company": "SendGrid",
"country": "US",
"website": "http://sendgrid.com",
"address2": "",
"last_name": "Bernier",
"first_name": "Matthew"
},
"properties": {
"zip": {
"type": "string",
"description": "The zip code for this user."
},
"city": {
"type": "string",
"description": "The city for the user profile."
},
"phone": {
"type": "string",
"description": "The phone number for the user."
},
"state": {
"type": "string",
"description": "The state for this user."
},
"address": {
"type": "string",
"description": "The street address for this user profile."
},
"company": {
"type": "string",
"description": "That company that this user profile is associated with."
},
"country": {
"type": "string",
"description": "Th country of this user profile."
},
"website": {
"type": "string",
"description": "The website associated with this user."
},
"address2": {
"type": "string",
"description": "An optional second line for the street address of this user profile."
},
"last_name": {
"type": "string",
"description": "The last name of the user."
},
"first_name": {
"type": "string",
"description": "The first name of the user."
}
}
}
user_scheduled_send_status
{
"allOf": [
{
"$ref": "#/components/schemas/mail_batch_id"
},
{
"type": "object",
"required": [
"status"
],
"properties": {
"status": {
"enum": [
"cancel",
"pause"
],
"type": "string",
"description": "The status of the scheduled send."
}
},
"description": "The status of the scheduled send."
}
],
"title": "User Scheduled Send status",
"example": {
"status": "pause",
"batch_id": "HkJ5yLYULb7Rj8GKSx7u025ouWVlMgAi"
}
}
verified-sender-request-schema
{
"type": "object",
"title": "Verified Sender Request Schema",
"example": {
"zip": "94105",
"city": "San Francisco",
"state": "CA",
"address": "1234 Fake St",
"country": "USA",
"address2": "PO Box 1234",
"nickname": "Orders",
"reply_to": "orders@example.com",
"from_name": "Example Orders",
"from_email": "orders@example.com",
"reply_to_name": "Example Orders"
},
"required": [
"nickname",
"from_email",
"reply_to"
],
"properties": {
"zip": {
"type": "string",
"maxLength": 10
},
"city": {
"type": "string",
"maxLength": 150
},
"state": {
"type": "string",
"maxLength": 2
},
"address": {
"type": "string",
"maxLength": 100
},
"country": {
"type": "string",
"maxLength": 100
},
"address2": {
"type": "string",
"maxLength": 100
},
"nickname": {
"type": "string",
"maxLength": 100
},
"reply_to": {
"type": "string",
"format": "email",
"maxLength": 256
},
"from_name": {
"type": "string",
"maxLength": 256
},
"from_email": {
"type": "string",
"format": "email",
"maxLength": 256
},
"reply_to_name": {
"type": "string",
"maxLength": 256
}
}
}
verified-sender-response-schema
{
"type": "object",
"title": "Verified Sender Response Schema",
"example": {
"id": 1234,
"zip": "94105",
"city": "San Francisco",
"state": "CA",
"locked": false,
"address": "1234 Fake St.",
"country": "USA",
"address2": "PO Box 1234",
"nickname": "Example Orders",
"reply_to": "orders@example.com",
"verified": true,
"from_name": "Example Orders",
"from_email": "orders@example.com",
"reply_to_name": "Example Orders"
},
"properties": {
"id": {
"type": "integer"
},
"zip": {
"type": "string"
},
"city": {
"type": "string"
},
"state": {
"type": "string"
},
"locked": {
"type": "boolean"
},
"address": {
"type": "string"
},
"country": {
"type": "string"
},
"address2": {
"type": "string"
},
"nickname": {
"type": "string"
},
"reply_to": {
"type": "string"
},
"verified": {
"type": "boolean"
},
"from_name": {
"type": "string"
},
"from_email": {
"type": "string"
},
"reply_to_name": {
"type": "string"
}
}
}
webhook
{
"type": "object",
"title": "webhook",
"required": [
"url",
"nonce"
],
"properties": {
"url": {
"type": "string",
"description": "The URL to invoke in the webhook"
},
"nonce": {
"type": "string",
"maxLength": 32,
"minLength": 8,
"description": "The one time nonce to use when \"signature\" is \"hmac-sha1\""
}
}
}
webhooks-event-webhook-request
{
"type": "object",
"title": "Webhooks: Event Webhook Request",
"required": [
"enabled",
"url",
"group_resubscribe",
"delivered",
"group_unsubscribe",
"spam_report",
"bounce",
"deferred",
"unsubscribe",
"processed",
"open",
"click",
"dropped"
],
"properties": {
"url": {
"type": "string",
"description": "The URL that you want the event webhook to POST to."
},
"open": {
"type": "boolean",
"description": "Recipient has opened the HTML message. You need to enable Open Tracking for getting this type of event."
},
"click": {
"type": "boolean",
"description": "Recipient clicked on a link within the message. You need to enable Click Tracking for getting this type of event."
},
"bounce": {
"type": "boolean",
"description": "Receiving server could not or would not accept message."
},
"dropped": {
"type": "boolean",
"description": "You may see the following drop reasons: Invalid SMTPAPI header, Spam Content (if spam checker app enabled), Unsubscribed Address, Bounced Address, Spam Reporting Address, Invalid, Recipient List over Package Quota"
},
"enabled": {
"type": "boolean",
"description": "Indicates if the event webhook is enabled."
},
"deferred": {
"type": "boolean",
"description": "Recipient's email server temporarily rejected message."
},
"delivered": {
"type": "boolean",
"description": "Message has been successfully delivered to the receiving server."
},
"processed": {
"type": "boolean",
"description": "Message has been received and is ready to be delivered."
},
"spam_report": {
"type": "boolean",
"description": "Recipient marked a message as spam."
},
"unsubscribe": {
"type": "boolean",
"description": "Recipient clicked on message's subscription management link. You need to enable Subscription Tracking for getting this type of event."
},
"oauth_client_id": {
"type": "string",
"description": "The client ID Twilio SendGrid sends to your OAuth server or service provider to generate an OAuth access token. When passing data in this field, you must also include the oauth_token_url field."
},
"oauth_token_url": {
"type": "string",
"description": "The URL where Twilio SendGrid sends the Client ID and Client Secret to generate an access token. This should be your OAuth server or service provider. When passing data in this field, you must also include the oauth_client_id field."
},
"group_resubscribe": {
"type": "boolean",
"description": "Recipient resubscribes to specific group by updating preferences. You need to enable Subscription Tracking for getting this type of event."
},
"group_unsubscribe": {
"type": "boolean",
"description": "Recipient unsubscribe from specific group, by either direct link or updating preferences. You need to enable Subscription Tracking for getting this type of event."
}
}
}