SendGrid

Email delivery and marketing service

sendgrid.com/docs ↗
Version
1.0.0
OpenAPI
3.0.0
Endpoints
334
Schemas
545
Updated
3 days ago
Email email marketing communications
Use this API in your AI agent

Query structured spec data via REST or MCP. Get exactly what your agent needs.

Get API Key

Server URLs

http://api.sendgrid.com/v3

Authentication

apiKey

Endpoints

Clear filters

Api key permissions 1 endpoints

GET /scopes

**This endpoint returns a list of all scopes that this user has access to.** API Keys are used to authenticate with [SendGrid's v3 API](https://sendgrid.api-docs.io/v3.0/how-to-use-the-sendgrid-v3-api/api-authorization). API Keys may be assigned certain permissions, or scopes, that limit which API endpoints they are able to access. This endpoint returns all the scopes assigned to the key you use to authenticate with it. To retrieve the scopes assigned to another key, you can pass an API key ID to the "Retrieve an existing API key" endpoint. For a more detailed explanation of how you can use API Key permissions, please visit our [API Keys documentation](https://sendgrid.com/docs/ui/account-and-settings/api-keys/).

operationId: GET_scopes

Parameters

Name In Required Type Description
optional

Responses

200
401
403
404
500
GET /scopes

Api keys 2 endpoints

GET /api_keys

**This endpoint allows you to retrieve all API Keys that belong to the authenticated user.** A successful response from this API will include all available API keys' names and IDs. For security reasons, there is not a way to retrieve the key itself after it's created. If you lose your API key, you must create a new one. Only the "Create API keys" endpoint will return a key to you and only at the time of creation. An `api_key_id` can be used to update or delete the key, as well as retrieve the key's details, such as its scopes.

operationId: ApiKeys_getAll

Parameters

Name In Required Type Description
limit query optional integer
optional

Responses

200
401
403
404
500
GET /api_keys
GET /api_keys/{api_key_id}

**This endpoint allows you to retrieve a single API key using an `api_key_id`.** The endpoint will return a key's name, ID, and scopes. If the API Key ID does not, exist a `404` status will be returned. See the [API Key Permissions List](https://sendgrid.api-docs.io/v3.0/how-to-use-the-sendgrid-v3-api/api-authorization) for all available scopes. An API key's scopes can be updated after creation using the "Update API keys" endpoint.

operationId: ApiKeys_getByKeyId

Parameters

Name In Required Type Description
optional

Responses

200
400
401
403
404
500
GET /api_keys/{api_key_id}

Alerts 2 endpoints

GET /alerts

**This endpoint allows you to retrieve all of your alerts.** Alerts allow you to specify an email address to receive notifications regarding your email usage or statistics. * Usage alerts allow you to set the threshold at which an alert will be sent. * Stats notifications allow you to set how frequently you would like to receive email statistics reports. For example, "daily", "weekly", or "monthly". For more information about alerts, please see our [Alerts documentation](https://sendgrid.com/docs/ui/account-and-settings/alerts/).

operationId: GET_alerts

Parameters

Name In Required Type Description
optional

Responses

200
GET /alerts
GET /alerts/{alert_id}

**This endpoint allows you to retrieve a specific alert.** Alerts allow you to specify an email address to receive notifications regarding your email usage or statistics. * Usage alerts allow you to set the threshold at which an alert will be sent. * Stats notifications allow you to set how frequently you would like to receive email statistics reports. For example, "daily", "weekly", or "monthly". For more information about alerts, please see our [Alerts documentation](https://sendgrid.com/docs/ui/account-and-settings/alerts/).

operationId: Alerts_getSpecificAlert

Parameters

Name In Required Type Description
optional

Responses

200
GET /alerts/{alert_id}

Blocks api 2 endpoints

GET /suppression/blocks

**This endpoint allows you to retrieve all email addresses that are currently on your blocks list.**

operationId: BlocksApi_getAllEmailAddresses

Parameters

Name In Required Type Description
start_time query optional integer The start of the time range when a blocked email was created (inclusive). This is a unix timestamp.
end_time query optional integer The end of the time range when a blocked email was created (inclusive). This is a unix timestamp.
limit query optional integer Limit the number of results to be displayed per page.
offset query optional integer The point in the list to begin displaying results.
optional

Responses

200
GET /suppression/blocks
GET /suppression/blocks/{email}

**This endpoint allows you to retrieve a specific email address from your blocks list.**

operationId: BlocksApi_getSpecificBlock

Parameters

Name In Required Type Description
optional

Responses

200
GET /suppression/blocks/{email}

Bounces api 2 endpoints

GET /suppression/bounces

**This endpoint allows you to retrieve all of your bounces.**

operationId: BouncesApi_getAllBounces

Parameters

Name In Required Type Description
start_time query optional integer Refers start of the time range in unix timestamp when a bounce was created (inclusive).
end_time query optional integer Refers end of the time range in unix timestamp when a bounce was created (inclusive).
optional

Responses

200
401
GET /suppression/bounces
GET /suppression/bounces/{email}

**This endpoint allows you to retrieve a specific bounce by email address.**

operationId: BouncesApi_getByEmailAddress

Parameters

Name In Required Type Description
optional

Responses

200
GET /suppression/bounces/{email}

Csv (ui only) 1 endpoints

GET /messages/download/{download_uuid}

**This endpoint will return a presigned URL that can be used to download the CSV that was requested from the "Request a CSV" endpoint.**

operationId: CsvUiOnly_generateCsvDownloadUrl

Responses

200
404
500
GET /messages/download/{download_uuid}

Campaigns api 3 endpoints

GET /campaigns

**This endpoint allows you to retrieve a list of all of your campaigns.** Returns campaigns in reverse order they were created (newest first). Returns an empty array if no campaigns exist.

operationId: GET_campaigns

Parameters

Name In Required Type Description
limit query optional integer The number of results you would like to receive at a time.
offset query optional integer The index of the first campaign to return, where 0 is the first campaign.
optional

Responses

200
GET /campaigns
GET /campaigns/{campaign_id}

**This endpoint allows you to retrieve a specific campaign.**

operationId: CampaignsApi_getSingleCampaign

Parameters

Name In Required Type Description
optional

Responses

200
401
404 "": "not found"
GET /campaigns/{campaign_id}
GET /campaigns/{campaign_id}/schedules

**This endpoint allows you to retrieve the date and time that a campaign has been scheduled to be sent.**

operationId: CampaignsApi_getScheduledTime

Parameters

Name In Required Type Description
optional

Responses

200
404 "": "not found"
GET /campaigns/{campaign_id}/schedules

Cancel scheduled sends 3 endpoints

GET /mail/batch/{batch_id}

**This endpoint allows you to validate a batch ID.** When you pass a valid `batch_id` to this endpoint, it will return a `200` status code and the batch ID itself. If you pass an invalid `batch_id` to the endpoint, you will receive a `400` level status code and an error message. A `batch_id` does not need to be assigned to a scheduled send to be considered valid. A successful response means only that the `batch_id` has been created, but it does not indicate that it has been associated with a send.

operationId: CancelScheduledSends_validateBatchId

Parameters

Name In Required Type Description
optional

Responses

200
400
401
403
404
500
GET /mail/batch/{batch_id}
GET /user/scheduled_sends

**This endpoint allows you to retrieve all cancelled and paused scheduled send information.** This endpoint will return only the scheduled sends that are associated with a `batch_id`. If you have scheduled a send using the `/mail/send` endpoint and the `send_at` field but no `batch_id`, the send will be scheduled for delivery; however, it will not be returned by this endpoint. For this reason, you should assign a `batch_id` to any scheduled send you may need to pause or cancel in the future.

operationId: CancelScheduledSends_allScheduledSends

Parameters

Name In Required Type Description
optional

Responses

200
400
401
403
404
500
GET /user/scheduled_sends
GET /user/scheduled_sends/{batch_id}

**This endpoint allows you to retrieve the cancel/paused scheduled send information for a specific `batch_id`.**

operationId: CancelScheduledSends_byBatchId

Parameters

Name In Required Type Description
optional

Responses

200
400
401
403
404
500
GET /user/scheduled_sends/{batch_id}

Categories 3 endpoints

GET /categories

**This endpoint allows you to retrieve a list of all of your categories.**

operationId: GET_categories

Parameters

Name In Required Type Description
limit query optional integer The number of categories to display per page.
category query optional string Allows you to perform a prefix search on this particular category.
offset query optional integer The point in the list that you would like to begin displaying results.
optional

Responses

200
400
GET /categories
GET /categories/stats

**This endpoint allows you to retrieve all of your email statistics for each of your categories.** If you do not define any query parameters, this endpoint will return a sum for each category in groups of 10.

operationId: Categories_getEmailStatisticsFor

Parameters

Name In Required Type Description
start_date query required string The starting date of the statistics to retrieve. Must follow format YYYY-MM-DD
end_date query optional string The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD.
categories query required string The individual categories that you want to retrieve statistics for. You may include up to 10 different categories.
limit query optional integer The number of results to include.
offset query optional integer The number of results to skip.
aggregated_by query optional string How to group the statistics. Must be either "day", "week", or "month".
optional

Responses

200
GET /categories/stats
GET /categories/stats/sums

**This endpoint allows you to retrieve the total sum of each email statistic for every category over the given date range.** If you do not define any query parameters, this endpoint will return a sum for each category in groups of 10.

operationId: Categories_getSums

Parameters

Name In Required Type Description
sort_by_metric query optional string The metric that you want to sort by. Must be a single metric.
sort_by_direction query optional string The direction you want to sort.
start_date query required string The starting date of the statistics to retrieve. Must follow format YYYY-MM-DD.
end_date query optional string The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD.
limit query optional integer Limits the number of results returned.
offset query optional integer The point in the list to begin retrieving results.
aggregated_by query optional string How to group the statistics. Must be either "day", "week", or "month".
optional

Responses

200
GET /categories/stats/sums

Certificates 2 endpoints

GET /sso/certificates/{cert_id}

**This endpoint allows you to retrieve an individual SSO certificate.**

operationId: Certificates_getIndividual

Responses

200
400
401
403
429
500
GET /sso/certificates/{cert_id}
GET /sso/integrations/{integration_id}/certificates

**This endpoint allows you to retrieve all your IdP configurations by configuration ID.** The `integration_id` expected by this endpoint is the `id` returned in the response by the "Get All SSO Integrations" endpoint.

operationId: Certificates_getByIdpConfigurations

Responses

200
400
401
403
429
500
GET /sso/integrations/{integration_id}/certificates

Contacts 6 endpoints

GET /marketing/contacts

**This endpoint will return up to 50 of the most recent contacts uploaded or attached to a list**. This list will then be sorted by email address. The full contact count is also returned. Please note that pagination of the contacts has been deprecated. Twilio SendGrid recommends exporting your contacts regularly as a backup to avoid issues or lost data.

operationId: Contacts_getRecentContacts

Responses

200
400
401
403
404
500
GET /marketing/contacts
GET /marketing/contacts/count

**This endpoint returns the total number of contacts you have stored.** Twilio SendGrid recommends exporting your contacts regularly as a backup to avoid issues or lost data.

operationId: Contacts_getTotalCount

Responses

200
401
403
404
500
GET /marketing/contacts/count
GET /marketing/contacts/exports

**Use this endpoint to retrieve details of all current exported jobs**. It will return an array of objects, each of which records an export job in flight or recently completed. Each object's `export_type` field will tell you which kind of export it is and its `status` field will indicate what stage of processing it has reached. Exports which are `ready` will be accompanied by a `urls` field which lists the URLs of the export's downloadable files — there will be more than one if you specified a maximum file size in your initial export request. Use this endpoint if you have exports in flight but do not know their IDs, which are required for the "Export Contacts Status" endpoint. Twilio SendGrid recommends exporting your contacts regularly as a backup to avoid issues or lost data.

operationId: Contacts_getAllExports

Responses

200
400
401
403
404
500
GET /marketing/contacts/exports
GET /marketing/contacts/exports/{id}

**This endpoint can be used to check the status of a contact export job**. To use this call, you will need the `id` from the "Export Contacts" call. If you would like to download a list, take the `id` that is returned from the "Export Contacts" endpoint and make an API request here to get the `urls`. Once you have the list of URLs, make a `GET` request on each URL to download your CSV file(s). Twilio SendGrid recommends exporting your contacts regularly as a backup to avoid issues or lost data.

operationId: Contacts_checkExportStatus

Responses

200
400
401
403
404
500
GET /marketing/contacts/exports/{id}
GET /marketing/contacts/imports/{id}

**This endpoint can be used to check the status of a contact import job**. Use the `job_id` from the "Import Contacts," "Add or Update a Contact," or "Delete Contacts" endpoints as the `id` in the path parameter. If there is an error with your `PUT` request, download the `errors_url` file and open it to view more details. The job `status` field indicates whether the job is `pending`, `completed`, `errored`, or `failed`. Pending means not started. Completed means finished without any errors. Errored means finished with some errors. Failed means finshed with all errors, or the job was entirely unprocessable: for example, if you attempt to import file format we do not support. The `results` object will have fields depending on the job type. Twilio SendGrid recommends exporting your contacts regularly as a backup to avoid issues or lost data.

operationId: Contacts_checkImportStatus

Responses

200
400
401
403
404
500
GET /marketing/contacts/imports/{id}
GET /marketing/contacts/{id}

**This endpoint returns the full details and all fields for the specified contact**. The "Get Contacts by Emails" endpoint can be used to get the ID of a contact. Twilio SendGrid recommends exporting your contacts regularly as a backup to avoid issues or lost data.

operationId: Contacts_getByIdDetails

Responses

200
401
403
404
500
GET /marketing/contacts/{id}

Contacts api - custom fields 3 endpoints

GET /contactdb/custom_fields

**This endpoint allows you to retrieve all custom fields.**

operationId: ContactsApiCustomFields_getAll

Parameters

Name In Required Type Description
optional

Responses

200
401
GET /contactdb/custom_fields
GET /contactdb/custom_fields/{custom_field_id}

**This endpoint allows you to retrieve a custom field by ID.**

operationId: ContactsApiCustomFields_getById

Parameters

Name In Required Type Description
optional

Responses

200
400
401
404 "custom_field_id" : "Returned if custom_field_id does not exist"
GET /contactdb/custom_fields/{custom_field_id}
GET /contactdb/reserved_fields

**This endpoint allows you to list all fields that are reserved and can't be used for custom field names.**

operationId: ContactsApiCustomFields_getReservedFields

Parameters

Name In Required Type Description
optional

Responses

200
401
GET /contactdb/reserved_fields

Contacts api - lists 3 endpoints

GET /contactdb/lists

**This endpoint allows you to retrieve all of your recipient lists. If you don't have any lists, an empty array will be returned.**

operationId: ContactsApiLists_getAllLists

Parameters

Name In Required Type Description
optional

Responses

200
GET /contactdb/lists
GET /contactdb/lists/{list_id}

**This endpoint allows you to retrieve a single recipient list.**

operationId: ContactsApiLists_getSingleList

Parameters

Name In Required Type Description
list_id query optional integer The ID of the list to retrieve.
optional

Responses

200
400 "list_id" : "Returned if list_id is not valid"
401
404 "list_id" : "Returned if list_id does not exist"
GET /contactdb/lists/{list_id}
GET /contactdb/lists/{list_id}/recipients

**This endpoint allows you to retrieve all recipients on the list with the given ID.**

operationId: ContactsApiLists_getAllRecipients

Parameters

Name In Required Type Description
page query optional integer Page index of first recipient to return (must be a positive integer)
page_size query optional integer Number of recipients to return at a time (must be a positive integer between 1 and 1000)
list_id query required integer The ID of the list whose recipients you are requesting.
optional

Responses

200
400 "list_id" : "Returned if list_id is not a valid integer" "page" : "Returned if page is not a valid integer" "page" : "Returned if page is less than 1" "page_size" : "Returned if page_size is not a valid integer" "page_size" : "Returned if page_size is less than 1 or greater than 1000"
404 "list_id" : "Returned if list_id does not exist"
GET /contactdb/lists/{list_id}/recipients

Contacts api - recipients 7 endpoints

GET /contactdb/recipients

**This endpoint allows you to retrieve all of your Marketing Campaigns recipients.** Batch deletion of a page makes it possible to receive an empty page of recipients before reaching the end of the list of recipients. To avoid this issue; iterate over pages until a 404 is retrieved.

operationId: ContactsApiRecipients_getAllRecipients

Parameters

Name In Required Type Description
page query optional integer Page index of first recipients to return (must be a positive integer)
page_size query optional integer Number of recipients to return at a time (must be a positive integer between 1 and 1000)
optional

Responses

200
400 "page" : "Returned if page is not a valid integer" "page" : "Returned if page is less than 1" "page_size" : "Returned if page_size is not a valid integer" "page_size" : "Returned if page_size is less than 1 or greater than 1000"
401
GET /contactdb/recipients
GET /contactdb/recipients/billable_count

**This endpoint allows you to retrieve the number of Marketing Campaigns recipients that you will be billed for.** You are billed for marketing campaigns based on the highest number of recipients you have had in your account at one time. This endpoint will allow you to know the current billable count value.

operationId: ContactsApiRecipients_getBillableCount

Parameters

Name In Required Type Description
optional

Responses

200
401
GET /contactdb/recipients/billable_count
GET /contactdb/recipients/count

**This endpoint allows you to retrieve the total number of Marketing Campaigns recipients.**

operationId: ContactsApiRecipients_getCountOfRecipients

Parameters

Name In Required Type Description
optional

Responses

200
401
GET /contactdb/recipients/count
GET /contactdb/recipients/search

**This endpoint allows you to perform a search on all of your Marketing Campaigns recipients.** field_name: * is a variable that is substituted for your actual custom field name from your recipient. * Text fields must be url-encoded. Date fields are searchable only by unix timestamp (e.g. 2/2/2015 becomes 1422835200) * If field_name is a 'reserved' date field, such as created_at or updated_at, the system will internally convert your epoch time to a date range encompassing the entire day. For example, an epoch time of 1422835600 converts to Mon, 02 Feb 2015 00:06:40 GMT, but internally the system will search from Mon, 02 Feb 2015 00:00:00 GMT through Mon, 02 Feb 2015 23:59:59 GMT.

operationId: ContactsApiRecipients_searchRecipientByField

Parameters

Name In Required Type Description
{field_name} query optional string
optional

Responses

200
400 "" : "Returned if no search params are specified" "field" : "Returned if the provided field is invalid or does not exist"
401
GET /contactdb/recipients/search
GET /contactdb/recipients/{recipient_id}

**This endpoint allows you to retrieve a single recipient by ID from your contact database.**

operationId: ContactsApiRecipients_getSingleRecipient

Parameters

Name In Required Type Description
optional

Responses

200
400 "recipient_id" : "Returned if recipient_id is not valid"
401
404 "recipient_id" : "Returned if record for recipient id does not exist"
GET /contactdb/recipients/{recipient_id}
GET /contactdb/recipients/{recipient_id}/lists

**This endpoint allows you to retrieve the lists that a given recipient belongs to.** Each recipient can be on many lists. This endpoint gives you all of the lists that any one recipient has been added to.

operationId: ContactsApiRecipients_getRecipientLists

Parameters

Name In Required Type Description
optional

Responses

200
400 "recipient_id" : "Returned if recipient_id is not valid"
401
404 "recipient_id" : "Returned if record for the recipient id does not exist"
GET /contactdb/recipients/{recipient_id}/lists
GET /contactdb/status

**This endpoint allows you to check the upload status of a Marketing Campaigns recipient.**

operationId: ContactsApiRecipients_getUploadStatus

Parameters

Name In Required Type Description
optional

Responses

200
GET /contactdb/status

Contacts api - segments 3 endpoints

GET /contactdb/segments

**This endpoint allows you to retrieve all of your segments.**

operationId: ContactsApiSegments_getAllSegments

Parameters

Name In Required Type Description
optional

Responses

200
401
GET /contactdb/segments
GET /contactdb/segments/{segment_id}

**This endpoint allows you to retrieve a single segment with the given ID.**

operationId: ContactsApiSegments_getSegmentById

Parameters

Name In Required Type Description
segment_id query required integer The ID of the segment you want to request.
optional

Responses

200
400 "segment_id" : "Returned if segment_id is not valid"
401
404 "segment_id" : "Returned if segment_id does not exist"
GET /contactdb/segments/{segment_id}
GET /contactdb/segments/{segment_id}/recipients

**This endpoint allows you to retrieve all of the recipients in a segment with the given ID.**

operationId: ContactsApiSegments_getSegmentRecipients

Parameters

Name In Required Type Description
page query optional integer
page_size query optional integer
optional

Responses

200
400 "page" : "Returned if page is not a valid integer" "page" : "Returned if page is less than 1" "page_size" : "Returned if page_size is not a valid integer"
401
404 "segment_id" : "Returned if segment_id is not valid" "segment_id" : "Returned if segment_id does not exist"
GET /contactdb/segments/{segment_id}/recipients

Custom fields 1 endpoints

GET /marketing/field_definitions

**This endpoint retrieves all defined Custom Fields and Reserved Fields.**

operationId: CustomFields_getAllFieldDefinitions

Responses

200
GET /marketing/field_definitions

Designs api 4 endpoints

GET /designs

**This endpoint allows you to retrieve a list of designs already stored in your Design Library**. A GET request to `/designs` will return a list of your existing designs. This endpoint will not return the pre-built Twilio SendGrid designs. Pre-built designs can be retrieved using the `/designs/pre-builts` endpoint, which is detailed below. By default, you will receive 100 results per request; however, you can modify the number of results returned by passing an integer to the `page_size` query parameter.

operationId: DesignsApi_getList

Parameters

Name In Required Type Description
optional
optional
optional

Responses

200
GET /designs
GET /designs/pre-builts

**This endpoint allows you to retrieve a list of pre-built designs provided by Twilio SendGrid**. Unlike the `/designs` endpoint where *your* designs are stored, a GET request made to `designs/pre-builts` will retrieve a list of the pre-built Twilio SendGrid designs. This endpoint will not return the designs stored in your Design Library. By default, you will receive 100 results per request; however, you can modify the number of results returned by passing an integer to the `page_size` query parameter. This endpoint is useful for retrieving the IDs of Twilio SendGrid designs that you want to duplicate and modify.

operationId: DesignsApi_listPreBuiltDesigns

Parameters

Name In Required Type Description
optional
optional
optional

Responses

200
GET /designs/pre-builts
GET /designs/pre-builts/{id}

**This endpoint allows you to retrieve a single pre-built design**. A GET request to `/designs/pre-builts/{id}` will retrieve details about a specific pre-built design. This endpoint is valuable when retrieving details about a pre-built design that you wish to duplicate and modify.

operationId: DesignsApi_getSinglePreBuiltDesign

Responses

200
400
404
GET /designs/pre-builts/{id}
GET /designs/{id}

**This endpoint allows you to retrieve a single design**. A GET request to `/designs/{id}` will retrieve details about a specific design in your Design Library. This endpoint is valuable when retrieving information stored in a field that you wish to update using a PATCH request.

operationId: DesignsApi_getSingleDesign

Responses

200
400
404
GET /designs/{id}

Domain authentication 4 endpoints

GET /whitelabel/domains

**This endpoint allows you to retrieve a list of all domains you have authenticated.**

operationId: DomainAuthentication_getAllDomains

Parameters

Name In Required Type Description
limit query optional integer Number of domains to return.
offset query optional integer Paging offset.
exclude_subusers query optional boolean Exclude subuser domains from the result.
username query optional string The username associated with an authenticated domain.
domain query optional string Search for authenticated domains.
optional

Responses

200
GET /whitelabel/domains
GET /whitelabel/domains/default

**This endpoint allows you to retrieve the default authentication for a domain.** When creating or updating a domain authentication, you can set the domain as a default. The default domain will be used to send all mail. If you have multiple authenticated domains, the authenticated domain matching the domain of the From address will be used, and the default will be overridden. This endpoint will return a default domain and its details only if a default is set. You are not required to set a default. If you do not set a default domain, this endpoint will return general information about your domain authentication status.

operationId: DomainAuthentication_getDefaultAuthentication

Parameters

Name In Required Type Description
domain query optional string The domain to find a default authentication.
optional

Responses

200
GET /whitelabel/domains/default
GET /whitelabel/domains/subuser

**This endpoint allows you to retrieve all of the authenticated domains that have been assigned to a specific subuser.** Authenticated domains can be associated with (i.e. assigned to) subusers from a parent account. This functionality allows subusers to send mail using their parent's domain authentication. To associate an authenticated domain with a subuser, the parent account must first authenticate and validate the domain. The parent may then associate the authenticated domain via the subuser management tools.

operationId: DomainAuthentication_listSubuserDomains

Parameters

Name In Required Type Description
username query required string Username for the subuser to find associated authenticated domain.

Responses

200
GET /whitelabel/domains/subuser
GET /whitelabel/domains/{domain_id}

**This endpoint allows you to retrieve a specific authenticated domain.**

operationId: DomainAuthentication_getSpecificDomain

Parameters

Name In Required Type Description
optional

Responses

200
GET /whitelabel/domains/{domain_id}

Ip access management 3 endpoints

GET /access_settings/activity

**This endpoint allows you to retrieve a list of all of the IP addresses that recently attempted to access your account either through the User Interface or the API.**

operationId: IpAccessManagement_getRecentAccessAttempts

Parameters

Name In Required Type Description
limit query optional integer Limits the number of IPs to return.
optional

Responses

200
401
403
404
500
GET /access_settings/activity
GET /access_settings/whitelist

**This endpoint allows you to retrieve a list of IP addresses that are currently allowed to access your account.** Each IP address returned to you will have `created_at` and `updated_at` dates. Each IP will also be associated with an `id` that can be used to remove the address from your allow list.

operationId: IpAccessManagement_getAllowedIPs

Parameters

Name In Required Type Description
optional

Responses

200
401
403
404
500
GET /access_settings/whitelist
GET /access_settings/whitelist/{rule_id}

**This endpoint allows you to retreive a specific IP address that has been allowed to access your account.** You must include the ID for the specific IP address you want to retrieve in your call. You can retrieve the IDs associated with your allowed IP addresses using the "Retrieve a list of currently allowed IPs" endpoint.

operationId: IpAccessManagement_getAllowedIp

Parameters

Name In Required Type Description
optional

Responses

200
GET /access_settings/whitelist/{rule_id}

Ip addresses 4 endpoints

GET /ips

**This endpoint allows you to retrieve a list of all assigned and unassigned IPs.** Response includes warm up status, pools, assigned subusers, and reverse DNS info. The start_date field corresponds to when warmup started for that IP. A single IP address or a range of IP addresses may be dedicated to an account in order to send email for multiple domains. The reputation of this IP is based on the aggregate performance of all the senders who use it.

operationId: GET_ips

Parameters

Name In Required Type Description
ip query optional string The IP address to get
exclude_whitelabels query optional boolean Should we exclude reverse DNS records (whitelabels)?
limit query optional integer The number of IPs you want returned at the same time.
offset query optional integer The offset for the number of IPs that you are requesting.
subuser query optional string The subuser you are requesting for.
sort_by_direction query optional string The direction to sort the results.

Responses

200
GET /ips
GET /ips/assigned

**This endpoint allows you to retrieve only assigned IP addresses.** A single IP address or a range of IP addresses may be dedicated to an account in order to send email for multiple domains. The reputation of this IP is based on the aggregate performance of all the senders who use it.

operationId: IpAddresses_getAssignedIps

Responses

200
GET /ips/assigned
GET /ips/remaining

**This endpoint gets amount of IP Addresses that can still be created during a given period and the price of those IPs.**

operationId: IpAddresses_getRemainingIPsCount

Responses

200
GET /ips/remaining
GET /ips/{ip_address}

**This endpoint allows you to see which IP pools a particular IP address has been added to.** The same IP address can be added to multiple IP pools. A single IP address or a range of IP addresses may be dedicated to an account in order to send email for multiple domains. The reputation of this IP is based on the aggregate performance of all the senders who use it.

operationId: IpAddresses_getIpPoolsByAddress

Responses

200
GET /ips/{ip_address}

Ip pools 2 endpoints

GET /ips/pools

**This endpoint allows you to get all of your IP pools.**

operationId: IpPools_getAll

Responses

200
GET /ips/pools
GET /ips/pools/{pool_name}

**This endpoint allows you to get all of the IP addresses that are in a specific IP pool.**

operationId: IpPools_getPoolIps

Responses

200
404
GET /ips/pools/{pool_name}

Ip warmup 2 endpoints

GET /ips/warmup

**This endpoint allows you to retrieve all of your IP addresses that are currently warming up.**

operationId: IpWarmup_getAllIpsWarmup

Responses

200
GET /ips/warmup
GET /ips/warmup/{ip_address}

**This endpoint allows you to retrieve the warmup status for a specific IP address.** You can retrieve all of your warming IPs using the "Retrieve all IPs currently in warmup" endpoint.

operationId: IpWarmup_getWarmupStatusForIpAddress

Responses

200
404
GET /ips/warmup/{ip_address}

Invalid emails api 2 endpoints

GET /suppression/invalid_emails

**This endpoint allows you to retrieve a list of all invalid email addresses.**

operationId: InvalidEmailsApi_getAllInvalidEmails

Parameters

Name In Required Type Description
start_time query optional integer Refers start of the time range in unix timestamp when an invalid email was created (inclusive).
end_time query optional integer Refers end of the time range in unix timestamp when an invalid email was created (inclusive).
limit query optional integer Limit the number of results to be displayed per page.
offset query optional integer Paging offset. The point in the list to begin displaying results.
optional

Responses

200
GET /suppression/invalid_emails
GET /suppression/invalid_emails/{email}

**This endpoint allows you to retrieve a specific invalid email addresses.**

operationId: InvalidEmailsApi_getSpecificInvalidEmail

Parameters

Name In Required Type Description
optional

Responses

200
GET /suppression/invalid_emails/{email}

Lists 3 endpoints

GET /marketing/lists

**This endpoint returns an array of all of your contact lists.**

operationId: Lists_getAll

Parameters

Name In Required Type Description
page_size query optional number Maximum number of elements to return. Defaults to 100, returns 1000 max
page_token query optional string

Responses

200
GET /marketing/lists
GET /marketing/lists/{id}

**This endpoint returns data about a specific list.** Setting the optional parameter `contact_sample=true` returns the `contact_sample` in the response body. Up to fifty of the most recent contacts uploaded or attached to a list will be returned, sorted alphabetically, by email address. The full contact count is also returned.

operationId: Lists_getListById

Parameters

Name In Required Type Description
contact_sample query optional boolean Setting this parameter to the true will cause the contact_sample to be returned

Responses

200
404
GET /marketing/lists/{id}
GET /marketing/lists/{id}/contacts/count

**This endpoint returns the number of contacts on a specific list.**

operationId: Lists_contactCountGet

Responses

200
404
GET /marketing/lists/{id}/contacts/count

Marketing campaigns stats 8 endpoints

GET /marketing/stats/automations

**This endpoint allows you to retrieve stats for all your Automations.** By default, all of your Automations will be returned, but you can specify a selection by passing in a comma-separated list of Automation IDs as the value of the query string parameter `automation_ids`. Responses are paginated. You can limit the number of responses returned per batch using the `page_size` query string parameter. The default is 50, but you specify a value between 1 and 100. You can retrieve a specific page of responses with the `page_token` query string parameter.

operationId: MarketingCampaignsStats_getAllAutomationStats

Parameters

Name In Required Type Description
automation_ids query optional array This endpoint returns all automation IDs if no `automation_ids` are specified.
optional
optional

Responses

200
400
GET /marketing/stats/automations
GET /marketing/stats/automations/export

**This endpoint allows you to export Automation stats as CSV data**. You can specify one Automation or many: include as many Automation IDs as you need, separating them with commas, as the value of the `ids` query string paramter. The data is returned as plain text response but in CSV format, so your application making the call can present the information in whatever way is most appropriate, or just save the data as a `.csv` file.

operationId: MarketingCampaignsStats_exportAutomationStats

Parameters

Name In Required Type Description
ids query optional array The IDs of Automations for which to export stats.
timezone query optional string The [IANA Area/Region](https://en.wikipedia.org/wiki/Tz_database#Names_of_time_zones) string representing the timezone in which the stats are to be presented; i.e. `"America/Chicago"`. This parameter changes the timezone format only; it does not alter which stats are returned.

Responses

200
400
GET /marketing/stats/automations/export
GET /marketing/stats/automations/{id}

**This endpoint allows you to retrieve stats for a single Automation using its ID.** Multiple Automation IDs can be retrieved using the "Get All Automation Stats" endpoint. Once you have an ID, this endpoint will return detailed stats for the single automation specified. You may constrain the stats returned using the `start_date` and `end_date` query string parameters. You can also use the `group_by` and `aggregated_by` query string parameters to further refine the stats returned.

operationId: MarketingCampaignsStats_getStatsById

Parameters

Name In Required Type Description
optional
optional
optional
optional
optional
optional
optional
optional

Responses

200
400
404
GET /marketing/stats/automations/{id}
GET /marketing/stats/automations/{id}/links

**This endpoint lets you retrieve click-tracking stats for a single Automation**. The stats returned list the URLs embedded in your Automation and the number of clicks each one received. Responses are paginated. You can limit the number of responses returned per batch using the `page_size` query string parameter. The default is 50, but you specify a value between 1 and 100. You can retrieve a specific page of responses with the `page_token` query string parameter.

operationId: MarketingCampaignsStats_getAutomationLinkStat

Parameters

Name In Required Type Description
optional
optional
optional
optional

Responses

200
400
404
GET /marketing/stats/automations/{id}/links
GET /marketing/stats/singlesends

**This endpoint allows you to retrieve stats for all your Single Sends.** By default, all of your Single Sends will be returned, but you can specify a selection by passing in a comma-separated list of Single Send IDs as the value of the query string parameter `singlesend_ids`. Responses are paginated. You can limit the number of responses returned per batch using the `page_size` query string parameter. The default is 50, but you specify a value between 1 and 100. You can retrieve a specific page of responses with the `page_token` query string parameter.

operationId: MarketingCampaignsStats_getAllSingleSendsStats

Parameters

Name In Required Type Description
singlesend_ids query optional array This endpoint returns all Single Send IDs if no IDs are included in `singlesend_ids`.
optional
optional

Responses

200
400
GET /marketing/stats/singlesends
GET /marketing/stats/singlesends/export

**This endpoint allows you to export Single Send stats as .CSV data**. You can specify one Single Send or many: include as many Single Send IDs as you need, separating them with commas, as the value of the `ids` query string paramter. The data is returned as plain text response but in .CSV format, so your application making the call can present the information in whatever way is most appropriate, or just save the data as a .csv file.

operationId: MarketingCampaignsStats_exportSingleSendStats

Parameters

Name In Required Type Description
ids query optional array The IDs of Single Sends for which to export stats.
timezone query optional string The [IANA Area/Region](https://en.wikipedia.org/wiki/Tz_database#Names_of_time_zones) string representing the timezone in which the stats are to be presented; i.e. `"America/Chicago"`. This parameter changes the timezone format only; it does not alter which stats are returned.

Responses

200
400
GET /marketing/stats/singlesends/export
GET /marketing/stats/singlesends/{id}

**This endpoint allows you to retrieve stats for an individual Single Send using a Single Send ID.** Multiple Single Send IDs can be retrieved using the "Get All Single Sends Stats" endpoint. Once you have an ID, this endpoint will return detailed stats for the Single Send specified. You may constrain the stats returned using the `start_date` and `end_date` query string parameters. You can also use the `group_by` and `aggregated_by` query string parameters to further refine the stats returned.

operationId: MarketingCampaignsStats_getSingleSendStatsById

Parameters

Name In Required Type Description
optional
optional
optional
optional
optional
optional
optional

Responses

200
400
404
GET /marketing/stats/singlesends/{id}
GET /marketing/stats/singlesends/{id}/links

**This endpoint lets you retrieve click-tracking stats for one Single Send**. The stats returned list the URLs embedded in the specified Single Send and the number of clicks each one received. Responses are paginated. You can limit the number of responses returned per batch using the `page_size` query string parameter. The default is 50, but you specify a value between 1 and 100. You can retrieve a specific page of responses with the `page_token` query string parameter.

operationId: MarketingCampaignsStats_getSingleSendLinkStatById

Parameters

Name In Required Type Description
optional
optional
optional
optional
optional

Responses

200
400
404
GET /marketing/stats/singlesends/{id}/links

Query 2 endpoints

GET /messages

This is **BETA** functionality. You may not have access, and we reserve the right to change functionality without notice. Filter all messages to search your Email Activity. All queries need to be [URL encoded](https://meyerweb.com/eric/tools/dencoder/), and have this format: `query={query_type}="{query_content}"` encoded, this would look like this: `query=type%3D%22query_content%22` for example: Filter by a specific email - `query=to_email%3D%22example%40example.com%22` Filter by subject line - `query=subject%3d%22A%20Great%20Subject%22` **Full list of basic query types and examples:** | **Filter query** | **Unencoded Example** (put this one into the try it out query - it'll automatically encode it for you) | **Encoded Example** (use this one in your code) | |-----------------|----------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------| | msg_id | msg_id=“filter0307p1las1-16816-5A023E36-1.0” | msg_id%3D%22filter0307p1las1-16816-5A023E36-1.0%22 | | from_email | from_email=“testing@sendgrid.net” | from_email%3D%22testing%40sendgrid.net%22 | | subject | subject="This is a subject test" | subject%22This%20is%20a%20subject%20test%22 | | to_email | to_email="example@example.com" | to_email%3D%22example%40example.com%22 | | status | | status%22processed%22 | | template_id | | | | asm_group_id | | | | api_key_id | | | | events | status="processed" | status%3D%22processed%22 | | originating_ip | | | | categories | | | | unique_args | | | | outbound_ip | | | | last_event_time | last_event_time=“2017-11-07T23:13:58Z” | last_event_time%3D%E2%80%9C2017-11-07T23%3A13%3A58Z%E2%80%9D | | clicks | clicks="0" | clicks%3D%220%22 | For information about building compound queries, and for the full query language functionality, see the [query language reference](https://docs.google.com/a/sendgrid.com/document/d/1fWoKTFNfg5UUsB6t9KuIcSo9CetKF_T0bGfWJ_gdPCs/edit?usp=sharing). Coming soon, example compound queries: limit + to email + date

operationId: Query_filterMessages

Parameters

Name In Required Type Description
query query required string Use the query syntax to filter your email activity.
limit query optional number The number of messages returned. This parameter must be greater than 0 and less than or equal to 1000
X-Query-Id header optional string
X-Cursor header optional string

Responses

200
400
429
GET /messages
GET /messages/{msg_id}

This is BETA functionality. You may not have access, and we reserve the right to change functionality without notice. Get all of the details about the specified message.

operationId: Query_messageDetails

Responses

200
400
404
429
GET /messages/{msg_id}

Reverse dns 2 endpoints

GET /whitelabel/ips

**This endpoint allows you to retrieve all of the Reverse DNS records created by this account.** You may include a search key by using the `ip` query string parameter. This enables you to perform a prefix search for a given IP segment (e.g., `?ip="192."`). Use the `limit` query string parameter to reduce the number of records returned. All records will be returned if you have fewer records than the specified limit. The `offset` query string parameter allows you to specify a non-zero index from which records will be returned. For example, if you have ten records, `?offset=5` will return the last five records (at indexes 5 through 9). The list starts at index zero.

operationId: ReverseDns_getAllReverseDnsRecords

Parameters

Name In Required Type Description
limit query optional integer The maximum number of results to retrieve.
offset query optional integer The point in the list of results to begin retrieving IP addresses from.
ip query optional string The IP address segment that you'd like to use in a prefix search.
optional

Responses

200
GET /whitelabel/ips
GET /whitelabel/ips/{id}

**This endpoint allows you to retrieve a reverse DNS record.** You can retrieve the IDs associated with all your reverse DNS records using the "Retrieve all reverse DNS records" endpoint.

operationId: ReverseDns_getRecord

Parameters

Name In Required Type Description
optional

Responses

200
GET /whitelabel/ips/{id}

Segmenting contacts 2 endpoints

GET /marketing/segments

**This endpoint allows you to retrieve a list of segments.** The query param `parent_list_ids` is treated as a filter. Any match will be returned. 0 matches will return a response code of 200 with an empty `results` array. `parent_list_ids` | `no_parent_list_id` | `result` -----------------:|:--------------------:|:------------- empty | false | all segments values | false | segments filtered by list_ids values | true | segments filtered by list_ids and segments with no parent list_ids empty | true | segments with no parent list_ids

operationId: SegmentingContacts_listSegments

Parameters

Name In Required Type Description
parent_list_ids query optional string A comma separated list of list ids to be used when searching for segments with the specified parent_list_id, no more than 50 is allowed
no_parent_list_id query optional boolean If set to `true` segments with an empty value of `parent_list_id` will be returned in the filter. If the value is not present it defaults to 'false'.

Responses

200
401
403
404
500
GET /marketing/segments
GET /marketing/segments/{segment_id}

**This endpoint allows you to retrieve a single segment by ID.**

operationId: SegmentingContacts_getById

Parameters

Name In Required Type Description
query_json query optional boolean Defaults to `false`. Set to `true` to return the parsed SQL AST as a JSON object in the field `query_json`

Responses

200
401
403
404
500
GET /marketing/segments/{segment_id}

Segmenting contacts v2 - beta 2 endpoints

GET /marketing/segments/2.0

**The Segmentation V2 API is currently in private beta. If you'd like to be added to the beta, please fill out this [form]({https://docs.google.com/forms/d/e/1FAIpQLSd5zwC9dRk8lAp1oTWjdGc-aSY69flW_7wnutvKBhpUluSnfQ/viewform)** The query param `parent_list_ids` is treated as a filter. Any match will be returned. 0 matches will return a response code of 200 with an empty `results` array. `parent_list_ids` | `no_parent_list_id` | `result` -----------------:|:--------------------:|:------------- empty | false | all segments values | false | segments filtered by list_ids values | true | segments filtered by list_ids and segments with no parent list_ids empty | true | segments with no parent list_ids

operationId: GET_segments

Parameters

Name In Required Type Description
parent_list_ids query optional string A comma separated list up to 50 in size, to filter segments on. Only segments that have any of these list ids as the parent list will be retrieved. This is different from the parameter of the same name used when creating a segment.
no_parent_list_id query optional boolean If set to `true` segments with an empty value of `parent_list_id` will be returned in the filter. If the value is not present it defaults to 'false'.

Responses

200
400
404
500
GET /marketing/segments/2.0
GET /marketing/segments/2.0/{segment_id}

**The Segmentation V2 API is currently in private beta. If you'd like to be added to the beta, please fill out this [form]({https://docs.google.com/forms/d/e/1FAIpQLSd5zwC9dRk8lAp1oTWjdGc-aSY69flW_7wnutvKBhpUluSnfQ/viewform)**

operationId: SegmentingContactsV2Beta_getById

Parameters

Name In Required Type Description
contacts_sample query optional boolean Defaults to `true`. Set to `false` to exclude the contacts_sample in the response.

Responses

200
400
500
GET /marketing/segments/2.0/{segment_id}

Sender identities api 2 endpoints

GET /senders

**This endpoint allows you to retrieve a list of all sender identities that have been created for your account.**

operationId: SenderIdentitiesApi_getAll

Parameters

Name In Required Type Description
optional

Responses

200
GET /senders
GET /senders/{sender_id}

**This endpoint allows you to retrieve a specific sender identity.**

operationId: SenderIdentitiesApi_viewSenderIdentity

Parameters

Name In Required Type Description
optional

Responses

200
404
GET /senders/{sender_id}

Sender verification 4 endpoints

GET /verified_senders

**This endpoint allows you to retrieve all the Sender Identities associated with an account.** This endpoint will return both verified and unverified senders. You can limit the number of results returned using the `limit`, `lastSeenID`, and `id` query string parameters. * `limit` allows you to specify an exact number of Sender Identities to return. * `lastSeenID` will return senders with an ID number occuring after the passed in ID. In other words, the `lastSeenID` provides a starting point from which SendGrid will iterate to find Sender Identities associated with your account. * `id` will return information about only the Sender Identity passed in the request.

operationId: SenderVerification_getAllSenderIdentities

Parameters

Name In Required Type Description
limit query optional number
lastSeenID query optional number
id query optional integer

Responses

200
401
403
404
500
GET /verified_senders
GET /verified_senders/domains

**This endpoint returns a list of domains known to implement DMARC and categorizes them by failure type — hard failure or soft failure**. Domains listed as hard failures will not deliver mail when used as a [Sender Identity](https://sendgrid.com/docs/for-developers/sending-email/sender-identity/) due to the domain's DMARC policy settings. For example, using a `yahoo.com` email address as a Sender Identity will likely result in the rejection of your mail. For more information about DMARC, see [Everything about DMARC](https://sendgrid.com/docs/ui/sending-email/dmarc/).

operationId: SenderVerification_listDomainWarn

Responses

200
401
403
404
500
GET /verified_senders/domains
GET /verified_senders/steps_completed

**This endpoint allows you to determine which of SendGrid’s verification processes have been completed for an account**. This endpoint returns boolean values, `true` and `false`, for [Domain Authentication](https://sendgrid.com/docs/for-developers/sending-email/sender-identity/#domain-authentication), `domain_verified`, and [Single Sender Verification](https://sendgrid.com/docs/for-developers/sending-email/sender-identity/#single-sender-verification), `sender_verified`, for the account. An account may have one, both, or neither verification steps completed. If you need to authenticate a domain rather than a Single Sender, see the "Authenticate a domain" endpoint.

operationId: SenderVerification_determineVerificationStatus

Responses

200
401
403
404
500
GET /verified_senders/steps_completed
GET /verified_senders/verify/{token}

**This endpoint allows you to verify a sender requests.** The token is generated by SendGrid and included in a verification email delivered to the address that's pending verification.

operationId: SenderVerification_requestVerificationToken

Responses

204
401
403
404
500
GET /verified_senders/verify/{token}

Settings - enforced tls 1 endpoints

GET /user/settings/enforced_tls

**This endpoint allows you to retrieve your current Enforced TLS settings.** The Enforced TLS settings specify whether or not the recipient is required to support TLS or have a valid certificate. If either `require_tls` or `require_valid_cert` is set to `true`, the recipient must support TLS 1.1 or higher or have a valid certificate. If these conditions are not met, Twilio SendGrid will drop the message and send a block event with “TLS required but not supported” as the description.

operationId: SettingsEnforcedTls_getCurrentEnforcedTlsSettings

Parameters

Name In Required Type Description
optional

Responses

200
401
403
404
500
GET /user/settings/enforced_tls

Settings - inbound parse 1 endpoints

GET /user/webhooks/parse/settings/{hostname}

**This endpoint allows you to retrieve a specific inbound parse setting by hostname.** You can retrieve all your Inbound Parse settings and their associated host names with the "Retrieve all parse settings" endpoint.

operationId: SettingsInboundParse_getSpecificParseSettingByHostname

Parameters

Name In Required Type Description
optional

Responses

200
401
403
404
500
GET /user/webhooks/parse/settings/{hostname}

Settings - mail 7 endpoints

GET /mail_settings

**This endpoint allows you to retrieve a list of all mail settings.** Each setting will be returned with an `enabled` status set to `true` or `false` and a short description that explains what the setting does.

operationId: SettingsMail_getAllMailSettings

Parameters

Name In Required Type Description
limit query optional integer The number of settings to return.
offset query optional integer Where in the list of results to begin displaying settings.
optional

Responses

200
400
401
403
404
500
GET /mail_settings
GET /mail_settings/address_whitelist

**This endpoint allows you to retrieve your current email address whitelist settings.** The Address Whitelist setting allows you to specify email addresses or domains for which mail should never be suppressed. For example, if you own the domain `example.com`, and one or more of your recipients use `email@example.com` addresses, placing `example.com` in the address whitelist setting instructs Twilio SendGrid to ignore all bounces, blocks, and unsubscribes logged for that domain. In other words, all bounces, blocks, and unsubscribes will still be sent to `example.com` as if they were sent under normal sending conditions.

operationId: SettingsMail_getAddressWhitelistMailSettings

Parameters

Name In Required Type Description
optional

Responses

200
400
401
403
404
500
GET /mail_settings/address_whitelist
GET /mail_settings/bounce_purge

**This endpoint allows you to retrieve your current bounce and purge settings.** The Bounce Perge setting allows you to set a schedule that Twilio SendGrid will use to automatically delete contacts from your soft and hard bounce suppression lists. A hard bounce occurs when an email message has been returned to the sender because the recipient's address is invalid. A hard bounce might occur because the domain name doesn't exist or because the recipient is unknown. A soft bounce occurs when an email message reaches the recipient's mail server but is bounced back undelivered before it actually reaches the recipient. A soft bounce might occur because the recipient's inbox is full. You can also manage this setting in the [Mail Settings section of the Twilio SendGrid App](https://app.sendgrid.com/settings/mail_settings). You can manage your bounces manually using the [Bounces API](https://sendgrid.api-docs.io/v3.0/bounces-api) or the [Bounces menu in the Twilio SendGrid App](https://app.sendgrid.com/suppressions/bounces).

operationId: SettingsMail_getBouncePurgeSettings

Parameters

Name In Required Type Description
optional

Responses

200
400
401
403
404
500
GET /mail_settings/bounce_purge
GET /mail_settings/footer

**This endpoint allows you to retrieve your current Footer mail settings.** The Footer setting will insert a custom footer at the bottom of your text and HTML email message bodies. You can insert your HTML or plain text directly using the "Update footer mail settings" endpoint, or you can create the footer using the [Mail Settings menu in the Twilio SendGrid App](https://app.sendgrid.com/settings/mail_settings).

operationId: SettingsMail_getFooterMailSettings

Parameters

Name In Required Type Description
optional

Responses

200
400
401
403
404
500
GET /mail_settings/footer
GET /mail_settings/forward_bounce

**This endpoint allows you to retrieve your current bounce forwarding mail settings.** Enabling the Forward Bounce setting allows you to specify `email` addresses to which bounce reports will be forwarded. This endpoint returns the email address you have set to receive forwarded bounces and an `enabled` status indicating if the setting is active.

operationId: SettingsMail_getForwardBounceMailSettings

Parameters

Name In Required Type Description
optional

Responses

200
400
401
403
404
500
GET /mail_settings/forward_bounce
GET /mail_settings/forward_spam

**This endpoint allows you to retrieve your current Forward Spam mail settings.** Enabling the Forward Spam setting allows you to specify `email` addresses to which spam reports will be forwarded. This endpoint returns any email address(es) you have set to receive forwarded spam and an `enabled` status indicating if the setting is active.

operationId: SettingsMail_getForwardSpamMailSettings

Parameters

Name In Required Type Description
optional

Responses

200
400
401
403
404
500
GET /mail_settings/forward_spam
GET /mail_settings/template

**This endpoint allows you to retrieve your current legacy email template settings.** This setting refers to our original email templates. We currently support more fully featured [Dynamic Transactional Templates](https://sendgrid.com/docs/ui/sending-email/how-to-send-an-email-with-dynamic-transactional-templates/). The legacy email template setting wraps an HTML template around your email content. This can be useful for sending out marketing email and/or other HTML formatted messages. For instructions on using legacy templates, see how to ["Create and Edit Legacy Transactional Templates](https://sendgrid.com/docs/ui/sending-email/create-and-edit-legacy-transactional-templates/). For help migrating to our current template system, see ["Migrating from Legacy Templates"](https://sendgrid.com/docs/ui/sending-email/migrating-from-legacy-templates/).

operationId: SettingsMail_getLegacyTemplateSettings

Parameters

Name In Required Type Description
optional

Responses

200
400
401
403
404
500
GET /mail_settings/template

Settings - partner 2 endpoints

GET /partner_settings

**This endpoint allows you to retrieve a list of all partner settings that you can enable.** Our partner settings allow you to integrate your SendGrid account with our partners to increase your SendGrid experience and functionality. For more information about our partners, and how you can begin integrating with them, please visit our [Partners documentation](https://sendgrid.com/docs/ui/account-and-settings/partners/).

operationId: SettingsPartner_listPartnerSettings

Parameters

Name In Required Type Description
limit query optional integer The number of settings to return per page.
offset query optional integer The paging offset.
optional

Responses

200
GET /partner_settings
GET /partner_settings/new_relic

**This endpoint allows you to retrieve your current New Relic partner settings.** Our partner settings allow you to integrate your SendGrid account with our partners to increase your SendGrid experience and functionality. For more information about our partners, and how you can begin integrating with them, please visit our [Partners documentation](https://sendgrid.com/docs/ui/account-and-settings/partners/). By integrating with New Relic, you can send your SendGrid email statistics to your New Relic Dashboard. If you enable this setting, your stats will be sent to New Relic every 5 minutes. You will need your New Relic License Key to enable this setting. For more information, please see our [SendGrid for New Relic documentation](https://sendgrid.com/docs/ui/analytics-and-reporting/tracking-stats-using-new-relic/).

operationId: SettingsPartner_getAllNewRelicPartnerSettings

Parameters

Name In Required Type Description
optional

Responses

200
GET /partner_settings/new_relic

Settings - tracking 5 endpoints

GET /tracking_settings

**This endpoint allows you to retrieve a list of all tracking settings on your account.**

operationId: SettingsTracking_getAllTracking

Parameters

Name In Required Type Description
optional

Responses

200
GET /tracking_settings
GET /tracking_settings/click

**This endpoint allows you to retrieve your current click tracking setting.** Click Tracking overrides all the links and URLs in your emails and points them to either SendGrid’s servers or the domain with which you branded your link. When a customer clicks a link, SendGrid tracks those [clicks](https://sendgrid.com/docs/glossary/clicks/). Click tracking helps you understand how users are engaging with your communications. SendGrid can track up to 1000 links per email

operationId: SettingsTracking_getClickTrackingSetting

Parameters

Name In Required Type Description
optional

Responses

200
GET /tracking_settings/click
GET /tracking_settings/google_analytics

**This endpoint allows you to retrieve your current setting for Google Analytics.** Google Analytics helps you understand how users got to your site and what they're doing there. For more information about using Google Analytics, please refer to [Google’s URL Builder](https://support.google.com/analytics/answer/1033867?hl=en) and their article on ["Best Practices for Campaign Building"](https://support.google.com/analytics/answer/1037445). We default the settings to Google’s recommendations. For more information, see [Google Analytics Demystified](https://sendgrid.com/docs/ui/analytics-and-reporting/google-analytics/).

operationId: SettingsTracking_getGoogleAnalyticsSettings

Parameters

Name In Required Type Description
optional

Responses

200
GET /tracking_settings/google_analytics
GET /tracking_settings/open

**This endpoint allows you to retrieve your current settings for open tracking.** Open Tracking adds an invisible image at the end of the email which can track email opens. If the email recipient has images enabled on their email client, a request to SendGrid’s server for the invisible image is executed and an open event is logged. These events are logged in the Statistics portal, Email Activity interface, and are reported by the Event Webhook.

operationId: SettingsTracking_getOpenSettings

Parameters

Name In Required Type Description
optional

Responses

200
GET /tracking_settings/open
GET /tracking_settings/subscription

**This endpoint allows you to retrieve your current settings for subscription tracking.** Subscription tracking adds links to the bottom of your emails that allows your recipients to subscribe to, or unsubscribe from, your emails.

operationId: SettingsTracking_getSubscriptionTrackingSettings

Parameters

Name In Required Type Description
optional

Responses

200
GET /tracking_settings/subscription

Single sends 3 endpoints

GET /marketing/singlesends

**This endpoint allows you to retrieve all your Single Sends.** Returns all of your Single Sends with condensed details about each, including the Single Sends' IDs. For more details about an individual Single Send, pass the Single Send's ID to the `/marketing/singlesends/{id}` endpoint.

operationId: SingleSends_getAllSinglesends

Parameters

Name In Required Type Description
page_size query optional integer
page_token query optional string

Responses

200
500
GET /marketing/singlesends
GET /marketing/singlesends/categories

**This endpoint allows you to retrieve all the categories associated with your Single Sends.** This endpoint will return your latest 1,000 categories.

operationId: SingleSends_getAllCategories

Responses

200
500
GET /marketing/singlesends/categories
GET /marketing/singlesends/{id}

**This endpoint allows you to retrieve details about one Single Send using a Single Send ID.** You can retrieve all of your Single Sends by making a GET request to the `/marketing/singlesends` endpoint.

operationId: SingleSends_getDetailsById

Responses

200
404
500
GET /marketing/singlesends/{id}

Single sign-on settings 2 endpoints

GET /sso/integrations

**This endpoint allows you to retrieve all SSO integrations tied to your Twilio SendGrid account.** The IDs returned by this endpoint can be used by the APIs additional endpoints to modify your SSO integrations.

operationId: SingleSignOnSettings_getAllSsoIntegrations

Parameters

Name In Required Type Description
si query optional boolean If this parameter is set to `true`, the response will include the `completed_integration` field.

Responses

200
400
401
403
429
500
GET /sso/integrations
GET /sso/integrations/{id}

**This endpoint allows you to retrieve an SSO integration by ID.** You can retrieve the IDs for your configurations from the response provided by the "Get All SSO Integrations" endpoint.

operationId: SingleSignOnSettings_getSsoIntegrationById

Parameters

Name In Required Type Description
si query optional boolean If this parameter is set to `true`, the response will include the `completed_integration` field.

Responses

200
400
401
403
429
500
GET /sso/integrations/{id}

Spam reports api 2 endpoints

GET /suppression/spam_reports

**This endpoint allows you to retrieve all spam reports.**

operationId: SpamReportsApi_getAllReports

Parameters

Name In Required Type Description
start_time query optional integer The start of the time range when a spam report was created (inclusive). This is a unix timestamp.
end_time query optional integer The end of the time range when a spam report was created (inclusive). This is a unix timestamp.
limit query optional integer Limit the number of results to be displayed per page.
offset query optional integer Paging offset. The point in the list to begin displaying results.
optional

Responses

200
GET /suppression/spam_reports
GET /suppression/spam_reports/{email}

**This endpoint allows you to retrieve a specific spam report by email address.**

operationId: SpamReportsApi_getSpecificReportByEmail

Parameters

Name In Required Type Description
optional

Responses

200
GET /suppression/spam_reports/{email}

Stats 7 endpoints

GET /browsers/stats

**This endpoint allows you to retrieve your email statistics segmented by browser type.** **We only store up to 7 days of email activity in our database.** By default, 500 items will be returned per request via the Advanced Stats API endpoints. Advanced Stats provide a more in-depth view of your email statistics and the actions taken by your recipients. You can segment these statistics by geographic location, device type, client type, browser, and mailbox provider. For more information about statistics, please see our [Statistics Overview](https://sendgrid.com/docs/ui/analytics-and-reporting/stats-overview/).

operationId: Stats_getEmailStatisticsByBrowser

Parameters

Name In Required Type Description
browsers query optional string The browsers to get statistics for. You can include up to 10 different browsers by including this parameter multiple times.
optional
optional
optional
optional
optional
optional

Responses

200
GET /browsers/stats
GET /clients/stats

**This endpoint allows you to retrieve your email statistics segmented by client type.** **We only store up to 7 days of email activity in our database.** By default, 500 items will be returned per request via the Advanced Stats API endpoints. Advanced Stats provide a more in-depth view of your email statistics and the actions taken by your recipients. You can segment these statistics by geographic location, device type, client type, browser, and mailbox provider. For more information about statistics, please see our [Statistics Overview](https://sendgrid.com/docs/ui/analytics-and-reporting/stats-overview/).

operationId: Stats_getEmailStatisticsByClientType

Parameters

Name In Required Type Description
optional
optional
optional
optional

Responses

200
GET /clients/stats
GET /clients/{client_type}/stats

**This endpoint allows you to retrieve your email statistics segmented by a specific client type.** **We only store up to 7 days of email activity in our database.** By default, 500 items will be returned per request via the Advanced Stats API endpoints. ## Available Client Types - phone - tablet - webmail - desktop Advanced Stats provide a more in-depth view of your email statistics and the actions taken by your recipients. You can segment these statistics by geographic location, device type, client type, browser, and mailbox provider. For more information about statistics, please see our [Statistics Overview](https://sendgrid.com/docs/ui/analytics-and-reporting/stats-overview/).

operationId: Stats_getStatsByClientType

Parameters

Name In Required Type Description
optional
optional
optional
optional

Responses

200
GET /clients/{client_type}/stats
GET /devices/stats

**This endpoint allows you to retrieve your email statistics segmented by the device type.** **We only store up to 7 days of email activity in our database.** By default, 500 items will be returned per request via the Advanced Stats API endpoints. ## Available Device Types | **Device** | **Description** | **Example** | |---|---|---| | Desktop | Email software on desktop computer. | I.E., Outlook, Sparrow, or Apple Mail. | | Webmail | A web-based email client. | I.E., Yahoo, Google, AOL, or Outlook.com. | | Phone | A smart phone. | iPhone, Android, Blackberry, etc. | Tablet | A tablet computer. | iPad, android based tablet, etc. | | Other | An unrecognized device. | Advanced Stats provide a more in-depth view of your email statistics and the actions taken by your recipients. You can segment these statistics by geographic location, device type, client type, browser, and mailbox provider. For more information about statistics, please see our [Statistics Overview](https://sendgrid.com/docs/ui/analytics-and-reporting/stats-overview/).

operationId: Stats_getEmailStatisticsByDeviceType

Parameters

Name In Required Type Description
optional
optional
optional
optional
optional
optional

Responses

200
GET /devices/stats
GET /geo/stats

**This endpoint allows you to retrieve your email statistics segmented by country and state/province.** **We only store up to 7 days of email activity in our database.** By default, 500 items will be returned per request via the Advanced Stats API endpoints. Advanced Stats provide a more in-depth view of your email statistics and the actions taken by your recipients. You can segment these statistics by geographic location, device type, client type, browser, and mailbox provider. For more information about statistics, please see our [User Guide](https://sendgrid.com/docs/User_Guide/Statistics/index.html).

operationId: Stats_getEmailStatisticsByCountryAndStateProvince

Parameters

Name In Required Type Description
country query optional string The country you would like to see statistics for. Currently only supported for US and CA.
optional
optional
optional
optional
optional
optional

Responses

200
GET /geo/stats
GET /mailbox_providers/stats

**This endpoint allows you to retrieve your email statistics segmented by recipient mailbox provider.** **We only store up to 7 days of email activity in our database.** By default, 500 items will be returned per request via the Advanced Stats API endpoints. Advanced Stats provide a more in-depth view of your email statistics and the actions taken by your recipients. You can segment these statistics by geographic location, device type, client type, browser, and mailbox provider. For more information about statistics, please see our [Statistics Overview](https://sendgrid.com/docs/ui/analytics-and-reporting/stats-overview/).

operationId: Stats_getEmailStatisticsByMailboxProvider

Parameters

Name In Required Type Description
mailbox_providers query optional string The mail box providers to get statistics for. You can include up to 10 by including this parameter multiple times.
optional
optional
optional
optional
optional
optional

Responses

200
GET /mailbox_providers/stats
GET /stats

**This endpoint allows you to retrieve all of your global email statistics between a given date range.** Parent accounts will see aggregated stats for their account and all subuser accounts. Subuser accounts will only see their own stats.

operationId: GET_stats

Parameters

Name In Required Type Description
optional
optional
optional
optional
optional
optional

Responses

200
GET /stats

Subuser monitor settings 1 endpoints

GET /subusers/{subuser_name}/monitor
operationId: SubuserMonitorSettings_getSettings

Responses

200
401
404
GET /subusers/{subuser_name}/monitor

Subuser statistics 4 endpoints

GET /subusers/stats

**This endpoint allows you to retrieve the email statistics for the given subusers.** You may retrieve statistics for up to 10 different subusers by including an additional _subusers_ parameter for each additional subuser.

operationId: SubuserStatistics_getEmailStatsForSubusers

Parameters

Name In Required Type Description
limit query optional integer Limits the number of results returned per page.
offset query optional integer The point in the list to begin retrieving results from.
aggregated_by query optional string How to group the statistics. Must be either "day", "week", or "month".
subusers query required string The subuser you want to retrieve statistics for. You may include this parameter up to 10 times to retrieve statistics for multiple subusers.
start_date query required string The starting date of the statistics to retrieve. Must follow format YYYY-MM-DD.
end_date query optional string The end date of the statistics to retrieve. Defaults to today.

Responses

200
GET /subusers/stats
GET /subusers/stats/monthly

**This endpoint allows you to retrieve the monthly email statistics for all subusers over the given date range.** When using the `sort_by_metric` to sort your stats by a specific metric, you can not sort by the following metrics: `bounce_drops`, `deferred`, `invalid_emails`, `processed`, `spam_report_drops`, `spam_reports`, or `unsubscribe_drops`.

operationId: SubuserStatistics_getMonthlyStatsForAllSubusers

Parameters

Name In Required Type Description
date query required string The date of the month to retrieve statistics for. Must be formatted YYYY-MM-DD
subuser query optional string A substring search of your subusers.
sort_by_metric query optional string The metric that you want to sort by. Metrics that you can sort by are: `blocks`, `bounces`, `clicks`, `delivered`, `opens`, `requests`, `unique_clicks`, `unique_opens`, and `unsubscribes`.'
sort_by_direction query optional string The direction you want to sort.
limit query optional integer Optional field to limit the number of results returned.
offset query optional integer Optional beginning point in the list to retrieve from.

Responses

200
GET /subusers/stats/monthly
GET /subusers/stats/sums

**This endpoint allows you to retrieve the total sums of each email statistic metric for all subusers over the given date range.**

operationId: SubuserStatistics_getEmailStatsForSubusers

Parameters

Name In Required Type Description
sort_by_direction query optional string The direction you want to sort.
start_date query required string The starting date of the statistics to retrieve. Must follow format YYYY-MM-DD.
end_date query optional string The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD.
limit query optional integer Limits the number of results returned per page.
offset query optional integer The point in the list to begin retrieving results from.
aggregated_by query optional string How to group the statistics. Defaults to today. Must follow format YYYY-MM-DD.
sort_by_metric query optional string The metric that you want to sort by. Must be a single metric.

Responses

200
GET /subusers/stats/sums
GET /subusers/{subuser_name}/stats/monthly

**This endpoint allows you to retrive the monthly email statistics for a specific subuser.** When using the `sort_by_metric` to sort your stats by a specific metric, you can not sort by the following metrics: `bounce_drops`, `deferred`, `invalid_emails`, `processed`, `spam_report_drops`, `spam_reports`, or `unsubscribe_drops`.

operationId: SubuserStatistics_getMonthlyEmailStatsForSingleSubuser

Parameters

Name In Required Type Description
date query required string The date of the month to retrieve statistics for. Must be formatted YYYY-MM-DD
sort_by_metric query optional string The metric that you want to sort by. Metrics that you can sort by are: `blocks`, `bounces`, `clicks`, `delivered`, `opens`, `requests`, `unique_clicks`, `unique_opens`, and `unsubscribes`.'
sort_by_direction query optional string The direction you want to sort.
limit query optional integer Optional field to limit the number of results returned.
offset query optional integer Optional beginning point in the list to retrieve from.

Responses

200
GET /subusers/{subuser_name}/stats/monthly

Subusers api 2 endpoints

GET /subusers

**This endpoint allows you to retrieve a list of all of your subusers.** You can choose to retrieve specific subusers as well as limit the results that come back from the API.

operationId: GET_subusers

Parameters

Name In Required Type Description
username query optional string The username of this subuser.
limit query optional integer The number of results you would like to get in each request.
offset query optional integer The number of subusers to skip.

Responses

200
401 Unexpected error in API call. See HTTP response body for details.
GET /subusers
GET /subusers/reputations

**This endpoint allows you to request the reputations for your subusers.** Subuser sender reputations give a good idea how well a sender is doing with regards to how recipients and recipient servers react to the mail that is being received. When a bounce, spam report, or other negative action happens on a sent email, it will affect your sender rating.

operationId: SubusersApi_getSubuserReputations

Parameters

Name In Required Type Description
usernames query optional string

Responses

200
GET /subusers/reputations

Suppressions - global suppressions 2 endpoints

GET /asm/suppressions/global/{email}

**This endpoint allows you to retrieve a global suppression. You can also use this endpoint to confirm if an email address is already globally suppresed.** If the email address you include in the URL path parameter `{email}` is already globally suppressed, the response will include that email address. If the address you enter for `{email}` is not globally suppressed, an empty JSON object `{}` will be returned.

operationId: SuppressionsGlobalSuppressions_getGlobalSuppression

Parameters

Name In Required Type Description
optional

Responses

200
GET /asm/suppressions/global/{email}
GET /suppression/unsubscribes

**This endpoint allows you to retrieve a list of all email address that are globally suppressed.**

operationId: SuppressionsGlobalSuppressions_getAllAddresses

Parameters

Name In Required Type Description
start_time query optional integer Refers start of the time range in unix timestamp when an unsubscribe email was created (inclusive).
end_time query optional integer Refers end of the time range in unix timestamp when an unsubscribe email was created (inclusive).
limit query optional integer The number of results to display on each page.
offset query optional integer The point in the list of results to begin displaying global suppressions.
optional

Responses

200
GET /suppression/unsubscribes

Suppressions - suppressions 3 endpoints

GET /asm/groups/{group_id}/suppressions

**This endpoint allows you to retrieve all suppressed email addresses belonging to the given group.**

operationId: SuppressionsSuppressions_getAllSuppressedEmails

Parameters

Name In Required Type Description
optional

Responses

200
GET /asm/groups/{group_id}/suppressions
GET /asm/suppressions

**This endpoint allows you to retrieve a list of all suppressions.**

operationId: SuppressionsSuppressions_getAllSuppressions

Parameters

Name In Required Type Description
optional

Responses

200
GET /asm/suppressions
GET /asm/suppressions/{email}

**This endpoint returns a list of all groups from which the given email address has been unsubscribed.**

operationId: SuppressionsSuppressions_getUnsubscribeGroupsByEmail

Parameters

Name In Required Type Description
optional

Responses

200
GET /asm/suppressions/{email}

Suppressions - unsubscribe groups 2 endpoints

GET /asm/groups

**This endpoint allows you to retrieve a list of all suppression groups created by this user.** This endpoint can also return information for multiple group IDs that you include in your request. To add a group ID to your request, simply append `?id=123456&id=123456`, with the appropriate group IDs.

operationId: SuppressionsUnsubscribeGroups_getAll

Parameters

Name In Required Type Description
id query optional integer
optional

Responses

200
GET /asm/groups
GET /asm/groups/{group_id}

**This endpoint allows you to retrieve a single suppression group.**

operationId: SuppressionsUnsubscribeGroups_getSingleGroup

Parameters

Name In Required Type Description
optional

Responses

200
GET /asm/groups/{group_id}

Teammates 4 endpoints

GET /scopes/requests

**This endpoint allows you to retrieve a list of all recent access requests.** The Response Header's `link` parameter will include pagination info.

operationId: Teammates_getAccessRequests

Parameters

Name In Required Type Description
limit query optional integer Optional field to limit the number of results returned.
offset query optional integer Optional beginning point in the list to retrieve from.

Responses

200
GET /scopes/requests
GET /teammates

**This endpoint allows you to retrieve a list of all current Teammates.** You can limit the number of results returned using the `limit` query paramater. To return results from a specific Teammate, use the `offset` paramter. The Response Headers will include pagination info.

operationId: Teammates_getAllTeammates

Parameters

Name In Required Type Description
limit query optional integer Number of items to return
offset query optional integer Paging offset
optional

Responses

200
GET /teammates
GET /teammates/pending

**This endpoint allows you to retrieve a list of all pending Teammate invitations.** Each teammate invitation is valid for 7 days. Users may resend the invitation to refresh the expiration date.

operationId: Teammates_getAllPending

Parameters

Name In Required Type Description
optional

Responses

200
GET /teammates/pending
GET /teammates/{username}

**This endpoint allows you to retrieve a specific Teammate by username.** You can retrieve the username's for each of your Teammates using the "Retrieve all Teammates" endpoint.

operationId: Teammates_getByUsername

Parameters

Name In Required Type Description
optional

Responses

200
GET /teammates/{username}

Transactional templates 2 endpoints

GET /templates

**This endpoint allows you to retrieve all transactional templates.**

operationId: GET_templates

Parameters

Name In Required Type Description
generations query optional string Comma-delimited list specifying which generations of templates to return. Options are `legacy`, `dynamic` or `legacy,dynamic`.
page_size query required number The number of templates to be returned in each page of results
page_token query optional string A token corresponding to a specific page of results, as provided by metadata
optional

Responses

200
400
GET /templates
GET /templates/{template_id}

**This endpoint allows you to retrieve a single transactional template.**

operationId: TransactionalTemplates_getSingleTemplate

Parameters

Name In Required Type Description
optional

Responses

200
GET /templates/{template_id}

Transactional templates versions 1 endpoints

GET /templates/{template_id}/versions/{version_id}

**This endpoint allows you to retrieve a specific version of a template.**

operationId: TransactionalTemplatesVersions_getSpecificVersion

Parameters

Name In Required Type Description
optional

Responses

200
GET /templates/{template_id}/versions/{version_id}

Users api 5 endpoints

GET /user/account

**This endpoint allows you to retrieve your user account details.** Your user's account information includes the user's account type and reputation.

operationId: UsersApi_getUserAccountInformation

Parameters

Name In Required Type Description
optional

Responses

200
GET /user/account
GET /user/credits

**This endpoint allows you to retrieve the current credit balance for your account.** Each account has a credit balance, which is a base number of emails it can send before receiving per-email charges. For more information about credits and billing, see [Billing and Plan details information](https://sendgrid.com/docs/ui/account-and-settings/billing/).

operationId: UsersApi_getCreditBalance

Parameters

Name In Required Type Description
optional

Responses

200
GET /user/credits
GET /user/email

**This endpoint allows you to retrieve the email address currently on file for your account.**

operationId: UsersApi_getAccountEmailAddress

Parameters

Name In Required Type Description
optional

Responses

200
GET /user/email
GET /user/profile
operationId: UsersApi_getUserProfile

Parameters

Name In Required Type Description
optional

Responses

200
GET /user/profile
GET /user/username

**This endpoint allows you to retrieve your current account username.**

operationId: UsersApi_getUsername

Parameters

Name In Required Type Description
optional

Responses

200
GET /user/username

Webhooks 4 endpoints

GET /user/webhooks/event/settings

**This endpoint allows you to retrieve your current event webhook settings.** If an event type is marked as `true`, then the event webhook will include information about that event. SendGrid’s Event Webhook will notify a URL of your choice via HTTP POST with information about events that occur as SendGrid processes your email. Common uses of this data are to remove unsubscribes, react to spam reports, determine unengaged recipients, identify bounced email addresses, or create advanced analytics of your email program.

operationId: Webhooks_getEventSettings

Parameters

Name In Required Type Description
optional

Responses

200
GET /user/webhooks/event/settings
GET /user/webhooks/event/settings/signed

**This endpoint allows you to retrieve your signed webhook's public key.** Once you have enabled signing of the Event Webhook, you will need the public key provided to verify the signatures on requests coming from Twilio SendGrid. You can retrieve the public key from this endpoint at any time. For more information about cryptographically signing the Event Webhook, see [Getting Started with the Event Webhook Security Features](https://sendgrid.com/docs/for-developers/tracking-events/getting-started-event-webhook-security-features).

operationId: Webhooks_getSignedWebhookPublicKey

Parameters

Name In Required Type Description
optional

Responses

200
GET /user/webhooks/event/settings/signed
GET /user/webhooks/parse/settings

**This endpoint allows you to retrieve all of your current inbound parse settings.**

operationId: Webhooks_getParseSettings

Parameters

Name In Required Type Description
optional

Responses

200
401
403
404
500
GET /user/webhooks/parse/settings
GET /user/webhooks/parse/stats

**This endpoint allows you to retrieve the statistics for your Parse Webhook useage.** SendGrid's Inbound Parse Webhook allows you to parse the contents and attachments of incomming emails. The Parse API can then POST the parsed emails to a URL that you specify. The Inbound Parse Webhook cannot parse messages greater than 30MB in size, including all attachments. There are a number of pre-made integrations for the SendGrid Parse Webhook which make processing events easy. You can find these integrations in the [Library Index](https://sendgrid.com/docs/Integrate/libraries.html#-Webhook-Libraries).

operationId: Webhooks_getParseStats

Parameters

Name In Required Type Description
limit query optional string The number of statistics to return on each page.
offset query optional string The number of statistics to skip.
aggregated_by query optional string How you would like the statistics to by grouped.
start_date query required string The starting date of the statistics you want to retrieve. Must be in the format YYYY-MM-DD
end_date query optional string The end date of the statistics you want to retrieve. Must be in the format YYYY-MM-DD
optional

Responses

200
GET /user/webhooks/parse/stats

Schemas

object AlertsDeleteAlertByIdResponse
{
  "type": "object",
  "properties": {}
}
object 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."
    }
  }
}
object 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"
    }
  }
}
object 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."
    }
  }
}
object 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."
    }
  }
}
object ApiKeysCreateKeyResponse
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string"
    },
    "scopes": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "api_key": {
      "type": "string"
    },
    "api_key_id": {
      "type": "string"
    }
  }
}
object ApiKeysGetAllResponse
{
  "type": "object",
  "properties": {
    "result": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/api_key_name_id"
      }
    }
  }
}
object ApiKeysGetByKeyIdResponse
{
  "type": "object",
  "properties": {
    "result": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/api_key_name_id_scopes"
      }
    }
  }
}
object ApiKeysUpdateKeyNameRequest
{
  "type": "object",
  "example": {
    "name": "A New Hope"
  },
  "required": [
    "name"
  ],
  "properties": {
    "name": {
      "type": "string",
      "description": "The new name of the API Key."
    }
  }
}
object 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"
      }
    }
  }
}
object 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."
    }
  }
}
object BlocksApiDeleteAllBlockedEmailsResponse
{
  "type": "object",
  "properties": {}
}
object BlocksApiDeleteSpecificBlockResponse
{
  "type": "object",
  "properties": {}
}
object 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."
    }
  }
}
object BouncesApiDeleteBouncesResponse
{
  "type": "object",
  "example": {},
  "properties": {}
}
array BouncesApiGetAllBouncesResponse
{
  "type": "array",
  "items": {
    "$ref": "#/components/schemas/bounce_response"
  }
}
array BouncesApiGetByEmailAddressResponse
{
  "type": "array",
  "items": {
    "$ref": "#/components/schemas/bounce_response"
  }
}
object BouncesApiRemoveBounceResponse
{
  "type": "object",
  "example": {},
  "properties": {}
}
object 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"
          }
        }
      }
    }
  }
}
object CampaignsApiDeleteCampaignById404Response
{
  "type": "object",
  "example": {},
  "properties": {}
}
object CampaignsApiDeleteCampaignByIdResponse
{
  "type": "object",
  "example": {},
  "properties": {}
}
object CampaignsApiGetScheduledTimeResponse
{
  "type": "object",
  "title": "View Scheduled Time of a Campaign response",
  "required": [
    "send_at"
  ],
  "properties": {
    "send_at": {
      "type": "integer",
      "format": "int64"
    }
  }
}
object 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"
          }
        }
      }
    }
  }
}
object 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"
          }
        }
      }
    }
  }
}
object 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"
    }
  }
}
object 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."
    }
  }
}
object 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."
    }
  }
}
object CampaignsApiSendCampaignNowResponse
{
  "type": "object",
  "title": "Send a Campaign response",
  "required": [
    "id",
    "status"
  ],
  "properties": {
    "id": {
      "type": "integer",
      "format": "int64"
    },
    "status": {
      "type": "string"
    }
  }
}
object 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."
    }
  }
}
object CampaignsApiSendTestCampaignResponse
{
  "type": "object",
  "title": "Send a Test Campaign request",
  "required": [
    "to"
  ],
  "properties": {
    "to": {
      "type": "string"
    }
  }
}
object CampaignsApiUnscheduleCampaignResponse
{
  "type": "object",
  "example": {},
  "properties": {}
}
object CampaignsApiUpdateScheduledTimeRequest
{
  "type": "object",
  "title": "Update a Scheduled Campaign request",
  "example": {
    "send_at": 1489451436
  },
  "required": [
    "send_at"
  ],
  "properties": {
    "send_at": {
      "type": "integer",
      "format": "int64"
    }
  }
}
object 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."
    }
  }
}
object 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."
          }
        }
      }
    }
  }
}
object 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."
    }
  }
}
object 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"
          }
        }
      }
    }
  }
}
array CancelScheduledSendsAllScheduledSendsResponse
{
  "type": "array",
  "items": {
    "$ref": "#/components/schemas/user_scheduled_send_status"
  }
}
array CancelScheduledSendsByBatchIdResponse
{
  "type": "array",
  "items": {
    "$ref": "#/components/schemas/user_scheduled_send_status"
  },
  "title": "Retrieve scheduled send response"
}
object 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."
    }
  }
}
object CancelScheduledSendsRequestResponse
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "errors": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "help": {
            "type": "object"
          },
          "field": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        }
      }
    }
  }
}
object 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."
    }
  }
}
object CancelScheduledSendsUpdateStatusResponse
{
  "type": "object",
  "example": {},
  "properties": {}
}
array CategoriesGetEmailStatisticsForResponse
{
  "type": "array",
  "items": {
    "$ref": "#/components/schemas/category_stats"
  }
}
object 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": ""
}
array CertificatesGetByIdpConfigurationsResponse
{
  "type": "array",
  "items": {
    "$ref": "#/components/schemas/sso-certificate-body"
  }
}
object 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."
    }
  }
}
object ContactsApiCustomFieldsCreateNewFieldRequest
{
  "type": "object",
  "example": {
    "name": "pet",
    "type": "text"
  },
  "properties": {
    "name": {
      "type": "string"
    },
    "type": {
      "type": "string"
    }
  }
}
object 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"
      }
    }
  }
}
object ContactsApiCustomFieldsGetReservedFieldsResponse
{
  "type": "object",
  "properties": {
    "reserved_fields": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "type": {
            "type": "string"
          }
        }
      }
    }
  }
}
array ContactsApiListsAddMultipleRecipientsToListRequest
{
  "type": "array",
  "items": {
    "type": "integer"
  },
  "example": [
    "recipient_id1",
    "recipient_id2"
  ]
}
object ContactsApiListsAddMultipleRecipientsToListResponse
{
  "type": "object",
  "example": {},
  "properties": {}
}
object ContactsApiListsAddSingleRecipientResponse
{
  "type": "object",
  "example": {},
  "properties": {}
}
object ContactsApiListsCreateNewListRequest
{
  "type": "object",
  "title": "Create a List request",
  "example": {
    "name": "your list name"
  },
  "required": [
    "name"
  ],
  "properties": {
    "name": {
      "type": "string"
    }
  }
}
object ContactsApiListsDeleteListByIdRequest
{
  "nullable": true
}
object ContactsApiListsDeleteListByIdResponse
{
  "type": "object",
  "example": {},
  "properties": {}
}
array ContactsApiListsDeleteMultipleListsRequest
{
  "type": "array",
  "items": {
    "type": "integer"
  },
  "example": [
    1,
    2,
    3,
    4
  ]
}
object ContactsApiListsDeleteMultipleListsResponse
{
  "type": "object",
  "example": {},
  "properties": {}
}
object ContactsApiListsDeleteRecipientResponse
{
  "type": "object",
  "example": {},
  "properties": {}
}
object ContactsApiListsGetAllListsResponse
{
  "type": "object",
  "title": "List All Lists response",
  "required": [
    "lists"
  ],
  "properties": {
    "lists": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/contactdb_list"
      }
    }
  }
}
object 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"
          }
        }
      }
    }
  }
}
object ContactsApiListsGetAllRecipientsResponse
{
  "type": "object",
  "properties": {
    "recipients": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/contactdb_recipient"
      }
    }
  }
}
object ContactsApiListsUpdateListNameRequest
{
  "type": "object",
  "title": "Update a List request",
  "example": {
    "name": "newlistname"
  },
  "required": [
    "name"
  ],
  "properties": {
    "name": {
      "type": "string",
      "description": "The new name for your list. "
    }
  }
}
object 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"
    }
  }
}
array 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"
    }
  ]
}
array ContactsApiRecipientsDeleteMultipleRecipientsRequest
{
  "type": "array",
  "items": {
    "type": "string"
  },
  "example": [
    "recipient_id1",
    "recipient_id2"
  ]
}
object ContactsApiRecipientsDeleteMultipleRecipientsResponse
{
  "type": "object",
  "example": {},
  "properties": {}
}
object ContactsApiRecipientsDeleteRecipientByIdResponse
{
  "type": "object",
  "example": {},
  "properties": {}
}
object ContactsApiRecipientsGetAllRecipients400Response
{
  "type": "object",
  "example": {},
  "properties": {}
}
object ContactsApiRecipientsGetAllRecipientsResponse
{
  "type": "object",
  "title": "List Recipients response",
  "required": [
    "recipients"
  ],
  "properties": {
    "recipients": {
      "type": "array",
      "items": {
        "type": "object"
      }
    }
  }
}
object ContactsApiRecipientsGetRecipientListsResponse
{
  "type": "object",
  "properties": {
    "lists": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/contactdb_list"
      }
    }
  }
}
object ContactsApiRecipientsGetSingleRecipient404Response
{
  "type": "object",
  "example": {},
  "properties": {}
}
object ContactsApiRecipientsGetSingleRecipientResponse
{
  "type": "object",
  "example": {},
  "properties": {}
}
object 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."
          }
        }
      }
    }
  }
}
object 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"
      }
    }
  }
}
object 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"
    }
  }
}
object ContactsApiRecipientsSearchRecipientByFieldResponse
{
  "type": "object",
  "properties": {
    "recipients": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/contactdb_recipient"
      }
    }
  }
}
array 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"
    }
  ]
}
object ContactsApiSegmentsDeleteSegmentResponse
{
  "type": "object",
  "example": {},
  "properties": {}
}
object ContactsApiSegmentsGetAllSegmentsResponse
{
  "type": "object",
  "title": "List All Segments response",
  "required": [
    "segments"
  ],
  "properties": {
    "segments": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/contactdb_segments"
      }
    }
  }
}
object ContactsApiSegmentsGetSegmentRecipients400Response
{
  "type": "object",
  "example": {},
  "properties": {}
}
object ContactsApiSegmentsGetSegmentRecipients404Response
{
  "type": "object",
  "example": {},
  "properties": {}
}
object ContactsApiSegmentsGetSegmentRecipientsResponse
{
  "type": "object",
  "title": "List Recipients On a Segment response",
  "required": [
    "recipients"
  ],
  "properties": {
    "recipients": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/contactdb_recipient"
      }
    }
  }
}
object 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."
    }
  }
}
object ContactsCheckExportStatusResponse
{
  "type": "object",
  "properties": {
    "errors": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/error"
      }
    }
  }
}
object ContactsCheckImportStatusResponse
{
  "type": "object",
  "properties": {
    "errors": {
      "$ref": "#/components/schemas/error"
    }
  }
}
object ContactsDeleteBulkContacts400Response
{
  "type": "object",
  "required": [
    "errors"
  ],
  "properties": {
    "errors": {
      "type": "array",
      "items": {
        "type": "object"
      }
    }
  }
}
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."
}
object ContactsExportListsSegments400Response
{
  "type": "object",
  "properties": {
    "errors": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/error"
      }
    }
  }
}
object 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"
        }
      }
    }
  }
}
object ContactsExportListsSegmentsResponse
{
  "type": "object",
  "required": [
    "_metadata"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "The ID of the export job."
    },
    "_metadata": {
      "$ref": "#/components/schemas/metadata"
    }
  }
}
object ContactsGetAllExports400Response
{
  "type": "object",
  "properties": {
    "errors": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "message"
        ],
        "properties": {
          "": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "error_id": {
            "type": "string"
          }
        }
      }
    }
  }
}
object 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."
        }
      }
    }
  }
}
object ContactsGetBatchedByIds404Response
{
  "type": "object",
  "example": {},
  "properties": {}
}
object ContactsGetBatchedByIdsRequest
{
  "type": "object",
  "example": {
    "ids": [
      "1234",
      "1235"
    ]
  },
  "required": [
    "ids"
  ],
  "properties": {
    "ids": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "maxItems": 100
    }
  },
  "description": "Array of IDs"
}
object ContactsGetBatchedByIdsResponse
{
  "type": "object",
  "properties": {
    "result": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/contact-details3"
      }
    }
  }
}
object ContactsGetRecentContacts400Response
{
  "type": "object",
  "properties": {
    "errors": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/error"
      }
    }
  }
}
object ContactsGetRecentContacts404Response
{
  "type": "object",
  "example": {},
  "properties": {}
}
object ContactsGetRecentContactsResponse
{
  "type": "object",
  "properties": {
    "result": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/contact-details3"
      }
    },
    "_metadata": {
      "$ref": "#/components/schemas/selfmetadata"
    },
    "contact_count": {
      "type": "integer"
    }
  }
}
object 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."
    }
  }
}
object ContactsImportCsv400Response
{
  "type": "object",
  "required": [
    "errors"
  ],
  "properties": {
    "errors": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/error"
      },
      "uniqueItems": true
    }
  }
}
object 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."
}
object 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
    }
  }
}
object 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."
    }
  }
}
object ContactsSearchByEmails500Response
{
  "type": "object",
  "properties": {
    "errors": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string"
          }
        }
      }
    }
  }
}
object 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": ""
}
object 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."
        }
      }
    }
  }
}
object ContactsSearchContactsByQuery400Response
{
  "type": "object",
  "properties": {
    "errors": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        }
      }
    }
  }
}
object ContactsSearchContactsByQuery500Response
{
  "type": "object",
  "properties": {
    "errors": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string"
          }
        }
      }
    }
  }
}
object 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."
    }
  }
}
object 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."
    }
  }
}
object ContactsUpsertBatchContacts400Response
{
  "type": "object",
  "properties": {
    "errors": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/error"
      }
    }
  }
}
object 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."
    }
  }
}
object 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."
    }
  }
}
object CsvUiOnlyGenerateCsvDownloadUrl404Response
{
  "type": "object",
  "properties": {
    "errors": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string"
          }
        }
      }
    }
  }
}
object CsvUiOnlyGenerateCsvDownloadUrl500Response
{
  "type": "object",
  "properties": {
    "errors": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string"
          }
        }
      }
    }
  }
}
object 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."
    }
  }
}
object CsvUiOnlyRequestCsvDownload400Response
{
  "type": "object",
  "properties": {
    "errors": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string"
          }
        }
      }
    }
  }
}
object CsvUiOnlyRequestCsvDownload429Response
{
  "type": "object",
  "properties": {
    "errors": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string"
          }
        }
      }
    }
  }
}
object CsvUiOnlyRequestCsvDownload500Response
{
  "type": "object",
  "properties": {
    "errors": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string"
          }
        }
      }
    }
  }
}
object CsvUiOnlyRequestCsvDownloadResponse
{
  "type": "object",
  "properties": {
    "status": {
      "enum": [
        "pending"
      ],
      "type": "string"
    },
    "message": {
      "type": "string"
    }
  }
}
object CustomFieldsCreateDefinition400Response
{
  "type": "object",
  "required": [
    "errors"
  ],
  "properties": {
    "errors": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/error"
      },
      "uniqueItems": true
    }
  }
}
object 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"
    }
  }
}
object CustomFieldsCreateDefinitionResponse
{
  "allOf": [
    {
      "$ref": "#/components/schemas/custom_field_definitions_response"
    },
    {
      "type": "object",
      "properties": {
        "_metadata": {
          "$ref": "#/components/schemas/_metadata"
        }
      }
    }
  ]
}
object CustomFieldsDeleteDefinitionResponse
{
  "type": "object",
  "required": [
    "errors"
  ],
  "properties": {
    "errors": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/error"
      },
      "uniqueItems": true
    }
  }
}
object 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
}
object CustomFieldsUpdateDefinition400Response
{
  "type": "object",
  "required": [
    "errors"
  ],
  "properties": {
    "errors": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/error"
      },
      "uniqueItems": true
    }
  }
}
object CustomFieldsUpdateDefinition404Response
{
  "type": "object",
  "required": [
    "errors"
  ],
  "properties": {
    "errors": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/error"
      },
      "uniqueItems": true
    }
  }
}
object CustomFieldsUpdateDefinitionRequest
{
  "type": "object",
  "example": {
    "name": "new_custom_field_name"
  },
  "required": [
    "name"
  ],
  "properties": {
    "name": {
      "type": "string",
      "maxLength": 100,
      "minLength": 1
    }
  }
}
object CustomFieldsUpdateDefinitionResponse
{
  "allOf": [
    {
      "$ref": "#/components/schemas/custom_field_definitions_response"
    },
    {
      "type": "object",
      "properties": {
        "_metadata": {
          "$ref": "#/components/schemas/_metadata"
        }
      }
    }
  ]
}
object DesignsApiDeleteDesignByIdResponse
{
  "type": "object",
  "example": {},
  "properties": {}
}
object DesignsApiGetListResponse
{
  "type": "object",
  "properties": {
    "result": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/design-output-summary"
      }
    },
    "_metadata": {
      "$ref": "#/components/schemas/_metadata"
    }
  }
}
object DesignsApiListPreBuiltDesignsResponse
{
  "type": "object",
  "properties": {
    "result": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/design-output-summary"
      }
    },
    "_metadata": {
      "$ref": "#/components/schemas/_metadata"
    }
  }
}
object 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."
    }
  }
}
object 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."
    }
  }
}
object DomainAuthenticationAssociateSubuserWithDomainRequest
{
  "type": "object",
  "example": {
    "username": "jdoe"
  },
  "required": [
    "username"
  ],
  "properties": {
    "username": {
      "type": "string",
      "description": "Username to associate with the authenticated domain."
    }
  }
}
object DomainAuthenticationDeleteAuthenticatedDomainResponse
{
  "type": "object",
  "example": {},
  "properties": {}
}
object DomainAuthenticationDisassociateDomainFromSubuserResponse
{
  "type": "object",
  "example": {},
  "properties": {}
}
object 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."
    }
  }
}
object 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."
    }
  }
}
object 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."
          }
        }
      }
    }
  }
}
object 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."
    }
  }
}
object 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."
    }
  }
}
object 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)"
        }
      }
    }
  }
}
object 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."
    }
  }
}
object EmailCnameRecordsSendDnsEmailResponse
{
  "type": "object",
  "properties": {
    "errors": {
      "type": "object",
      "properties": {
        "error": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      }
    }
  }
}
array 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."
}
object GetCampaignsResponse
{
  "type": "object",
  "properties": {
    "result": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/campaign_response"
      }
    }
  }
}
object 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."
    }
  }
}
array GetCategoriesResponse
{
  "type": "array",
  "items": {
    "type": "object",
    "required": [
      "category"
    ],
    "properties": {
      "category": {
        "type": "string",
        "description": "A category used to group emails by broad topic."
      }
    }
  }
}
array 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."
      }
    }
  }
}
object 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."
    }
  }
}
object 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
    }
  }
}
array 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."
      }
    }
  }
}
array GetSubusersResponse
{
  "type": "array",
  "items": {
    "$ref": "#/components/schemas/subuser"
  }
}
object GetTemplates400Response
{
  "type": "object",
  "properties": {
    "errors": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "error_id": {
            "type": "string"
          }
        }
      }
    }
  }
}
object GetTemplatesResponse
{
  "type": "object",
  "properties": {
    "result": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/transactional-templates-template-lean"
      },
      "description": ""
    },
    "_metadata": {
      "$ref": "#/components/schemas/_metadata"
    }
  }
}
object 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."
    }
  }
}
object InvalidEmailsApiDeleteInvalidEmailsResponse
{
  "type": "object",
  "properties": {}
}
array InvalidEmailsApiGetAllInvalidEmailsResponse
{
  "type": "array",
  "items": {
    "$ref": "#/components/schemas/invalid-email"
  },
  "description": "The list of invalid email addresses."
}
array InvalidEmailsApiGetSpecificInvalidEmailResponse
{
  "type": "array",
  "items": {
    "$ref": "#/components/schemas/invalid-email"
  },
  "maxItems": 1,
  "minItems": 0,
  "description": "A specific invalid email."
}
object InvalidEmailsApiRemoveSpecificEmailResponse
{
  "type": "object",
  "properties": {}
}
object 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."
    }
  }
}
object IpAccessManagementGetRecentAccessAttempts500Response
{
  "type": "object",
  "properties": {
    "errors": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string"
          }
        }
      }
    }
  }
}
object 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."
    }
  }
}
object 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."
    }
  }
}
object IpAccessManagementRemoveIpAddressesResponse
{
  "type": "object",
  "properties": {}
}
object IpAccessManagementRemoveSpecificIpFromAllowedListResponse
{
  "type": "object",
  "properties": {}
}
array 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"
}
object 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."
    }
  }
}
object 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."
          }
        }
      }
    }
  }
}
object 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."
    }
  }
}
object 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."
    }
  }
}
object 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."
    }
  }
}
object IpPoolsCreatePoolRequest
{
  "type": "object",
  "example": {
    "name": "marketing"
  },
  "required": [
    "name"
  ],
  "properties": {
    "name": {
      "type": "string",
      "maxLength": 64,
      "description": "The name of your new IP pool."
    }
  }
}
object IpPoolsDeletePool404Response
{
  "type": "object",
  "properties": {
    "error": {
      "type": "string",
      "description": "An error explaining why the pool could not be deleted."
    }
  }
}
object IpPoolsDeletePoolResponse
{
  "type": "object",
  "example": {},
  "properties": {}
}
array IpPoolsGetAllResponse
{
  "type": "array",
  "items": {
    "$ref": "#/components/schemas/ip_pool_response"
  }
}
object 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."
          }
        }
      }
    }
  }
}
object 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."
    }
  }
}
object IpPoolsRemoveIpAddressFromPool404Response
{
  "type": "object",
  "properties": {
    "error": {
      "type": "string",
      "description": "An error explaining why the IP address could not be removed from the IP pool."
    }
  }
}
object IpPoolsRemoveIpAddressFromPoolResponse
{
  "type": "object",
  "example": {},
  "properties": {}
}
object IpPoolsUpdateNameRequest
{
  "type": "object",
  "example": {
    "name": "new_pool_name"
  },
  "properties": {
    "name": {
      "type": "string",
      "maxLength": 64,
      "description": "The new name for your IP pool."
    }
  }
}
object 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."
          }
        }
      }
    }
  }
}
object 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."
    }
  }
}
object IpWarmupStartIpAddressWarmupRequest
{
  "type": "object",
  "example": {
    "ip": "0.0.0.0"
  },
  "properties": {
    "ip": {
      "type": "string",
      "description": "The IP address that you want to begin warming up."
    }
  }
}
object 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."
    }
  }
}
object 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."
    }
  }
}
object IpWarmupStopIpAddressWarmupResponse
{
  "type": "object",
  "example": {},
  "properties": {}
}
object 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."
    }
  }
}
object 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."
    }
  }
}
object LinkBrandingDeleteBrandedLinkResponse
{
  "type": "object",
  "example": {},
  "properties": {}
}
object LinkBrandingDisassociateBrandedLinkFromSubuserResponse
{
  "type": "object",
  "example": {},
  "properties": {}
}
array LinkBrandingGetBrandedLinksResponse
{
  "type": "array",
  "items": {
    "$ref": "#/components/schemas/link_branding_200_response"
  }
}
object 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."
    }
  }
}
object 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."
    }
  }
}
object 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."
    }
  }
}
object ListsContactCountGet404Response
{
  "type": "object",
  "example": {},
  "properties": {}
}
object ListsContactCountGetResponse
{
  "type": "object",
  "properties": {
    "contact_count": {
      "type": "integer"
    },
    "billable_count": {
      "type": "integer"
    }
  }
}
object ListsCreateNewListRequest
{
  "type": "object",
  "example": {
    "name": "list-name"
  },
  "required": [
    "name"
  ],
  "properties": {
    "name": {
      "type": "string",
      "maxLength": 100,
      "minLength": 1,
      "description": "Your name for your list"
    }
  }
}
object ListsCreateNewListResponse
{
  "type": "object",
  "properties": {
    "errors": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/error"
      }
    }
  }
}
string ListsDeleteList204Response
{
  "type": "string",
  "description": "The delete has been processed. "
}
object ListsDeleteList404Response
{
  "type": "object",
  "required": [
    "errors"
  ],
  "properties": {
    "errors": {
      "type": "array",
      "items": {
        "type": "object"
      }
    }
  }
}
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."
}
object ListsGetAllResponse
{
  "type": "object",
  "properties": {
    "result": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/list"
      }
    },
    "_metadata": {
      "$ref": "#/components/schemas/metadata"
    }
  }
}
array ListsGetListById404Response
{
  "type": "array",
  "items": {
    "$ref": "#/components/schemas/error"
  }
}
object ListsGetListByIdResponse
{
  "allOf": [
    {
      "$ref": "#/components/schemas/list"
    },
    {
      "type": "object",
      "properties": {
        "contact_sample": {
          "$ref": "#/components/schemas/contact-details2"
        }
      }
    }
  ]
}
object ListsRemoveContactsFromList404Response
{
  "type": "object",
  "example": {},
  "properties": {}
}
object ListsRemoveContactsFromListResponse
{
  "type": "object",
  "properties": {
    "job_id": {
      "type": "string",
      "description": "job_id of the async job"
    }
  },
  "description": "The removal is accepted and processing."
}
object ListsUpdateName404Response
{
  "type": "object",
  "example": {},
  "properties": {}
}
object ListsUpdateNameRequest
{
  "type": "object",
  "example": {
    "name": "updated-list-name"
  },
  "properties": {
    "name": {
      "type": "string",
      "description": "Your name for your list."
    }
  }
}
object ListsUpdateNameResponse
{
  "type": "object",
  "properties": {
    "errors": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/error"
      }
    }
  }
}
object 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."
    }
  }
}
string MarketingCampaignsStatsExportAutomationStatsResponse
{
  "type": "string",
  "description": "CSV data"
}
string MarketingCampaignsStatsExportSingleSendStatsResponse
{
  "type": "string",
  "description": "CSV data"
}
object MarketingCampaignsStatsGetSingleSendLinkStatByIdResponse
{
  "type": "object",
  "example": {},
  "properties": {}
}
object PostAlerts400Response
{
  "type": "object",
  "properties": {
    "field": {
      "type": "string"
    },
    "message": {
      "type": "string"
    }
  }
}
object 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"
    }
  }
}
object 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."
    }
  }
}
object PostCampaignsResponse
{
  "type": "object",
  "example": {},
  "properties": {}
}
object 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."
    }
  }
}
object 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."
    }
  }
}
object 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"
  }
}
object PostSendersResponse
{
  "type": "object",
  "properties": {
    "errors": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        }
      }
    }
  }
}
object 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."
    }
  }
}
object 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"
          }
        }
      }
    }
  }
}
object 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."
    }
  }
}
object QueryFilterMessages400Response
{
  "type": "object",
  "required": [
    "errors"
  ],
  "properties": {
    "errors": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "message"
        ],
        "properties": {
          "message": {
            "type": "string"
          }
        }
      }
    }
  }
}
object QueryFilterMessages429Response
{
  "type": "object",
  "properties": {
    "errors": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string"
          }
        }
      }
    }
  }
}
object 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"
          }
        }
      }
    }
  }
}
object QueryMessageDetails400Response
{
  "type": "object",
  "example": {},
  "properties": {}
}
object QueryMessageDetails404Response
{
  "type": "object",
  "properties": {
    "errors": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        }
      }
    }
  }
}
object QueryMessageDetails429Response
{
  "type": "object",
  "properties": {
    "errors": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string"
          }
        }
      }
    }
  }
}
object 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"
    }
  }
}
object ReverseDnsDeleteReverseDnsRecordResponse
{
  "type": "object",
  "example": {},
  "properties": {}
}
array ReverseDnsGetAllReverseDnsRecordsResponse
{
  "type": "array",
  "items": {
    "$ref": "#/components/schemas/reverse_dns"
  }
}
object 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."
    }
  }
}
object 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."
    }
  }
}
object 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."
    }
  }
}
object 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."
    }
  }
}
object SegmentingContactsBulkDeleteSegments202Response
{
  "type": "object",
  "example": {},
  "properties": {}
}
object SegmentingContactsBulkDeleteSegments400Response
{
  "type": "object",
  "properties": {
    "errors": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        }
      }
    }
  }
}
object 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"
      }
    }
  }
}
object 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"
          }
        }
      }
    }
  }
}
object 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})`"
        }
      }
    }
  ]
}
object SegmentingContactsCreateNewSegmentResponse
{
  "type": "object",
  "required": [
    "errors"
  ],
  "properties": {
    "errors": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "message"
        ],
        "properties": {
          "message": {
            "type": "string"
          }
        }
      }
    }
  }
}
object SegmentingContactsDeleteById404Response
{
  "type": "object",
  "required": [
    "errors"
  ],
  "properties": {
    "errors": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "message",
          "field"
        ],
        "properties": {
          "field": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        }
      }
    }
  }
}
object SegmentingContactsDeleteById500Response
{
  "type": "object",
  "required": [
    "errors"
  ],
  "properties": {
    "errors": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "message"
        ],
        "properties": {
          "message": {
            "type": "string"
          }
        }
      }
    }
  }
}
object SegmentingContactsDeleteByIdResponse
{
  "type": "object",
  "example": {},
  "properties": {}
}
object SegmentingContactsGetById500Response
{
  "type": "object",
  "required": [
    "errors"
  ],
  "properties": {
    "errors": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "message"
        ],
        "properties": {
          "message": {
            "type": "string"
          }
        }
      }
    }
  }
}
object SegmentingContactsGetByIdResponse
{
  "type": "object",
  "required": [
    "errors"
  ],
  "properties": {
    "errors": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "message",
          "field"
        ],
        "properties": {
          "field": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        }
      }
    }
  }
}
object SegmentingContactsListSegments500Response
{
  "type": "object",
  "required": [
    "errors"
  ],
  "properties": {
    "errors": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "message"
        ],
        "properties": {
          "message": {
            "type": "string"
          }
        }
      }
    }
  }
}
object SegmentingContactsListSegmentsResponse
{
  "type": "object",
  "required": [
    "results"
  ],
  "properties": {
    "results": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/segment_summary"
      },
      "minItems": 0,
      "uniqueItems": true
    }
  }
}
object SegmentingContactsUpdateSegmentById500Response
{
  "type": "object",
  "required": [
    "errors"
  ],
  "properties": {
    "errors": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "message"
        ],
        "properties": {
          "message": {
            "type": "string"
          }
        }
      }
    }
  }
}
object SegmentingContactsUpdateSegmentByIdResponse
{
  "type": "object",
  "required": [
    "errors"
  ],
  "properties": {
    "errors": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "message",
          "field"
        ],
        "properties": {
          "field": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        }
      }
    }
  }
}
object 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."
    }
  }
}
object SendTestEmailToContactsResponse
{
  "type": "object",
  "example": {},
  "properties": {}
}
object SenderIdentitiesApiDeleteSenderIdentity403Response
{
  "type": "object",
  "properties": {
    "errors": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        }
      }
    }
  }
}
object SenderIdentitiesApiDeleteSenderIdentity404Response
{
  "type": "object",
  "properties": {
    "errors": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        }
      }
    }
  }
}
object SenderIdentitiesApiDeleteSenderIdentityResponse
{
  "type": "object",
  "properties": {}
}
object SenderIdentitiesApiGetAllResponse
{
  "type": "object",
  "properties": {
    "result": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/senderID"
      }
    }
  }
}
object SenderIdentitiesApiResendVerificationEmail400Response
{
  "type": "object",
  "properties": {
    "errors": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        }
      }
    }
  }
}
object SenderIdentitiesApiResendVerificationEmail404Response
{
  "type": "object",
  "properties": {
    "errors": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        }
      }
    }
  }
}
object SenderIdentitiesApiResendVerificationEmailResponse
{
  "type": "object",
  "properties": {}
}
object SenderIdentitiesApiUpdateSenderIdentity403Response
{
  "type": "object",
  "properties": {
    "errors": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        }
      }
    }
  }
}
object SenderIdentitiesApiUpdateSenderIdentity404Response
{
  "type": "object",
  "properties": {
    "errors": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        }
      }
    }
  }
}
object SenderIdentitiesApiUpdateSenderIdentityResponse
{
  "type": "object",
  "properties": {
    "errors": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        }
      }
    }
  }
}
object SenderIdentitiesApiViewSenderIdentityResponse
{
  "type": "object",
  "properties": {
    "errors": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        }
      }
    }
  }
}
object 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"
          }
        }
      }
    }
  }
}
object SenderVerificationDeleteVerifiedSender403Response
{
  "type": "object",
  "properties": {
    "errors": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "message",
          "error_id"
        ],
        "properties": {
          "message": {
            "type": "string"
          },
          "error_id": {
            "type": "string"
          }
        }
      }
    }
  }
}
object SenderVerificationDeleteVerifiedSender404Response
{
  "type": "object",
  "required": [
    "errors"
  ],
  "properties": {
    "errors": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "message",
          "error_id"
        ],
        "properties": {
          "message": {
            "type": "string"
          },
          "error_id": {
            "type": "string"
          }
        }
      }
    }
  }
}
object SenderVerificationDeleteVerifiedSenderResponse
{
  "type": "object",
  "example": {},
  "properties": {}
}
object SenderVerificationDetermineVerificationStatusResponse
{
  "type": "object",
  "properties": {
    "results": {
      "type": "object",
      "properties": {
        "domain_verified": {
          "type": "boolean"
        },
        "sender_verified": {
          "type": "boolean"
        }
      }
    }
  }
}
object SenderVerificationGetAllSenderIdentitiesResponse
{
  "type": "object",
  "properties": {
    "results": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/verified-sender-response-schema"
      }
    }
  }
}
object 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"
          }
        }
      }
    }
  }
}
object SenderVerificationRequestVerificationTokenResponse
{
  "type": "object",
  "required": [
    "errors"
  ],
  "properties": {
    "errors": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "message",
          "error_id"
        ],
        "properties": {
          "message": {
            "type": "string"
          },
          "error_id": {
            "type": "string"
          }
        }
      }
    }
  }
}
object SenderVerificationResendVerificationEmail400Response
{
  "type": "object",
  "required": [
    "errors"
  ],
  "properties": {
    "errors": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "message",
          "error_id"
        ],
        "properties": {
          "message": {
            "type": "string"
          },
          "error_id": {
            "type": "string"
          }
        }
      }
    }
  }
}
object SenderVerificationResendVerificationEmail404Response
{
  "type": "object",
  "required": [
    "errors"
  ],
  "properties": {
    "errors": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "message",
          "error_id"
        ],
        "properties": {
          "message": {
            "type": "string"
          },
          "error_id": {
            "type": "string"
          }
        }
      }
    }
  }
}
object SenderVerificationResendVerificationEmailResponse
{
  "type": "object",
  "example": {},
  "properties": {}
}
object SenderVerificationUpdateSenderIdentity403Response
{
  "type": "object",
  "required": [
    "errors"
  ],
  "properties": {
    "errors": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "message",
          "error_id"
        ],
        "properties": {
          "message": {
            "type": "string"
          },
          "error_id": {
            "type": "string"
          }
        }
      }
    }
  }
}
object SenderVerificationUpdateSenderIdentity404Response
{
  "type": "object",
  "required": [
    "errors"
  ],
  "properties": {
    "errors": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "message",
          "error_id"
        ],
        "properties": {
          "message": {
            "type": "string"
          },
          "error_id": {
            "type": "string"
          }
        }
      }
    }
  }
}
object 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"
          }
        }
      }
    }
  }
}
object 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."
    }
  }
}
object SettingsInboundParseDeleteSettingByHostnameResponse
{
  "type": "object",
  "example": {},
  "properties": {}
}
object 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"
          }
        }
      }
    }
  }
}
object 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"
          }
        }
      }
    }
  }
}
object 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"
          }
        }
      }
    }
  }
}
object 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"
          }
        }
      }
    }
  }
}
object 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"
          }
        }
      }
    }
  }
}
object 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."
    }
  }
}
object 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."
    }
  }
}
object 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."
    }
  }
}
object 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."
    }
  }
}
object 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."
          }
        }
      }
    }
  }
}
object 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."
    }
  }
}
object 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."
    }
  }
}
object SettingsTrackingGetOpenSettingsResponse
{
  "type": "object",
  "required": [
    "enabled"
  ],
  "properties": {
    "enabled": {
      "type": "boolean",
      "description": "Indicates if open tracking is enabled."
    }
  }
}
object SettingsTrackingUpdateClickTrackingSettingRequest
{
  "type": "object",
  "example": {
    "enabled": true
  },
  "properties": {
    "enabled": {
      "type": "boolean",
      "description": "The setting you want to use for click tracking."
    }
  }
}
object SettingsTrackingUpdateOpenTrackingSettingsRequest
{
  "type": "object",
  "example": {
    "enabled": true
  },
  "properties": {
    "enabled": {
      "type": "boolean",
      "description": "The new status that you want to set for open tracking."
    }
  }
}
object SettingsTrackingUpdateOpenTrackingSettingsResponse
{
  "type": "object",
  "required": [
    "enabled"
  ],
  "properties": {
    "enabled": {
      "type": "boolean",
      "description": "Indicates if open tracking is enabled."
    }
  }
}
object SingleSendsBulkDelete500Response
{
  "type": "object",
  "properties": {
    "errors": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "error_id": {
            "type": "string"
          }
        }
      }
    }
  }
}
object SingleSendsBulkDeleteResponse
{
  "type": "object",
  "properties": {
    "errors": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "error_id": {
            "type": "string"
          }
        }
      }
    }
  }
}
object SingleSendsCancelScheduledSend500Response
{
  "type": "object",
  "properties": {
    "errors": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "error_id": {
            "type": "string"
          }
        }
      }
    }
  }
}
object SingleSendsCancelScheduledSendResponse
{
  "type": "object",
  "properties": {
    "errors": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "error_id": {
            "type": "string"
          }
        }
      }
    }
  }
}
object SingleSendsCreateNewSingleSend500Response
{
  "type": "object",
  "properties": {
    "errors": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "error_id": {
            "type": "string"
          }
        }
      }
    }
  }
}
object SingleSendsCreateNewSingleSendResponse
{
  "type": "object",
  "properties": {
    "errors": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "error_id": {
            "type": "string"
          }
        }
      }
    }
  }
}
object SingleSendsDeleteById500Response
{
  "type": "object",
  "properties": {
    "errors": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "error_id": {
            "type": "string"
          }
        }
      }
    }
  }
}
object SingleSendsDeleteByIdResponse
{
  "type": "object",
  "properties": {
    "errors": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "error_id": {
            "type": "string"
          }
        }
      }
    }
  }
}
object SingleSendsDuplicateSingleSend500Response
{
  "type": "object",
  "properties": {
    "errors": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "error_id": {
            "type": "string"
          }
        }
      }
    }
  }
}
object 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."
    }
  }
}
object SingleSendsDuplicateSingleSendResponse
{
  "type": "object",
  "properties": {
    "errors": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "error_id": {
            "type": "string"
          }
        }
      }
    }
  }
}
object SingleSendsGetAllCategories500Response
{
  "type": "object",
  "properties": {
    "errors": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "error_id": {
            "type": "string"
          }
        }
      }
    }
  }
}
object 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
    }
  }
}
object SingleSendsGetAllSinglesends500Response
{
  "type": "object",
  "properties": {
    "errors": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "error_id": {
            "type": "string"
          }
        }
      }
    }
  }
}
object SingleSendsGetAllSinglesendsResponse
{
  "type": "object",
  "properties": {
    "result": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/singlesend_response_short"
      }
    },
    "_metadata": {
      "$ref": "#/components/schemas/_metadata"
    }
  }
}
object SingleSendsGetDetailsById500Response
{
  "type": "object",
  "properties": {
    "errors": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "error_id": {
            "type": "string"
          }
        }
      }
    }
  }
}
object SingleSendsGetDetailsByIdResponse
{
  "type": "object",
  "properties": {
    "errors": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "error_id": {
            "type": "string"
          }
        }
      }
    }
  }
}
object SingleSendsSchedulePut404Response
{
  "type": "object",
  "properties": {
    "errors": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "error_id": {
            "type": "string"
          }
        }
      }
    }
  }
}
object SingleSendsSchedulePut500Response
{
  "type": "object",
  "properties": {
    "errors": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "error_id": {
            "type": "string"
          }
        }
      }
    }
  }
}
object 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\""
    }
  }
}
object SingleSendsSchedulePutResponse
{
  "type": "object",
  "properties": {
    "status": {
      "enum": [
        "scheduled"
      ],
      "type": "string"
    },
    "send_at": {
      "type": "string",
      "format": "date-time",
      "description": ""
    }
  }
}
object SingleSendsSearchByCriteria404Response
{
  "type": "object",
  "properties": {
    "errors": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "error_id": {
            "type": "string"
          }
        }
      }
    }
  }
}
object SingleSendsSearchByCriteriaResponse
{
  "type": "object",
  "properties": {
    "result": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/singlesend_response_short"
      }
    },
    "_metadata": {
      "$ref": "#/components/schemas/_metadata"
    }
  }
}
object SingleSendsUpdateById404Response
{
  "type": "object",
  "properties": {
    "errors": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "error_id": {
            "type": "string"
          }
        }
      }
    }
  }
}
object SingleSendsUpdateById500Response
{
  "type": "object",
  "properties": {
    "errors": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "error_id": {
            "type": "string"
          }
        }
      }
    }
  }
}
object SingleSendsUpdateByIdResponse
{
  "type": "object",
  "properties": {
    "errors": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "error_id": {
            "type": "string"
          }
        }
      }
    }
  }
}
array SingleSignOnSettingsGetAllSsoIntegrationsResponse
{
  "type": "array",
  "items": {
    "$ref": "#/components/schemas/sso-integration"
  }
}
object 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"
    }
  }
}
object 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."
    }
  }
}
object SpamReportsApiDeleteReportsResponse
{
  "type": "object",
  "properties": {}
}
object SpamReportsApiDeleteSpecificReportByEmailAddressResponse
{
  "type": "object",
  "properties": {}
}
array 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."
      }
    }
  }
}
array 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."
      }
    }
  }
}
array 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."
      }
    }
  }
}
array 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."
      }
    }
  }
}
array 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."
      }
    }
  }
}
array 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."
      }
    }
  }
}
object SubuserMonitorSettingsDeleteMonitorSettingsResponse
{
  "type": "object",
  "properties": {}
}
object SubusersApiDeleteSubuserResponse
{
  "type": "object",
  "properties": {}
}
array 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."
      }
    }
  }
}
object SubusersApiUpdateSubuserEnableStateRequest
{
  "type": "object",
  "example": {
    "disabled": false
  },
  "properties": {
    "disabled": {
      "type": "boolean",
      "description": "Whether or not this subuser is disabled. True means disabled, False means enabled."
    }
  }
}
object SubusersApiUpdateSubuserEnableStateResponse
{
  "type": "object",
  "properties": {}
}
array 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."
}
object SubusersApiUpdateSubuserIpsResponse
{
  "type": "object",
  "properties": {
    "ips": {
      "type": "array",
      "items": {
        "type": "string",
        "format": "ipv4"
      },
      "description": "The IP addresses that are assigned to the subuser."
    }
  }
}
object SuppressionsGlobalSuppressionsAddRecipientAddressesResponse
{
  "type": "object",
  "required": [
    "recipient_emails"
  ],
  "properties": {
    "recipient_emails": {
      "type": "array",
      "items": {
        "type": "string",
        "format": "email"
      },
      "description": "The email addresses that are globally suppressed"
    }
  }
}
array 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."
      }
    }
  }
}
object 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."
    }
  }
}
object SuppressionsGlobalSuppressionsRemoveEmailResponse
{
  "type": "object",
  "example": {},
  "properties": {}
}
object SuppressionsSuppressionsAddToGroupResponse
{
  "type": "object",
  "properties": {
    "recipient_emails": {
      "type": "array",
      "items": {
        "type": "string",
        "format": "email"
      },
      "description": "The email addresses you added to the unsubscribe group"
    }
  }
}
array SuppressionsSuppressionsGetAllSuppressedEmailsResponse
{
  "type": "array",
  "items": {
    "type": "string",
    "format": "email"
  },
  "description": "The list of email addresses belonging to the given suppression group."
}
array 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."
      }
    }
  }
}
object 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."
    }
  }
}
object SuppressionsSuppressionsRemoveSuppressionFromGroupResponse
{
  "type": "object",
  "example": {},
  "properties": {}
}
array SuppressionsSuppressionsSearchWithinGroupResponse
{
  "type": "array",
  "items": {
    "type": "string",
    "format": "email"
  },
  "description": "The email address from your search that do exist in the suppression group."
}
object 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."
    }
  }
}
object SuppressionsUnsubscribeGroupsDeleteGroupResponse
{
  "type": "object",
  "example": {},
  "properties": {}
}
array SuppressionsUnsubscribeGroupsGetAllResponse
{
  "type": "array",
  "items": {
    "$ref": "#/components/schemas/suppression_group"
  }
}
object 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
        }
      }
    }
  ]
}
object 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"
}
object TeammatesApproveAccessRequest401Response
{
  "type": "object",
  "example": {},
  "properties": {}
}
object TeammatesApproveAccessRequest404Response
{
  "type": "object",
  "properties": {
    "errors": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        }
      }
    }
  }
}
object TeammatesApproveAccessRequestResponse
{
  "type": "object",
  "properties": {
    "scope_group_name": {
      "type": "string",
      "description": "name of feature teammate will be given access to"
    }
  }
}
object TeammatesDeletePendingTeammateResponse
{
  "type": "object",
  "properties": {
    "errors": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        }
      }
    }
  }
}
object TeammatesDenyAccessRequestResponse
{
  "type": "object",
  "properties": {
    "errors": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        }
      }
    }
  }
}
array 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"
      }
    }
  }
}
object 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"
          }
        }
      }
    }
  }
}
object 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"
          }
        }
      }
    }
  }
}
object 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"
    }
  }
}
object TeammatesInviteTeammate400Response
{
  "type": "object",
  "properties": {
    "errors": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        }
      }
    }
  }
}
object 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"
    }
  }
}
object 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"
    }
  }
}
object TeammatesRemoveTeammate404Response
{
  "type": "object",
  "properties": {
    "errors": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        }
      }
    }
  }
}
object TeammatesRemoveTeammateResponse
{
  "type": "object",
  "properties": {
    "errors": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        }
      }
    }
  }
}
object TeammatesResendTeammateInvite404Response
{
  "type": "object",
  "properties": {
    "errors": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        }
      }
    }
  }
}
object 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"
    }
  }
}
object TeammatesUpdatePermissions400Response
{
  "type": "object",
  "properties": {
    "errors": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        }
      }
    }
  }
}
object TeammatesUpdatePermissions404Response
{
  "type": "object",
  "properties": {
    "errors": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        }
      }
    }
  }
}
object 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."
    }
  }
}
object 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"
    }
  }
}
object TransactionalTemplatesDeleteTemplateResponse
{
  "type": "object",
  "example": {},
  "properties": {}
}
object TransactionalTemplatesDuplicateTemplateRequest
{
  "type": "object",
  "example": {
    "name": "example_name"
  },
  "properties": {
    "name": {
      "type": "string",
      "maxLength": 100,
      "description": "The name for the new transactional template."
    }
  }
}
object TransactionalTemplatesEditTemplateNameRequest
{
  "type": "object",
  "example": {
    "name": "new_example_name"
  },
  "properties": {
    "name": {
      "type": "string",
      "maxLength": 100,
      "description": "The name of the transactional template."
    }
  }
}
object UsersApiGetAccountEmailAddressResponse
{
  "type": "object",
  "required": [
    "email"
  ],
  "properties": {
    "email": {
      "type": "string",
      "format": "email",
      "description": "The email address currently on file for your account."
    }
  }
}
object 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."
    }
  }
}
object 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."
    }
  }
}
object 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."
    }
  }
}
object 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."
    }
  }
}
object 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."
    }
  }
}
object UsersApiUpdateEmailResponse
{
  "type": "object",
  "required": [
    "email"
  ],
  "properties": {
    "email": {
      "type": "string",
      "format": "email",
      "description": "The current email address on file for your account."
    }
  }
}
object 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."
    }
  }
}
object UsersApiUpdatePasswordResponse
{
  "type": "object",
  "properties": {}
}
object UsersApiUpdateUsernameRequest
{
  "type": "object",
  "example": {
    "username": "test_username"
  },
  "properties": {
    "username": {
      "type": "string",
      "description": "The new username you would like to use for your account."
    }
  }
}
object UsersApiUpdateUsernameResponse
{
  "type": "object",
  "required": [
    "username"
  ],
  "properties": {
    "username": {
      "type": "string",
      "description": "The current username on file for your account."
    }
  }
}
object WebhooksEnableSignedWebhook400Response
{
  "type": "object",
  "properties": {
    "errors": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "message"
        ],
        "properties": {
          "field": {
            "type": "string",
            "nullable": true
          },
          "message": {
            "type": "string"
          }
        }
      }
    }
  }
}
object WebhooksEnableSignedWebhook401Response
{
  "type": "object",
  "properties": {
    "errors": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "message"
        ],
        "properties": {
          "field": {
            "type": "string",
            "nullable": true
          },
          "message": {
            "type": "string"
          }
        }
      }
    }
  }
}
object WebhooksEnableSignedWebhook500Response
{
  "type": "object",
  "properties": {
    "errors": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "message"
        ],
        "properties": {
          "field": {
            "type": "string",
            "nullable": true
          },
          "message": {
            "type": "string"
          }
        }
      }
    }
  }
}
object WebhooksEnableSignedWebhookRequest
{
  "type": "object",
  "example": {
    "enabled": true
  },
  "required": [
    "enabled"
  ],
  "properties": {
    "enabled": {
      "type": "boolean"
    }
  }
}
object WebhooksEnableSignedWebhookResponse
{
  "type": "object",
  "required": [
    "public_key"
  ],
  "properties": {
    "public_key": {
      "type": "string",
      "description": "The public key you can use to verify the Twilio SendGrid signature."
    }
  }
}
object WebhooksGetParseSettingsResponse
{
  "type": "object",
  "properties": {
    "result": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/parse-setting"
      },
      "description": "The list of your current inbound parse settings."
    }
  }
}
array 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."
      }
    }
  }
}
object WebhooksGetSignedWebhookPublicKeyResponse
{
  "type": "object",
  "required": [
    "public_key"
  ],
  "properties": {
    "public_key": {
      "type": "string",
      "description": "The public key you can use to verify the Twilio SendGrid signature."
    }
  }
}
object 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."
    }
  }
}
object _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
    }
  }
}
object 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"
    }
  }
}
object 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"
    }
  }
}
object 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."
}
object 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."
}
object 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."
}
object 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."
}
object 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"
    }
  }
}
object api-error
{
  "type": "object",
  "title": "error",
  "required": [
    "message",
    "field",
    "error_id"
  ],
  "properties": {
    "field": {
      "type": "string"
    },
    "message": {
      "type": "string"
    },
    "error_id": {
      "type": "string"
    }
  }
}
object api-errors
{
  "type": "object",
  "title": "errors",
  "properties": {
    "errors": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/api-error"
      }
    }
  }
}
object 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. "
    }
  }
}
object 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"
  }
}
object 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."
    }
  }
}
object 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"
    }
  }
}
object 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"
    }
  }
}
array 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
    }
  ]
}
object 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."
    }
  }
}
object 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."
    }
  }
}
object 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"
}
object 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."
              }
            }
          }
        }
      }
    }
  }
}
object 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."
    }
  }
}
object 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."
    }
  }
}
object 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"
    }
  }
}
object 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"
    }
  }
}
object 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"
    }
  }
}
object 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."
    }
  }
}
object 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."
    }
  }
}
object 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."
    }
  }
}
object 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."
    }
  }
}
object 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."
    }
  }
}
object 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."
    }
  }
}
object 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."
}
object 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."
}
object 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."
    }
  }
}
object 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."
          }
        }
      }
    }
  }
}
object 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."
    }
  }
}
object 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."
    }
  }
}
object 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."
    }
  }
}
object 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"
    }
  }
}
object 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"
}
object 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"
    }
  }
}
object 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."
    }
  }
}
object 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"
        }
      }
    }
  }
}
object 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
  }
}
object 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."
  }
}
object 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"
    }
  }
}
object 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"
}
object 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."
    }
  }
}
object 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}}} )"
  }
}
object design-output
{
  "allOf": [
    {
      "$ref": "#/components/schemas/design-output-summary"
    },
    {
      "$ref": "#/components/schemas/design-input"
    }
  ],
  "title": "Design Output"
}
object 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
    }
  }
}
array 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
    }
  ]
}
object 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."
    }
  }
}
object 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."
    }
  }
}
object 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."
    }
  }
}
object error
{
  "type": "object",
  "title": "error",
  "required": [
    "message"
  ],
  "properties": {
    "field": {
      "type": "string"
    },
    "message": {
      "type": "string"
    },
    "error_id": {
      "type": "string"
    },
    "parameter": {
      "type": "string"
    }
  }
}
object 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."
}
object 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."
}
object 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."
    }
  }
}
object 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."
    }
  }
}
object 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."
    }
  }
}
object 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": ""
  }
}
object global_empty_request
{
  "title": "Global: Request Empty Body",
  "nullable": true
}
object 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"
          }
        }
      }
    }
  }
}
integer global_id
{
  "type": "integer",
  "title": "Global: ID"
}
object 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."
    }
  }
}
object 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."
    }
  }
}
object 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."
    }
  }
}
object ip_pool
{
  "type": "object",
  "title": "IP Pools: Pool",
  "required": [
    "name"
  ],
  "properties": {
    "name": {
      "type": "string",
      "maxLength": 64,
      "description": "The name of the IP pool."
    }
  }
}
object 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."
    }
  }
}
array 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
    }
  ]
}
object link
{
  "type": "object",
  "title": "Link",
  "properties": {
    "rel": {
      "type": "string"
    },
    "href": {
      "type": "string"
    }
  }
}
object 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."
    }
  }
}
object 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."
    }
  }
}
object 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."
    }
  }
}
object 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\\-\\_]"
    }
  }
}
object 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. "
    }
  }
}
object 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."
    }
  }
}
object 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."
    }
  }
}
object 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."
    }
  }
}
object 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."
    }
  }
}
object 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."
    }
  }
}
object 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."
    }
  }
}
object 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"
    }
  }
}
object 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"
    }
  }
}
object 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."
    }
  }
}
object 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"
    }
  }
}
object 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."
    }
  }
}
object 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."
    }
  }
}
object 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."
    }
  }
}
object 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."
    }
  }
}
array 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"
  ]
}
object 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."
    }
  }
}
object 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"
        }
      }
    }
  }
}
object 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"
    }
  }
}
object 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"
}
object 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."
    }
  }
}
object segment_summary_v2
{
  "type": "object",
  "title": "segment_summary",
  "properties": {
    "results": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/segment_summary"
      }
    }
  },
  "description": ""
}
object 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"
    }
  }
}
object 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."
    }
  }
}
object 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
    }
  }
}
object selfmetadata
{
  "type": "object",
  "title": "selfMetadata",
  "properties": {
    "self": {
      "type": "string",
      "description": "A link to this object."
    }
  }
}
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."
    }
  }
}
object 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
  }
}
object 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."
    }
  }
}
object 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."
    }
  }
}
object 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."
        }
      }
    }
  }
}
object 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
    }
  }
}
object 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"
    }
  }
}
object 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\""
    }
  }
}
object 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
    }
  }
}
object 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"
          }
        }
      }
    }
  }
}
object 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"
    }
  }
}
object 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"
    }
  }
}
array 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
    }
  ]
}
object 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."
    }
  }
}
array 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"
}
object 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"
}
object 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."
    }
  }
}
object 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"
}
object 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"
}
object 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"
}
object 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"
}
array 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"
}
object 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."
    }
  }
}
object 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."
    }
  }
}
object 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"
    }
  }
}
object 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."
    }
  }
}
object 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."
    }
  }
}
object 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
    }
  }
}
object 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."
    }
  }
}
array 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"
    }
  ]
}
object transactional-template-warning
{
  "type": "object",
  "title": "Warning",
  "example": {
    "message": "A sample warning message."
  },
  "properties": {
    "message": {
      "type": "string",
      "description": "Warning message for the user"
    }
  }
}
object 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."
    }
  }
}
object 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."
    }
  }
}
object 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"
  }
}
object 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."
    }
  }
}
object 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"
}
object 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."
    }
  }
}
object 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"
  }
}
object 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
    }
  }
}
object 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"
    }
  }
}
object 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\""
    }
  }
}
object 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."
    }
  }
}