Query structured spec data via REST or MCP. Get exactly what your agent needs.
http://api.sendgrid.com/v3
/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
/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
/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
/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}/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
/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
/sso/certificates
**This endpoint allows you to create an SSO certificate.**
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CertificatesCreateSsoCertificateRequest"
}
}
}
}
POST /sso/certificates
/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/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/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
/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/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}/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 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 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/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/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
/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
/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/{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 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 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/{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}/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/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
/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/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}/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/warmup
**This endpoint allows you to put an IP address into warmup mode.**
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/IpWarmupStartIpAddressWarmupRequest"
}
}
}
}
POST /ips/warmup
/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/{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 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
/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
/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}/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 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/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/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 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}/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 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/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}
/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/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
/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/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 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}
/sso/integrations
**This endpoint allows you to create an SSO integration.**
{
"$ref": "#/components/requestBodies/create-integration-request"
}
POST /sso/integrations
/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
/subusers/{subuser_name}/monitor
{
"$ref": "#/components/requestBodies/monitor"
}
POST /subusers/{subuser_name}/monitor
/subusers
**This endpoint allows you to create a new subuser.**
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PostSubusersRequest"
}
}
}
}
POST /subusers
/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/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
**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
/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/{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
/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 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}/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/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
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."
}
}
}