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 keys 1 endpoints

PUT /api_keys/{api_key_id}

**This endpoint allows you to update the name and scopes of a given API key.** You must pass this endpoint a JSON request body with a `name` field and a `scopes` array containing at least one scope. The `name` and `scopes` fields will be used to update the key associated with the `api_key_id` in the request URL. If you need to update a key's scopes only, pass the `name` field with the key's existing name; the `name` will not be modified. If you need to update a key's name only, use the "Update API key name" endpoint. See the [API Key Permissions List](https://sendgrid.api-docs.io/v3.0/how-to-use-the-sendgrid-v3-api/api-authorization) for all available scopes.

operationId: ApiKeys_updateNameAndScopes

Parameters

Name In Required Type Description
optional

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/ApiKeysUpdateNameAndScopesRequest"
      }
    }
  }
}

Responses

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

Contacts 2 endpoints

PUT /marketing/contacts

**This endpoint allows the [upsert](https://en.wiktionary.org/wiki/upsert) (insert or update) of up to 30,000 contacts, or 6MB of data, whichever is lower**. Because the creation and update of contacts is an asynchronous process, the response will not contain immediate feedback on the processing of your upserted contacts. Rather, it will contain an HTTP 202 response indicating the contacts are queued for processing or an HTTP 4XX error containing validation errors. Should you wish to get the resulting contact's ID or confirm your contacts have been updated or added, you can use the "Get Contacts by Emails" endpoint. Please note that custom fields need to have been already created if you wish to set their values for the contacts being upserted. To do this, please use the "Create Custom Field Definition" endpoint. You will see a `job_id` in the response to your request. This can be used to check the status of your upsert job. To do so, please use the "Import Contacts Status" endpoint. If the contact already exists in the system, any entries submitted via this endpoint will update the existing contact. The contact to update will be determined only by the `email` field and any fields omitted from the request will remain as they were. A contact's ID cannot be used to update the contact. The email field will be changed to all lower-case. If a contact is added with an email that exists but contains capital letters, the existing contact with the all lower-case email will be updated. Twilio SendGrid recommends exporting your contacts regularly as a backup to avoid issues or lost data.

operationId: Contacts_upsertBatchContacts

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/ContactsUpsertBatchContactsRequest"
      }
    }
  }
}

Responses

202
400
401
403
404
500
PUT /marketing/contacts
PUT /marketing/contacts/imports

**This endpoint allows a CSV upload containing up to one million contacts or 5GB of data, whichever is smaller.** Imports take place asynchronously: the endpoint returns a URL (`upload_uri`) and HTTP headers (`upload_headers`) which can subsequently be used to `PUT` a file of contacts to be imported into our system. Uploaded CSV files may also be [gzip-compressed](https://en.wikipedia.org/wiki/Gzip). In either case, you must include the field `file_type` with the value `csv` in your request body. The `field_mappings` paramter is a respective list of field definition IDs to map the uploaded CSV columns to. It allows you to use CSVs where one or more columns are skipped (`null`) or remapped to the contact field. For example, if `field_mappings` is set to `[null, "w1", "_rf1"]`, this means skip column 0, map column 1 to the custom field with the ID `w1`, and map column 2 to the reserved field with the ID `_rf1`. See the "Get All Field Definitions" endpoint to fetch your custom and reserved field IDs to use with `field_mappings`. Once you recieve the response body you can then initiate a **second** API call where you use the supplied URL and HTTP header to upload your file. For example: `curl --upload-file "file/path.csv" "URL_GIVEN" -H 'HEADER_GIVEN'` If you'd like to monitor the status of your import job, use the `job_id` and the "Import Contacts Status" endpoint. Twilio SendGrid recommends exporting your contacts regularly as a backup to avoid issues or lost data.

operationId: Contacts_importCsv

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/ContactsImportCsvRequest"
      }
    }
  }
}

Responses

200
400
401
403
404
500
PUT /marketing/contacts/imports

Ip pools 1 endpoints

PUT /ips/pools/{pool_name}

**This endpoint allows you to update the name of an IP pool.**

operationId: IpPools_updateName

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/IpPoolsUpdateNameRequest"
      }
    }
  }
}

Responses

200
404
PUT /ips/pools/{pool_name}

Single sends 1 endpoints

PUT /marketing/singlesends/{id}/schedule

**This endpoint allows you to schedule a Single Send for future delivery using a Single Send ID.** To schedule a Single Send, you must pass a date string in ISO 8601 time format (yyyy-MM-ddTHH:mm:ssZ) using the required `send_at` field. For example, the ISO 8601 format for 9:00 AM UTC on May 6, 2020 would be `2020-05-06T09:00:00Z`. You may also pass the string `"now"` to send the Single Send immediately.

operationId: SingleSends_schedulePut

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/SingleSendsSchedulePutRequest"
      }
    }
  }
}

Responses

201
404
500
PUT /marketing/singlesends/{id}/schedule

Subuser monitor settings 1 endpoints

PUT /subusers/{subuser_name}/monitor
operationId: SubuserMonitorSettings_updateForSubuserNameMonitor

Request Body

{
  "$ref": "#/components/requestBodies/monitor"
}

Responses

200
400
401
PUT /subusers/{subuser_name}/monitor

Subusers api 1 endpoints

PUT /subusers/{subuser_name}/ips

**This endpoint allows you update your subusers' assigned IP.** Each subuser should be assigned to an IP address from which all of this subuser's mail will be sent. Often, this is the same IP as the parent account, but each subuser can have one or more of their own IP addresses as well. More information: * [How to request more IPs](https://sendgrid.com/docs/ui/account-and-settings/dedicated-ip-addresses/) * [Setup Reverse DNS](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-reverse-dns/)

operationId: SubusersApi_updateSubuserIps

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/SubusersApiUpdateSubuserIpsRequest"
      }
    }
  }
}

Responses

200
401
PUT /subusers/{subuser_name}/ips

Users api 3 endpoints

PUT /user/email

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

operationId: UsersApi_updateEmail

Parameters

Name In Required Type Description
optional

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/UsersApiUpdateEmailRequest"
      }
    }
  }
}

Responses

200
PUT /user/email
PUT /user/password

**This endpoint allows you to update your password.**

operationId: UsersApi_updatePassword

Parameters

Name In Required Type Description
optional

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/UsersApiUpdatePasswordRequest"
      }
    }
  }
}

Responses

200
PUT /user/password
PUT /user/username

**This endpoint allows you to update the username for your account.**

operationId: UsersApi_updateUsername

Parameters

Name In Required Type Description
optional

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/UsersApiUpdateUsernameRequest"
      }
    }
  }
}

Responses

200
PUT /user/username

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."
    }
  }
}