openapi: 3.0.0
servers:
  - url: http://api.sendgrid.com/v3
info:
  description: 'The Beta endpoints for the new Email Activity APIs -
    functionality is subject to change without notice. You may not have access
    to this Beta endpoint.


    Email Activity offers filtering and search by event type for two days worth
    of data. There is an optional add-on to store 60 days worth of data. This
    add-on also gives you access to the ability to download a CSV of the 60 days
    worth of email event data. The Beta endpoints for the new Email Activity
    APIs - functionality is subject to change without notice. You may not have
    access to this Beta endpoint.


    Email Activity offers filtering and search by event type for two days worth
    of data. There is an optional add-on to store 60 days worth of data. This
    add-on also gives you access to the ability to download a CSV of the 60 days
    worth of email event data.'
  title: Email Activity (beta)
  version: 1.0.0
  x-apisguru-categories:
    - email
    - marketing
  x-logo:
    url: https://user-images.githubusercontent.com/21603/27865240-b4c0da22-6189-11e7-9f2c-f35f4c6fa57c.png
  x-origin:
    - format: openapi
      url: https://raw.githubusercontent.com/sendgrid/sendgrid-oai/main/oai.json
      version: '3.0'
  x-providerName: sendgrid.com
externalDocs:
  url: https://sendgrid.com/docs/API_Reference/Web_API_v3/index.html
paths:
  /access_settings/activity:
    get:
      description:
        '**This endpoint allows you to retrieve a list of all of the IP
        addresses that recently attempted to access your account either through
        the User Interface or the API.**'
      operationId: GET_access_settings-activity
      parameters:
        - description: Limits the number of IPs to return.
          in: query
          name: limit
          schema:
            default: 20
            type: integer
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    result:
                      - allowed: false
                        auth_method: Web
                        first_at: 1444087966
                        ip: 1.1.1.1
                        last_at: 1444406672
                        location: Australia
                      - allowed: false
                        auth_method: Web
                        first_at: 1444087505
                        ip: 1.2.3.48
                        last_at: 1444087505
                        location: Mukilteo, Washington
              schema:
                properties:
                  result:
                    description:
                      An array containing the IPs that recently attempted to
                      access your account.
                    items:
                      properties:
                        allowed:
                          description:
                            Indicates if the IP address was granted access to
                            the account.
                          type: boolean
                        auth_method:
                          description:
                            The authentication method used when attempting
                            access.
                          type: string
                        first_at:
                          description:
                            A Unix timestamp indicating when the first access
                            attempt was made.
                          type: integer
                        ip:
                          description:
                            The IP addressed used during the access attempt.
                          type: string
                        last_at:
                          description:
                            A Unix timestamp indicating when the most recent
                            access attempt was made
                          type: integer
                        location:
                          description:
                            The geographic location from which the access
                            attempt originated.
                          type: string
                      required:
                        - allowed
                        - auth_method
                        - first_at
                        - ip
                        - last_at
                        - location
                      type: object
                    type: array
                required:
                  - result
                type: object
          description: ''
        '401':
          $ref: '#/components/responses/trait_globalErrors_401'
        '403':
          $ref: '#/components/responses/trait_globalErrors_403'
        '404':
          $ref: '#/components/responses/trait_globalErrors_404'
        '500':
          $ref: '#/components/responses/trait_globalErrors_500'
      security:
        - Authorization: []
      summary: Retrieve all recent access attempts
      tags:
        - IP Access Management
  /access_settings/whitelist:
    delete:
      description: '**This endpoint allows you to remove one or more IP
        addresses from your list of allowed addresses.**


        To remove one or more IP addresses, pass this endpoint an array
        containing the ID(s) associated with the IP(s) you intend to remove. You
        can retrieve the IDs associated with your allowed IP addresses using the
        "Retrieve a list of currently allowed IPs" endpoint.


        It is possible to remove your own IP address, which will block access to
        your account. You will need to submit a [support
        ticket](https://sendgrid.com/docs/ui/account-and-settings/support/) if
        this happens. For this reason, it is important to double check that you
        are removing only the IPs you intend to remove when using this endpoint.'
      operationId: DELETE_access_settings-whitelist
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      requestBody:
        content:
          application/json:
            schema:
              example:
                ids:
                  - 1
                  - 2
                  - 3
              properties:
                ids:
                  description:
                    An array of the IDs of the IP address that you want to
                    remove from your allow list.
                  items:
                    type: integer
                  type: array
              type: object
      responses:
        '204':
          content:
            application/json:
              schema:
                properties: {}
                type: object
          description: ''
        '401':
          $ref: '#/components/responses/trait_globalErrors_401'
        '403':
          $ref: '#/components/responses/trait_globalErrors_403'
        '404':
          $ref: '#/components/responses/trait_globalErrors_404'
        '500':
          $ref: '#/components/responses/trait_globalErrors_500'
      security:
        - Authorization: []
      summary: Remove one or more IPs from the allow list
      tags:
        - IP Access Management
    get:
      description: '**This endpoint allows you to retrieve a list of IP
        addresses that are currently allowed to access your account.**


        Each IP address returned to you will have `created_at` and `updated_at`
        dates. Each IP will also be associated with an `id` that can be used to
        remove the address from your allow list.'
      operationId: GET_access_settings-whitelist
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    result:
                      - created_at: 1441824715
                        id: 1
                        ip: 192.168.1.1/32
                        updated_at: 1441824715
                      - created_at: 1441824715
                        id: 2
                        ip: 192.168.1.2/32
                        updated_at: 1441824715
                      - created_at: 1441824715
                        id: 3
                        ip: 192.168.1.3/32
                        updated_at: 1441824715
              schema:
                $ref: '#/components/schemas/ip-access-response'
          description: ''
        '401':
          $ref: '#/components/responses/trait_globalErrors_401'
        '403':
          $ref: '#/components/responses/trait_globalErrors_403'
        '404':
          $ref: '#/components/responses/trait_globalErrors_404'
        '500':
          $ref: '#/components/responses/trait_globalErrors_500'
      security:
        - Authorization: []
      summary: Retrieve a list of currently allowed IPs
      tags:
        - IP Access Management
    post:
      description: '**This endpoint allows you to add one or more allowed IP
        addresses.**


        To allow one or more IP addresses, pass them to this endpoint in an
        array. Once an IP address is added to your allow list, it will be
        assigned an `id` that can be used to remove the address. You can
        retrieve the ID associated with an IP using the "Retrieve a list of
        currently allowed IPs" endpoint.'
      operationId: POST_access_settings-whitelist
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      requestBody:
        content:
          application/json:
            schema:
              example:
                ips:
                  - ip: 192.168.1.1
                  - ip: 192.*.*.*
                  - ip: 192.168.1.3/32
              properties:
                ips:
                  description: An array containing the IP(s) you want to allow.
                  items:
                    properties:
                      ip:
                        description: An IP address that you want to allow.
                        type: string
                    required:
                      - ip
                    type: object
                  type: array
              required:
                - ips
              type: object
      responses:
        '201':
          content:
            application/json:
              examples:
                response:
                  value:
                    result:
                      - created_at: 1441824715
                        id: 1
                        ip: 192.168.1.1/32
                        updated_at: 1441824715
                      - created_at: 1441824715
                        id: 2
                        ip: 192.0.0.0/8
                        updated_at: 1441824715
                      - created_at: 1441824715
                        id: 3
                        ip: 192.168.1.3/32
                        updated_at: 1441824715
              schema:
                $ref: '#/components/schemas/ip-access-response'
          description: ''
        '401':
          $ref: '#/components/responses/trait_globalErrors_401'
        '403':
          $ref: '#/components/responses/trait_globalErrors_403'
        '404':
          $ref: '#/components/responses/trait_globalErrors_404'
        '500':
          $ref: '#/components/responses/trait_globalErrors_500'
      security:
        - Authorization: []
      summary: Add one or more IPs to the allow list
      tags:
        - IP Access Management
  /access_settings/whitelist/{rule_id}:
    delete:
      description: '**This endpoint allows you to remove a specific IP address
        from your list of allowed addresses.**


        When removing a specific IP address from your list, you must include the
        ID in your call.  You can retrieve the IDs associated with your allowed
        IP addresses using the "Retrieve a list of currently allowed IPs"
        endpoint.'
      operationId: DELETE_access_settings-whitelist-rule_id
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '204':
          content:
            application/json:
              schema:
                properties: {}
                type: object
          description: ''
      security:
        - Authorization: []
      summary: Remove a specific IP from the allowed list
      tags:
        - IP Access Management
    get:
      description: '**This endpoint allows you to retreive a specific IP address
        that has been allowed to access your account.**


        You must include the ID for the specific IP address you want to retrieve
        in your call. You can retrieve the IDs associated with your allowed IP
        addresses using the "Retrieve a  list of currently allowed IPs"
        endpoint.'
      operationId: GET_access_settings-whitelist-rule_id
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    created_at: 1441824715
                    id: 1
                    ip: 192.168.1.1
                    updated_at: 1441824715
              schema:
                $ref: '#/components/schemas/ip-access-response'
          description: ''
      security:
        - Authorization: []
      summary: Retrieve a specific allowed IP
      tags:
        - IP Access Management
    parameters:
      - description: The ID of the allowed IP address that you want to retrieve.
        in: path
        name: rule_id
        required: true
        schema:
          type: string
  /alerts:
    get:
      description:
        "**This endpoint allows you to retrieve all of your alerts.**\n\nAlerts
        allow you to specify an email address to receive notifications regarding
        your email usage or statistics. \n* Usage alerts allow you to set the
        threshold at which an alert will be sent.\n* Stats notifications allow
        you to set how frequently you would like to receive email statistics
        reports. For example, \"daily\", \"weekly\", or \"monthly\".\n\nFor more
        information about alerts, please see our [Alerts
        documentation](https://sendgrid.com/docs/ui/account-and-settings/alerts/)."
      operationId: GET_alerts
      parameters:
        - in: header
          name: Authorization
          schema:
            type: string
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    - created_at: 1451498784
                      email_to: example1@example.com
                      id: 46
                      percentage: 90
                      type: usage_limit
                      updated_at: 1451498784
                    - created_at: 1451498812
                      email_to: example2@example.com
                      frequency: monthly
                      id: 47
                      type: stats_notification
                      updated_at: 1451498812
                    - created_at: 1451520930
                      email_to: example3@example.com
                      frequency: daily
                      id: 48
                      type: stats_notification
                      updated_at: 1451520930
              schema:
                description: The list of alerts.
                items:
                  properties:
                    created_at:
                      description:
                        A Unix timestamp indicating when the alert was created.
                      type: integer
                    email_to:
                      description:
                        The email address that the alert will be sent to.
                      type: string
                    frequency:
                      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".
                      type: string
                    id:
                      description: The ID of the alert.
                      type: integer
                    percentage:
                      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.
                      type: integer
                    type:
                      description: The type of alert.
                      enum:
                        - usage_limit
                        - stats_notification
                      type: string
                    updated_at:
                      description:
                        A Unix timestamp indicating when the alert was last
                        modified.
                      type: integer
                  required:
                    - created_at
                    - email_to
                    - id
                    - type
                  type: object
                type: array
          description: ''
      security:
        - Authorization: []
      summary: Retrieve all alerts
      tags:
        - Alerts
    post:
      description: '**This endpoint allows you to create a new alert.**


        Alerts allow you to specify an email address to receive notifications
        regarding your email usage or statistics. There are two types of alerts
        that can be created with this endpoint:


        * `usage_limit` allows you to set the threshold at which an alert will
        be sent.

        * `stats_notification` allows you to set how frequently you would like
        to receive email statistics reports. For example, "daily", "weekly", or
        "monthly".


        For more information about alerts, please see our [Alerts
        documentation](https://sendgrid.com/docs/ui/account-and-settings/alerts/).'
      operationId: POST_alerts
      parameters:
        - in: header
          name: Authorization
          schema:
            type: string
        - in: header
          name: on-behalf-of
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              example:
                email_to: example@example.com
                frequency: daily
                type: stats_notification
              properties:
                email_to:
                  description: 'The email address the alert will be sent to.

                    Example: test@example.com'
                  format: email
                  nullable: true
                  type: string
                frequency:
                  description: 'Required for stats_notification. How frequently
                    the alert will be sent.

                    Example: daily'
                  type: string
                percentage:
                  description: 'Required for usage_alert. When this usage
                    threshold is reached, the alert will be sent.

                    Example: 90'
                  type: integer
                type:
                  description: 'The type of alert you want to create. Can be
                    either usage_limit or stats_notification.

                    Example: usage_limit'
                  enum:
                    - stats_notification
                    - usage_limit
                  type: string
              required:
                - type
                - email_to
              type: object
      responses:
        '201':
          content:
            application/json:
              examples:
                response:
                  value:
                    created_at: 1451520930
                    email_to: test@example.com
                    frequency: daily
                    id: 48
                    type: stats_notification
                    updated_at: 1451520930
              schema:
                properties:
                  created_at:
                    description:
                      A Unix timestamp indicating when the alert was created.
                    type: integer
                  email_to:
                    description:
                      The email address that the alert will be sent to.
                    format: email
                    type: string
                  frequency:
                    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".
                    type: string
                  id:
                    description: The ID of the alert.
                    type: integer
                  percentage:
                    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.'
                    type: integer
                  type:
                    description: The type of alert.
                    type: string
                  updated_at:
                    description:
                      A Unix timestamp indicating when the alert was last
                      modified.
                    type: integer
                required:
                  - created_at
                  - email_to
                  - id
                  - type
                  - updated_at
                type: object
          description: ''
        '400':
          content:
            application/json:
              schema:
                properties:
                  field:
                    type: string
                  message:
                    type: string
                type: object
          description: ''
      security:
        - Authorization: []
      summary: Create a new Alert
      tags:
        - Alerts
  /alerts/{alert_id}:
    delete:
      description:
        "**This endpoint allows you to delete an alert.**\n\nAlerts allow you to
        specify an email address to receive notifications regarding your email
        usage or statistics. \n* Usage alerts allow you to set the threshold at
        which an alert will be sent.\n* Stats notifications allow you to set how
        frequently you would like to receive email statistics reports. For
        example, \"daily\", \"weekly\", or \"monthly\".\n\nFor more information
        about alerts, please see our [Alerts
        documentation](https://sendgrid.com/docs/ui/account-and-settings/alerts/)."
      operationId: DELETE_alerts-alert_id
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '204':
          content:
            application/json:
              schema:
                properties: {}
                type: object
          description: ''
      security:
        - Authorization: []
      summary: Delete an alert
      tags:
        - Alerts
    get:
      description:
        "**This endpoint allows you to retrieve a specific alert.**\n\nAlerts
        allow you to specify an email address to receive notifications regarding
        your email usage or statistics. \n* Usage alerts allow you to set the
        threshold at which an alert will be sent.\n* Stats notifications allow
        you to set how frequently you would like to receive email statistics
        reports. For example, \"daily\", \"weekly\", or \"monthly\".\n\nFor more
        information about alerts, please see our [Alerts
        documentation](https://sendgrid.com/docs/ui/account-and-settings/alerts/)."
      operationId: GET_alerts-alert_id
      parameters:
        - in: header
          name: Authorization
          schema:
            type: string
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    created_at: 1451520930
                    email_to: example@example.com
                    frequency: daily
                    id: 48
                    type: stats_notification
                    updated_at: 1451520930
              schema:
                properties:
                  created_at:
                    description:
                      A Unix timestamp indicating when the alert was created.
                    type: integer
                  email_to:
                    description:
                      The email address that the alert will be sent to.
                    type: string
                  frequency:
                    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".'
                    type: string
                  id:
                    description: The ID of the alert.
                    type: integer
                  percentage:
                    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.
                    type: integer
                  type:
                    description: The type of alert.
                    enum:
                      - usage_alert
                      - stats_notification
                    type: string
                  updated_at:
                    description:
                      A Unix timestamp indicating when the alert was last
                      modified.
                    type: integer
                required:
                  - created_at
                  - email_to
                  - id
                  - type
                  - updated_at
                type: object
          description: ''
      security:
        - Authorization: []
      summary: Retrieve a specific alert
      tags:
        - Alerts
    parameters:
      - description: The ID of the alert you would like to retrieve.
        in: path
        name: alert_id
        required: true
        schema:
          type: integer
    patch:
      description:
        "**This endpoint allows you to update an alert.**\n\nAlerts allow you to
        specify an email address to receive notifications regarding your email
        usage or statistics. \n* Usage alerts allow you to set the threshold at
        which an alert will be sent.\n* Stats notifications allow you to set how
        frequently you would like to receive email statistics reports. For
        example, \"daily\", \"weekly\", or \"monthly\".\n\nFor more information
        about alerts, please see our [Alerts
        documentation](https://sendgrid.com/docs/ui/account-and-settings/alerts/)."
      operationId: PATCH_alerts-alert_id
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      requestBody:
        content:
          application/json:
            schema:
              example:
                email_to: example@example.com
              properties:
                email_to:
                  description: 'The new email address you want your alert to be
                    sent to.

                    Example: test@example.com'
                  type: string
                frequency:
                  description: 'The new frequency at which to send the
                    stats_notification alert.

                    Example: monthly'
                  type: string
                percentage:
                  description: 'The new percentage threshold at which the
                    usage_limit alert will be sent.

                    Example: 90'
                  type: integer
              type: object
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    created_at: 1451520930
                    email_to: example@example.com
                    frequency: daily
                    id: 48
                    type: stats_notification
                    updated_at: 1451522691
              schema:
                properties:
                  created_at:
                    description:
                      A Unix timestamp indicating when the alert was created.
                    type: integer
                  email_to:
                    description:
                      The email address that the alert will be sent to.
                    type: string
                  frequency:
                    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".'
                    type: string
                  id:
                    description: The ID of the alert.
                    type: integer
                  percentage:
                    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.
                    type: integer
                  type:
                    description: The type of alert.
                    enum:
                      - usage_alert
                      - stats_notification
                    type: string
                  updated_at:
                    description:
                      A Unix timestamp indicating when the alert was last
                      modified.
                    type: integer
                required:
                  - created_at
                  - email_to
                  - id
                  - type
                  - updated_at
                type: object
          description: ''
      security:
        - Authorization: []
      summary: Update an alert
      tags:
        - Alerts
  /api_keys:
    get:
      description: '**This endpoint allows you to retrieve all API Keys that
        belong to the authenticated user.**


        A successful response from this API will include all available API
        keys'' names and IDs.


        For security reasons, there is not a way to retrieve the key itself
        after it''s created. If you lose your API key, you must create a new
        one. Only the "Create API keys" endpoint will return a key to you and
        only at the time of creation.


        An `api_key_id` can be used to update or delete the key, as well as
        retrieve the key''s details, such as its scopes.'
      operationId: GET_api_keys
      parameters:
        - in: query
          name: limit
          schema:
            type: integer
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    result:
                      - api_key_id: some-apikey-id
                        name: API Key Name
                      - api_key_id: another-apikey-id
                        name: API Key Name 2
              schema:
                properties:
                  result:
                    items:
                      $ref: '#/components/schemas/api_key_name_id'
                    type: array
                type: object
          description: ''
        '401':
          $ref: '#/components/responses/trait_globalErrors_401'
        '403':
          $ref: '#/components/responses/trait_globalErrors_403'
        '404':
          $ref: '#/components/responses/trait_globalErrors_404'
        '500':
          $ref: '#/components/responses/trait_globalErrors_500'
      security:
        - Authorization: []
      summary: Retrieve all API Keys belonging to the authenticated user
      tags:
        - API Keys
    post:
      description: '**This endpoint allows you to create a new API Key for the
        user.**


        To create your initial SendGrid API Key, you should [use the SendGrid
        App](https://app.sendgrid.com/settings/api_keys). Once you have created
        a first key with scopes to manage additional API keys, you can use this
        API for all other key management.


        > There is a limit of 100 API Keys on your account.


        A JSON request body containing a `name` property is required when making
        requests to this endpoint. If the number of maximum keys, 100, is
        reached, a `403` status will be returned.


        Though the `name` field is required, it does not need to be unique. A
        unique API key ID will be generated for each key you create and returned
        in the response body.


        It is not necessary to pass a `scopes` field to the API when creating a
        key, but you should be aware that omitting the `scopes` field from your
        request will create a key with "Full Access" permissions by default.


        See the [API Key Permissions
        List](https://sendgrid.api-docs.io/v3.0/how-to-use-the-sendgrid-v3-api/api-authorization)
        for all available scopes. An API key''s scopes can be updated after
        creation using the "Update API keys" endpoint.'
      operationId: create-api-keys
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      requestBody:
        content:
          application/json:
            schema:
              example:
                name: My API Key
                scopes:
                  - mail.send
                  - alerts.create
                  - alerts.read
              properties:
                name:
                  description: The name you will use to describe this API Key.
                  type: string
                scopes:
                  description:
                    The individual permissions that you are giving to this API
                    Key.
                  items:
                    type: string
                  type: array
              required:
                - name
              type: object
      responses:
        '201':
          content:
            application/json:
              examples:
                response:
                  value:
                    api_key: SG.xxxxxxxx.yyyyyyyy
                    api_key_id: xxxxxxxx
                    name: My API Key
                    scopes:
                      - mail.send
                      - alerts.create
                      - alerts.read
              schema:
                properties:
                  api_key:
                    type: string
                  api_key_id:
                    type: string
                  name:
                    type: string
                  scopes:
                    items:
                      type: string
                    type: array
                type: object
          description: ''
        '400':
          $ref: '#/components/responses/trait_apiKeysErrors_400'
        '401':
          $ref: '#/components/responses/trait_globalErrors_401'
        '403':
          $ref: '#/components/responses/trait_apiKeysErrors_403'
        '404':
          $ref: '#/components/responses/trait_apiKeysErrors_404'
        '500':
          $ref: '#/components/responses/trait_globalErrors_500'
      security:
        - Authorization: []
      summary: Create API keys
      tags:
        - API Keys
  /api_keys/{api_key_id}:
    delete:
      description: '**This endpoint allows you to revoke an existing API Key
        using an `api_key_id`**


        Authentications using a revoked API Key will fail after after some small
        propogation delay. If the API Key ID does not exist, a `404` status will
        be returned.'
      operationId: DELETE_api_keys-api_key_id
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '204':
          description: ''
        '400':
          $ref: '#/components/responses/trait_apiKeysErrors_400'
        '401':
          $ref: '#/components/responses/trait_globalErrors_401'
        '403':
          $ref: '#/components/responses/trait_globalErrors_403'
        '404':
          $ref: '#/components/responses/trait_globalErrors_404'
        '500':
          $ref: '#/components/responses/trait_globalErrors_500'
      security:
        - Authorization: []
      summary: Delete API keys
      tags:
        - API Keys
    get:
      description: '**This endpoint allows you to retrieve a single API key
        using an `api_key_id`.**


        The endpoint will return a key''s name, ID, and scopes. If the API Key
        ID does not, exist a `404` status will be returned.


        See the [API Key Permissions
        List](https://sendgrid.api-docs.io/v3.0/how-to-use-the-sendgrid-v3-api/api-authorization)
        for all available scopes. An API key''s scopes can be updated after
        creation using the "Update API keys" endpoint.'
      operationId: GET_api_keys-api_key_id
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    result:
                      - api_key_id: some-apikey-id
                        name: API Key Name
                      - api_key_id: another-apikey-id
                        name: API Key Name 2
              schema:
                properties:
                  result:
                    items:
                      $ref: '#/components/schemas/api_key_name_id_scopes'
                    type: array
                type: object
          description: ''
        '400':
          $ref: '#/components/responses/trait_apiKeysErrors_400'
        '401':
          $ref: '#/components/responses/trait_globalErrors_401'
        '403':
          $ref: '#/components/responses/trait_apiKeysErrors_403'
        '404':
          $ref: '#/components/responses/trait_apiKeysErrors_404'
        '500':
          $ref: '#/components/responses/trait_globalErrors_500'
      security:
        - Authorization: []
      summary: Retrieve an existing API Key
      tags:
        - API Keys
    parameters:
      - description: ''
        in: path
        name: api_key_id
        required: true
        schema:
          type: string
    patch:
      description: '**This endpoint allows you to update the name of an existing
        API Key.**


        You must pass this endpoint a JSON request body with a `name` property,
        which will be used to rename the key associated with the `api_key_id`
        passed in the URL.'
      operationId: PATCH_api_keys-api_key_id
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      requestBody:
        content:
          application/json:
            schema:
              example:
                name: A New Hope
              properties:
                name:
                  description: The new name of the API Key.
                  type: string
              required:
                - name
              type: object
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    api_key_id: qfTQ6KG0QBiwWdJ0-pCLCA
                    name: A New Hope
              schema:
                $ref: '#/components/schemas/api_key_name_id'
          description: ''
        '400':
          $ref: '#/components/responses/trait_apiKeysErrors_400'
        '401':
          $ref: '#/components/responses/trait_globalErrors_401'
        '403':
          $ref: '#/components/responses/trait_globalErrors_403'
        '404':
          $ref: '#/components/responses/trait_globalErrors_404'
        '500':
          $ref: '#/components/responses/trait_globalErrors_500'
      security:
        - Authorization: []
      summary: Update API key name
      tags:
        - API Keys
    put:
      description: '**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: PUT_api_keys-api_key_id
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      requestBody:
        content:
          application/json:
            schema:
              example:
                name: Profiles key
                scopes:
                  - user.profile.read
                  - user.profile.update
              properties:
                name:
                  type: string
                scopes:
                  items:
                    type: string
                  type: array
              required:
                - name
              type: object
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    api_key_id: qfTQ6KG0QBiwWdJ0-pCLCA
                    name: Profiles Key
                    scopes:
                      - user.profile.read
                      - user.profile.update
              schema:
                $ref: '#/components/schemas/api_key_name_id_scopes'
          description: ''
        '400':
          $ref: '#/components/responses/trait_apiKeysErrors_400'
        '401':
          $ref: '#/components/responses/trait_globalErrors_401'
        '403':
          $ref: '#/components/responses/trait_globalErrors_403'
        '404':
          $ref: '#/components/responses/trait_globalErrors_404'
        '500':
          $ref: '#/components/responses/trait_globalErrors_500'
      security:
        - Authorization: []
      summary: Update API key name and scopes
      tags:
        - API Keys
  /asm/groups:
    get:
      description: '**This endpoint allows you to retrieve a list of all
        suppression groups created by this user.**


        This endpoint can also return information for multiple group IDs that
        you include in your request. To add a group ID to your request, simply
        append `?id=123456&id=123456`, with the appropriate group IDs.'
      operationId: GET_asm-groups
      parameters:
        - in: query
          name: id
          schema:
            type: integer
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    - description: An Unsubscribe Group
                      id: 1234
                      is_default: true
                      last_email_sent_at: null
                      name: Unsubscribe Group
                      unsubscribes: 1234
                    - description: An Unsubscribe Group
                      id: 1234
                      is_default: true
                      last_email_sent_at: null
                      name: Unsubscribe Group
                      unsubscribes: 1234
              schema:
                items:
                  $ref: '#/components/schemas/suppression_group'
                type: array
          description: ''
      security:
        - Authorization: []
      summary: Retrieve all suppression groups associated with the user.
      tags:
        - Suppressions - Unsubscribe Groups
    post:
      description: '**This endpoint allows you to create a new suppression
        group.**


        To add an email address to the suppression group, [create a
        Suppression](https://sendgrid.api-docs.io/v3.0/suppressions-suppressions/add-suppressions-to-a-suppression-group).'
      operationId: POST_asm-groups
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/suppression-group-request-base'
      responses:
        '201':
          content:
            application/json:
              examples:
                response:
                  value:
                    description: Suggestions for products our users might like.
                    id: 103
                    is_default: false
                    name: Product Suggestions
              schema:
                properties:
                  description:
                    description: A brief description of the suppression group.
                    type: string
                  id:
                    description: The ID of the suppression group.
                    type: integer
                  is_default:
                    description:
                      Indicates if this is the default suppression group.
                    type: boolean
                  name:
                    description: The name of the suppression group.
                    type: string
                required:
                  - id
                  - name
                  - description
                  - is_default
                type: object
          description: ''
      security:
        - Authorization: []
      summary: Create a new suppression group
      tags:
        - Suppressions - Unsubscribe Groups
  /asm/groups/{group_id}:
    delete:
      description: '**This endpoint allows you to delete a suppression group.**


        If a recipient uses the "one-click unsubscribe" option on an email
        associated with a deleted group, that recipient will be added to the
        global suppression list.


        Deleting a suppression group will remove the suppression, meaning email
        will once again be sent to the previously suppressed addresses. This
        should be avoided unless a recipient indicates they wish to receive
        email from you again. You can use our [bypass
        filters](https://sendgrid.com/docs/ui/sending-email/index-suppressions/#bypass-suppressions)
        to deliver messages to otherwise suppressed addresses when exceptions
        are required.'
      operationId: DELETE_asm-groups-group_id
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '204':
          content:
            application/json:
              schema:
                type: object
          description: ''
      security:
        - Authorization: []
      summary: Delete a Suppression Group
      tags:
        - Suppressions - Unsubscribe Groups
    get:
      description:
        '**This endpoint allows you to retrieve a single suppression group.**'
      operationId: GET_asm-groups-group_id
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    description: Our monthly newsletter.
                    id: 100
                    is_default: true
                    last_email_sent_at: null
                    name: Newsletters
                    unsubscribes: 400
              schema:
                allOf:
                  - $ref: '#/components/schemas/suppression-group-request-base'
                  - properties:
                      id:
                        description: The ID of the suppression group.
                        type: integer
                      last_email_sent_at:
                        nullable: true
                        type: string
                      unsubscribes:
                        description:
                          The number of unsubscribes, or suppressions, in this
                          group.
                        type: integer
                    required:
                      - id
                    type: object
          description: ''
      security:
        - Authorization: []
      summary: Get information on a single suppression group.
      tags:
        - Suppressions - Unsubscribe Groups
    parameters:
      - description: The ID of the suppression group you would like to retrieve.
        in: path
        name: group_id
        required: true
        schema:
          type: string
    patch:
      description:
        '**This endpoint allows you to update or change a suppression group.**'
      operationId: PATCH_asm-groups-group_id
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      requestBody:
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/suppression-group-request-base'
              example:
                description: Suggestions for items our users might like.
                id: 103
                name: Item Suggestions
      responses:
        '201':
          content:
            application/json:
              examples:
                response:
                  value:
                    description: Suggestions for items our users might like.
                    id: 103
                    name: Item Suggestions
              schema:
                $ref: '#/components/schemas/suppression_group'
          description: ''
      security:
        - Authorization: []
      summary: Update a suppression group.
      tags:
        - Suppressions - Unsubscribe Groups
  /asm/groups/{group_id}/suppressions:
    get:
      description:
        '**This endpoint allows you to retrieve all suppressed email addresses
        belonging to the given group.**'
      operationId: GET_asm-groups-group_id-suppressions
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    - example@example.com
                    - example2@example.com
              schema:
                description:
                  The list of email addresses belonging to the given suppression
                  group.
                items:
                  format: email
                  type: string
                type: array
          description: ''
      security:
        - Authorization: []
      summary: Retrieve all suppressions for a suppression group
      tags:
        - Suppressions - Suppressions
    parameters:
      - description:
          The id of the unsubscribe group that you are adding suppressions to.
        in: path
        name: group_id
        required: true
        schema:
          type: string
    post:
      description: '**This endpoint allows you to add email addresses to an
        unsubscribe group.**


        If you attempt to add suppressions to a group that has been deleted or
        does not exist, the suppressions will be added to the global
        suppressions list.'
      operationId: POST_asm-groups-group_id-suppressions
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      requestBody:
        $ref: '#/components/requestBodies/suppressions-request'
      responses:
        '201':
          content:
            application/json:
              examples:
                response:
                  value:
                    recipient_emails:
                      - test1@example.com
                      - test2@example.com
              schema:
                properties:
                  recipient_emails:
                    description:
                      The email addresses you added to the unsubscribe group
                    items:
                      format: email
                      type: string
                    type: array
                type: object
          description: ''
      security:
        - Authorization: []
      summary: Add suppressions to a suppression group
      tags:
        - Suppressions - Suppressions
  /asm/groups/{group_id}/suppressions/search:
    parameters:
      - description:
          The ID of the suppression group that you would like to search.
        in: path
        name: group_id
        required: true
        schema:
          type: string
    post:
      description: '**This endpoint allows you to search a suppression group for
        multiple suppressions.**


        When given a list of email addresses and a group ID, this endpoint will
        only return the email addresses that have been unsubscribed from the
        given group.'
      operationId: POST_asm-groups-group_id-suppressions-search
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      requestBody:
        $ref: '#/components/requestBodies/suppressions-request'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    - exists1@example.com
                    - exists2@example.com
              schema:
                description:
                  The email address from your search that do exist in the
                  suppression group.
                items:
                  format: email
                  type: string
                type: array
          description: ''
      security:
        - Authorization: []
      summary: Search for suppressions within a group
      tags:
        - Suppressions - Suppressions
  /asm/groups/{group_id}/suppressions/{email}:
    delete:
      description: '**This endpoint allows you to remove a suppressed email
        address from the given suppression group.**


        Removing an address will remove the suppression, meaning email will once
        again be sent to the previously suppressed addresses. This should be
        avoided unless a recipient indicates they wish to receive email from you
        again. You can use our [bypass
        filters](https://sendgrid.com/docs/ui/sending-email/index-suppressions/#bypass-suppressions)
        to deliver messages to otherwise suppressed addresses when exceptions
        are required.'
      operationId: DELETE_asm-groups-group_id-suppressions-email
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '204':
          content:
            application/json:
              schema:
                nullable: true
          description: ''
      security:
        - Authorization: []
      summary: Delete a suppression from a suppression group
      tags:
        - Suppressions - Suppressions
    parameters:
      - description:
          The id of the suppression group that you are removing an email address
          from.
        in: path
        name: group_id
        required: true
        schema:
          type: string
      - description:
          The email address that you want to remove from the suppression group.
        in: path
        name: email
        required: true
        schema:
          type: string
  /asm/suppressions:
    get:
      description:
        '**This endpoint allows you to retrieve a list of all suppressions.**'
      operationId: GET_asm-suppressions
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    - created_at: 1410986704
                      email: test1@example.com
                      group_id: 1
                      group_name: Weekly News
                    - created_at: 1411493671
                      email: test1@example.com
                      group_id: 2
                      group_name: Daily News
                    - created_at: 1411493671
                      email: test2@example.com
                      group_id: 2
                      group_name: Daily News
              schema:
                items:
                  properties:
                    created_at:
                      description:
                        A UNIX timestamp indicating when the suppression was
                        created.
                      type: integer
                    email:
                      description: The email address that was suppressed.
                      type: string
                    group_id:
                      description:
                        The id of the suppression group that this email address
                        belongs to.
                      type: integer
                    group_name:
                      description:
                        The name of the suppression group that this email
                        address belongs to.
                      type: string
                  required:
                    - email
                    - group_id
                    - group_name
                    - created_at
                  type: object
                type: array
          description: ''
      security:
        - Authorization: []
      summary: Retrieve all suppressions
      tags:
        - Suppressions - Suppressions
  /asm/suppressions/global:
    post:
      description:
        '**This endpoint allows you to add one or more email addresses to the
        global suppressions group.**'
      operationId: POST_asm-suppressions-global
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      requestBody:
        $ref: '#/components/requestBodies/suppressions-request'
      responses:
        '201':
          content:
            application/json:
              examples:
                response:
                  value:
                    recipient_emails:
                      - test1@example.com
                      - test2@example.com
              schema:
                properties:
                  recipient_emails:
                    description:
                      The email addresses that are globally suppressed
                    items:
                      format: email
                      type: string
                    type: array
                required:
                  - recipient_emails
                type: object
          description: ''
      security:
        - Authorization: []
      summary: Add recipient addresses to the global suppression group.
      tags:
        - Suppressions - Global Suppressions
  /asm/suppressions/global/{email}:
    delete:
      description: '**This endpoint allows you to remove an email address from
        the global suppressions group.**


        Deleting a suppression group will remove the suppression, meaning email
        will once again be sent to the previously suppressed addresses. This
        should be avoided unless a recipient indicates they wish to receive
        email from you again. You can use our [bypass
        filters](https://sendgrid.com/docs/ui/sending-email/index-suppressions/#bypass-suppressions)
        to deliver messages to otherwise suppressed addresses when exceptions
        are required.'
      operationId: DELETE_asm-suppressions-global-email
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '204':
          content:
            application/json:
              schema:
                type: object
          description: ''
      security:
        - Authorization: []
      summary: Delete a Global Suppression
      tags:
        - Suppressions - Global Suppressions
    get:
      description: '**This endpoint allows you to retrieve a global suppression.
        You can also use this endpoint to confirm if an email address is already
        globally suppresed.**


        If the email address you include in the URL path parameter `{email}` is
        already globally suppressed, the response will include that email
        address. If the address you enter for `{email}` is not globally
        suppressed, an empty JSON object `{}` will be returned.'
      operationId: GET_asm-suppressions-global-email
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    recipient_email: test@example.com
              schema:
                properties:
                  recipient_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.
                    format: email
                    type: string
                required:
                  - recipient_email
                title: Retrieve a Global Suppression response
                type: object
          description: ''
      security:
        - Authorization: []
      summary: Retrieve a Global Suppression
      tags:
        - Suppressions - Global Suppressions
    parameters:
      - description:
          The email address of the global suppression you want to retrieve. Or,
          if you want to check if an email address is on the global suppressions
          list, enter that email address here.
        in: path
        name: email
        required: true
        schema:
          type: string
  /asm/suppressions/{email}:
    get:
      description:
        '**This endpoint returns a list of all groups from which the given email
        address has been unsubscribed.**'
      operationId: GET_asm-suppressions-email
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    suppressions:
                      - description: Optional description.
                        id: 1
                        is_default: true
                        name: Weekly News
                        suppressed: true
                      - description: Some daily news.
                        id: 2
                        is_default: true
                        name: Daily News
                        suppressed: true
                      - description: An old group.
                        id: 2
                        is_default: false
                        name: Old News
                        suppressed: false
              schema:
                properties:
                  suppressions:
                    description: The array of suppression groups.
                    items:
                      properties:
                        description:
                          description: The description of the suppression group.
                          type: string
                        id:
                          description: The id of the suppression group.
                          type: integer
                        is_default:
                          description:
                            Indicates if the suppression group  is set as the
                            default.
                          type: boolean
                        name:
                          description: The name of the suppression group.
                          type: string
                        suppressed:
                          description:
                            Indicates if the given email address is suppressed
                            for this group.
                          type: boolean
                      required:
                        - description
                        - id
                        - is_default
                        - name
                        - suppressed
                      type: object
                    type: array
                required:
                  - suppressions
                type: object
          description: ''
      security:
        - Authorization: []
      summary: Retrieve all suppression groups for an email address
      tags:
        - Suppressions - Suppressions
    parameters:
      - description:
          The email address that you want to search suppression groups for.
        in: path
        name: email
        required: true
        schema:
          type: string
  /browsers/stats:
    get:
      description: '**This endpoint allows you to retrieve your email statistics
        segmented by browser type.**


        **We only store up to 7 days of email activity in our database.** By
        default, 500 items will be returned per request via the Advanced Stats
        API endpoints.


        Advanced Stats provide a more in-depth view of your email statistics and
        the actions taken by your recipients. You can segment these statistics
        by geographic location, device type, client type, browser, and mailbox
        provider. For more information about statistics, please see our
        [Statistics
        Overview](https://sendgrid.com/docs/ui/analytics-and-reporting/stats-overview/).'
      operationId: GET_browsers-stats
      parameters:
        - description:
            The browsers to get statistics for. You can include up to 10
            different browsers by including this parameter multiple times.
          in: query
          name: browsers
          schema:
            type: string
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
        - $ref: '#/components/parameters/trait_statsAdvancedQueryStringsLimitOffset_limit'
        - $ref: '#/components/parameters/trait_statsAdvancedQueryStringsLimitOffset_offset'
        - $ref: '#/components/parameters/trait_statsAdvancedQueryStringsLimitOffset_aggregated_by'
        - $ref: '#/components/parameters/trait_statsAdvancedQueryStringsLimitOffset_start_date'
        - $ref: '#/components/parameters/trait_statsAdvancedQueryStringsLimitOffset_end_date'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    - date: '2014-10-01'
                      stats:
                        - metrics:
                            clicks: 0
                            unique_clicks: 0
                          name: Chrome
                          type: browser
                        - metrics:
                            clicks: 1
                            unique_clicks: 1
                          name: Firefox
                          type: browser
                    - date: '2014-10-02'
                      stats:
                        - metrics:
                            clicks: 0
                            unique_clicks: 0
                          name: Chrome
                          type: browser
                        - metrics:
                            clicks: 1
                            unique_clicks: 1
                          name: Firefox
                          type: browser
              schema:
                items:
                  properties:
                    date:
                      description: The date that the statistics were gathered.
                      type: string
                    stats:
                      description: The list of statistics.
                      items:
                        properties:
                          metrics:
                            $ref: '#/components/schemas/advanced_stats_clicks'
                          name:
                            description: The name of the specific segmentation.
                            type: string
                          type:
                            description: The type of segmentation.
                            type: string
                        type: object
                      type: array
                  type: object
                type: array
          description: ''
      security:
        - Authorization: []
      summary: Retrieve email statistics by browser.
      tags:
        - Stats
  /campaigns:
    get:
      description: '**This endpoint allows you to retrieve a list of all of your
        campaigns.**


        Returns campaigns in reverse order they were created (newest first).


        Returns an empty array if no campaigns exist.'
      operationId: GET_campaigns
      parameters:
        - description:
            The number of results you would like to receive at a time.
          in: query
          name: limit
          schema:
            default: 10
            type: integer
        - description:
            The index of the first campaign to return, where 0 is the first
            campaign.
          in: query
          name: offset
          schema:
            default: 0
            type: integer
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    result:
                      - categories:
                          - spring line
                        custom_unsubscribe_url: ''
                        html_content:
                          <html><head><title></title></head><body><p>Check out
                          our spring line!</p></body></html>
                        id: 986724
                        ip_pool: marketing
                        list_ids:
                          - 110
                          - 124
                        plain_content: Check out our spring line!
                        segment_ids:
                          - 110
                        sender_id: 124451
                        status: Draft
                        subject: New Products for Spring!
                        suppression_group_id: 42
                        title: March Newsletter
                      - categories:
                          - winter line
                        custom_unsubscribe_url: ''
                        html_content:
                          <html><head><title></title></head><body><p>Last call
                          for winter clothes!</p></body></html>
                        id: 986723
                        ip_pool: marketing
                        list_ids:
                          - 110
                          - 124
                        plain_content: Last call for winter clothes!
                        segment_ids:
                          - 110
                        sender_id: 124451
                        status: Sent
                        subject: Final Winter Product Sale!
                        suppression_group_id: 42
                        title: February Newsletter
              schema:
                properties:
                  result:
                    items:
                      $ref: '#/components/schemas/campaign_response'
                    type: array
                type: object
          description: ''
      security:
        - Authorization: []
      summary: Retrieve all Campaigns
      tags:
        - Campaigns API
    post:
      description: '**This endpoint allows you to create a campaign.**


        In order to send or schedule the campaign, you will be required to
        provide a subject, sender ID, content (we suggest both html and plain
        text), and at least one list or segment ID. This information is not
        required when you create a campaign.'
      operationId: POST_campaigns
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/campaign_request'
      responses:
        '201':
          content:
            application/json:
              examples:
                response:
                  value:
                    categories:
                      - spring line
                    custom_unsubscribe_url: ''
                    html_content:
                      <html><head><title></title></head><body><p>Check out our
                      spring line!</p></body></html>
                    id: 986724
                    ip_pool: marketing
                    list_ids:
                      - 110
                      - 124
                    plain_content: Check out our spring line!
                    segment_ids:
                      - 110
                    sender_id: 124451
                    status: Draft
                    subject: New Products for Spring!
                    suppression_group_id: 42
                    title: March Newsletter
              schema:
                $ref: '#/components/schemas/campaign_response'
          description: ''
        '400':
          content:
            application/json:
              examples:
                response:
                  value:
                    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.
                      - field: null
                        message:
                          You've reached your limit of 250 campaigns. Please
                          delete one or more and try again.
              schema:
                $ref: '#/components/schemas/global_error_response_schema'
          description: '"title": "title can''t be blank"

            "title": "title is too long (maximum is 100 characters)"

            "categories": "categories exceeds 10 category limit"

            "html_content": "html_content exceeds the 1MB limit"

            "plain_content": "plain_content exceeds the 1MB limit"

            "sender_id": "sender_id does not exist"

            "sender_id": "sender_id is not a verified sender identity"

            "list_ids": "list_ids do not all exist"

            "segment_ids": "segment_ids do not all exist"

            "ip_pool": "The ip pool you provided is invalid"

            "suppression_group_id": "suppression_group_id does not exist"

            "unsubscribes": "Either suppression_group_id or
            custom_unsubscribe_url may be set/used, but not both. Please remove
            one before setting the other."

            "": "The JSON you have submitted cannot be parsed."

            "": "You''ve reached your limit of 250 campaigns. Please delete one
            or more and try again."'
        '401':
          content:
            application/json:
              schema:
                type: object
          description: ''
      security:
        - Authorization: []
      summary: Create a Campaign
      tags:
        - Campaigns API
  /campaigns/{campaign_id}:
    delete:
      description: '**This endpoint allows you to delete a specific campaign.**'
      operationId: DELETE_campaigns-campaign_id
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '204':
          content:
            application/json:
              schema:
                nullable: true
          description: ''
        '401':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: null
                        message: authorization required
              schema:
                type: object
          description: ''
        '404':
          content:
            application/json:
              schema:
                type: object
          description: '"": "not found"'
      security:
        - Authorization: []
      summary: Delete a Campaign
      tags:
        - Campaigns API
    get:
      description:
        '**This endpoint allows you to retrieve a specific campaign.**'
      operationId: GET_campaigns-campaign_id
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    categories:
                      - spring line
                    custom_unsubscribe_url: ''
                    html_content:
                      <html><head><title></title></head><body><p>Check out our
                      spring line!</p></body></html>
                    id: 986724
                    ip_pool: marketing
                    list_ids:
                      - 110
                    plain_content: Check out our spring line!
                    segment_ids:
                      - 110
                    sender_id: 124451
                    status: Draft
                    subject: New Products for Spring!
                    suppression_group_id: 42
                    title: March Newsletter
              schema:
                properties:
                  categories:
                    items:
                      type: string
                    type: array
                  custom_unsubscribe_url:
                    type: string
                  html_content:
                    type: string
                  id:
                    type: integer
                  ip_pool:
                    type: string
                  list_ids:
                    items:
                      type: integer
                    type: array
                  plain_content:
                    type: string
                  segment_ids:
                    items:
                      type: integer
                    type: array
                  sender_id:
                    type: integer
                  status:
                    type: string
                  subject:
                    type: string
                  suppression_group_id:
                    type: integer
                  title:
                    type: string
                type: object
          description: ''
        '401':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: null
                        message: authorization required
              schema:
                type: object
          description: ''
        '404':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: null
                        message: not found
              schema:
                type: object
          description: '"": "not found"'
      security:
        - Authorization: []
      summary: Retrieve a single campaign
      tags:
        - Campaigns API
    parameters:
      - description: The id of the campaign you would like to retrieve.
        in: path
        name: campaign_id
        required: true
        schema:
          type: integer
    patch:
      description: "**This endpoint allows you to update a specific campaign.**


        This is especially useful if you only set up the campaign using POST
        /campaigns, but didn't set many of the parameters."
      operationId: PATCH_campaigns-campaign_id
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      requestBody:
        content:
          application/json:
            schema:
              example:
                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!
                subject: New Products for Summer!
                title: May Newsletter
              properties:
                categories:
                  description: The categories you want to tag on this campaign.
                  items:
                    type: string
                  type: array
                html_content:
                  description: The HTML content of this campaign.
                  type: string
                plain_content:
                  description: The plain content of this campaign.
                  type: string
                subject:
                  description: The subject line for your campaign.
                  type: string
                title:
                  description: The title of the campaign.
                  type: string
              required:
                - title
                - subject
                - categories
                - html_content
                - plain_content
              title: Update a Campaign request
              type: object
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    categories:
                      - summer line
                    custom_unsubscribe_url: ''
                    html_content:
                      <html><head><title></title></head><body><p>Check out our
                      summer line!</p></body></html>
                    id: 986724
                    ip_pool: marketing
                    list_ids:
                      - 110
                      - 124
                    plain_content: Check out our summer line!
                    segment_ids:
                      - 110
                    sender_id: 124451
                    status: Draft
                    subject: New Products for Summer!
                    suppression_group_id: 42
                    title: May Newsletter
              schema:
                $ref: '#/components/schemas/campaign_response'
          description: ''
        '400':
          content:
            application/json:
              examples:
                response:
                  value:
                    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.
              schema:
                type: object
          description: '"title": "title can''t be blank"

            "title": "title is too long (maximum is 100 characters)"

            "categories": "categories exceeds 10 category limit"

            "html_content": "html_content exceeds the 1MB limit"

            "plain_content": "plain_content exceeds the 1MB limit"

            "sender_id": "sender_id does not exist"

            "sender_id": "sender_id is not a verified sender identity"

            "list_ids": "list_ids do not all exist"

            "segment_ids": "segment_ids do not all exist"

            "ip_pool": "The ip pool you provided is invalid"

            "suppression_group_id": "suppression_group_id does not exist"

            "unsubscribes": "Either suppression_group_id or
            custom_unsubscribe_url may be set/used, but not both. Please remove
            one before setting the other."

            "": "The JSON you have submitted cannot be parsed."'
        '401':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: null
                        message: authorization required
              schema:
                $ref: '#/components/schemas/global_error_response_schema'
          description: ''
        '403':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: null
                        message:
                          You may only update a campaign when it is in draft
                          mode.
              schema:
                type: object
          description:
            '"": "You may only update a campaign when it is in draft mode."'
        '404':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: null
                        message: not found
              schema:
                $ref: '#/components/schemas/global_error_response_schema'
          description: '"": "not found"'
      security:
        - Authorization: []
      summary: Update a Campaign
      tags:
        - Campaigns API
  /campaigns/{campaign_id}/schedules:
    delete:
      description: '**This endpoint allows you to unschedule a campaign that has
        already been scheduled to be sent.**


        A successful unschedule will return a 204.

        If the specified campaign is in the process of being sent, the only
        option is to cancel (a different method).'
      operationId: DELETE_campaigns-campaign_id-schedules
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '204':
          content:
            application/json:
              schema:
                nullable: true
          description: ''
        '403':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: null
                        message: This campaign is already In Progress.
                      - field: null
                        message: This campaign is already Sent.
                      - field: null
                        message: This campaign is already Paused.
                      - field: null
                        message: This campaign is already Canceled.
              schema:
                $ref: '#/components/schemas/global_error_response_schema'
          description: '"": "This campaign is already In Progress."

            "": "This campaign is already Sent."

            "": "This campaign is already Paused."

            "": "This campaign is already Canceled."'
        '404':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: null
                        message: not found
              schema:
                $ref: '#/components/schemas/global_error_response_schema'
          description: '"": "not found"'
      security:
        - Authorization: []
      summary: Unschedule a Scheduled Campaign
      tags:
        - Campaigns API
    get:
      description:
        '**This endpoint allows you to retrieve the date and time that a
        campaign has been scheduled to be sent.**'
      operationId: GET_campaigns-campaign_id-schedules
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    send_at: 1490778528
              schema:
                properties:
                  send_at:
                    format: int64
                    type: integer
                required:
                  - send_at
                title: View Scheduled Time of a Campaign response
                type: object
          description: ''
        '404':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: null
                        message: not found
              schema:
                $ref: '#/components/schemas/global_error_response_schema'
          description: '"": "not found"'
      security:
        - Authorization: []
      summary: View Scheduled Time of a Campaign
      tags:
        - Campaigns API
    parameters:
      - in: path
        name: campaign_id
        required: true
        schema:
          type: integer
    patch:
      description:
        '**This endpoint allows to you change the scheduled time and date for a
        campaign to be sent.**'
      operationId: PATCH_campaigns-campaign_id-schedules
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      requestBody:
        content:
          application/json:
            schema:
              example:
                send_at: 1489451436
              properties:
                send_at:
                  format: int64
                  type: integer
              required:
                - send_at
              title: Update a Scheduled Campaign request
              type: object
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  id:
                    description: The campaign ID
                    type: integer
                  send_at:
                    description: The unix timestamp to send the campaign.
                    type: integer
                  status:
                    description: The status of the schedule.
                    type: string
                required:
                  - id
                  - send_at
                  - status
                title: Update a Scheduled Campaign response
                type: object
          description: ''
        '400':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: send_at
                        message:
                          Please choose a future time for sending your campaign.
                      - field: null
                        message: The JSON you have submitted cannot be parsed.
                      - field: null
                        message:
                          You do not have enough credits to send this campaign.
                          Upgrade your plan to send
                          https://app.sendgrid.com/settings/billing
              schema:
                $ref: '#/components/schemas/global_error_response_schema'
          description: '"": "The JSON you have submitted cannot be parsed."

            "send_at": "Please choose a future time for sending your campaign."

            "":"You do not have enough credits to send this campaign. Upgrade
            your plan to send more: https://app.sendgrid.com/settings/billing"'
        '403':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: send_at
                        message:
                          You cannot update the send_at value of non-scheduled
                          campaign.
              schema:
                $ref: '#/components/schemas/global_error_response_schema'
          description:
            '"send_at": "You cannot update the send_at value of non-scheduled
            campaign."'
        '404':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: null
                        message: not found
              schema:
                $ref: '#/components/schemas/global_error_response_schema'
          description: '"": "not found"'
      security:
        - Authorization: []
      summary: Update a Scheduled Campaign
      tags:
        - Campaigns API
    post:
      description: "**This endpoint allows you to schedule a specific date and
        time for your campaign to be sent.**


        If you have the flexibility, it's better to schedule mail for off-peak
        times. Most emails are scheduled and sent at the top of the hour or half
        hour. Scheduling email to avoid those times (for example, scheduling at
        10:53) can result in lower deferral rates because it won't be going
        through our servers at the same times as everyone else's mail."
      operationId: POST_campaigns-campaign_id-schedules
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      requestBody:
        content:
          application/json:
            schema:
              example:
                send_at: 1489771528
              properties:
                send_at:
                  description:
                    The unix timestamp for the date and time you would like your
                    campaign to be sent out.
                  type: integer
              required:
                - send_at
              title: Schedule a Campaign request
              type: object
      responses:
        '201':
          content:
            application/json:
              examples:
                response:
                  value:
                    id: 1234
                    send_at: 1489771528
                    status: Scheduled
              schema:
                properties:
                  id:
                    description: The campaign ID.
                    type: integer
                  send_at:
                    description:
                      The date time you scheduled your campaign to be sent.
                    type: integer
                  status:
                    description: The status of your campaign.
                    enum:
                      - Scheduled
                    type: string
                required:
                  - id
                  - send_at
                  - status
                title: Schedule a Campaign response
                type: object
          description: ''
        '400':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: subject
                        message: subject can't be blank
                      - field: sender_id
                        message: sender_id can't be blank
                      - field: plain_content
                        message:
                          plain_content can't be blank, please provide plain
                          text or html content
                      - field: list_id
                        message:
                          You must select at least 1 segment or 1 list to send
                          to.
                      - field: unsubscribe_tag
                        message:
                          An [unsubscribe] tag in both your html and plain
                          content is required to send a campaign.
                      - field: suppression_group_id
                        message:
                          Either a suppression_group_id or
                          custom_unsubscribe_url is required to send a campaign.
                      - field: null
                        message:
                          'You do not have enough credits to send this campaign.
                          Upgrade your plan to send more:
                          https://app.sendgrid.com/settings/billing'
              schema:
                $ref: '#/components/schemas/global_error_response_schema'
          description: '"subject": "subject can''t be blank"

            "sender_id": "sender_id can''t be blank"

            "plain_content": "plain_content can''t be blank, please provide
            plain text or html content"

            "list_ids": "You must select at least 1 segment or 1 list to send
            to."

            "send_at": "Please choose a future time for sending your campaign."

            "unsubscribe_tag": "An [unsubscribe] tag in both your html and plain
            content is required to send a campaign."

            "suppression_group_id": "Either a suppression_group_id or
            custom_unsubscribe_url is required to send a campaign."

            "": "The JSON you have submitted cannot be parsed."

            "":"You do not have enough credits to send this campaign. Upgrade
            your plan to send more: https://app.sendgrid.com/settings/billing"'
        '401':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: null
                        message: authorization required
              schema:
                $ref: '#/components/schemas/global_error_response_schema'
          description: ''
        '403':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: null
                        message:
                          You cannot POST to a campaign that has already sent or
                          scheduled. However you can update a scheduled campaign
                          with a PATCH.
              schema:
                $ref: '#/components/schemas/global_error_response_schema'
          description:
            '"": "You cannot POST to a campaign that has already sent or
            scheduled. However you can update a scheduled campaign with a
            PATCH."'
        '404':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: null
                        message: not found
              schema:
                $ref: '#/components/schemas/global_error_response_schema'
          description: '"": "not found"'
      security:
        - Authorization: []
      summary: Schedule a Campaign
      tags:
        - Campaigns API
  /campaigns/{campaign_id}/schedules/now:
    parameters:
      - in: path
        name: campaign_id
        required: true
        schema:
          type: integer
    post:
      description: '**This endpoint allows you to immediately send an existing
        campaign.**


        Normally a POST request would have a body, but since this endpoint is
        telling us to send a resource that is already created, a request body is
        not needed.'
      operationId: POST_campaigns-campaign_id-schedules-now
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '201':
          content:
            application/json:
              examples:
                response:
                  value:
                    id: 1234
                    status: Scheduled
              schema:
                properties:
                  id:
                    format: int64
                    type: integer
                  status:
                    type: string
                required:
                  - id
                  - status
                title: Send a Campaign response
                type: object
          description: ''
        '400':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: subject
                        message: subject can't be blank
                      - field: sender_id
                        message: sender_id can't be blank
                      - field: plain_content
                        message:
                          plain_content can't be blank, please provide plain
                          text or html content
                      - field: list_id
                        message:
                          You must select at least 1 segment or 1 list to send
                          to.
                      - field: unsubscribe_tag
                        message:
                          An [unsubscribe] tag in both your html and plain
                          content is required to send a campaign.
                      - field: suppression_group_id
                        message:
                          Either a suppression_group_id or
                          custom_unsubscribe_url is required to send a campaign.
                      - field: null
                        message:
                          'You do not have enough credits to send this campaign.
                          Upgrade your plan to send more:
                          https://app.sendgrid.com/settings/billing'
              schema:
                $ref: '#/components/schemas/global_error_response_schema'
          description: '"subject": "subject can''t be blank"

            "sender_id": "sender_id can''t be blank"

            "plain_content": "plain_content can''t be blank, please provide
            plain text or html content"

            "list_ids": "You must select at least 1 segment or 1 list to send
            to."

            "unsubscribe_tag": "An [unsubscribe] tag in both your html and plain
            content is required to send a campaign."

            "suppression_group_id": "Either a suppression_group_id or
            custom_unsubscribe_url is required to send a campaign."

            "": "You do not have enough credits to send this campaign. Upgrade
            your plan to send more: https://app.sendgrid.com/settings/billing"'
        '401':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: null
                        message: authorization required
              schema:
                $ref: '#/components/schemas/global_error_response_schema'
          description: ''
        '403':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: null
                        message:
                          You may only send a campaign when it is in draft mode.
              schema:
                $ref: '#/components/schemas/global_error_response_schema'
          description:
            '"": "You may only send a campaign when it is in draft mode."'
        '404':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: null
                        message: not found
              schema:
                $ref: '#/components/schemas/global_error_response_schema'
          description: '"": "not found"'
      security:
        - Authorization: []
      summary: Send a Campaign
      tags:
        - Campaigns API
  /campaigns/{campaign_id}/schedules/test:
    parameters:
      - in: path
        name: campaign_id
        required: true
        schema:
          type: integer
    post:
      description: '**This endpoint allows you to send a test campaign.**


        To send to multiple addresses, use an array for the JSON "to" value
        ["one@address","two@address"]'
      operationId: POST_campaigns-campaign_id-schedules-test
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      requestBody:
        content:
          application/json:
            schema:
              example:
                to: your.email@example.com
              properties:
                to:
                  description:
                    The email address that should receive the test campaign.
                  format: email
                  type: string
              required:
                - to
              type: object
      responses:
        '204':
          content:
            application/json:
              schema:
                properties:
                  to:
                    type: string
                required:
                  - to
                title: Send a Test Campaign request
                type: object
          description: ''
        '400':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: send_at
                        message:
                          Please choose a future time for sending your campaign.
                      - field: null
                        message: The JSON you have submitted cannot be parsed.
                      - field: null
                        message:
                          'You do not have enough credits to send this campaign.
                          Upgrade your plan to send more:
                          https://app.sendgrid.com/settings/billing'
              schema:
                $ref: '#/components/schemas/global_error_response_schema'
          description: '"": "The JSON you have submitted cannot be parsed."

            "to": "Please provide an email address to which the test should be
            sent."

            "to": "You can only send tests to 10 addresses at a time."

            "subject": "Please add a subject to your campaign before sending a
            test."

            "plain_content": "Plain content and html content can''t both be
            blank. Please set one of these values before sending a test."

            "sender_id": "Please assign a sender identity to your campaign
            before sending a test."'
        '404':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: null
                        message: not found
              schema:
                $ref: '#/components/schemas/global_error_response_schema'
          description: '"": "not found"'
      security:
        - Authorization: []
      summary: Send a Test Campaign
      tags:
        - Campaigns API
  /categories:
    get:
      description:
        '**This endpoint allows you to retrieve a list of all of your
        categories.**'
      operationId: GET_categories
      parameters:
        - description: The number of categories to display per page.
          in: query
          name: limit
          schema:
            default: 50
            type: integer
        - description:
            Allows you to perform a prefix search on this particular category.
          in: query
          name: category
          schema:
            type: string
        - description:
            The point in the list that you would like to begin displaying
            results.
          in: query
          name: offset
          schema:
            default: 0
            type: integer
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    - category: category 1
                    - category: category 2
              schema:
                items:
                  properties:
                    category:
                      description:
                        A category used to group emails by broad topic.
                      type: string
                  required:
                    - category
                  type: object
                type: array
          description: ''
        '400':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: sort_by
                        message: invalid sort value
              schema:
                properties:
                  errors:
                    description: The error returned.
                    items:
                      properties:
                        field:
                          type: string
                        message:
                          description:
                            A message explaining why your categories could not
                            be retrieved.
                          type: string
                      required:
                        - field
                        - message
                      type: object
                    type: array
                type: object
          description: ''
      security:
        - Authorization: []
      summary: Retrieve all categories
      tags:
        - Categories
  /categories/stats:
    get:
      description: '**This endpoint allows you to retrieve all of your email
        statistics for each of your categories.**


        If you do not define any query parameters, this endpoint will return a
        sum for each category in groups of 10.'
      operationId: GET_categories-stats
      parameters:
        - description:
            The starting date of the statistics to retrieve. Must follow format
            YYYY-MM-DD
          in: query
          name: start_date
          required: true
          schema:
            type: string
        - description:
            The end date of the statistics to retrieve. Defaults to today. Must
            follow format YYYY-MM-DD.
          in: query
          name: end_date
          required: false
          schema:
            type: string
        - description:
            The individual categories that you want to retrieve statistics for.
            You may include up to 10 different categories.
          in: query
          name: categories
          required: true
          schema:
            type: string
        - description: The number of results to include.
          in: query
          name: limit
          required: false
          schema:
            default: 500
            maximum: 500
            type: integer
        - description: The number of results to skip.
          in: query
          name: offset
          required: false
          schema:
            type: integer
        - description:
            How to group the statistics. Must be either "day", "week", or
            "month".
          in: query
          name: aggregated_by
          required: false
          schema:
            enum:
              - day
              - week
              - month
            type: string
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    - date: '2015-10-01'
                      stats:
                        - metrics:
                            blocks: 0
                            bounce_drops: 0
                            bounces: 0
                            clicks: 0
                            deferred: 0
                            delivered: 0
                            invalid_emails: 0
                            opens: 0
                            processed: 0
                            requests: 0
                            spam_report_drops: 0
                            spam_reports: 0
                            unique_clicks: 0
                            unique_opens: 0
                            unsubscribe_drops: 0
                            unsubscribes: 0
                          name: docs
                          type: category
                        - metrics:
                            blocks: 0
                            bounce_drops: 0
                            bounces: 0
                            clicks: 0
                            deferred: 0
                            delivered: 0
                            invalid_emails: 0
                            opens: 0
                            processed: 0
                            requests: 0
                            spam_report_drops: 0
                            spam_reports: 0
                            unique_clicks: 0
                            unique_opens: 0
                            unsubscribe_drops: 0
                            unsubscribes: 0
                          name: mattscategory
                          type: category
                    - date: '2015-11-01'
                      stats:
                        - metrics:
                            blocks: 0
                            bounce_drops: 0
                            bounces: 0
                            clicks: 0
                            deferred: 0
                            delivered: 0
                            invalid_emails: 0
                            opens: 0
                            processed: 0
                            requests: 0
                            spam_report_drops: 0
                            spam_reports: 0
                            unique_clicks: 0
                            unique_opens: 0
                            unsubscribe_drops: 0
                            unsubscribes: 0
                          name: docs
                          type: category
                        - metrics:
                            blocks: 0
                            bounce_drops: 0
                            bounces: 0
                            clicks: 0
                            deferred: 0
                            delivered: 0
                            invalid_emails: 0
                            opens: 0
                            processed: 0
                            requests: 0
                            spam_report_drops: 0
                            spam_reports: 0
                            unique_clicks: 0
                            unique_opens: 0
                            unsubscribe_drops: 0
                            unsubscribes: 0
                          name: mattscategory
                          type: category
              schema:
                items:
                  $ref: '#/components/schemas/category_stats'
                type: array
          description: ''
      security:
        - Authorization: []
      summary: Retrieve Email Statistics for Categories
      tags:
        - Categories
  /categories/stats/sums:
    get:
      description: '**This endpoint allows you to retrieve the total sum of each
        email statistic for every category over the given date range.**


        If you do not define any query parameters, this endpoint will return a
        sum for each category in groups of 10.'
      operationId: GET_categories-stats-sums
      parameters:
        - description:
            The metric that you want to sort by.  Must be a single metric.
          in: query
          name: sort_by_metric
          required: false
          schema:
            default: delivered
            type: string
        - description: The direction you want to sort.
          in: query
          name: sort_by_direction
          required: false
          schema:
            default: desc
            enum:
              - desc
              - asc
            type: string
        - description:
            The starting date of the statistics to retrieve. Must follow format
            YYYY-MM-DD.
          in: query
          name: start_date
          required: true
          schema:
            type: string
        - description:
            The end date of the statistics to retrieve. Defaults to today. Must
            follow format YYYY-MM-DD.
          in: query
          name: end_date
          required: false
          schema:
            type: string
        - description: Limits the number of results returned.
          in: query
          name: limit
          required: false
          schema:
            default: 5
            type: integer
        - description: The point in the list to begin retrieving results.
          in: query
          name: offset
          required: false
          schema:
            default: 0
            type: integer
        - description:
            How to group the statistics. Must be either "day", "week", or
            "month".
          in: query
          name: aggregated_by
          required: false
          schema:
            enum:
              - day
              - week
              - month
            type: string
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    date: '2015-01-01'
                    stats:
                      - metrics:
                          blocks: 0
                          bounce_drops: 0
                          bounces: 0
                          clicks: 20
                          deferred: 0
                          delivered: 20
                          invalid_emails: 0
                          opens: 20
                          processed: 0
                          requests: 20
                          spam_report_drops: 0
                          spam_reports: 0
                          unique_clicks: 20
                          unique_opens: 20
                          unsubscribe_drops: 0
                          unsubscribes: 20
                        name: cat1
                        type: category
                      - metrics:
                          blocks: 1
                          bounce_drops: 0
                          bounces: 0
                          clicks: 19
                          deferred: 0
                          delivered: 19
                          invalid_emails: 0
                          opens: 19
                          processed: 0
                          requests: 20
                          spam_report_drops: 0
                          spam_reports: 0
                          unique_clicks: 19
                          unique_opens: 19
                          unsubscribe_drops: 0
                          unsubscribes: 19
                        name: cat2
                        type: category
                      - metrics:
                          blocks: 0
                          bounce_drops: 0
                          bounces: 0
                          clicks: 5
                          deferred: 0
                          delivered: 5
                          invalid_emails: 0
                          opens: 5
                          processed: 0
                          requests: 5
                          spam_report_drops: 0
                          spam_reports: 0
                          unique_clicks: 5
                          unique_opens: 5
                          unsubscribe_drops: 0
                          unsubscribes: 5
                        name: cat3
                        type: category
                      - metrics:
                          blocks: 0
                          bounce_drops: 0
                          bounces: 0
                          clicks: 6
                          deferred: 0
                          delivered: 5
                          invalid_emails: 0
                          opens: 6
                          processed: 0
                          requests: 5
                          spam_report_drops: 0
                          spam_reports: 0
                          unique_clicks: 5
                          unique_opens: 5
                          unsubscribe_drops: 0
                          unsubscribes: 6
                        name: cat4
                        type: category
                      - metrics:
                          blocks: 10
                          bounce_drops: 0
                          bounces: 0
                          clicks: 0
                          deferred: 0
                          delivered: 0
                          invalid_emails: 0
                          opens: 0
                          processed: 0
                          requests: 10
                          spam_report_drops: 0
                          spam_reports: 0
                          unique_clicks: 0
                          unique_opens: 0
                          unsubscribe_drops: 0
                          unsubscribes: 0
                        name: cat5
                        type: category
              schema:
                $ref: '#/components/schemas/category_stats'
          description: ''
      security:
        - Authorization: []
      summary:
        'Retrieve sums of email stats for each category [Needs: Stats object
        defined, has category ID?]'
      tags:
        - Categories
  /clients/stats:
    get:
      description: '**This endpoint allows you to retrieve your email statistics
        segmented by client type.**


        **We only store up to 7 days of email activity in our database.** By
        default, 500 items will be returned per request via the Advanced Stats
        API endpoints.


        Advanced Stats provide a more in-depth view of your email statistics and
        the actions taken by your recipients. You can segment these statistics
        by geographic location, device type, client type, browser, and mailbox
        provider. For more information about statistics, please see our
        [Statistics
        Overview](https://sendgrid.com/docs/ui/analytics-and-reporting/stats-overview/).'
      operationId: GET_clients-stats
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
        - $ref: '#/components/parameters/trait_statsAdvancedStatsBaseQueryStrings_start_date'
        - $ref: '#/components/parameters/trait_statsAdvancedStatsBaseQueryStrings_end_date'
        - $ref: '#/components/parameters/trait_statsAdvancedStatsBaseQueryStrings_aggregated_by'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    - date: '2014-10-01'
                      stats:
                        - metrics:
                            opens: 1
                            unique_opens: 1
                          name: Gmail
                          type: client
                    - date: '2014-10-02'
                      stats:
                        - metrics:
                            opens: 0
                            unique_opens: 0
                          name: Gmail
                          type: client
              schema:
                items:
                  properties:
                    date:
                      description: The date that the statistics were gathered.
                      type: string
                    stats:
                      description: The list of statistics.
                      items:
                        properties:
                          metrics:
                            $ref: '#/components/schemas/advanced_stats_opens'
                          name:
                            description: The name of the specific segmentation.
                            type: string
                          type:
                            description: The type of segmentation.
                            type: string
                        type: object
                      type: array
                  type: object
                type: array
          description: ''
      security:
        - Authorization: []
      summary: Retrieve email statistics by client type.
      tags:
        - Stats
  /clients/{client_type}/stats:
    get:
      description: '**This endpoint allows you to retrieve your email statistics
        segmented by a specific client type.**


        **We only store up to 7 days of email activity in our database.** By
        default, 500 items will be returned per request via the Advanced Stats
        API endpoints.


        ## Available Client Types

        - phone

        - tablet

        - webmail

        - desktop


        Advanced Stats provide a more in-depth view of your email statistics and
        the actions taken by your recipients. You can segment these statistics
        by geographic location, device type, client type, browser, and mailbox
        provider. For more information about statistics, please see our
        [Statistics
        Overview](https://sendgrid.com/docs/ui/analytics-and-reporting/stats-overview/).'
      operationId: GET_clients-client_type-stats
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
        - $ref: '#/components/parameters/trait_statsAdvancedStatsBaseQueryStrings_start_date'
        - $ref: '#/components/parameters/trait_statsAdvancedStatsBaseQueryStrings_end_date'
        - $ref: '#/components/parameters/trait_statsAdvancedStatsBaseQueryStrings_aggregated_by'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    - date: '2014-10-01'
                      stats:
                        - metrics:
                            opens: 1
                            unique_opens: 1
                          name: Gmail
                          type: client
                    - date: '2014-10-02'
                      stats:
                        - metrics:
                            opens: 0
                            unique_opens: 0
                          name: Gmail
                          type: client
              schema:
                items:
                  properties:
                    date:
                      description: The date that the statistics were gathered.
                      type: string
                    stats:
                      description: The list of statistics.
                      items:
                        properties:
                          metrics:
                            $ref: '#/components/schemas/advanced_stats_opens'
                          name:
                            description: The name of the specific segmentation.
                            type: string
                          type:
                            description: The type of segmentation.
                            type: string
                        type: object
                      type: array
                  type: object
                type: array
          description: ''
      security:
        - Authorization: []
      summary: Retrieve stats by a specific client type.
      tags:
        - Stats
    parameters:
      - description:
          Specifies the type of client to retrieve stats for. Must be either
          "phone", "tablet", "webmail", or "desktop".
        in: path
        name: client_type
        required: true
        schema:
          enum:
            - phone
            - tablet
            - webmail
            - desktop
          type: string
  /contactdb/custom_fields:
    get:
      description: '**This endpoint allows you to retrieve all custom fields.**'
      operationId: GET_contactdb-custom_fields
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    custom_fields:
                      - id: 6234
                        name: age
                        type: number
                      - id: 6233
                        name: country
                        type: text
                      - id: 6235
                        name: favorite_color
                        type: text
                      - id: 6239
                        name: fname
                        type: text
                      - id: 6240
                        name: lname
                        type: text
                      - id: 49439
                        name: pet
                        type: text
              schema:
                properties:
                  custom_fields:
                    items:
                      $ref: '#/components/schemas/contactdb_custom_field_with_id'
                    type: array
                required:
                  - custom_fields
                title: List All Custom Fields response
                type: object
          description: ''
        '401':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: null
                        message: authorization required
              schema:
                $ref: '#/components/schemas/global_error_response_schema'
          description: ''
      security:
        - Authorization: []
      summary: Retrieve all custom fields
      tags:
        - Contacts API - Custom Fields
    post:
      description: '**This endpoint allows you to create a custom field.**


        **You can create up to 120 custom fields.**'
      operationId: POST_contactdb-custom_fields
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      requestBody:
        content:
          application/json:
            schema:
              example:
                name: pet
                type: text
              properties:
                name:
                  type: string
                type:
                  type: string
              type: object
      responses:
        '201':
          content:
            application/json:
              examples:
                response:
                  value:
                    id: 1
                    name: pet
                    type: text
              schema:
                $ref: '#/components/schemas/contactdb_custom_field_with_id'
          description: ''
        '400':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: null
                        message: Returned if request body is invalid JSON
                      - field: type
                        message:
                          Returned if custom field type is invalid or not
                          provided
                      - field: name
                        message: Returned if custom field name is not provided
              schema:
                $ref: '#/components/schemas/global_error_response_schema'
          description: '"" : "Returned if request body is invalid JSON"

            "type" : "Returned if custom field type is invalid or not provided"

            "name" : "Returned if custom field name is not provided"'
      security:
        - Authorization: []
      summary: Create a Custom Field
      tags:
        - Contacts API - Custom Fields
  /contactdb/custom_fields/{custom_field_id}:
    delete:
      description:
        '**This endpoint allows you to delete a custom field by ID.**'
      operationId: DELETE_contactdb-custom_fields-custom_field_id
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '202':
          content:
            application/json:
              examples:
                response:
                  value:
                    message: Custom Field delete is processing.
              schema:
                $ref: '#/components/schemas/global_error_response_schema'
          description: ''
        '400':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - message:
                          Custom field in use by one or more segment conditions
                      - message: Custom field ID does not exist
              schema:
                $ref: '#/components/schemas/global_error_response_schema'
          description: '"id" : "Returned if custom_field_id is not valid"'
        '401':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: null
                        message: authorization required
              schema:
                $ref: '#/components/schemas/global_error_response_schema'
          description: ''
        '404':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - message: Custom field ID does not exist
              schema:
                $ref: '#/components/schemas/global_error_response_schema'
          description:
            '"custom_field_id" : "Returned if custom_field_id does not exist"'
      security:
        - Authorization: []
      summary: Delete a Custom Field
      tags:
        - Contacts API - Custom Fields
    get:
      description:
        '**This endpoint allows you to retrieve a custom field by ID.**'
      operationId: GET_contactdb-custom_fields-custom_field_id
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    id: 1
                    name: pet
                    type: text
              schema:
                $ref: '#/components/schemas/contactdb_custom_field_with_id'
          description: ''
        '400':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - message: invalid id
              schema:
                $ref: '#/components/schemas/global_error_response_schema'
          description: ''
        '401':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: null
                        message: authorization required
              schema:
                $ref: '#/components/schemas/global_error_response_schema'
          description: ''
        '404':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - message: Custom field ID does not exist
              schema:
                $ref: '#/components/schemas/global_error_response_schema'
          description:
            '"custom_field_id" : "Returned if custom_field_id does not exist"'
      security:
        - Authorization: []
      summary: Retrieve a Custom Field
      tags:
        - Contacts API - Custom Fields
    parameters:
      - description: The ID of the custom field that you want to retrieve.
        in: path
        name: custom_field_id
        required: true
        schema:
          type: integer
  /contactdb/lists:
    delete:
      description:
        '**This endpoint allows you to delete multiple recipient lists.**'
      operationId: DELETE_contactdb-lists
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      requestBody:
        content:
          application/json:
            schema:
              example:
                - 1
                - 2
                - 3
                - 4
              items:
                type: integer
              type: array
      responses:
        '204':
          content:
            application/json:
              schema:
                nullable: true
          description: ''
        '400':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: null
                        message: list id was invalid
              schema:
                $ref: '#/components/schemas/global_error_response_schema'
          description: '"id" : "Returned if all list ids are not valid"'
        '401':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: null
                        message: authorization required
              schema:
                $ref: '#/components/schemas/global_error_response_schema'
          description: ''
      security:
        - Authorization: []
      summary: Delete Multiple lists
      tags:
        - Contacts API - Lists
    get:
      description:
        "**This endpoint allows you to retrieve all of your recipient lists. If
        you don't have any lists, an empty array will be returned.**"
      operationId: GET_contactdb-lists
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    lists:
                      - id: 1
                        name: the jones
                        recipient_count: 1
              schema:
                properties:
                  lists:
                    items:
                      $ref: '#/components/schemas/contactdb_list'
                    type: array
                required:
                  - lists
                title: List All Lists response
                type: object
          description: ''
      security:
        - Authorization: []
      summary: Retrieve all lists
      tags:
        - Contacts API - Lists
    post:
      description:
        '**This endpoint allows you to create a list for your recipients.**'
      operationId: POST_contactdb-lists
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      requestBody:
        content:
          application/json:
            schema:
              example:
                name: your list name
              properties:
                name:
                  type: string
              required:
                - name
              title: Create a List request
              type: object
      responses:
        '201':
          content:
            application/json:
              examples:
                response:
                  value:
                    id: 1
                    name: your list name
                    recipient_count: 0
              schema:
                $ref: '#/components/schemas/contactdb_list'
          description: ''
        '400':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: null
                        message: Returned if request body is invalid JSON
                      - field: name
                        message: Returned if list name is not a string
                      - field: name
                        message:
                          Returned if list name is a duplicate of an existing
                          list or segment
              schema:
                $ref: '#/components/schemas/global_error_response_schema'
          description: '"name" : "Returned if list name is a duplicate of an
            existing list or segment"

            "name" : "Returned if list name is not a string"

            "" : "Returned if request body is invalid JSON"'
        '401':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: null
                        message: authorization required
              schema:
                $ref: '#/components/schemas/global_error_response_schema'
          description: ''
      security:
        - Authorization: []
      summary: Create a List
      tags:
        - Contacts API - Lists
  /contactdb/lists/{list_id}:
    delete:
      description:
        '**This endpoint allows you to delete a specific recipient list with the
        given ID.**'
      operationId: DELETE_contactdb-lists-list_id
      parameters:
        - description:
            Adds the ability to delete all contacts on the list in addition to
            deleting the list.
          in: query
          name: delete_contacts
          schema:
            enum:
              - true
              - false
            type: boolean
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      requestBody:
        $ref: '#/components/requestBodies/DELETE_contactdb-lists-list_idBody'
      responses:
        '202':
          content:
            application/json:
              schema:
                nullable: true
          description: ''
        '400':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: delete_contacts
                        message: delete_contacts not a bool
                      - field: list_id
                        message: Returned if list_id is not valid
              schema:
                $ref: '#/components/schemas/global_error_response_schema'
          description: '"list_id" : "Returned if list_id is not valid"

            "delete_contacts" : "Returned if delete_contacts is not valid"'
        '401':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: null
                        message: authorization required
              schema:
                $ref: '#/components/schemas/global_error_response_schema'
          description: ''
        '404':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - message: 'List not found: 5'
              schema:
                $ref: '#/components/schemas/global_error_response_schema'
          description: '"list_id" : "Returned if list_id does not exist"'
      security:
        - Authorization: []
      summary: Delete a List
      tags:
        - Contacts API - Lists
    get:
      description:
        '**This endpoint allows you to retrieve a single recipient list.**'
      operationId: GET_contactdb-lists-list_id
      parameters:
        - description: The ID of the list to retrieve.
          in: query
          name: list_id
          schema:
            type: integer
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    id: 1
                    name: listname
                    recipient_count: 0
              schema:
                $ref: '#/components/schemas/contactdb_list'
          description: ''
        '400':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - message: invalid id
              schema:
                $ref: '#/components/schemas/global_error_response_schema'
          description: '"list_id" : "Returned if list_id is not valid"'
        '401':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: null
                        message: authorization required
              schema:
                $ref: '#/components/schemas/global_error_response_schema'
          description: ''
        '404':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: null
                        message: List ID does not exist
              schema:
                $ref: '#/components/schemas/global_error_response_schema'
          description: '"list_id" : "Returned if list_id does not exist"'
      security:
        - Authorization: []
      summary: Retrieve a single list
      tags:
        - Contacts API - Lists
    parameters:
      - in: path
        name: list_id
        required: true
        schema:
          type: string
    patch:
      description:
        '**This endpoint allows you to update the name of one of your recipient
        lists.**'
      operationId: PATCH_contactdb-lists-list_id
      parameters:
        - description: The ID of the list you are updating.
          in: query
          name: list_id
          required: true
          schema:
            type: integer
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      requestBody:
        content:
          application/json:
            schema:
              example:
                name: newlistname
              properties:
                name:
                  description: 'The new name for your list. '
                  type: string
              required:
                - name
              title: Update a List request
              type: object
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    id: 1234
                    name: 2016 iPhone Users
                    recipient_count: 0
              schema:
                properties:
                  id:
                    description: The ID of the list
                    type: integer
                  name:
                    description: The new name for the list
                    type: string
                  recipient_count:
                    description: The number of recipients on the list
                    type: integer
                type: object
          description: ''
        '400':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - message: invalid id
              schema:
                $ref: '#/components/schemas/global_error_response_schema'
          description: '"name" : "Returned if list name is a duplicate of
            existing list or segment"

            "name" : "Returned if list name is invalid or not provided"

            "list_id" : "Returned if list_id is not valid"

            "" : "Returned if request body is invalid JSON"'
        '404':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - message: List ID does not exist
              schema:
                $ref: '#/components/schemas/global_error_response_schema'
          description: '"list_id" : "Returned if list_id does not exist"'
      security:
        - Authorization: []
      summary: Update a List
      tags:
        - Contacts API - Lists
  /contactdb/lists/{list_id}/recipients:
    get:
      description:
        '**This endpoint allows you to retrieve all recipients on the list with
        the given ID.**'
      operationId: GET_contactdb-lists-list_id-recipients
      parameters:
        - description:
            Page index of first recipient to return (must be a positive integer)
          in: query
          name: page
          required: false
          schema:
            type: integer
        - description:
            Number of recipients to return at a time (must be a positive integer
            between 1 and 1000)
          in: query
          name: page_size
          required: false
          schema:
            type: integer
        - description: The ID of the list whose recipients you are requesting.
          in: query
          name: list_id
          required: true
          schema:
            type: integer
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    recipients:
                      - created_at: 1433348344
                        custom_fields:
                          - id: 6234
                            name: age
                            type: number
                            value: null
                          - id: 6233
                            name: country
                            type: text
                            value: null
                          - id: 6235
                            name: fname
                            type: text
                            value: Example
                          - id: 6239
                            name: lname
                            type: text
                            value: User
                          - id: 6240
                            name: lname
                            type: text
                            value: null
                        email: example@example.com
                        first_name: Example
                        id: ZGVWfyZWsuYmFpbmVzQHNlbmRmCmLkLmNv==
                        last_clicked: 1438616117
                        last_emailed: 1438613272
                        last_name: User
                        last_opened: 1438616109
                        updated_at: 1438616119
              schema:
                properties:
                  recipients:
                    items:
                      $ref: '#/components/schemas/contactdb_recipient'
                    type: array
                type: object
          description: ''
        '400':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: list_id
                        message: Returned if list_id is not a valid integer
                      - field: page
                        message: Returned if page is not a valid integer
                      - field: page
                        message: Returned if page is less than 1
                      - field: page_size
                        message: Returned if page_size is not a valid integer
                      - field: page_size
                        message:
                          Returned if page_size is less than 1 or greater than
                          1000
              schema:
                $ref: '#/components/schemas/global_error_response_schema'
          description: '"list_id" : "Returned if list_id is not a valid integer"

            "page" : "Returned if page is not a valid integer"

            "page" : "Returned if page is less than 1"

            "page_size" : "Returned if page_size is not a valid integer"

            "page_size" : "Returned if page_size is less than 1 or greater than
            1000"'
        '404':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: list_id
                        message: Returned if list_id is invalid
              schema:
                type: object
          description: '"list_id" : "Returned if list_id does not exist"'
      security:
        - Authorization: []
      summary: Retrieve all recipients on a List
      tags:
        - Contacts API - Lists
    parameters:
      - description: The id of the list of recipients you want to retrieve.
        in: path
        name: list_id
        required: true
        schema:
          type: integer
    post:
      description: '**This endpoint allows you to add multiple recipients to a
        list.**


        Adds existing recipients to a list, passing in the recipient IDs to add.
        Recipient IDs should be passed exactly as they are returned from
        recipient endpoints.'
      operationId: POST_contactdb-lists-list_id-recipients
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      requestBody:
        content:
          application/json:
            schema:
              example:
                - recipient_id1
                - recipient_id2
              items:
                type: integer
              type: array
      responses:
        '201':
          content:
            application/json:
              schema:
                nullable: true
          description: ''
        '400':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: list_id
                        message: list_id is invalid
                      - field: recipient_id
                        message: no valid recipients were provided
                      - field: null
                        message: no recipients were added
                      - field: null
                        message: request body is invalid JSON
              schema:
                $ref: '#/components/schemas/global_error_response_schema'
          description: '"list_id" : "Returned if list_id is not a valid integer"

            "" : "Returned if no valid recipient ids were passed"

            "" : "Returned if no recipients were added"

            "" : "Returned if request body is invalid JSON"'
        '401':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: null
                        message: authorization required
              schema:
                $ref: '#/components/schemas/global_error_response_schema'
          description: ''
        '404':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: list_id
                        message: list_id does not exist
                      - field: recipient_id
                        message: recipient_id does not exist
              schema:
                $ref: '#/components/schemas/global_error_response_schema'
          description: '"list_id": "Returned if list_id does not exist"'
      security:
        - Authorization: []
      summary: Add Multiple Recipients to a List
      tags:
        - Contacts API - Lists
  /contactdb/lists/{list_id}/recipients/{recipient_id}:
    delete:
      description:
        '**This endpoint allows you to delete a single recipient from a list.**'
      operationId: DELETE_contactdb-lists-list_id-recipients-recipient_id
      parameters:
        - description:
            The ID of the list you are taking this recipient away from.
          in: query
          name: list_id
          required: true
          schema:
            type: integer
        - description: The ID of the recipient to take off the list.
          in: query
          name: recipient_id
          required: true
          schema:
            type: integer
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      requestBody:
        $ref: '#/components/requestBodies/DELETE_contactdb-lists-list_idBody'
      responses:
        '204':
          content:
            application/json:
              schema:
                nullable: true
          description: ''
        '400':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: list_id
                        message: Returned if list_id is invalid
                      - field: recipient_id
                        message: no valid recipients were provided
              schema:
                $ref: '#/components/schemas/global_error_response_schema'
          description: '"list_id" : "Returned if list_id is not valid"

            "recipient_id" : "Returned if recipient_id is not valid"'
        '401':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: null
                        message: authorization required
              schema:
                $ref: '#/components/schemas/global_error_response_schema'
          description: ''
        '404':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: list_id
                        message: Returned if list_id does not exist
                      - field: recipient_id
                        message: Returned if recipient_id does not exist
              schema:
                $ref: '#/components/schemas/global_error_response_schema'
          description: '"list_id" : "Returned if list_id does not exist"

            "recipient_id" : "Returned if recipient_id does not exist"'
      security:
        - Authorization: []
      summary: Delete a Single Recipient from a Single List
      tags:
        - Contacts API - Lists
    parameters:
      - description: The ID of the list that you want to add the recipient to.
        in: path
        name: list_id
        required: true
        schema:
          type: integer
      - description: The ID of the recipient you are adding to the list.
        in: path
        name: recipient_id
        required: true
        schema:
          type: string
    post:
      description:
        '**This endpoint allows you to add a single recipient to a list.**'
      operationId: POST_contactdb-lists-list_id-recipients-recipient_id
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '201':
          content:
            application/json:
              schema:
                nullable: true
          description: ''
        '400':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: list_id
                        message: Returned if list_id is invalid
                      - field: recipient_id
                        message: Returned if recipient_id is invalid
              schema:
                $ref: '#/components/schemas/global_error_response_schema'
          description: '"list_id" : "Returned if list_id is invalid"

            "recipient_id" : "Returned if recipient_id is invalid"'
        '401':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: null
                        message: authorization required
              schema:
                $ref: '#/components/schemas/global_error_response_schema'
          description: ''
        '404':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: list_id
                        message: Returned if list_id does not exist
                      - field: recipient_id
                        message: Returned if recipient_id does not exist
              schema:
                $ref: '#/components/schemas/global_error_response_schema'
          description: '"list_id" : "Returned if list_id does not exist"

            "recipient_id" : "Returned if recipient_id does not exist"'
      security:
        - Authorization: []
      summary: Add a Single Recipient to a List
      tags:
        - Contacts API - Lists
  /contactdb/recipients:
    delete:
      description: '**This endpoint allows you to deletes one or more
        recipients.**


        The body of an API call to this endpoint must include an array of
        recipient IDs of the recipients you want to delete.'
      operationId: DELETE_contactdb-recipients
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      requestBody:
        content:
          application/json:
            schema:
              example:
                - recipient_id1
                - recipient_id2
              items:
                type: string
              type: array
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
          description: ''
        '400':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - message: No recipient ids provided
              schema:
                $ref: '#/components/schemas/global_error_response_schema'
          description: '"" : "Returned if no recipients are deleted"

            "" : "Returned if all of the provided recipient ids are invalid"

            "" : "Returned if request body is not valid json"'
        '401':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: null
                        message: authorization required
              schema:
                $ref: '#/components/schemas/global_error_response_schema'
          description: ''
      security:
        - Authorization: []
      summary: Delete Recipients
      tags:
        - Contacts API - Recipients
    get:
      description: '**This endpoint allows you to retrieve all of your Marketing
        Campaigns recipients.**


        Batch deletion of a page makes it possible to receive an empty page of
        recipients before reaching the end of

        the list of recipients. To avoid this issue; iterate over pages until a
        404 is retrieved.'
      operationId: GET_contactdb-recipients
      parameters:
        - description:
            Page index of first recipients to return (must be a positive
            integer)
          in: query
          name: page
          schema:
            type: integer
        - description:
            Number of recipients to return at a time (must be a positive integer
            between 1 and 1000)
          in: query
          name: page_size
          schema:
            type: integer
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  recipients:
                    items:
                      type: object
                    type: array
                required:
                  - recipients
                title: List Recipients response
                type: object
          description: ''
        '400':
          content:
            application/json:
              schema:
                type: object
          description: '"page" : "Returned if page is not a valid integer"

            "page" : "Returned if page is less than 1"

            "page_size" : "Returned if page_size is not a valid integer"

            "page_size" : "Returned if page_size is less than 1 or greater than
            1000"'
        '401':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: null
                        message: authorization required
              schema:
                $ref: '#/components/schemas/global_error_response_schema'
          description: ''
      security:
        - Authorization: []
      summary: Retrieve recipients
      tags:
        - Contacts API - Recipients
    patch:
      description: '**This endpoint allows you to update one or more
        recipients.**


        The body of an API call to this endpoint must include an array of one or
        more recipient objects.


        It is of note that you can add custom field data as parameters on
        recipient objects. We have provided an example using some of the default
        custom fields SendGrid provides.'
      operationId: PATCH_contactdb-recipients
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      requestBody:
        content:
          application/json:
            schema:
              example:
                - email: jones@example.com
                  first_name: Guy
                  last_name: Jones
              items:
                properties:
                  email:
                    format: email
                    type: string
                  first_name:
                    description:
                      The first name of the recipient. This is one of the
                      default custom fields.
                    type: string
                  last_name:
                    description:
                      The last name of the recipient. This is one of the default
                      custom fields.
                    type: string
                required:
                  - email
                type: object
              type: array
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/contactdb_recipient_response'
          description: ''
        '400':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: null
                        message: Request body is not valid json
              schema:
                $ref: '#/components/schemas/global_error_response_schema'
          description: '"" : "Returned if request body is not valid json"'
        '401':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: null
                        message: authorization required
              schema:
                $ref: '#/components/schemas/global_error_response_schema'
          description: ''
      security:
        - Authorization: []
      summary: Update Recipient
      tags:
        - Contacts API - Recipients
    post:
      description: '**This endpoint allows you to add a Marketing Campaigns
        recipient.**


        You can add custom field data as a parameter on this endpoint. We have
        provided an example using some of the default custom fields SendGrid
        provides.


        The rate limit is three requests every 2 seconds. You can upload
        1000  contacts per request. So the maximum upload rate is 1500
        recipients per second.'
      operationId: POST_contactdb-recipients
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      requestBody:
        content:
          application/json:
            schema:
              example:
                - age: 25
                  email: example@example.com
                  first_name: ''
                  last_name: User
                - age: 25
                  email: example2@example.com
                  first_name: Example
                  last_name: User
              items:
                properties:
                  age:
                    type: integer
                  email:
                    description: The email address of the recipient.
                    format: email
                    type: string
                  first_name:
                    description: The first name of the recipient.
                    type: string
                  last_name:
                    description: The last name of the recipient.
                    type: string
                required:
                  - email
                type: object
              type: array
      responses:
        '201':
          content:
            application/json:
              examples:
                response:
                  value:
                    error_count: 1
                    error_indices:
                      - 2
                    errors:
                      - error_indices:
                          - 2
                        message: Invalid email.
                    new_count: 2
                    persisted_recipients:
                      - YUBh
                      - bWlsbGVyQG1pbGxlci50ZXN0
                    updated_count: 0
              schema:
                $ref: '#/components/schemas/contactdb_recipient_response'
          description: ''
        '400':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: null
                        message: Request body is not valid json
              schema:
                $ref: '#/components/schemas/global_error_response_schema'
          description: '"" : "Returned if request body is not valid json"'
        '401':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: null
                        message: authorization required
              schema:
                $ref: '#/components/schemas/global_error_response_schema'
          description: ''
      security:
        - Authorization: []
      summary: Add recipients
      tags:
        - Contacts API - Recipients
  /contactdb/recipients/billable_count:
    get:
      description: '**This endpoint allows you to retrieve the number of
        Marketing Campaigns recipients that you will be billed for.**


        You are billed for marketing campaigns based on the highest number of
        recipients you have had in your account at one time. This endpoint will
        allow you to know the current billable count value.'
      operationId: GET_contactdb-recipients-billable_count
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    recipient_count: 1234
              schema:
                $ref: '#/components/schemas/contactdb_recipient_count'
          description: ''
        '401':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: null
                        message: authorization required
              schema:
                $ref: '#/components/schemas/global_error_response_schema'
          description: ''
      security:
        - Authorization: []
      summary: Retrieve the count of billable recipients
      tags:
        - Contacts API - Recipients
  /contactdb/recipients/count:
    get:
      description:
        '**This endpoint allows you to retrieve the total number of Marketing
        Campaigns recipients.**'
      operationId: GET_contactdb-recipients-count
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    recipient_count: 1234
              schema:
                $ref: '#/components/schemas/contactdb_recipient_count'
          description: ''
        '401':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: null
                        message: authorization required
              schema:
                $ref: '#/components/schemas/global_error_response_schema'
          description: ''
      security:
        - Authorization: []
      summary: Retrieve a Count of Recipients
      tags:
        - Contacts API - Recipients
  /contactdb/recipients/search:
    get:
      description: "**This endpoint allows you to perform a search on all of
        your Marketing Campaigns recipients.**


        field_name:


        * is a variable that is substituted for your actual custom field name
        from your recipient.

        * Text fields must be url-encoded. Date fields are searchable only by
        unix timestamp (e.g. 2/2/2015 becomes 1422835200)

        * If field_name is a 'reserved' date field, such as created_at or
        updated_at, the system will internally convert

        your epoch time to a date range encompassing the entire day. For
        example, an epoch time of 1422835600 converts to

        Mon, 02 Feb 2015 00:06:40 GMT, but internally the system will search
        from Mon, 02 Feb 2015 00:00:00 GMT through

        Mon, 02 Feb 2015 23:59:59 GMT."
      operationId: GET_contactdb-recipients-search
      parameters:
        - in: query
          name: '{field_name}'
          schema:
            type: string
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    recipients:
                      - created_at: 1422313607
                        custom_fields:
                          - id: 23
                            name: pet
                            type: text
                            value: Fluffy
                        email: jones@example.com
                        first_name: null
                        id: YUBh
                        last_clicked: null
                        last_emailed: null
                        last_name: Jones
                        last_opened: null
                        updated_at: 1422313790
              schema:
                properties:
                  recipients:
                    items:
                      $ref: '#/components/schemas/contactdb_recipient'
                    type: array
                type: object
          description: ''
        '400':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - message:
                          'The following parameters are not custom fields or
                          reserved fields: [{field_name}]'
                      - message: No search params are specified
              schema:
                $ref: '#/components/schemas/global_error_response_schema'
          description: '"" : "Returned if no search params are specified"

            "field" : "Returned if the provided field is invalid or does not
            exist"'
        '401':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: null
                        message: authorization required
              schema:
                $ref: '#/components/schemas/global_error_response_schema'
          description: ''
      security:
        - Authorization: []
      summary: Search recipients
      tags:
        - Contacts API - Recipients
    post:
      description: "<p>\n  Search using segment conditions without actually
        creating a segment.\n  Body contains a JSON object with
        <code>conditions</code>, a list of conditions as described below, and an
        optional <code>list_id</code>, which is a valid list ID for a list to
        limit the search on.\n</p>\n\n<p>\n  Valid operators for create and
        update depend on the type of the field for which you are
        searching.\n</p>\n\n<ul>\n  <li>Dates:\n    <ul>\n      <li>\"eq\",
        \"ne\", \"lt\" (before), \"gt\" (after)\n        <ul>\n          <li>You
        may use MM/DD/YYYY for day granularity or an epoch for second
        granularity.</li>\n        </ul>\n      </li>\n      <li>\"empty\",
        \"not_empty\"</li>\n      <li>\"is
        within\"\n        <ul>\n          <li>You may use an <a
        href=\"https://en.wikipedia.org/wiki/ISO_8601\">ISO 8601 date format</a>
        or the # of
        days.</li>\n        </ul>\n      </li>\n    </ul>\n  </li>\n  <li>Text:
        \"contains\", \"eq\" (is - matches the full field), \"ne\" (is not -
        matches any field\
        \ where the entire field is not the condition value), \"empty\",
        \"not_empty\"</li>\n  <li>Numbers: \"eq\", \"lt\", \"gt\", \"empty\",
        \"not_empty\"</li>\n  <li>Email Clicks and Opens: \"eq\" (opened),
        \"ne\" (not opened)</li>\n</ul>\n\n<p>\n  Field values must all be a
        string.\n</p>\n\n<p>\n  Search conditions using \"eq\" or \"ne\" for
        email clicks and opens should provide a \"field\" of either
        <code>clicks.campaign_identifier</code> or
        <code>opens.campaign_identifier</code>.\n  The condition value should be
        a string containing the id of a completed
        campaign.\n</p>\n\n<p>\n  Search conditions list may contain multiple
        conditions, joined by an \"and\" or \"or\" in the \"and_or\"
        field.\n  The first condition in the conditions list must have an empty
        \"and_or\", and subsequent conditions must all specify an
        \"and_or\".\n</p>"
      operationId: POST_contactdb-recipients-search
      requestBody:
        content:
          application/json:
            schema:
              example:
                conditions:
                  - and_or: ''
                    field: birthday
                    operator: eq
                    value: 01/12/1985
                  - and_or: ''
                    field: birthday
                    operator: eq
                    value: 01/12/1985
                  - and_or: ''
                    field: birthday
                    operator: eq
                    value: 01/12/1985
                  - and_or: ''
                    field: birthday
                    operator: eq
                    value: 01/12/1985
                list_id: -27497588
              properties:
                conditions:
                  items:
                    x-and_or: ''
                    x-field: birthday
                    x-operator: eq
                    x-value: 01/12/1985
                  type: array
                list_id:
                  format: int32
                  type: integer
              required:
                - list_id
                - conditions
              type: object
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    recipient_count: 65190677
                    recipients:
                      - created_at: -27901208
                        email: ut magna quis ipsum
                        id: fugiat ad adipisicing ullamco
                        last_emailed: 21626657
                      - created_at: 17466400
                        email: sunt irure
                        first_name: est
                        id: et
                        last_clicked: -23135244
                        last_opened: -44593357
                      - created_at: -34495329
                        email: reprehenderit incididunt velit Lorem esse
                        id: esse Ut ad dolore
                        last_clicked: 10164083
                        last_opened: 34443062
                      - created_at: -37030673
                        email: amet deserunt fugiat voluptate
                        id: et exercitation commodo id laborum
                        last_clicked: -10497425
                      - created_at: 3658435
                        custom_fields:
                          - id: -5765608
                            name: proident pariatur
                            type: dolore ut
                            value: do in magna mollit
                          - id: -31131201
                            name: laborum mollit
                            type: veniam
                            value: 84434696
                        email: labore veniam
                        first_name: Ut cupidatat nulla deserunt adipisicing
                        id: ad pariatur esse
                        last_clicked: -52862671
                        last_opened: -84227501
                        updated_at: -56455352
              schema:
                properties:
                  recipient_count:
                    type: integer
                  recipients:
                    items:
                      properties:
                        created_at:
                          type: integer
                        custom_fields:
                          items:
                            properties:
                              id:
                                type: integer
                              name:
                                type: string
                              type:
                                type: string
                              value:
                                anyOf:
                                  - type: integer
                                  - type: string
                            type: object
                          type: array
                        email:
                          type: string
                        first_name:
                          type: string
                        id:
                          type: string
                        last_clicked:
                          type: integer
                        last_emailed:
                          type: integer
                        last_opened:
                          type: integer
                        updated_at:
                          type: integer
                      type: object
                    type: array
                type: object
          description: ''
        '400':
          description: ''
      security:
        - Authorization: []
      summary: Search recipients
      tags:
        - Contacts API - Recipients
  /contactdb/recipients/{recipient_id}:
    delete:
      description: '**This endpoint allows you to delete a single recipient with
        the given ID from your contact database.**


        > Use this to permanently delete your recipients from all of your
        contact lists and all segments if required by applicable law.'
      operationId: DELETE_contactdb-recipients-recipient_id
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '204':
          content:
            application/json:
              schema:
                type: object
          description: ''
        '400':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: null
                        message: recipient not found
              schema:
                $ref: '#/components/schemas/global_error_response_schema'
          description:
            '"recipient_id" : "Returned if recipient_id is not valid"'
        '401':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: null
                        message: authorization required
              schema:
                $ref: '#/components/schemas/global_error_response_schema'
          description: ''
        '404':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: null
                        message: recipient_id is not valid
              schema:
                $ref: '#/components/schemas/global_error_response_schema'
          description:
            '"recipient_id" : "Returned if record for recipient id does not
            exist"'
      security:
        - Authorization: []
      summary: Delete a Recipient
      tags:
        - Contacts API - Recipients
    get:
      description:
        '**This endpoint allows you to retrieve a single recipient by ID from
        your contact database.**'
      operationId: GET_contactdb-recipients-recipient_id
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/contactdb_recipient'
          description: ''
        '400':
          content:
            application/json:
              schema:
                type: object
          description:
            '"recipient_id" : "Returned if recipient_id is not valid"'
        '401':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: null
                        message: authorization required
              schema:
                $ref: '#/components/schemas/global_error_response_schema'
          description: ''
        '404':
          content:
            application/json:
              schema:
                type: object
          description:
            '"recipient_id" : "Returned if record for recipient id does not
            exist"'
      security:
        - Authorization: []
      summary: Retrieve a single recipient
      tags:
        - Contacts API - Recipients
    parameters:
      - description: The ID of the recipient that you want to retrieve.
        in: path
        name: recipient_id
        required: true
        schema:
          type: string
  /contactdb/recipients/{recipient_id}/lists:
    get:
      description: '**This endpoint allows you to retrieve the lists that a
        given recipient belongs to.**


        Each recipient can be on many lists. This endpoint gives you all of the
        lists that any one recipient has been added to.'
      operationId: GET_contactdb-recipients-recipient_id-lists
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    lists:
                      - id: 1234
                        name: Example list
                        recipient_count: 42
              schema:
                properties:
                  lists:
                    items:
                      $ref: '#/components/schemas/contactdb_list'
                    type: array
                type: object
          description: ''
        '400':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: null
                        message: recipient ID is invalid
              schema:
                $ref: '#/components/schemas/global_error_response_schema'
          description:
            '"recipient_id" : "Returned if recipient_id is not valid"'
        '401':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: null
                        message: authorization required
              schema:
                $ref: '#/components/schemas/global_error_response_schema'
          description: ''
        '404':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: null
                        message: recipient id not found
              schema:
                $ref: '#/components/schemas/global_error_response_schema'
          description:
            '"recipient_id" : "Returned if record for the recipient id does not
            exist"'
      security:
        - Authorization: []
      summary: Retrieve the lists that a recipient is on
      tags:
        - Contacts API - Recipients
    parameters:
      - description: The ID of the recipient for whom you are retrieving lists.
        in: path
        name: recipient_id
        required: true
        schema:
          type: string
  /contactdb/reserved_fields:
    get:
      description:
        "**This endpoint allows you to list all fields that are reserved and
        can't be used for custom field names.**"
      operationId: GET_contactdb-reserved_fields
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    reserved_fields:
                      - name: first_name
                        type: text
                      - name: last_name
                        type: text
                      - name: email
                        type: text
                      - name: created_at
                        type: date
                      - name: updated_at
                        type: date
                      - name: last_emailed
                        type: date
                      - name: last_clicked
                        type: date
                      - name: last_opened
                        type: date
                      - name: lists
                        type: set
                      - name: campaigns
                        type: set
                      - name: my_custom_field
                        type: text
              schema:
                properties:
                  reserved_fields:
                    items:
                      properties:
                        name:
                          type: string
                        type:
                          type: string
                      type: object
                    type: array
                type: object
          description: ''
        '401':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: null
                        message: authorization required
              schema:
                $ref: '#/components/schemas/global_error_response_schema'
          description: ''
      security:
        - Authorization: []
      summary: Retrieve reserved fields
      tags:
        - Contacts API - Custom Fields
  /contactdb/segments:
    get:
      description:
        '**This endpoint allows you to retrieve all of your segments.**'
      operationId: GET_contactdb-segments
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    segments:
                      - conditions:
                          - field: age
                            operator: lt
                            value: '25'
                        id: 1234
                        name: Age segments < 25
                        recipient_count: 8
                      - conditions:
                          - field: email
                            operator: contains
                            value: '@gmail.com'
                        id: 2345
                        name: email address - gmail
                        recipient_count: 0
              schema:
                properties:
                  segments:
                    items:
                      $ref: '#/components/schemas/contactdb_segments'
                    type: array
                required:
                  - segments
                title: List All Segments response
                type: object
          description: ''
        '401':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: null
                        message: authorization required
              schema:
                $ref: '#/components/schemas/global_error_response_schema'
          description: ''
      security:
        - Authorization: []
      summary: Retrieve all segments
      tags:
        - Contacts API - Segments
    post:
      description: "**This endpoint allows you to create a new
        segment.**\n\n\n  Valid operators for create and update depend on the
        type of the field for which you are searching.\n\n**Dates**\n- \"eq\",
        \"ne\", \"lt\" (before), \"gt\" (after)\n    - You may use MM/DD/YYYY
        for day granularity or an epoch for second granularity.\n- \"empty\",
        \"not_empty\"\n- \"is within\"\n    - You may use an [ISO 8601 date
        format](https://en.wikipedia.org/wiki/ISO_8601) or the # of
        days.\n\n**Text**\n- \"contains\"\n- \"eq\" (is/equals - matches the
        full field)\n- \"ne\" (is not/not equals - matches any field where the
        entire field is not the condition value)\n- \"empty\"\n-
        \"not_empty\"\n\n**Numbers**\n- \"eq\" (is/equals)\n- \"lt\" (is less
        than)\n- \"gt\" (is greater than)\n- \"empty\"\n-
        \"not_empty\"\n\n**Email Clicks and Opens**\n- \"eq\" (opened)\n- \"ne\"
        (not opened)\n\nAll field values must be a string.\n\n\nConditions using
        \"eq\" or \"ne\" for email clicks and opens should provide a \"field\"\
        \ of either `clicks.campaign_identifier` or
        `opens.campaign_identifier`.\nThe condition value should be a string
        containing the id of a completed campaign.\n\n\nThe conditions list may
        contain multiple conditions, joined by an \"and\" or \"or\" in the
        \"and_or\" field.\n\nThe first condition in the conditions list must
        have an empty \"and_or\", and subsequent conditions must all specify an
        \"and_or\"."
      operationId: POST_contactdb-segments
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/contactdb_segments'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    conditions:
                      - and_or: ''
                        field: last_name
                        operator: eq
                        value: Miller
                      - and_or: and
                        field: last_clicked
                        operator: gt
                        value: 01/02/2015
                      - and_or: or
                        field: clicks.campaign_identifier
                        operator: eq
                        value: '513'
                    id: 1
                    list_id: 4
                    name: Last Name Miller
                    recipient_count: 0
              schema:
                $ref: '#/components/schemas/contactdb_segments_with_id'
          description: ''
        '400':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - message: request body is not valid json
                      - message:
                          invalid value is passed into one of the request body
                          parameters
                      - field: field
                        message:
                          field and set value is not passed into the request
                          body
                      - field: value
                        message:
                          value and set value is not passed into the request
                          body
                      - field: operator
                        message:
                          operator and set value is not passed into the request
                          body
                      - field: and_or
                        message:
                          and_or is not set on more than one condition and less
                          than all conditions
                      - field: and_or
                        message: and_or is set on all conditions
                      - field: and_or
                        message: and_or is set on the only condition passed
                      - field: and_or
                        message:
                          and_or and set value is not passed into the request
                          body
                      - field: list_id
                        message: the list_id is not valid
                      - field: name
                        message: the name is not valid
              schema:
                $ref: '#/components/schemas/global_error_response_schema'
          description: '"name" : "Returned if the name is not valid"

            "list_id" : "Returned if the list_id is not valid"

            "and_or" : "Returned if and_or and set value is not passed into the
            request body"

            "and_or" : "Returned if and_or is set on the only condition passed"

            "and_or" : "Returned if and_or is set on all conditions"

            "and_or" : "Returned if and_or is not set on more than one condition
            and less than all conditions"

            "operator" : "Returned if operator and set value is not passed into
            the request body"

            "value" : "Returned if value and set value is not passed into the
            request body"

            "field" : "Returned if field and set value is not passed into the
            request body"

            "" : "Returned if request body is not valid json"

            "" : "Returned if invalid value is passed into one of the request
            body parameters"'
        '401':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: null
                        message: authorization required
              schema:
                $ref: '#/components/schemas/global_error_response_schema'
          description: ''
      security:
        - Authorization: []
      summary: Create a Segment
      tags:
        - Contacts API - Segments
  /contactdb/segments/{segment_id}:
    delete:
      description: '**This endpoint allows you to delete a segment from your
        recipients database.**


        You also have the option to delete all the contacts from your Marketing
        Campaigns recipient database who were in this segment.'
      operationId: DELETE_contactdb-segments-segment_id
      parameters:
        - description:
            True to delete all contacts matching the segment in addition to
            deleting the segment
          in: query
          name: delete_contacts
          schema:
            type: boolean
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      requestBody:
        $ref: '#/components/requestBodies/DELETE_contactdb-lists-list_idBody'
      responses:
        '204':
          content:
            application/json:
              schema:
                nullable: true
          description: ''
        '400':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: segment_id
                        message: Returned if segment_id is not valid
                      - field: delete_contacts
                        message:
                          Returned if delete_contacts is not a valid boolean
              schema:
                $ref: '#/components/schemas/global_error_response_schema'
          description: '"segment_id" : "Returned if segment_id is not valid"

            "delete_contacts" : "Returned if delete_contacts is not a valid
            boolean"'
        '401':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: null
                        message: authorization required
              schema:
                $ref: '#/components/schemas/global_error_response_schema'
          description: ''
        '404':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: segment_id
                        message: segment_id does not exist
              schema:
                $ref: '#/components/schemas/global_error_response_schema'
          description: '"segment_id" : "Returned if segment_id does not exist"'
      security:
        - Authorization: []
      summary: Delete a segment
      tags:
        - Contacts API - Segments
    get:
      description:
        '**This endpoint allows you to retrieve a single segment with the given
        ID.**'
      operationId: GET_contactdb-segments-segment_id
      parameters:
        - description: The ID of the segment you want to request.
          in: query
          name: segment_id
          required: true
          schema:
            type: integer
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    conditions:
                      - and_or: ''
                        field: last_name
                        operator: eq
                        value: Miller
                    id: 1
                    list_id: 4
                    name: Last Name Miller
                    recipient_count: 1
              schema:
                $ref: '#/components/schemas/contactdb_segments'
          description: ''
        '400':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - message: if segment_id is not valid
              schema:
                $ref: '#/components/schemas/global_error_response_schema'
          description: '"segment_id" : "Returned if segment_id is not valid"'
        '401':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: null
                        message: authorization required
              schema:
                $ref: '#/components/schemas/global_error_response_schema'
          description: ''
        '404':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - message: segment_id not found
              schema:
                $ref: '#/components/schemas/global_error_response_schema'
          description: '"segment_id" : "Returned if segment_id does not exist"'
      security:
        - Authorization: []
      summary: Retrieve a segment
      tags:
        - Contacts API - Segments
    parameters:
      - in: path
        name: segment_id
        required: true
        schema:
          type: string
    patch:
      description: '**This endpoint allows you to update a segment.**'
      operationId: PATCH_contactdb-segments-segment_id
      parameters:
        - description: The ID of the segment you are updating.
          in: query
          name: segment_id
          schema:
            type: string
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      requestBody:
        content:
          application/json:
            schema:
              example:
                conditions:
                  - and_or: ''
                    field: last_name
                    operator: eq
                    value: Miller
                list_id: 5
                name: The Millers
              properties:
                conditions:
                  description:
                    The conditions by which this segment should be created.
                  items:
                    $ref: '#/components/schemas/contactdb_segments_conditions'
                  type: array
                list_id:
                  description:
                    The list ID you would like this segment to be built from.
                  type: number
                name:
                  type: string
              required:
                - name
              type: object
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    conditions:
                      - and_or: ''
                        field: last_name
                        operator: eq
                        value: Miller
                    id: 5
                    list_id: 5
                    name: The Millers
                    recipient_count: 1
              schema:
                $ref: '#/components/schemas/contactdb_segments'
          description: ''
        '400':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - message: request body is not valid json
                      - message:
                          invalid value is passed into one of the request body
                          parameters
                      - message: segment id is not valid
                        segment_id: segment_id
                      - field: field
                        message:
                          field and set value is not passed into the request
                          body
                      - field: value
                        message:
                          value and set value is not passed into the request
                          body
                      - field: operator
                        message:
                          operator and set value is not passed into the request
                          body
                      - field: and_or
                        message:
                          and_or is not set on more than one condition and less
                          than all conditions
                      - field: and_or
                        message: and_or is set on all conditions
                      - field: and_or
                        message: and_or is set on the only condition passed
                      - field: and_or
                        message:
                          and_or and set value is not passed into the request
                          body
                      - field: list_id
                        message: the list_id is not valid
                      - field: name
                        message: the name is not valid
              schema:
                $ref: '#/components/schemas/global_error_response_schema'
          description: ''
        '401':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: null
                        message: authorization required
              schema:
                $ref: '#/components/schemas/global_error_response_schema'
          description: ''
      security:
        - Authorization: []
      summary: Update a segment
      tags:
        - Contacts API - Segments
  /contactdb/segments/{segment_id}/recipients:
    get:
      description:
        '**This endpoint allows you to retrieve all of the recipients in a
        segment with the given ID.**'
      operationId: GET_contactdb-segments-segment_id-recipients
      parameters:
        - in: query
          name: page
          schema:
            type: integer
        - in: query
          name: page_size
          schema:
            type: integer
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    recipients:
                      - created_at: 1422313607
                        custom_fields:
                          - id: 23
                            name: pet
                            type: text
                            value: Indiana
                        email: jones@example.com
                        first_name: null
                        id: YUBh
                        last_clicked: null
                        last_emailed: null
                        last_name: Jones
                        last_opened: null
                        updated_at: 1422313790
              schema:
                properties:
                  recipients:
                    items:
                      $ref: '#/components/schemas/contactdb_recipient'
                    type: array
                required:
                  - recipients
                title: List Recipients On a Segment response
                type: object
          description: ''
        '400':
          content:
            application/json:
              schema:
                type: object
          description: '"page" : "Returned if page is not a valid integer"

            "page" : "Returned if page is less than 1"

            "page_size" : "Returned if page_size is not a valid integer"'
        '401':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: null
                        message: authorization required
              schema:
                $ref: '#/components/schemas/global_error_response_schema'
          description: ''
        '404':
          content:
            application/json:
              schema:
                type: object
          description: '"segment_id" : "Returned if segment_id is not valid"

            "segment_id" : "Returned if segment_id does not exist"'
      security:
        - Authorization: []
      summary: Retrieve recipients on a segment
      tags:
        - Contacts API - Segments
    parameters:
      - description:
          The ID of the segment from which you want to retrieve recipients.
        in: path
        name: segment_id
        required: true
        schema:
          type: integer
  /contactdb/status:
    get:
      description:
        '**This endpoint allows you to check the upload status of a Marketing
        Campaigns recipient.**'
      operationId: GET_contactdb-status
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    status:
                      - id: worker_delay
                        value: delayed
                      - id: worker_delay_seconds
                        value: '75.0'
              schema:
                properties:
                  status:
                    items:
                      properties:
                        '':
                          type: string
                        id:
                          default: ''
                          description:
                            Valid values are "worker_delay" and
                            "worker_delay_seconds" (the second value appears
                            only if "worker_delay" has a value of "delayed").
                          type: string
                        value:
                          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.
                          type: string
                      type: object
                    type: array
                type: object
          description: ''
      security:
        - Authorization: []
      summary: Get Recipient Upload Status
      tags:
        - Contacts API - Recipients
  /designs:
    get:
      description: '**This endpoint allows you to retrieve a list of designs
        already stored in your Design Library**.


        A GET request to `/designs` will return a list of your existing designs.
        This endpoint will not return the pre-built Twilio SendGrid designs.
        Pre-built designs can be retrieved using the `/designs/pre-builts`
        endpoint, which is detailed below.


        By default, you will receive 100 results per request; however, you can
        modify the number of results returned by passing an integer to the
        `page_size` query parameter.'
      operationId: LIST-designs
      parameters:
        - $ref: '#/components/parameters/trait_designsQueryStrings_page_size'
        - $ref: '#/components/parameters/trait_designsQueryStrings_page_token'
        - $ref: '#/components/parameters/trait_designsQueryStrings_summary'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    _metadata:
                      count: 3
                      self: https://api.sendgrid.com/v3/designs?page_token=vHdvHCg0w1F-TmWJcPNpTEnFY2aPEmRBHONwOgZ6TgJbX2_I
                    result:
                      - categories:
                          - welcome
                          - new customer
                        created_at: '2021-04-09T17:29:46Z'
                        editor: code
                        generate_plain_content: true
                        id: 3247eaea-c912-42a3-b0bc-60bdaf210396
                        name: Welcome Email
                        subject: Welcom to the Cake or Pie Cafe
                        thumbnail_url: //us-east-2-production-thumbnail-bucket.s3.amazonaws.com/llny8o5b3m636z92p7hbjnmq1jvpka39p370jwtin2s1wxv7x1sgm0y5fk518d0s.png
                        updated_at: '2021-04-09T17:29:55Z'
                      - categories:
                          - promo
                          - coupon
                        created_at: '2021-04-09T17:29:21Z'
                        editor: design
                        generate_plain_content: true
                        id: 02dfd792-f31f-439a-a79e-5c47fbcfdbac
                        name: Monthly Promo
                        subject: Free Dozen Cupcakes
                        thumbnail_url: //us-east-2-production-thumbnail-bucket.s3.amazonaws.com/hfyxahd7ues2ajuoeoqq2xe6ibdasl1q89ox0y9ncya2ftpoicssmtf9ddus4c39.png
                        updated_at: '2021-04-09T17:29:42Z'
                      - categories: []
                        created_at: '2020-10-09T17:33:46Z'
                        editor: design
                        generate_plain_content: true
                        id: e54be823-19ef-4c6f-8b60-efd7514f492d
                        name: 'Duplicate: Ingrid & Anders'
                        subject: Welcome to Ingrid & Anders!
                        thumbnail_url: //us-east-2-production-thumbnail-bucket.s3.amazonaws.com/12kni9gjpyb9uxmwr9vk7unycjr70u95zoyhe9sg2zounul2zg7dih1s20k13q2z.png
                        updated_at: '2021-04-07T19:57:52Z'
              schema:
                properties:
                  _metadata:
                    $ref: '#/components/schemas/_metadata'
                  result:
                    items:
                      $ref: '#/components/schemas/design-output-summary'
                    type: array
                type: object
          description: ''
      security:
        - Authorization: []
      summary: List Designs
      tags:
        - Designs API
    post:
      description: '**This endpoint allows you to create a new design**.


        You can add a new design by passing data, including a string of HTML
        email content, to `/designs`. When creating designs from scratch, be
        aware of the styling constraints inherent to many email clients. For a
        list of best practices, see our guide to [Cross-Platform Email
        Design](https://sendgrid.com/docs/ui/sending-email/cross-platform-html-design/).


        The Design Library can also convert your design’s HTML elements into
        drag and drop modules that are editable in the Designs Library user
        interface. For more, visit the [Design and Code Editor
        documentation](https://sendgrid.com/docs/ui/sending-email/editor/#drag--drop-markup).


        Because the `/designs` endpoint makes it easy to add designs, you can
        create a design with your preferred tooling or migrate designs you
        already own without relying on the Design Library UI.'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/design-input'
      responses:
        '201':
          content:
            application/json:
              examples:
                response:
                  value:
                    categories: []
                    created_at: '2021-04-30T18:51:20Z'
                    editor: design
                    generate_plain_content: false
                    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>"
                    id: 3247eaea-c912-42a3-b0bc-60bdaf210396
                    name: Ahoy, World!
                    plain_content: 'Ahoy, World!


                      {{Sender_Name}}


                      {{Sender_Address}} , {{Sender_City}} , {{Sender_State}}
                      {{Sender_Zip}}


                      Unsubscribe ( {{{unsubscribe}}} ) - Unsubscribe
                      Preferences ( {{{unsubscribe_preferences}}} )'
                    subject: Getting Started
                    thumbnail_url: //us-east-2-production-thumbnail-bucket.s3.amazonaws.com/kjlrmded0qnrscv8zqr39npoimrpdwgiax59q8iq6ovj7yoks2fzxoxpfjpwph6o.png
                    updated_at: '2021-04-30T18:51:20Z'
              schema:
                $ref: '#/components/schemas/design-output'
          description: ''
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api-errors'
          description: ''
      security:
        - Authorization: []
      summary: Create Design
      tags:
        - Designs API
  /designs/pre-builts:
    get:
      description: '**This endpoint allows you to retrieve a list of pre-built
        designs provided by Twilio SendGrid**.


        Unlike the `/designs` endpoint where *your* designs are stored, a GET
        request made to `designs/pre-builts` will retrieve a list of the
        pre-built Twilio SendGrid designs. This endpoint will not return the
        designs stored in your Design Library.


        By default, you will receive 100 results per request; however, you can
        modify the number of results returned by passing an integer to the
        `page_size` query parameter.


        This endpoint is useful for retrieving the IDs of Twilio SendGrid
        designs that you want to duplicate and modify.'
      operationId: LIST-Sendgrid-Pre-built-designs
      parameters:
        - $ref: '#/components/parameters/trait_designsQueryStrings_page_size'
        - $ref: '#/components/parameters/trait_designsQueryStrings_page_token'
        - $ref: '#/components/parameters/trait_designsQueryStrings_summary'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    _metadata:
                      count: 6
                      self: https://api.sendgrid.com/v3/designs/pre-builts?page_token=yYzyCxj-iIVgP54t6NjKkunDCKYLLpngo-5vAsfYXz0To34U
                    result:
                      - categories: []
                        created_at: '2019-09-10T02:11:34Z'
                        editor: design
                        generate_plain_content: true
                        id: 6ad69134-7165-48cb-964a-6c3cf03e8af8
                        name: Off Grid Adventures
                        subject: Welcome to the family!
                        thumbnail_url: //us-east-2-production-thumbnail-bucket.s3.amazonaws.com/a85b4b202ff28094828f11ff472360caecf67ead2d186b69b45c904b9251aa0b.png
                        updated_at: '2021-01-11T21:47:52Z'
                      - categories: []
                        created_at: '2019-09-10T02:12:32Z'
                        editor: design
                        generate_plain_content: true
                        id: b0a9c6f7-a9a1-4b52-b0c5-16fc6f4cdb2b
                        name: Song Riddle
                        subject: Welcome to Song Riddle!
                        thumbnail_url: //us-east-2-production-thumbnail-bucket.s3.amazonaws.com/4ef3a39249f3accb8461b03950c071454a745a232508feca89a626b3e7f578d3.png
                        updated_at: '2021-01-11T21:46:43Z'
                      - categories: []
                        created_at: '2019-09-10T02:10:38Z'
                        editor: design
                        generate_plain_content: true
                        id: f8d8da76-bcca-4cfe-b809-733887855f57
                        name: Ingrid & Anders 1
                        subject: Welcome to Ingrid & Anders!
                        thumbnail_url: //us-east-2-production-thumbnail-bucket.s3.amazonaws.com/15c97ffa97ee31693581a67526728d096eef00adfbaa34bb030d91034d477da4.png
                        updated_at: '2021-01-11T21:45:05Z'
                      - categories: []
                        created_at: '2019-09-10T02:09:31Z'
                        editor: design
                        generate_plain_content: true
                        id: 2935a7d0-7f02-4e0f-a570-dc302ce09749
                        name: Ingrid & Anders 2
                        subject: Check out these exclusive deals!
                        thumbnail_url: //us-east-2-production-thumbnail-bucket.s3.amazonaws.com/7b36a6c0955cab0c350d105114ad248700a685bd11032592cdef85ae26540afc.png
                        updated_at: '2021-01-11T21:44:08Z'
                      - categories: []
                        created_at: '2019-09-10T02:08:29Z'
                        editor: design
                        generate_plain_content: true
                        id: 7826ef14-7ba6-4dbc-91f0-a8c610ebe962
                        name: Ingrid & Anders 3
                        subject: Join our VIP club and save big!
                        thumbnail_url: //us-east-2-production-thumbnail-bucket.s3.amazonaws.com/6dd8dd73a1a62bd7a76c4313b52d7c749250d49e31b19cce718906655fcbc675.png
                        updated_at: '2021-01-11T21:41:35Z'
                      - categories: []
                        created_at: '2019-09-10T02:03:06Z'
                        editor: design
                        generate_plain_content: true
                        id: 41da47e7-d3e2-491b-a83f-f499a4139d6a
                        name: Mercado
                        subject: Subject
                        thumbnail_url: //us-east-2-production-thumbnail-bucket.s3.amazonaws.com/9cc87cc7671719712d9d363184995d0ec05103355db300ff03641fe9e205651d.png
                        updated_at: '2021-01-11T21:39:23Z'
              schema:
                properties:
                  _metadata:
                    $ref: '#/components/schemas/_metadata'
                  result:
                    items:
                      $ref: '#/components/schemas/design-output-summary'
                    type: array
                type: object
          description: ''
      security:
        - Authorization: []
      summary: List SendGrid Pre-built Designs
      tags:
        - Designs API
  /designs/pre-builts/{id}:
    get:
      description: '**This endpoint allows you to retrieve a single pre-built
        design**.


        A GET request to `/designs/pre-builts/{id}` will retrieve details about
        a specific pre-built design.


        This endpoint is valuable when retrieving details about a pre-built
        design that you wish to duplicate and modify.'
      operationId: GET-sendgrid-pre-built-design
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    categories: []
                    created_at: '2019-09-10T02:11:34Z'
                    editor: design
                    generate_plain_content: true
                    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:
                      courier, monospace;\n      font-size:
                      16px;\n    }\n    body {\n      color:
                      #FFFFFF;\n    }\n    body a {\n      color:
                      #fe5d61;\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    @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-->\n\n     <!--End Head user
                      entered-->\n    </head>\n    <body>\n      <center
                      class=\"wrapper\" data-link-color=\"#fe5d61\"
                      data-body-style=\"font-size:16px; font-family:courier,
                      monospace; color:#FFFFFF;
                      background-color:#f2f4fb;\">\n        <div
                      class=\"webkit\">\n          <table cellpadding=\"0\"
                      cellspacing=\"0\" border=\"0\" width=\"100%\"
                      class=\"wrapper\"
                      bgcolor=\"#f2f4fb\">\n            <tr>\n              <td
                      valign=\"top\" bgcolor=\"#f2f4fb\"
                      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:#FFFFFF; text-align:left;\" bgcolor=\"#f2f4fb\"
                      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>You've found the
                      secret!</p>\n      </td>\n    </tr>\n  </table><table
                      class=\"\
                      wrapper\" role=\"module\" data-type=\"image\" border=\"0\"
                      cellpadding=\"0\" cellspacing=\"0\" width=\"100%\"
                      style=\"table-layout: fixed;\"
                      data-muid=\"98ndJyAY9BSGjoVqrr6FYx\">\n      <tbody><tr>\n        <td
                      style=\"font-size:6px; line-height:10px; padding:30px 0px
                      30px 0px;\" valign=\"top\" align=\"left\"><img
                      class=\"max-width\" border=\"0\" style=\"display:block;
                      color:#000000; text-decoration:none;
                      font-family:Helvetica, arial, sans-serif; font-size:16px;
                      max-width:40% !important; width:40%; height:auto
                      !important;\"
                      src=\"https://mc.sendgrid.com/assets/uploads/9d9c1f3d8009c42bbe60c0355f1ed23e86c3f5619173e83a9328b9214e42e1c1d5e009ed5cc4c8f3efedfc33d46bba2f4577b143607025a29add6e89ab4662ad.png\"
                      alt=\"Off Grid Adventures\" width=\"240\"
                      data-responsive=\"true\"
                      data-proportionally-constrained=\"false\"></td>\n      </tr>\n    </tbody></table><table
                      class=\"wrapper\" role=\"module\" data-type=\"image\"
                      border=\"0\" cellpadding=\"0\" cellspacing=\"0\"
                      width=\"100%\"\
                      \ style=\"table-layout: fixed;\"
                      data-muid=\"3Ypdby9Xfsf2rN27zTDEfN\">\n      <tbody><tr>\n        <td
                      style=\"font-size:6px; line-height:10px; padding:0px 0px
                      0px 0px;\" valign=\"top\" align=\"center\"><img
                      class=\"max-width\" border=\"0\" style=\"display:block;
                      color:#000000; text-decoration:none;
                      font-family:Helvetica, arial, sans-serif; font-size:16px;
                      max-width:100% !important; width:100%; height:auto
                      !important;\"
                      src=\"https://mc.sendgrid.com/assets/uploads/e324b295c47223f1a936198fbd4e5d4b239ff86c6d6c89d4d0eb8d7c61028921abfc4901ba607f6dcb7acc7067bb0c6df4313726b14b8274e0b2c98cdf8b58d2.png\"
                      alt=\"\" width=\"600\" data-responsive=\"true\"
                      data-proportionally-constrained=\"false\"></td>\n      </tr>\n    </tbody></table><table
                      class=\"module\" role=\"module\" data-type=\"text\"
                      border=\"0\" cellpadding=\"0\" cellspacing=\"0\"
                      width=\"100%\" style=\"table-layout: fixed;\"
                      data-muid=\"7pyDCmyDaGcm5WsBBSaEgv\"
                      data-mc-module-version=\"2019-10-22\">\n      <tbody><tr>\n\
                      \        <td style=\"background-color:#FE5D61;
                      padding:50px 0px 30px 0px; line-height:22px;
                      text-align:inherit;\" height=\"100%\" valign=\"top\"
                      bgcolor=\"#FE5D61\"><div><div style=\"font-family:
                      inherit; text-align: center\"><span style=\"font-size:
                      24px\">Welcome to the
                      family!</span></div><div></div></div></td>\n      </tr>\n    </tbody></table><table
                      class=\"module\" role=\"module\" data-type=\"text\"
                      border=\"0\" cellpadding=\"0\" cellspacing=\"0\"
                      width=\"100%\" style=\"table-layout: fixed;\"
                      data-muid=\"nSVYnVzPLnGZ4wUdynLiKo\"
                      data-mc-module-version=\"2019-10-22\">\n      <tbody><tr>\n        <td
                      style=\"background-color:#fe5d61; padding:30px 50px 30px
                      50px; line-height:22px; text-align:inherit;\"
                      height=\"100%\" valign=\"top\"
                      bgcolor=\"#fe5d61\"><div><div style=\"font-family:
                      inherit; text-align: center\">You've found a community of
                      travelers that are just like you.</div>\n<div
                      style=\"font-family: inherit; text-align:
                      center\">&nbsp;</div>\n<div style=\"\
                      font-family: inherit; text-align: center\">We don't want
                      to be stuck in tourist traps that isolate us from vibrant,
                      local experiences. We want to discover the hidden gems and
                      less-traveled roads of our next destination.</div>\n<div
                      style=\"font-family: inherit; text-align:
                      center\">&nbsp;</div>\n<div style=\"font-family: inherit;
                      text-align: center\">Ready for your next authentic travel
                      experience?</div><div></div></div></td>\n      </tr>\n    </tbody></table><table
                      border=\"0\" cellpadding=\"0\" cellspacing=\"0\"
                      class=\"module\" data-role=\"module-button\"
                      data-type=\"button\" role=\"module\"
                      style=\"table-layout:fixed\" width=\"100%\"
                      data-muid=\"4ywPd9vJ6WFyV1Si75h9vh\"><tbody><tr><td
                      align=\"center\" bgcolor=\"#fe5d61\" class=\"outer-td\"
                      style=\"padding:10px 10px 60px 10px;
                      background-color:#fe5d61;\"><table border=\"0\"
                      cellpadding=\"0\" cellspacing=\"0\"
                      class=\"button-css__deep-table___2OZyb wrapper-mobile\"
                      style=\"text-align:center\"><tbody><tr><td align=\"\
                      center\" bgcolor=\"#ffffff\" class=\"inner-td\"
                      style=\"border-radius:6px; font-size:16px;
                      text-align:center; background-color:inherit;\"><a
                      style=\"background-color:#ffffff; border:1px solid
                      #ffffff; border-color:#ffffff; border-radius:3px;
                      border-width:1px; color:#fe5d61; display:inline-block;
                      font-size:16px; font-weight:700; letter-spacing:1px;
                      line-height:40px; padding:12px 20px 12px 20px;
                      text-align:center; text-decoration:none;
                      border-style:solid;\" href=\"\" target=\"_blank\">Browse
                      Gallery</a></td></tr></tbody></table></td></tr></tbody></table><table
                      class=\"wrapper\" role=\"module\" data-type=\"image\"
                      border=\"0\" cellpadding=\"0\" cellspacing=\"0\"
                      width=\"100%\" style=\"table-layout: fixed;\"
                      data-muid=\"6jxKSRk9dKQ1Tvi1wtnu8q\">\n      <tbody><tr>\n        <td
                      style=\"font-size:6px; line-height:10px; padding:0px 0px
                      0px 0px;\" valign=\"top\" align=\"center\"><img
                      class=\"max-width\" border=\"0\" style=\"display:block;
                      color:#000000; text-decoration:none;\
                      \ font-family:Helvetica, arial, sans-serif;
                      font-size:16px; max-width:100% !important; width:100%;
                      height:auto !important;\"
                      src=\"https://mc.sendgrid.com/assets/uploads/0accac77b1e34c614730ab732317a493478835c96bd549fb2df7a921ec1177fdb30d6d33e1d0a33d8c6c579344890ae408ce13aaed0e478f1fd6d2219d308365.png\"
                      alt=\"\" width=\"600\" data-responsive=\"true\"
                      data-proportionally-constrained=\"false\"></td>\n      </tr>\n    </tbody></table><table
                      class=\"module\" role=\"module\" data-type=\"spacer\"
                      border=\"0\" cellpadding=\"0\" cellspacing=\"0\"
                      width=\"100%\" style=\"table-layout: fixed;\"
                      data-muid=\"iYySZ4rAB78PLoW7vU13Bb\">\n      <tbody><tr>\n        <td
                      style=\"padding:0px 0px 30px 0px;\"
                      role=\"module-content\"
                      bgcolor=\"\">\n        </td>\n      </tr>\n    </tbody></table><table
                      class=\"module\" role=\"module\" data-type=\"divider\"
                      border=\"0\" cellpadding=\"0\" cellspacing=\"0\"
                      width=\"100%\" style=\"table-layout: fixed;\"
                      data-muid=\"mVyZz43HETwfwb72TGh4iy\">\n\
                      \      <tbody><tr>\n        <td style=\"padding:0px 0px
                      0px 0px;\" role=\"module-content\" height=\"100%\"
                      valign=\"top\" bgcolor=\"\">\n          <table
                      border=\"0\" cellpadding=\"0\" cellspacing=\"0\"
                      align=\"center\" width=\"100%\" height=\"3px\"
                      style=\"line-height:3px;
                      font-size:3px;\">\n            <tbody><tr>\n              <td
                      style=\"padding:0px 0px 3px 0px;\"
                      bgcolor=\"#ffffff\"></td>\n            </tr>\n          </tbody></table>\n        </td>\n      </tr>\n    </tbody></table><table
                      class=\"module\" role=\"module\" data-type=\"spacer\"
                      border=\"0\" cellpadding=\"0\" cellspacing=\"0\"
                      width=\"100%\" style=\"table-layout: fixed;\"
                      data-muid=\"sfek66tVLi5d2iy5jmSawj\">\n      <tbody><tr>\n        <td
                      style=\"padding:0px 0px 30px 0px;\"
                      role=\"module-content\"
                      bgcolor=\"\">\n        </td>\n      </tr>\n    </tbody></table><table
                      class=\"module\" role=\"module\" data-type=\"social\"
                      align=\"center\" border=\"0\" cellpadding=\"0\"
                      cellspacing=\"0\" width=\"100%\"\
                      \ style=\"table-layout: fixed;\"
                      data-muid=\"87277ffe-54ed-4792-94f3-0a973b71c268\">\n    <tbody>\n      <tr>\n        <td
                      valign=\"top\" style=\"padding:0px 0px 0px 0px;
                      font-size:6px; line-height:10px;\"
                      align=\"center\">\n          <table align=\"center\"
                      style=\"-webkit-margin-start:auto;-webkit-margin-end:auto;\">\n            <tbody><tr
                      align=\"center\"><td style=\"padding: 0px 5px;\"
                      class=\"social-icon-column\">\n      <a
                      role=\"social-icon-link\"
                      href=\"https://www.facebook.com/sendgrid/\"
                      target=\"_blank\" alt=\"Facebook\" title=\"Facebook\"
                      style=\"display:inline-block; background-color:#FE5D61;
                      height:30px; width:30px; border-radius:2px;
                      -webkit-border-radius:2px;
                      -moz-border-radius:2px;\">\n        <img
                      role=\"social-icon\" alt=\"Facebook\" title=\"Facebook\"
                      src=\"https://mc.sendgrid.com/assets/social/white/facebook.png\"
                      style=\"height:30px; width:30px;\" height=\"30\"
                      width=\"30\">\n      </a>\n    </td><td style=\"padding:
                      0px 5px;\" class=\"social-icon-column\"\
                      >\n      <a role=\"social-icon-link\"
                      href=\"https://twitter.com/sendgrid?ref_src=twsrc%5egoogle%7ctwcamp%5eserp%7ctwgr%5eauthor\"
                      target=\"_blank\" alt=\"Twitter\" title=\"Twitter\"
                      style=\"display:inline-block; background-color:#FE5D61;
                      height:30px; width:30px; border-radius:2px;
                      -webkit-border-radius:2px;
                      -moz-border-radius:2px;\">\n        <img
                      role=\"social-icon\" alt=\"Twitter\" title=\"Twitter\"
                      src=\"https://mc.sendgrid.com/assets/social/white/twitter.png\"
                      style=\"height:30px; width:30px;\" height=\"30\"
                      width=\"30\">\n      </a>\n    </td><td style=\"padding:
                      0px 5px;\" class=\"social-icon-column\">\n      <a
                      role=\"social-icon-link\"
                      href=\"https://www.instagram.com/sendgrid/?hl=en\"
                      target=\"_blank\" alt=\"Instagram\" title=\"Instagram\"
                      style=\"display:inline-block; background-color:#FE5D61;
                      height:30px; width:30px; border-radius:2px;
                      -webkit-border-radius:2px;
                      -moz-border-radius:2px;\">\n        <img
                      role=\"social-icon\" alt=\"Instagram\"
                      title=\"Instagram\"\
                      \
                      src=\"https://mc.sendgrid.com/assets/social/white/instagram.png\"
                      style=\"height:30px; width:30px;\" height=\"30\"
                      width=\"30\">\n      </a>\n    </td><td style=\"padding:
                      0px 5px;\" class=\"social-icon-column\">\n      <a
                      role=\"social-icon-link\"
                      href=\"https://www.pinterest.com/sendgrid/\"
                      target=\"_blank\" alt=\"Pinterest\" title=\"Pinterest\"
                      style=\"display:inline-block; background-color:#FE5D61;
                      height:30px; width:30px; border-radius:2px;
                      -webkit-border-radius:2px;
                      -moz-border-radius:2px;\">\n        <img
                      role=\"social-icon\" alt=\"Pinterest\" title=\"Pinterest\"
                      src=\"https://mc.sendgrid.com/assets/social/white/pinterest.png\"
                      style=\"height:30px; width:30px;\" height=\"30\"
                      width=\"30\">\n      </a>\n    </td></tr></tbody>\n          </table>\n        </td>\n      </tr>\n    </tbody>\n  </table><div
                      data-role=\"module-unsubscribe\" class=\"module
                      unsubscribe-css__unsubscribe___2CDlR\" role=\"module\"
                      data-type=\"unsubscribe\" style=\"color:#FFFFFF;
                      font-size:12px;\
                      \ line-height:20px; padding:16px 16px 16px 16px;
                      text-align:center;\"
                      data-muid=\"txBUUpmixSjuZ5Ad69p1sX\"><div
                      class=\"Unsubscribe--addressLine\"><p
                      class=\"Unsubscribe--senderName\"
                      style=\"font-family:arial,helvetica,sans-serif;
                      font-size:12px; line-height:20px;\">{{Sender_Name}}</p><p
                      style=\"font-family:arial,helvetica,sans-serif;
                      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-family:arial,helvetica,sans-serif;
                      font-size:12px; line-height:20px;\"><a
                      class=\"Unsubscribe--unsubscribeLink\"
                      href=\"{{{unsubscribe}}}\" 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>"
                    id: 6ad69134-7165-48cb-964a-6c3cf03e8af8
                    name: Off Grid Adventures
                    plain_content: "You've found the secret!


                      Welcome to the family!


                      You've found a community of travelers that are just like
                      you.


                      We don't want to be stuck in tourist traps that isolate us
                      from vibrant, local experiences. We want to discover the
                      hidden gems and less-traveled roads of our next
                      destination.


                      Ready for your next authentic travel experience?


                      Browse Gallery


                      ( https://www.facebook.com/sendgrid/ ) (
                      https://twitter.com/sendgrid?ref_src=twsrc%5egoogle%7ctwcamp%5eserp%7ctwgr%5eauthor
                      ) ( https://www.instagram.com/sendgrid/?hl=en ) (
                      https://www.pinterest.com/sendgrid/ )


                      {{Sender_Name}}


                      {{Sender_Address}} , {{Sender_City}} , {{Sender_State}}
                      {{Sender_Zip}}


                      Unsubscribe ( {{{unsubscribe}}} ) - Unsubscribe
                      Preferences ( {{{unsubscribe_preferences}}} )"
                    subject: Welcome to the family!
                    thumbnail_url: //us-east-2-production-thumbnail-bucket.s3.amazonaws.com/a85b4b202ff28094828f11ff472360caecf67ead2d186b69b45c904b9251aa0b.png
                    updated_at: '2021-01-11T21:47:52Z'
              schema:
                $ref: '#/components/schemas/design-output'
          description: ''
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api-errors'
          description: ''
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api-errors'
          description: ''
      security:
        - Authorization: []
      summary: Get SendGrid Pre-built Design
      tags:
        - Designs API
    parameters:
      - description: The ID of the pre-built Design you want to duplicate.
        in: path
        name: id
        required: true
        schema:
          format: uuid
          type: string
    post:
      description: '**This endpoint allows you to duplicate one of the pre-built
        Twilio SendGrid designs**.


        Like duplicating one of your existing designs, you are not required to
        pass any data in the body of a request to this endpoint. If you choose
        to leave the `name` field blank, your duplicate will be assigned the
        name of the design it was copied from with the text "Duplicate: "
        prepended to it. This name change is only a convenience, as the
        duplicate design will be assigned a unique ID that differentiates it
        from your other designs. You can retrieve the IDs for Twilio SendGrid
        pre-built designs using the "List SendGrid Pre-built Designs" endpoint.


        You can modify your duplicate’s name at the time of creation by passing
        an updated value to the `name` field when making the initial request.

        More on retrieving design IDs can be found above.'
      operationId: POST-sendgrid-pre-built-design
      requestBody:
        $ref: '#/components/requestBodies/design-duplicate-input'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    categories: []
                    created_at: '2021-04-30T19:15:28Z'
                    editor: design
                    generate_plain_content: true
                    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:
                      courier, monospace;\n      font-size:
                      16px;\n    }\n    body {\n      color:
                      #FFFFFF;\n    }\n    body a {\n      color:
                      #fe5d61;\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    @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-->\n\n     <!--End Head user
                      entered-->\n    </head>\n    <body>\n      <center
                      class=\"wrapper\" data-link-color=\"#fe5d61\"
                      data-body-style=\"font-size:16px; font-family:courier,
                      monospace; color:#FFFFFF;
                      background-color:#f2f4fb;\">\n        <div
                      class=\"webkit\">\n          <table cellpadding=\"0\"
                      cellspacing=\"0\" border=\"0\" width=\"100%\"
                      class=\"wrapper\"
                      bgcolor=\"#f2f4fb\">\n            <tr>\n              <td
                      valign=\"top\" bgcolor=\"#f2f4fb\"
                      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:#FFFFFF; text-align:left;\" bgcolor=\"#f2f4fb\"
                      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>You've found the
                      secret!</p>\n      </td>\n    </tr>\n  </table><table
                      class=\"\
                      wrapper\" role=\"module\" data-type=\"image\" border=\"0\"
                      cellpadding=\"0\" cellspacing=\"0\" width=\"100%\"
                      style=\"table-layout: fixed;\"
                      data-muid=\"98ndJyAY9BSGjoVqrr6FYx\">\n      <tbody><tr>\n        <td
                      style=\"font-size:6px; line-height:10px; padding:30px 0px
                      30px 0px;\" valign=\"top\" align=\"left\"><img
                      class=\"max-width\" border=\"0\" style=\"display:block;
                      color:#000000; text-decoration:none;
                      font-family:Helvetica, arial, sans-serif; font-size:16px;
                      max-width:40% !important; width:40%; height:auto
                      !important;\"
                      src=\"https://mc.sendgrid.com/assets/uploads/9d9c1f3d8009c42bbe60c0355f1ed23e86c3f5619173e83a9328b9214e42e1c1d5e009ed5cc4c8f3efedfc33d46bba2f4577b143607025a29add6e89ab4662ad.png\"
                      alt=\"Off Grid Adventures\" width=\"240\"
                      data-responsive=\"true\"
                      data-proportionally-constrained=\"false\"></td>\n      </tr>\n    </tbody></table><table
                      class=\"wrapper\" role=\"module\" data-type=\"image\"
                      border=\"0\" cellpadding=\"0\" cellspacing=\"0\"
                      width=\"100%\"\
                      \ style=\"table-layout: fixed;\"
                      data-muid=\"3Ypdby9Xfsf2rN27zTDEfN\">\n      <tbody><tr>\n        <td
                      style=\"font-size:6px; line-height:10px; padding:0px 0px
                      0px 0px;\" valign=\"top\" align=\"center\"><img
                      class=\"max-width\" border=\"0\" style=\"display:block;
                      color:#000000; text-decoration:none;
                      font-family:Helvetica, arial, sans-serif; font-size:16px;
                      max-width:100% !important; width:100%; height:auto
                      !important;\"
                      src=\"https://mc.sendgrid.com/assets/uploads/e324b295c47223f1a936198fbd4e5d4b239ff86c6d6c89d4d0eb8d7c61028921abfc4901ba607f6dcb7acc7067bb0c6df4313726b14b8274e0b2c98cdf8b58d2.png\"
                      alt=\"\" width=\"600\" data-responsive=\"true\"
                      data-proportionally-constrained=\"false\"></td>\n      </tr>\n    </tbody></table><table
                      class=\"module\" role=\"module\" data-type=\"text\"
                      border=\"0\" cellpadding=\"0\" cellspacing=\"0\"
                      width=\"100%\" style=\"table-layout: fixed;\"
                      data-muid=\"7pyDCmyDaGcm5WsBBSaEgv\"
                      data-mc-module-version=\"2019-10-22\">\n      <tbody><tr>\n\
                      \        <td style=\"background-color:#FE5D61;
                      padding:50px 0px 30px 0px; line-height:22px;
                      text-align:inherit;\" height=\"100%\" valign=\"top\"
                      bgcolor=\"#FE5D61\"><div><div style=\"font-family:
                      inherit; text-align: center\"><span style=\"font-size:
                      24px\">Welcome to the
                      family!</span></div><div></div></div></td>\n      </tr>\n    </tbody></table><table
                      class=\"module\" role=\"module\" data-type=\"text\"
                      border=\"0\" cellpadding=\"0\" cellspacing=\"0\"
                      width=\"100%\" style=\"table-layout: fixed;\"
                      data-muid=\"nSVYnVzPLnGZ4wUdynLiKo\"
                      data-mc-module-version=\"2019-10-22\">\n      <tbody><tr>\n        <td
                      style=\"background-color:#fe5d61; padding:30px 50px 30px
                      50px; line-height:22px; text-align:inherit;\"
                      height=\"100%\" valign=\"top\"
                      bgcolor=\"#fe5d61\"><div><div style=\"font-family:
                      inherit; text-align: center\">You've found a community of
                      travelers that are just like you.</div>\n<div
                      style=\"font-family: inherit; text-align:
                      center\">&nbsp;</div>\n<div style=\"\
                      font-family: inherit; text-align: center\">We don't want
                      to be stuck in tourist traps that isolate us from vibrant,
                      local experiences. We want to discover the hidden gems and
                      less-traveled roads of our next destination.</div>\n<div
                      style=\"font-family: inherit; text-align:
                      center\">&nbsp;</div>\n<div style=\"font-family: inherit;
                      text-align: center\">Ready for your next authentic travel
                      experience?</div><div></div></div></td>\n      </tr>\n    </tbody></table><table
                      border=\"0\" cellpadding=\"0\" cellspacing=\"0\"
                      class=\"module\" data-role=\"module-button\"
                      data-type=\"button\" role=\"module\"
                      style=\"table-layout:fixed\" width=\"100%\"
                      data-muid=\"4ywPd9vJ6WFyV1Si75h9vh\"><tbody><tr><td
                      align=\"center\" bgcolor=\"#fe5d61\" class=\"outer-td\"
                      style=\"padding:10px 10px 60px 10px;
                      background-color:#fe5d61;\"><table border=\"0\"
                      cellpadding=\"0\" cellspacing=\"0\"
                      class=\"button-css__deep-table___2OZyb wrapper-mobile\"
                      style=\"text-align:center\"><tbody><tr><td align=\"\
                      center\" bgcolor=\"#ffffff\" class=\"inner-td\"
                      style=\"border-radius:6px; font-size:16px;
                      text-align:center; background-color:inherit;\"><a
                      style=\"background-color:#ffffff; border:1px solid
                      #ffffff; border-color:#ffffff; border-radius:3px;
                      border-width:1px; color:#fe5d61; display:inline-block;
                      font-size:16px; font-weight:700; letter-spacing:1px;
                      line-height:40px; padding:12px 20px 12px 20px;
                      text-align:center; text-decoration:none;
                      border-style:solid;\" href=\"\" target=\"_blank\">Browse
                      Gallery</a></td></tr></tbody></table></td></tr></tbody></table><table
                      class=\"wrapper\" role=\"module\" data-type=\"image\"
                      border=\"0\" cellpadding=\"0\" cellspacing=\"0\"
                      width=\"100%\" style=\"table-layout: fixed;\"
                      data-muid=\"6jxKSRk9dKQ1Tvi1wtnu8q\">\n      <tbody><tr>\n        <td
                      style=\"font-size:6px; line-height:10px; padding:0px 0px
                      0px 0px;\" valign=\"top\" align=\"center\"><img
                      class=\"max-width\" border=\"0\" style=\"display:block;
                      color:#000000; text-decoration:none;\
                      \ font-family:Helvetica, arial, sans-serif;
                      font-size:16px; max-width:100% !important; width:100%;
                      height:auto !important;\"
                      src=\"https://mc.sendgrid.com/assets/uploads/0accac77b1e34c614730ab732317a493478835c96bd549fb2df7a921ec1177fdb30d6d33e1d0a33d8c6c579344890ae408ce13aaed0e478f1fd6d2219d308365.png\"
                      alt=\"\" width=\"600\" data-responsive=\"true\"
                      data-proportionally-constrained=\"false\"></td>\n      </tr>\n    </tbody></table><table
                      class=\"module\" role=\"module\" data-type=\"spacer\"
                      border=\"0\" cellpadding=\"0\" cellspacing=\"0\"
                      width=\"100%\" style=\"table-layout: fixed;\"
                      data-muid=\"iYySZ4rAB78PLoW7vU13Bb\">\n      <tbody><tr>\n        <td
                      style=\"padding:0px 0px 30px 0px;\"
                      role=\"module-content\"
                      bgcolor=\"\">\n        </td>\n      </tr>\n    </tbody></table><table
                      class=\"module\" role=\"module\" data-type=\"divider\"
                      border=\"0\" cellpadding=\"0\" cellspacing=\"0\"
                      width=\"100%\" style=\"table-layout: fixed;\"
                      data-muid=\"mVyZz43HETwfwb72TGh4iy\">\n\
                      \      <tbody><tr>\n        <td style=\"padding:0px 0px
                      0px 0px;\" role=\"module-content\" height=\"100%\"
                      valign=\"top\" bgcolor=\"\">\n          <table
                      border=\"0\" cellpadding=\"0\" cellspacing=\"0\"
                      align=\"center\" width=\"100%\" height=\"3px\"
                      style=\"line-height:3px;
                      font-size:3px;\">\n            <tbody><tr>\n              <td
                      style=\"padding:0px 0px 3px 0px;\"
                      bgcolor=\"#ffffff\"></td>\n            </tr>\n          </tbody></table>\n        </td>\n      </tr>\n    </tbody></table><table
                      class=\"module\" role=\"module\" data-type=\"spacer\"
                      border=\"0\" cellpadding=\"0\" cellspacing=\"0\"
                      width=\"100%\" style=\"table-layout: fixed;\"
                      data-muid=\"sfek66tVLi5d2iy5jmSawj\">\n      <tbody><tr>\n        <td
                      style=\"padding:0px 0px 30px 0px;\"
                      role=\"module-content\"
                      bgcolor=\"\">\n        </td>\n      </tr>\n    </tbody></table><table
                      class=\"module\" role=\"module\" data-type=\"social\"
                      align=\"center\" border=\"0\" cellpadding=\"0\"
                      cellspacing=\"0\" width=\"100%\"\
                      \ style=\"table-layout: fixed;\"
                      data-muid=\"87277ffe-54ed-4792-94f3-0a973b71c268\">\n    <tbody>\n      <tr>\n        <td
                      valign=\"top\" style=\"padding:0px 0px 0px 0px;
                      font-size:6px; line-height:10px;\"
                      align=\"center\">\n          <table align=\"center\"
                      style=\"-webkit-margin-start:auto;-webkit-margin-end:auto;\">\n            <tbody><tr
                      align=\"center\"><td style=\"padding: 0px 5px;\"
                      class=\"social-icon-column\">\n      <a
                      role=\"social-icon-link\"
                      href=\"https://www.facebook.com/sendgrid/\"
                      target=\"_blank\" alt=\"Facebook\" title=\"Facebook\"
                      style=\"display:inline-block; background-color:#FE5D61;
                      height:30px; width:30px; border-radius:2px;
                      -webkit-border-radius:2px;
                      -moz-border-radius:2px;\">\n        <img
                      role=\"social-icon\" alt=\"Facebook\" title=\"Facebook\"
                      src=\"https://mc.sendgrid.com/assets/social/white/facebook.png\"
                      style=\"height:30px; width:30px;\" height=\"30\"
                      width=\"30\">\n      </a>\n    </td><td style=\"padding:
                      0px 5px;\" class=\"social-icon-column\"\
                      >\n      <a role=\"social-icon-link\"
                      href=\"https://twitter.com/sendgrid?ref_src=twsrc%5egoogle%7ctwcamp%5eserp%7ctwgr%5eauthor\"
                      target=\"_blank\" alt=\"Twitter\" title=\"Twitter\"
                      style=\"display:inline-block; background-color:#FE5D61;
                      height:30px; width:30px; border-radius:2px;
                      -webkit-border-radius:2px;
                      -moz-border-radius:2px;\">\n        <img
                      role=\"social-icon\" alt=\"Twitter\" title=\"Twitter\"
                      src=\"https://mc.sendgrid.com/assets/social/white/twitter.png\"
                      style=\"height:30px; width:30px;\" height=\"30\"
                      width=\"30\">\n      </a>\n    </td><td style=\"padding:
                      0px 5px;\" class=\"social-icon-column\">\n      <a
                      role=\"social-icon-link\"
                      href=\"https://www.instagram.com/sendgrid/?hl=en\"
                      target=\"_blank\" alt=\"Instagram\" title=\"Instagram\"
                      style=\"display:inline-block; background-color:#FE5D61;
                      height:30px; width:30px; border-radius:2px;
                      -webkit-border-radius:2px;
                      -moz-border-radius:2px;\">\n        <img
                      role=\"social-icon\" alt=\"Instagram\"
                      title=\"Instagram\"\
                      \
                      src=\"https://mc.sendgrid.com/assets/social/white/instagram.png\"
                      style=\"height:30px; width:30px;\" height=\"30\"
                      width=\"30\">\n      </a>\n    </td><td style=\"padding:
                      0px 5px;\" class=\"social-icon-column\">\n      <a
                      role=\"social-icon-link\"
                      href=\"https://www.pinterest.com/sendgrid/\"
                      target=\"_blank\" alt=\"Pinterest\" title=\"Pinterest\"
                      style=\"display:inline-block; background-color:#FE5D61;
                      height:30px; width:30px; border-radius:2px;
                      -webkit-border-radius:2px;
                      -moz-border-radius:2px;\">\n        <img
                      role=\"social-icon\" alt=\"Pinterest\" title=\"Pinterest\"
                      src=\"https://mc.sendgrid.com/assets/social/white/pinterest.png\"
                      style=\"height:30px; width:30px;\" height=\"30\"
                      width=\"30\">\n      </a>\n    </td></tr></tbody>\n          </table>\n        </td>\n      </tr>\n    </tbody>\n  </table><div
                      data-role=\"module-unsubscribe\" class=\"module
                      unsubscribe-css__unsubscribe___2CDlR\" role=\"module\"
                      data-type=\"unsubscribe\" style=\"color:#FFFFFF;
                      font-size:12px;\
                      \ line-height:20px; padding:16px 16px 16px 16px;
                      text-align:center;\"
                      data-muid=\"txBUUpmixSjuZ5Ad69p1sX\"><div
                      class=\"Unsubscribe--addressLine\"><p
                      class=\"Unsubscribe--senderName\"
                      style=\"font-family:arial,helvetica,sans-serif;
                      font-size:12px; line-height:20px;\">{{Sender_Name}}</p><p
                      style=\"font-family:arial,helvetica,sans-serif;
                      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-family:arial,helvetica,sans-serif;
                      font-size:12px; line-height:20px;\"><a
                      class=\"Unsubscribe--unsubscribeLink\"
                      href=\"{{{unsubscribe}}}\" 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>"
                    id: abe0877f-a224-21e2-b62e-c789d326cda5
                    name: Ahoy, Pre-built Design!
                    plain_content: "You've found the secret!


                      Welcome to the family!


                      You've found a community of travelers that are just like
                      you.


                      We don't want to be stuck in tourist traps that isolate us
                      from vibrant, local experiences. We want to discover the
                      hidden gems and less-traveled roads of our next
                      destination.


                      Ready for your next authentic travel experience?


                      Browse Gallery


                      ( https://www.facebook.com/sendgrid/ ) (
                      https://twitter.com/sendgrid?ref_src=twsrc%5egoogle%7ctwcamp%5eserp%7ctwgr%5eauthor
                      ) ( https://www.instagram.com/sendgrid/?hl=en ) (
                      https://www.pinterest.com/sendgrid/ )


                      {{Sender_Name}}


                      {{Sender_Address}} , {{Sender_City}} , {{Sender_State}}
                      {{Sender_Zip}}


                      Unsubscribe ( {{{unsubscribe}}} ) - Unsubscribe
                      Preferences ( {{{unsubscribe_preferences}}} )"
                    subject: Welcome to the family!
                    thumbnail_url: //us-east-2-production-thumbnail-bucket.s3.amazonaws.com/a85b4b202ff28094828f11ff472360caecf67ead2d186b69b45c904b9251aa0b.png
                    updated_at: '2021-04-30T19:15:28Z'
              schema:
                $ref: '#/components/schemas/design-output'
          description: ''
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api-errors'
          description: ''
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api-errors'
          description: ''
      security:
        - Authorization: []
      summary: Duplicate SendGrid Pre-built Design
      tags:
        - Designs API
  /designs/{id}:
    delete:
      description: '**This endpoint allows you to delete a single design**.


        Be sure to check the ID of the design you intend to delete before making
        this request; deleting a design is a permanent action.'
      operationId: DELETE-design
      responses:
        '204':
          content:
            application/json:
              schema:
                type: object
          description: ''
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api-errors'
          description: ''
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api-errors'
          description: ''
      security:
        - Authorization: []
      summary: Delete Design
      tags:
        - Designs API
    get:
      description: '**This endpoint allows you to retrieve a single design**.


        A GET request to `/designs/{id}` will retrieve details about a specific
        design in your Design Library.


        This endpoint is valuable when retrieving information stored in a field
        that you wish to update using a PATCH request.'
      operationId: GET-design
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    categories: []
                    created_at: '2021-04-30T18:51:20Z'
                    editor: design
                    generate_plain_content: false
                    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>"
                    id: 15b85720-ce48-48ef-8a07-672b0d3455da
                    name: Ahoy, World!
                    plain_content: 'Ahoy, World!


                      {{Sender_Name}}


                      {{Sender_Address}} , {{Sender_City}} , {{Sender_State}}
                      {{Sender_Zip}}


                      Unsubscribe ( {{{unsubscribe}}} ) - Unsubscribe
                      Preferences ( {{{unsubscribe_preferences}}} )'
                    subject: Getting Started
                    thumbnail_url: //us-east-2-production-thumbnail-bucket.s3.amazonaws.com/5yysvuyi1lpdnxo1ym8ax8yd7ompve3azjtme76gamdace01vko3eyn1kzso1lhy.png
                    updated_at: '2021-04-30T18:51:20Z'
              schema:
                $ref: '#/components/schemas/design-output'
          description: ''
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api-errors'
          description: ''
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api-errors'
          description: ''
      security:
        - Authorization: []
      summary: Get Design
      tags:
        - Designs API
    parameters:
      - description: The ID of the Design you want to duplicate.
        in: path
        name: id
        required: true
        schema:
          format: uuid
          type: string
    patch:
      description:
        "**This endpoint allows you to edit a design**.\n\nThe Design API
        supports PATCH requests, which allow you to make partial updates to a
        single design. Passing data to a specific field will update only the
        data stored in that field; all other fields will be unaltered.\n\nFor
        example, updating a design's name requires that you make a PATCH request
        to this endpoint with data specified for the `name` field
        only.\n\n```\n{\n    \"name\": \"<Updated Name>\"\n}\n```"
      operationId: PUT-design
      requestBody:
        content:
          application/json:
            schema:
              example:
                categories:
                  - promotions
                generate_plain_content: false
                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>"
                name: Ahoy, World!
                subject: Getting Started
              properties:
                categories:
                  description: The list of categories applied to the design
                  items:
                    maxLength: 255
                    type: string
                  maxItems: 10
                  type: array
                  uniqueItems: true
                generate_plain_content:
                  default: true
                  description:
                    If true, plain_content is always generated from
                    html_content. If false, plain_content is not altered.
                  type: boolean
                html_content:
                  description: The HTML content of the Design.
                  maxLength: 1048576
                  type: string
                name:
                  default: My Design
                  description: Name of the Design.
                  maxLength: 100
                  type: string
                plain_content:
                  default: <generated from html_content if left empty>
                  description: Plain text content of the Design.
                  maxLength: 1048576
                  type: string
                subject:
                  description: Subject of the Design.
                  maxLength: 5000
                  type: string
              type: object
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    categories:
                      - promotions
                    created_at: '2021-04-30T18:51:20Z'
                    editor: design
                    generate_plain_content: false
                    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>"
                    id: 15b85720-ce48-48ef-8a07-672b0d3455da
                    name: Ahoy, World!
                    subject: Getting Started
                    thumbnail_url: //us-east-2-production-thumbnail-bucket.s3.amazonaws.com/5yysvuyi1lpdnxo1ym8ax8yd7ompve3azjtme76gamdace01vko3eyn1kzso1lhy.png
                    updated_at: '2021-04-30T18:51:20Z'
              schema:
                $ref: '#/components/schemas/design-output'
          description: ''
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api-errors'
          description: ''
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api-errors'
          description: ''
      security:
        - Authorization: []
      summary: Update Design
      tags:
        - Designs API
    post:
      description: '**This endpoint allows you to duplicate one of your existing
        designs**.


        Modifying an existing design is often the easiest way to create
        something new.


        You are not required to pass any data in the body of a request to this
        endpoint. If you choose to leave the `name` field blank, your duplicate
        will be assigned the name of the design it was copied from with the text
        "Duplicate: " prepended to it. This name change is only a convenience,
        as the duplicate will be assigned a unique ID that differentiates it
        from your other designs.


        You can modify your duplicate’s name at the time of creation by passing
        an updated value to the `name` field when making the initial request.

        More on retrieving design IDs can be found below.'
      operationId: POST-design
      requestBody:
        $ref: '#/components/requestBodies/design-duplicate-input'
      responses:
        '201':
          content:
            application/json:
              examples:
                response:
                  value:
                    categories: []
                    created_at: '2021-04-30T19:00:16Z'
                    editor: design
                    generate_plain_content: false
                    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>"
                    id: 15b85720-ce48-48ef-8a07-672b0d3455da
                    name: Ahoy, Cake or Pie Cafe!
                    plain_content: 'Ahoy, World!


                      {{Sender_Name}}


                      {{Sender_Address}} , {{Sender_City}} , {{Sender_State}}
                      {{Sender_Zip}}


                      Unsubscribe ( {{{unsubscribe}}} ) - Unsubscribe
                      Preferences ( {{{unsubscribe_preferences}}} )'
                    subject: Getting Started
                    thumbnail_url: //us-east-2-production-thumbnail-bucket.s3.amazonaws.com/79bb769ae6464960a307040120ad6f9921896fe9825e845ad1f24d12285ea068.png
                    updated_at: '2021-04-30T19:00:16Z'
              schema:
                $ref: '#/components/schemas/design-output'
          description: ''
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api-error'
          description: ''
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api-errors'
          description: ''
      security:
        - Authorization: []
      summary: Duplicate Design
      tags:
        - Designs API
  /devices/stats:
    get:
      description: "**This endpoint allows you to retrieve your email statistics
        segmented by the device type.**\n\n**We only store up to 7 days of email
        activity in our database.** By default, 500 items will be returned per
        request via the Advanced Stats API endpoints.\n\n## Available Device
        Types\n| **Device** | **Description** | **Example** |\n|---|---|---|\n|
        Desktop | Email software on desktop computer. | I.E., Outlook, Sparrow,
        or Apple Mail. |\n| Webmail |\tA web-based email client. | I.E., Yahoo,
        Google, AOL, or Outlook.com. |\n| Phone | A smart phone. | iPhone,
        Android, Blackberry, etc.\n| Tablet | A tablet computer. | iPad, android
        based tablet, etc. |\n| Other | An unrecognized device. |\n\nAdvanced
        Stats provide a more in-depth view of your email statistics and the
        actions taken by your recipients. You can segment these statistics by
        geographic location, device type, client type, browser, and mailbox
        provider. For more information about statistics, please see our
        [Statistics\
        \
        Overview](https://sendgrid.com/docs/ui/analytics-and-reporting/stats-overview/)."
      operationId: GET_devices-stats
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
        - $ref: '#/components/parameters/trait_statsAdvancedQueryStringsLimitOffset_limit'
        - $ref: '#/components/parameters/trait_statsAdvancedQueryStringsLimitOffset_offset'
        - $ref: '#/components/parameters/trait_statsAdvancedQueryStringsLimitOffset_aggregated_by'
        - $ref: '#/components/parameters/trait_statsAdvancedQueryStringsLimitOffset_start_date'
        - $ref: '#/components/parameters/trait_statsAdvancedQueryStringsLimitOffset_end_date'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    - date: '2015-10-11'
                      stats:
                        - metrics:
                            opens: 0
                            unique_opens: 0
                          name: Webmail
                          type: device
                    - date: '2015-10-12'
                      stats:
                        - metrics:
                            opens: 0
                            unique_opens: 0
                          name: Webmail
                          type: device
                    - date: '2015-10-13'
                      stats:
                        - metrics:
                            opens: 0
                            unique_opens: 0
                          name: Webmail
                          type: device
                    - date: '2015-10-14'
                      stats:
                        - metrics:
                            opens: 0
                            unique_opens: 0
                          name: Webmail
                          type: device
                    - date: '2015-10-15'
                      stats:
                        - metrics:
                            opens: 0
                            unique_opens: 0
                          name: Webmail
                          type: device
                    - date: '2015-10-16'
                      stats:
                        - metrics:
                            opens: 0
                            unique_opens: 0
                          name: Webmail
                          type: device
                    - date: '2015-10-17'
                      stats:
                        - metrics:
                            opens: 0
                            unique_opens: 0
                          name: Webmail
                          type: device
                    - date: '2015-10-18'
                      stats:
                        - metrics:
                            opens: 0
                            unique_opens: 0
                          name: Webmail
                          type: device
                    - date: '2015-10-19'
                      stats:
                        - metrics:
                            opens: 0
                            unique_opens: 0
                          name: Webmail
                          type: device
                    - date: '2015-10-20'
                      stats:
                        - metrics:
                            opens: 0
                            unique_opens: 0
                          name: Webmail
                          type: device
                    - date: '2015-10-21'
                      stats:
                        - metrics:
                            opens: 1
                            unique_opens: 1
                          name: Webmail
                          type: device
                    - date: '2015-10-22'
                      stats:
                        - metrics:
                            opens: 0
                            unique_opens: 0
                          name: Webmail
                          type: device
                    - date: '2015-10-23'
                      stats:
                        - metrics:
                            opens: 0
                            unique_opens: 0
                          name: Webmail
                          type: device
                    - date: '2015-10-24'
                      stats:
                        - metrics:
                            opens: 0
                            unique_opens: 0
                          name: Webmail
                          type: device
                    - date: '2015-10-25'
                      stats:
                        - metrics:
                            opens: 0
                            unique_opens: 0
                          name: Webmail
                          type: device
                    - date: '2015-10-26'
                      stats:
                        - metrics:
                            opens: 2
                            unique_opens: 2
                          name: Webmail
                          type: device
                    - date: '2015-10-27'
                      stats:
                        - metrics:
                            opens: 0
                            unique_opens: 0
                          name: Webmail
                          type: device
                    - date: '2015-10-28'
                      stats:
                        - metrics:
                            opens: 0
                            unique_opens: 0
                          name: Webmail
                          type: device
                    - date: '2015-10-29'
                      stats:
                        - metrics:
                            opens: 0
                            unique_opens: 0
                          name: Webmail
                          type: device
                    - date: '2015-10-30'
                      stats:
                        - metrics:
                            opens: 0
                            unique_opens: 0
                          name: Webmail
                          type: device
                    - date: '2015-10-31'
                      stats:
                        - metrics:
                            opens: 0
                            unique_opens: 0
                          name: Webmail
                          type: device
                    - date: '2015-11-01'
                      stats:
                        - metrics:
                            opens: 0
                            unique_opens: 0
                          name: Webmail
                          type: device
                    - date: '2015-11-02'
                      stats:
                        - metrics:
                            opens: 0
                            unique_opens: 0
                          name: Webmail
                          type: device
                    - date: '2015-11-03'
                      stats:
                        - metrics:
                            opens: 0
                            unique_opens: 0
                          name: Webmail
                          type: device
                    - date: '2015-11-04'
                      stats:
                        - metrics:
                            opens: 0
                            unique_opens: 0
                          name: Webmail
                          type: device
                    - date: '2015-11-05'
                      stats:
                        - metrics:
                            opens: 0
                            unique_opens: 0
                          name: Webmail
                          type: device
                    - date: '2015-11-06'
                      stats:
                        - metrics:
                            opens: 0
                            unique_opens: 0
                          name: Webmail
                          type: device
                    - date: '2015-11-07'
                      stats:
                        - metrics:
                            opens: 0
                            unique_opens: 0
                          name: Webmail
                          type: device
                    - date: '2015-11-08'
                      stats:
                        - metrics:
                            opens: 0
                            unique_opens: 0
                          name: Webmail
                          type: device
                    - date: '2015-11-09'
                      stats:
                        - metrics:
                            opens: 0
                            unique_opens: 0
                          name: Webmail
                          type: device
                    - date: '2015-11-10'
                      stats:
                        - metrics:
                            opens: 0
                            unique_opens: 0
                          name: Webmail
                          type: device
              schema:
                items:
                  properties:
                    date:
                      description: The date that the statistics were gathered.
                      type: string
                    stats:
                      description: The list of statistics.
                      items:
                        properties:
                          metrics:
                            $ref: '#/components/schemas/advanced_stats_opens'
                          name:
                            description: The name of the specific segmentation.
                            type: string
                          type:
                            description: The type of segmentation.
                            type: string
                        type: object
                      type: array
                  type: object
                type: array
          description: ''
      security:
        - Authorization: []
      summary: Retrieve email statistics by device type.
      tags:
        - Stats
  /geo/stats:
    get:
      description: '**This endpoint allows you to retrieve your email statistics
        segmented by country and state/province.**


        **We only store up to 7 days of email activity in our database.** By
        default, 500 items will be returned per request via the Advanced Stats
        API endpoints.


        Advanced Stats provide a more in-depth view of your email statistics and
        the actions taken by your recipients. You can segment these statistics
        by geographic location, device type, client type, browser, and mailbox
        provider. For more information about statistics, please see our [User
        Guide](https://sendgrid.com/docs/User_Guide/Statistics/index.html).'
      operationId: GET_geo-stats
      parameters:
        - description:
            The country you would like to see statistics for. Currently only
            supported for US and CA.
          in: query
          name: country
          schema:
            enum:
              - US
              - CA
            type: string
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
        - $ref: '#/components/parameters/trait_statsAdvancedQueryStringsLimitOffset_limit'
        - $ref: '#/components/parameters/trait_statsAdvancedQueryStringsLimitOffset_offset'
        - $ref: '#/components/parameters/trait_statsAdvancedQueryStringsLimitOffset_aggregated_by'
        - $ref: '#/components/parameters/trait_statsAdvancedQueryStringsLimitOffset_start_date'
        - $ref: '#/components/parameters/trait_statsAdvancedQueryStringsLimitOffset_end_date'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    - date: '2015-10-11'
                      stats:
                        - metrics:
                            clicks: 0
                            opens: 0
                            unique_clicks: 0
                            unique_opens: 0
                          name: TX
                          type: province
                    - date: '2015-10-12'
                      stats:
                        - metrics:
                            clicks: 0
                            opens: 0
                            unique_clicks: 0
                            unique_opens: 0
                          name: TX
                          type: province
                    - date: '2015-10-13'
                      stats:
                        - metrics:
                            clicks: 0
                            opens: 0
                            unique_clicks: 0
                            unique_opens: 0
                          name: TX
                          type: province
                    - date: '2015-10-14'
                      stats:
                        - metrics:
                            clicks: 0
                            opens: 0
                            unique_clicks: 0
                            unique_opens: 0
                          name: TX
                          type: province
                    - date: '2015-10-15'
                      stats:
                        - metrics:
                            clicks: 0
                            opens: 0
                            unique_clicks: 0
                            unique_opens: 0
                          name: TX
                          type: province
                    - date: '2015-10-16'
                      stats:
                        - metrics:
                            clicks: 0
                            opens: 0
                            unique_clicks: 0
                            unique_opens: 0
                          name: TX
                          type: province
                    - date: '2015-10-17'
                      stats:
                        - metrics:
                            clicks: 0
                            opens: 0
                            unique_clicks: 0
                            unique_opens: 0
                          name: TX
                          type: province
                    - date: '2015-10-18'
                      stats:
                        - metrics:
                            clicks: 0
                            opens: 0
                            unique_clicks: 0
                            unique_opens: 0
                          name: TX
                          type: province
                    - date: '2015-10-19'
                      stats:
                        - metrics:
                            clicks: 0
                            opens: 0
                            unique_clicks: 0
                            unique_opens: 0
                          name: TX
                          type: province
                    - date: '2015-10-20'
                      stats:
                        - metrics:
                            clicks: 0
                            opens: 0
                            unique_clicks: 0
                            unique_opens: 0
                          name: TX
                          type: province
                    - date: '2015-10-21'
                      stats:
                        - metrics:
                            clicks: 0
                            opens: 1
                            unique_clicks: 0
                            unique_opens: 1
                          name: TX
                          type: province
                    - date: '2015-10-22'
                      stats:
                        - metrics:
                            clicks: 0
                            opens: 0
                            unique_clicks: 0
                            unique_opens: 0
                          name: TX
                          type: province
                    - date: '2015-10-23'
                      stats:
                        - metrics:
                            clicks: 0
                            opens: 0
                            unique_clicks: 0
                            unique_opens: 0
                          name: TX
                          type: province
                    - date: '2015-10-24'
                      stats:
                        - metrics:
                            clicks: 0
                            opens: 0
                            unique_clicks: 0
                            unique_opens: 0
                          name: TX
                          type: province
                    - date: '2015-10-25'
                      stats:
                        - metrics:
                            clicks: 0
                            opens: 0
                            unique_clicks: 0
                            unique_opens: 0
                          name: TX
                          type: province
                    - date: '2015-10-26'
                      stats:
                        - metrics:
                            clicks: 0
                            opens: 0
                            unique_clicks: 0
                            unique_opens: 0
                          name: TX
                          type: province
                    - date: '2015-10-27'
                      stats:
                        - metrics:
                            clicks: 0
                            opens: 0
                            unique_clicks: 0
                            unique_opens: 0
                          name: TX
                          type: province
                    - date: '2015-10-28'
                      stats:
                        - metrics:
                            clicks: 0
                            opens: 0
                            unique_clicks: 0
                            unique_opens: 0
                          name: TX
                          type: province
                    - date: '2015-10-29'
                      stats:
                        - metrics:
                            clicks: 0
                            opens: 0
                            unique_clicks: 0
                            unique_opens: 0
                          name: TX
                          type: province
                    - date: '2015-10-30'
                      stats:
                        - metrics:
                            clicks: 0
                            opens: 0
                            unique_clicks: 0
                            unique_opens: 0
                          name: TX
                          type: province
                    - date: '2015-10-31'
                      stats:
                        - metrics:
                            clicks: 0
                            opens: 0
                            unique_clicks: 0
                            unique_opens: 0
                          name: TX
                          type: province
                    - date: '2015-11-01'
                      stats:
                        - metrics:
                            clicks: 0
                            opens: 0
                            unique_clicks: 0
                            unique_opens: 0
                          name: TX
                          type: province
                    - date: '2015-11-02'
                      stats:
                        - metrics:
                            clicks: 0
                            opens: 0
                            unique_clicks: 0
                            unique_opens: 0
                          name: TX
                          type: province
                    - date: '2015-11-03'
                      stats:
                        - metrics:
                            clicks: 0
                            opens: 0
                            unique_clicks: 0
                            unique_opens: 0
                          name: TX
                          type: province
                    - date: '2015-11-04'
                      stats:
                        - metrics:
                            clicks: 0
                            opens: 0
                            unique_clicks: 0
                            unique_opens: 0
                          name: TX
                          type: province
                    - date: '2015-11-05'
                      stats:
                        - metrics:
                            clicks: 0
                            opens: 0
                            unique_clicks: 0
                            unique_opens: 0
                          name: TX
                          type: province
                    - date: '2015-11-06'
                      stats:
                        - metrics:
                            clicks: 0
                            opens: 0
                            unique_clicks: 0
                            unique_opens: 0
                          name: TX
                          type: province
                    - date: '2015-11-07'
                      stats:
                        - metrics:
                            clicks: 0
                            opens: 0
                            unique_clicks: 0
                            unique_opens: 0
                          name: TX
                          type: province
                    - date: '2015-11-08'
                      stats:
                        - metrics:
                            clicks: 0
                            opens: 0
                            unique_clicks: 0
                            unique_opens: 0
                          name: TX
                          type: province
                    - date: '2015-11-09'
                      stats:
                        - metrics:
                            clicks: 0
                            opens: 0
                            unique_clicks: 0
                            unique_opens: 0
                          name: TX
                          type: province
                    - date: '2015-11-10'
                      stats:
                        - metrics:
                            clicks: 0
                            opens: 0
                            unique_clicks: 0
                            unique_opens: 0
                          name: TX
                          type: province
              schema:
                items:
                  properties:
                    date:
                      description: The date that the statistics were gathered.
                      type: string
                    stats:
                      description: The list of statistics.
                      items:
                        properties:
                          metrics:
                            $ref: '#/components/schemas/advanced_stats_clicks_opens'
                          name:
                            description: The name of the specific segmentation.
                            type: string
                          type:
                            description: The type of segmentation.
                            type: string
                        type: object
                      type: array
                  type: object
                type: array
          description: ''
      security:
        - Authorization: []
      summary: Retrieve email statistics by country and state/province.
      tags:
        - Stats
  /ips:
    get:
      description: '**This endpoint allows you to retrieve a list of all
        assigned and unassigned IPs.**


        Response includes warm up status, pools, assigned subusers, and reverse
        DNS info. The start_date field corresponds to when warmup started for
        that IP.


        A single IP address or a range of IP addresses may be dedicated to an
        account in order to send email for multiple domains. The reputation of
        this IP is based on the aggregate performance of all the senders who use
        it.'
      operationId: GET_ips
      parameters:
        - description: The IP address to get
          in: query
          name: ip
          schema:
            type: string
        - description: Should we exclude reverse DNS records (whitelabels)?
          in: query
          name: exclude_whitelabels
          schema:
            type: boolean
        - description: The number of IPs you want returned at the same time.
          in: query
          name: limit
          schema:
            default: 10
            type: integer
        - description: The offset for the number of IPs that you are requesting.
          in: query
          name: offset
          schema:
            default: 0
            type: integer
        - description: The subuser you are requesting for.
          in: query
          name: subuser
          schema:
            type: string
        - description: The direction to sort the results.
          in: query
          name: sort_by_direction
          schema:
            enum:
              - desc
              - asc
            type: string
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    - assigned_at: 1482883200
                      ip: 192.168.1.1
                      pools:
                        - pool1
                        - pool2
                      start_date: 1409616000
                      subusers:
                        - tim@sendgrid.net
                      warmup: false
                      whitelabeled: false
                    - assigned_at: 1482883200
                      ip: 208.115.214.22
                      pools: []
                      rdns: o1.email.burgermail.com
                      start_date: 1409616000
                      subusers: []
                      warmup: false
                      whitelabeled: true
              schema:
                items:
                  properties:
                    assigned_at:
                      description:
                        The date that the IP address was assigned to the user.
                      nullable: true
                      type: integer
                    ip:
                      description: An IP address.
                      type: string
                    pools:
                      description: The IP pools that this IP has been added to.
                      items:
                        type: string
                      type: array
                    rdns:
                      description: The reverse DNS record for this IP address.
                      type: string
                    start_date:
                      description:
                        The date that the IP address was entered into warmup.
                      nullable: true
                      type: number
                    subusers:
                      description:
                        The subusers that are able to send email from this IP.
                      items:
                        type: string
                      type: array
                    warmup:
                      description:
                        Indicates if this IP address is currently warming up.
                      type: boolean
                    whitelabeled:
                      description:
                        Indicates if this IP address is associated with a
                        reverse DNS record.
                      type: boolean
                  required:
                    - ip
                    - subusers
                    - pools
                    - warmup
                    - start_date
                    - whitelabeled
                    - assigned_at
                  type: object
                type: array
          description: ''
      security:
        - Authorization: []
      summary: Retrieve all IP addresses
      tags:
        - IP Addresses
    post:
      description:
        '**This endpoint is for adding a(n) IP Address(es) to your account.**'
      operationId: POST_ips
      requestBody:
        content:
          application/json:
            schema:
              example:
                count: 90323478
                subusers:
                  - subuser1
                  - subuser2
                user_can_send: true
                warmup: true
              properties:
                count:
                  description: The amount of IPs to add to the account.
                  type: integer
                subusers:
                  description: Array of usernames to be assigned a send IP.
                  items:
                    type: string
                  type: array
                warmup:
                  default: false
                  description: Whether or not to warmup the IPs being added.
                  type: boolean
              required:
                - count
              type: object
      responses:
        '201':
          content:
            application/json:
              examples:
                response:
                  value:
                    ips:
                      - ip: 1.2.3.4
                        subusers:
                          - user
                          - subuser1
                      - ip: 1.2.3.5
                        subusers:
                          - user
                          - subuser1
                    remaining_ips: 1
                    warmup: true
              schema:
                properties:
                  ips:
                    description: List of IP objects.
                    items:
                      properties:
                        ip:
                          description: IP added to account.
                          type: string
                        subusers:
                          description: Array of usernames assigned a send IP.
                          items:
                            type: string
                          type: array
                      required:
                        - ip
                        - subusers
                      type: object
                    type: array
                  remaining_ips:
                    description:
                      The number of IPs that can still be added to the user.
                    type: integer
                  warmup:
                    description: Whether or not the IPs are being warmed up.
                    type: boolean
                required:
                  - ips
                  - remaining_ips
                  - warmup
                type: object
          description: ''
        '400':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: null
                        message: one or more subusers do not belong to this user
              schema:
                $ref: '#/components/schemas/global_error_response_schema'
          description: ''
      security:
        - Authorization: []
      summary: Add IPs
      tags:
        - IP Addresses
  /ips/assigned:
    get:
      description: '**This endpoint allows you to retrieve only assigned IP
        addresses.**


        A single IP address or a range of IP addresses may be dedicated to an
        account in order to send email for multiple domains. The reputation of
        this IP is based on the aggregate performance of all the senders who use
        it.'
      operationId: GET_ips-assigned
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    - ip: 167.89.21.3
                      pools:
                        - new_test5
                      start_date: 1409616000
                      warmup: true
              schema:
                items:
                  properties:
                    ip:
                      description: The IP address.
                      type: string
                    pools:
                      description:
                        The IP pools that this IP address has been added to.
                      items:
                        type: string
                      type: array
                    start_date:
                      description:
                        The start date that this IP address was entered into
                        warmup.
                      type: integer
                    warmup:
                      description:
                        Indicates if this IP address is currently warming up.
                      type: boolean
                  required:
                    - ip
                    - pools
                    - warmup
                    - start_date
                  type: object
                title: List all assigned IPs response
                type: array
          description: ''
      security:
        - Authorization: []
      summary: Retrieve all assigned IPs
      tags:
        - IP Addresses
  /ips/pools:
    get:
      description: '**This endpoint allows you to get all of your IP pools.**'
      operationId: GET_ips-pools
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    - name: marketing
                    - name: transactional
              schema:
                items:
                  $ref: '#/components/schemas/ip_pool_response'
                type: array
          description: ''
      security:
        - Authorization: []
      summary: Retrieve all IP pools
      tags:
        - IP Pools
    post:
      description:
        "**This endpoint allows you to create an IP pool.**\n\nBefore you can
        create an IP pool, you need to activate the IP in your SendGrid account:
        \n\n1. Log into your SendGrid account.  \n1. Navigate to **Settings**
        and then select **IP Addresses**.  \n1. Find the IP address you want to
        activate and then click **Edit**.  \n1. Check **Allow my account to send
        mail using this IP address**.\n1. Click **Save**."
      operationId: POST_ips-pools
      requestBody:
        content:
          application/json:
            schema:
              example:
                name: marketing
              properties:
                name:
                  description: The name of your new IP pool.
                  maxLength: 64
                  type: string
              required:
                - name
              type: object
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    name: marketing
              schema:
                $ref: '#/components/schemas/ip_pool_response'
          description: ''
      security:
        - Authorization: []
      summary: Create an IP pool
      tags:
        - IP Pools
  /ips/pools/{pool_name}:
    delete:
      description: '**This endpoint allows you to delete an IP pool.**'
      operationId: DELETE_ips-pools-pool_name
      responses:
        '204':
          content:
            application/json:
              schema:
                type: object
          description: ''
        '404':
          content:
            application/json:
              examples:
                response:
                  value:
                    error: Unable to locate specified IPs Pool
              schema:
                properties:
                  error:
                    description:
                      An error explaining why the pool could not be deleted.
                    type: string
                type: object
          description: ''
      security:
        - Authorization: []
      summary: Delete an IP pool
      tags:
        - IP Pools
    get:
      description:
        '**This endpoint allows you to get all of the IP addresses that are in a
        specific IP pool.**'
      operationId: GET_ips-pools-pool_name
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    ips:
                      - 192.168.1.1
                      - 192.158.1.2
                      - 192.138.2.1
                    pool_name: Sample
              schema:
                properties:
                  ips:
                    description: The IP addresses that belong to this pool.
                    items:
                      type: string
                    type: array
                  pool_name:
                    description: The name of the IP pool.
                    maxLength: 64
                    type: string
                type: object
          description: ''
        '404':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: error
                        message: Unable to locate specified IPs Pool
              schema:
                properties:
                  errors:
                    items:
                      properties:
                        field:
                          description: The name of the error.
                          type: string
                        message:
                          description:
                            A message explaining why the IP addresses could not
                            be listed.
                          type: string
                      type: object
                    type: array
                type: object
          description: ''
      security:
        - Authorization: []
      summary: Retrieve all the IPs in a specified pool
      tags:
        - IP Pools
    parameters:
      - description:
          The name of the IP pool that you want to retrieve the IP addresses
          for.
        in: path
        name: pool_name
        required: true
        schema:
          type: string
    put:
      description:
        '**This endpoint allows you to update the name of an IP pool.**'
      operationId: PUT_ips-pools-pool_name
      requestBody:
        content:
          application/json:
            schema:
              example:
                name: new_pool_name
              properties:
                name:
                  description: The new name for your IP pool.
                  maxLength: 64
                  type: string
              type: object
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    name: new_pool_name
              schema:
                $ref: '#/components/schemas/ip_pool_response'
          description: ''
        '404':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: null
                        message: ip pool not found
              schema:
                properties:
                  errors:
                    items:
                      properties:
                        field:
                          nullable: true
                        message:
                          description:
                            A message explaining why the name of your IP pool
                            could not be updated.
                          type: string
                      type: object
                    type: array
                type: object
          description: ''
      security:
        - Authorization: []
      summary: Rename an IP pool
      tags:
        - IP Pools
  /ips/pools/{pool_name}/ips:
    parameters:
      - description:
          The name of the IP pool you want to add the address to. If the name
          contains spaces, they must be URL encoded (e.g., "Test Pool" becomes
          "Test%20Pool").
        in: path
        name: pool_name
        required: true
        schema:
          type: string
    post:
      description:
        "**This endpoint allows you to add an IP address to an IP pool.**\n\nYou
        can add the same IP address to multiple pools. It may take up to 60
        seconds for your IP address to be added to a pool after your request is
        made.\n\nBefore you can add an IP to a pool, you need to activate it in
        your SendGrid account:\n\n1. Log into your SendGrid account.  \n1.
        Navigate to **Settings** and then select **IP Addresses**.  \n1. Find
        the IP address you want to activate and then click **Edit**.  \n1. Check
        **Allow my account to send mail using this IP address**.\n1. Click
        **Save**.\n\nYou can retrieve all of your available IP addresses from
        the \"Retrieve all IP addresses\" endpoint."
      operationId: POST_ips-pools-pool_name-ips
      requestBody:
        content:
          application/json:
            schema:
              example:
                ip: 0.0.0.0
              properties:
                ip:
                  description:
                    The IP address that you want to add to the named pool.
                  type: string
              type: object
      responses:
        '201':
          content:
            application/json:
              examples:
                response:
                  value:
                    ip: 000.00.00.0
                    pools:
                      - test1
                    start_date: 1409616000
                    warmup: true
              schema:
                properties:
                  ip:
                    description: The IP address.
                    type: string
                  pools:
                    description:
                      The IP pools that this IP address has been added to.
                    items:
                      type: string
                    type: array
                  start_date:
                    description:
                      A Unix timestamp indicating when the warmup process began
                      for the added IP address.
                    type: integer
                  warmup:
                    description: Indicates if the IP address is in warmup.
                    type: boolean
                required:
                  - ip
                  - pools
                  - start_date
                  - warmup
                type: object
          description: ''
        '404':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: null
                        message: resource not found
              schema:
                properties:
                  errors:
                    description: The error returned.
                    items:
                      properties:
                        field:
                          nullable: true
                        message:
                          description:
                            A message explaining why the IP address could not be
                            added to the IP Pool.
                          type: string
                      type: object
                    type: array
                type: object
          description: ''
      security:
        - Authorization: []
      summary: Add an IP address to a pool
      tags:
        - IP Pools
  /ips/pools/{pool_name}/ips/{ip}:
    delete:
      description:
        '**This endpoint allows you to remove an IP address from an IP pool.**'
      operationId: DELETE_ips-pools-pool_name-ips-ip
      responses:
        '204':
          content:
            application/json:
              schema:
                type: object
          description: ''
        '404':
          content:
            application/json:
              examples:
                response:
                  value:
                    error: Unable to locate specified IPs Pool
              schema:
                properties:
                  error:
                    description:
                      An error explaining why the IP address could not be
                      removed from the IP pool.
                    type: string
                type: object
          description: ''
      security:
        - Authorization: []
      summary: Remove an IP address from a pool
      tags:
        - IP Pools
    parameters:
      - description:
          The name of the IP pool that you are removing the IP address from.
        in: path
        name: pool_name
        required: true
        schema:
          type: string
      - description: The IP address that you wish to remove.
        in: path
        name: ip
        required: true
        schema:
          type: string
  /ips/remaining:
    get:
      description:
        '**This endpoint gets amount of IP Addresses that can still be created
        during a given period and the price of those IPs.**'
      operationId: GET_ips-remaining
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    results:
                      - period: month
                        price_per_ip: 20
                        remaining: 2
              schema:
                properties:
                  results:
                    items:
                      properties:
                        period:
                          description:
                            The length of time until user can add more IPs.
                          type: string
                        price_per_ip:
                          description: The current cost to add an IP.
                          type: number
                        remaining:
                          description:
                            The number of IPs that can still be added to the
                            user.
                          type: integer
                      required:
                        - remaining
                        - period
                        - price_per_ip
                      type: object
                    type: array
                required:
                  - results
                type: object
          description: ''
      security:
        - Authorization: []
      summary: Get remaining IPs count
      tags:
        - IP Addresses
  /ips/warmup:
    get:
      description:
        '**This endpoint allows you to retrieve all of your IP addresses that
        are currently warming up.**'
      operationId: GET_ips-warmup
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    - ip: 0.0.0.0
                      start_date: 1409616000
              schema:
                $ref: '#/components/schemas/ip_warmup_response'
          description: ''
      security:
        - Authorization: []
      summary: Retrieve all IPs currently in warmup
      tags:
        - IP Warmup
    post:
      description:
        '**This endpoint allows you to put an IP address into warmup mode.**'
      operationId: POST_ips-warmup
      requestBody:
        content:
          application/json:
            schema:
              example:
                ip: 0.0.0.0
              properties:
                ip:
                  description: The IP address that you want to begin warming up.
                  type: string
              type: object
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    - ip: 0.0.0.0
                      start_date: 1409616000
              schema:
                $ref: '#/components/schemas/ip_warmup_response'
          description: ''
        '404':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: null
                        message: resource not found
              schema:
                properties:
                  errors:
                    description: The errors that were encountered.
                    items:
                      properties:
                        field:
                          nullable: true
                        message:
                          description:
                            A message explaining why the IP couldn't entered
                            into warmup mode.
                          type: string
                      type: object
                    type: array
                type: object
          description: ''
      security:
        - Authorization: []
      summary: Start warming up an IP address
      tags:
        - IP Warmup
  /ips/warmup/{ip_address}:
    delete:
      description: '**This endpoint allows you to remove an IP address from
        warmup mode.**


        Your request will return a 204 status code if the specified IP was
        successfully removed from warmup mode. To retrieve details of the IP’s
        warmup status *before* removing it from warmup mode, call the  "Retrieve
        the warmpup status for a specific IP address" endpoint.'
      operationId: DELETE_ips-warmup-ip_address
      responses:
        '204':
          content:
            application/json:
              schema:
                type: object
          description: ''
        '404':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: null
                        message: resource not found
              schema:
                properties:
                  errors:
                    description: The errors that were encountered.
                    items:
                      properties:
                        field:
                          nullable: true
                        message:
                          description:
                            A message explaining why the IP couldn't be removed
                            from warmup.
                          type: string
                      type: object
                    type: array
                type: object
          description: ''
      security:
        - Authorization: []
      summary: Stop warming up an IP address
      tags:
        - IP Warmup
    get:
      description: '**This endpoint allows you to retrieve the warmup status for
        a specific IP address.**


        You can retrieve all of your warming IPs using the "Retrieve all IPs
        currently in warmup" endpoint.'
      operationId: GET_ips-warmup-ip_address
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    - ip: 0.0.0.0
                      start_date: 1409616000
              schema:
                $ref: '#/components/schemas/ip_warmup_response'
          description: ''
        '404':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: null
                        message: resource not found
              schema:
                properties:
                  errors:
                    description: The errors that were encountered.
                    items:
                      properties:
                        field:
                          nullable: true
                        message:
                          description:
                            A message explaining why the warmup status could not
                            be retrieved.
                          type: string
                      type: object
                    type: array
                type: object
          description: ''
      security:
        - Authorization: []
      summary: Retrieve the warmup status for a specific IP address
      tags:
        - IP Warmup
    parameters:
      - description:
          The IP address that you want to retrieve the warmup status for.
        in: path
        name: ip_address
        required: true
        schema:
          type: string
  /ips/{ip_address}:
    get:
      description: '**This endpoint allows you to see which IP pools a
        particular IP address has been added to.**


        The same IP address can be added to multiple IP pools.


        A single IP address or a range of IP addresses may be dedicated to an
        account in order to send email for multiple domains. The reputation of
        this IP is based on the aggregate performance of all the senders who use
        it.'
      operationId: GET_ips-ip_address
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    ip: 000.00.00.0
                    pools:
                      - test1
                    rdns: o1.em.example.com
                    start_date: null
                    subusers:
                      - subuser1
                      - subuser2
                    warmup: false
                    whitelabeled: true
              schema:
                properties:
                  ip:
                    description: The IP address.
                    type: string
                  pools:
                    description:
                      The list of IP pools that this IP address belongs to.
                    items:
                      type: string
                    type: array
                  rdns:
                    description: The reverse DNS record for this IP address.
                    type: string
                  start_date:
                    description:
                      The date that the IP address was entered into warmup.
                    nullable: true
                    type: integer
                  subusers:
                    description:
                      The subusers that can send email using this IP address.
                    items:
                      type: string
                    type: array
                  warmup:
                    description:
                      Indicates if this IP address is currently warming up.
                    type: boolean
                  whitelabeled:
                    description:
                      Indicates if this IP address is associated with a reverse
                      DNS record.
                    type: boolean
                required:
                  - ip
                  - subusers
                  - rdns
                  - pools
                  - warmup
                  - start_date
                  - whitelabeled
                type: object
          description: ''
      security:
        - Authorization: []
      summary: Retrieve all IP pools an IP address belongs to
      tags:
        - IP Addresses
    parameters:
      - description: The IP address you are retrieving the IP pools for.
        in: path
        name: ip_address
        required: true
        schema:
          type: string
  /mail/batch:
    post:
      description: '**This endpoint allows you to generate a new batch ID.**


        Once a `batch_id` is created, you can associate it with a scheduled send
        using the `/mail/send` endpoint. Passing the `batch_id` as a field in
        the `/mail/send` request body will assign the ID to the send you are
        creating.


        Once an ID is associated with a scheduled send, the send can be accessed
        and its send status can be modified using the `batch_id`.'
      operationId: POST_mail-batch
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '201':
          content:
            application/json:
              examples:
                response:
                  value:
                    batch_id: HkJ5yLYULb7Rj8GKSx7u025ouWVlMgAi
              schema:
                $ref: '#/components/schemas/mail_batch_id'
          description: ''
        '400':
          $ref: '#/components/responses/trait_cancelScheduledSendsErrors_400'
        '401':
          $ref: '#/components/responses/trait_globalErrors_401'
        '403':
          $ref: '#/components/responses/trait_globalErrors_403'
        '404':
          $ref: '#/components/responses/trait_globalErrors_404'
        '500':
          $ref: '#/components/responses/trait_globalErrors_500'
      security:
        - Authorization: []
      summary: Create a batch ID
      tags:
        - Cancel Scheduled Sends
  /mail/batch/{batch_id}:
    get:
      description: '**This endpoint allows you to validate a batch ID.**


        When you pass a valid `batch_id` to this endpoint, it will return a
        `200` status code and the batch ID itself.


        If you pass an invalid `batch_id` to the endpoint, you will receive a
        `400` level status code and an error message.


        A `batch_id` does not need to be assigned to a scheduled send to be
        considered valid. A successful response means only that the `batch_id`
        has been created, but it does not indicate that it has been associated
        with a send.'
      operationId: GET_mail-batch-batch_id
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    batch_id: HkJ5yLYULb7Rj8GKSx7u025ouWVlMgAi
              schema:
                $ref: '#/components/schemas/mail_batch_id'
          description: ''
        '400':
          $ref: '#/components/responses/trait_cancelScheduledSendsErrors_400'
        '401':
          $ref: '#/components/responses/trait_globalErrors_401'
        '403':
          $ref: '#/components/responses/trait_globalErrors_403'
        '404':
          $ref: '#/components/responses/trait_globalErrors_404'
        '500':
          $ref: '#/components/responses/trait_globalErrors_500'
      security:
        - Authorization: []
      summary: Validate batch ID
      tags:
        - Cancel Scheduled Sends
    parameters:
      - in: path
        name: batch_id
        required: true
        schema:
          type: string
  /mail/send:
    post:
      description: "The Mail Send endpoint allows you to send email over
        SendGrid’s v3 Web API, the most recent version of our API. If you are
        looking for documentation about the v2 Mail Send endpoint, see our [v2
        API
        Reference](https://sendgrid.com/docs/API_Reference/Web_API/mail.html).\n\n##
        Helper Libraries\n\nTwilio SendGrid provides libraries to help you
        quickly and easily integrate with the v3 Web API in 7 different
        languages:\n\n* [C#](https://github.com/sendgrid/sendgrid-csharp) \n*
        [Go](https://github.com/sendgrid/sendgrid-go)\n*
        [Java](https://github.com/sendgrid/sendgrid-java)\n* [Node
        JS](https://github.com/sendgrid/sendgrid-nodejs)\n*
        [PHP](https://github.com/sendgrid/sendgrid-php)\n*
        [Python](https://github.com/sendgrid/sendgrid-python)\n*
        [Ruby](https://github.com/sendgrid/sendgrid-ruby)\n\n## Dynamic
        Transactional Templates and Handlebars\n\nIn order to send a dynamic
        template, specify the template ID with the `template_id` parameter.
        \n\nTo specify handlebar substitutions,\
        \ define your substitutions in the request JSON with this
        syntax:\n\n```\n\"dynamic_template_data\": {\n      \"guest\": \"Jane
        Doe\",\n      \"partysize\": \"4\",\n      \"english\":
        true,\n      \"date\": \"April 1st, 2021\"\n    }\n```\n\nFor more
        information about Dynamic Transactional Templates and Handlebars, see
        our documentation and reference pages.\n\n* [How to send an email with
        Dynamic Transactional
        Templates\n](https://sendgrid.com/docs/ui/sending-email/how-to-send-an-email-with-dynamic-transactional-templates/)\n*
        [Using
        Handlebars](https://sendgrid.com/docs/for-developers/sending-email/using-handlebars/)
        \n\n## Mail Body Compression\n\nMail body compression is available to
        some high volume accounts. Talk to your CSM if you are interested in
        this functionality. Mail body compression works by setting up a JSON
        payload as defined on this page, then compressing it with gzip (the gzip
        file can be no more than 30mb).\n\nTo use mail body compression:\n\n1.
        Add a `Content-Encoding`\
        \ header, with a value of `gzip`.  \n   a. `Content-Encoding: gzip` \n2.
        Send the gzip as a data-binary.  \n   a. `--data-binary
        '@data.json.gz'\n`\n\n## Multiple Reply-To Emails\n\nUsing
        `reply_to_list` allows senders to include more than one recipient email
        address to receive reply and/or bounce messages from the recipient of
        the email.\n\n### Usage Considerations\n\n* `reply_to` is mutually
        exclusive with `reply_to_list`. If both are used, then the API call will
        be rejected. \n* The `reply_to_list` object, when used, must at least
        have an email parameter and may also contain a name parameter.\n* Each
        email address in the `reply_to_list` should be unique.\n* There is a
        limit of 1000 `reply_to_list` emails per mail/send request.\n* In SMTP
        calls, we will omit any invalid emails.\n\n### Possible 400 Error
        Messages\n\n* `reply_to` is mutually exclusive with `reply_to_list`.\n*
        The `reply_to_list` object, when used, must at least have an email
        parameter and may also contain a name\
        \ parameter.\n* Each email address in the `reply_to_list` should be
        unique.\n* There is a limit of X `reply_to` emails per mail/send
        request.\n* The `reply_to_list` email does not contain a valid
        address.\n* The `reply_to_list` email exceeds the maximum total length
        of X characters.\n* The `reply_to_list` email parameter is required."
      operationId: POST_mail-send
      requestBody:
        content:
          application/json:
            schema:
              example:
                asm:
                  group_id: 12345
                  groups_to_display:
                    - 12345
                attachments:
                  - content: PCFET0NUWVBFIGh0bWw+CjxodG1sIGxhbmc9ImVuIj4KCiAgICA8aGVhZD4KICAgICAgICA8bWV0YSBjaGFyc2V0PSJVVEYtOCI+CiAgICAgICAgPG1ldGEgaHR0cC1lcXVpdj0iWC1VQS1Db21wYXRpYmxlIiBjb250ZW50PSJJRT1lZGdlIj4KICAgICAgICA8bWV0YSBuYW1lPSJ2aWV3cG9ydCIgY29udGVudD0id2lkdGg9ZGV2aWNlLXdpZHRoLCBpbml0aWFsLXNjYWxlPTEuMCI+CiAgICAgICAgPHRpdGxlPkRvY3VtZW50PC90aXRsZT4KICAgIDwvaGVhZD4KCiAgICA8Ym9keT4KCiAgICA8L2JvZHk+Cgo8L2h0bWw+Cg==
                    disposition: attachment
                    filename: index.html
                    type: text/html
                batch_id: AsdFgHjklQweRTYuIopzXcVBNm0aSDfGHjklmZcVbNMqWert1znmOP2asDFjkl
                categories:
                  - cake
                  - pie
                  - baking
                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>
                from:
                  email: orders@example.com
                  name: Example Order Confirmation
                ip_pool_name: transactional email
                mail_settings:
                  bypass_list_management:
                    enable: false
                  footer:
                    enable: false
                  sandbox_mode:
                    enable: false
                personalizations:
                  - bcc:
                      - email: james_doe@example.com
                        name: Jim Doe
                    cc:
                      - email: jane_doe@example.com
                        name: Jane Doe
                    to:
                      - email: john_doe@example.com
                        name: John Doe
                      - email: julia_doe@example.com
                        name: Julia Doe
                  - bcc:
                      - email: jordan_doe@example.com
                        name: Jordan Doe
                    from:
                      email: sales@example.com
                      name: Example Sales Team
                    to:
                      - email: janice_doe@example.com
                        name: Janice Doe
                reply_to:
                  email: customer_service@example.com
                  name: Example Customer Service Team
                send_at: 1617260400
                subject: Your Example Order Confirmation
                tracking_settings:
                  click_tracking:
                    enable: true
                    enable_text: false
                  open_tracking:
                    enable: true
                    substitution_tag: '%open-track%'
                  subscription_tracking:
                    enable: false
              properties:
                asm:
                  description:
                    An object allowing you to specify how to handle
                    unsubscribes.
                  properties:
                    group_id:
                      description:
                        The unsubscribe group to associate with this email.
                      type: integer
                    groups_to_display:
                      description:
                        An array containing the unsubscribe groups that you
                        would like to be displayed on the unsubscribe
                        preferences page.
                      items:
                        type: integer
                      maxItems: 25
                      type: array
                  required:
                    - group_id
                  type: object
                attachments:
                  description:
                    An array of objects where you can specify any attachments
                    you want to include.
                  items:
                    properties:
                      content:
                        description:
                          The Base64 encoded content of the attachment.
                        minLength: 1
                        type: string
                      content_id:
                        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.
                        type: string
                      disposition:
                        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.
                        enum:
                          - inline
                          - attachment
                        type: string
                      filename:
                        description: The attachment's filename.
                        type: string
                      type:
                        description:
                          The MIME type of the content you are attaching (e.g.,
                          `“text/plain”` or `“text/html”`).
                        minLength: 1
                        type: string
                    required:
                      - content
                      - filename
                    type: object
                  type: array
                batch_id:
                  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/).
                  type: string
                categories:
                  description:
                    'An array of category names for this message. Each category
                    name may not exceed 255 characters. '
                  items:
                    maxLength: 255
                    type: string
                  maxItems: 10
                  type: array
                  uniqueItems: true
                content:
                  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.
                  items:
                    properties:
                      type:
                        description:
                          The MIME type of the content you are including in your
                          email (e.g., `“text/plain”` or `“text/html”`).
                        minLength: 1
                        type: string
                      value:
                        description:
                          The actual content of the specified MIME type that you
                          are including in your email.
                        minLength: 1
                        type: string
                    required:
                      - type
                      - value
                    type: object
                  type: array
                custom_args:
                  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.
                  type: string
                from:
                  $ref: '#/components/schemas/from_email_object'
                headers:
                  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.
                  type: object
                ip_pool_name:
                  description:
                    The IP Pool that you would like to send this email from.
                  maxLength: 64
                  minLength: 2
                  type: string
                mail_settings:
                  description:
                    A collection of different mail settings that you can use to
                    specify how you would like this email to be handled.
                  properties:
                    bypass_bounce_management:
                      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.
                      properties:
                        enable:
                          description: Indicates if this setting is enabled.
                          type: boolean
                      type: object
                    bypass_list_management:
                      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.
                      properties:
                        enable:
                          description: Indicates if this setting is enabled.
                          type: boolean
                      type: object
                    bypass_spam_management:
                      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.
                      properties:
                        enable:
                          description: Indicates if this setting is enabled.
                          type: boolean
                      type: object
                    bypass_unsubscribe_management:
                      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.
                      properties:
                        enable:
                          description: Indicates if this setting is enabled.
                          type: boolean
                      type: object
                    footer:
                      description:
                        The default footer that you would like included on every
                        email.
                      properties:
                        enable:
                          description: Indicates if this setting is enabled.
                          type: boolean
                        html:
                          description: The HTML content of your footer.
                          type: string
                        text:
                          description: The plain text content of your footer.
                          type: string
                      type: object
                    sandbox_mode:
                      description:
                        Sandbox Mode allows you to send a test email to ensure
                        that your request body is valid and formatted correctly.
                      properties:
                        enable:
                          description: Indicates if this setting is enabled.
                          type: boolean
                      type: object
                  type: object
                personalizations:
                  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.
                  items:
                    properties:
                      bcc:
                        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.
                        items:
                          $ref: '#/components/schemas/cc_bcc_email_object'
                        maxItems: 1000
                        type: array
                      cc:
                        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.
                        items:
                          $ref: '#/components/schemas/cc_bcc_email_object'
                        maxItems: 1000
                        type: array
                      custom_args:
                        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
                        type: object
                      dynamic_template_data:
                        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".
                        type: object
                      from:
                        $ref: '#/components/schemas/from_email_object'
                      headers:
                        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`'
                        type: object
                      send_at:
                        description:
                          A unix timestamp allowing you to specify when your
                          email should be delivered. Scheduling delivery more
                          than 72 hours in advance is forbidden.
                        type: integer
                      subject:
                        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).
                        minLength: 1
                        type: string
                      substitutions:
                        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
                        type: object
                      to:
                        $ref: '#/components/schemas/to_email_array'
                    required:
                      - to
                    type: object
                  maxItems: 1000
                  type: array
                  uniqueItems: false
                reply_to:
                  $ref: '#/components/schemas/reply_to_email_object'
                reply_to_list:
                  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.
                  items:
                    properties:
                      email:
                        description:
                          The email address where any replies or bounces will be
                          returned.
                        format: email
                        type: string
                      name:
                        description:
                          A name or title associated with the `reply_to_list`
                          email address.
                        type: string
                    required:
                      - email
                    type: object
                  maxItems: 1000
                  type: array
                  uniqueItems: true
                send_at:
                  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.
                  type: integer
                subject:
                  description:
                    The global or 'message level' subject of your email. This
                    may be overridden by subject lines set in personalizations.
                  minLength: 1
                  type: string
                template_id:
                  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.
                  type: string
                tracking_settings:
                  description:
                    Settings to determine how you would like to track the
                    metrics of how your recipients interact with your email.
                  properties:
                    click_tracking:
                      description:
                        Allows you to track if a recipient clicked a link in
                        your email.
                      properties:
                        enable:
                          description: Indicates if this setting is enabled.
                          type: boolean
                        enable_text:
                          description:
                            Indicates if this setting should be included in the
                            `text/plain` portion of your email.
                          type: boolean
                      type: object
                    ganalytics:
                      description:
                        Allows you to enable tracking provided by Google
                        Analytics.
                      properties:
                        enable:
                          description: Indicates if this setting is enabled.
                          type: boolean
                        utm_campaign:
                          description: The name of the campaign.
                          type: string
                        utm_content:
                          description:
                            Used to differentiate your campaign from
                            advertisements.
                          type: string
                        utm_medium:
                          description:
                            Name of the marketing medium. (e.g. Email)
                          type: string
                        utm_source:
                          description:
                            Name of the referrer source. (e.g. Google,
                            SomeDomain.com, or Marketing Email)
                          type: string
                        utm_term:
                          description: Used to identify any paid keywords.
                          type: string
                      type: object
                    open_tracking:
                      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.
                      properties:
                        enable:
                          description: Indicates if this setting is enabled.
                          type: boolean
                        substitution_tag:
                          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.
                          type: string
                      type: object
                    subscription_tracking:
                      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`.
                      properties:
                        enable:
                          description: Indicates if this setting is enabled.
                          type: boolean
                        html:
                          description:
                            HTML to be appended to the email with the
                            subscription tracking link. You may control where
                            the link is by using the tag <% %>
                          type: string
                        substitution_tag:
                          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.'
                          type: string
                        text:
                          description:
                            Text to be appended to the email with the
                            subscription tracking link. You may control where
                            the link is by using the tag <% %>
                          type: string
                      type: object
                  type: object
              required:
                - personalizations
                - from
                - subject
                - content
              type: object
      responses:
        '202':
          description: ''
        '400':
          $ref: '#/components/responses/trait_mailSendErrors_400'
        '401':
          $ref: '#/components/responses/trait_globalErrors_401'
        '403':
          $ref: '#/components/responses/trait_globalErrors_403'
        '404':
          $ref: '#/components/responses/trait_globalErrors_404'
        '413':
          $ref: '#/components/responses/trait_mailSendErrors_413'
        '500':
          $ref: '#/components/responses/trait_globalErrors_500'
      security:
        - Authorization: []
      summary: v3 Mail Send
      tags:
        - Mail Send
  /mail_settings:
    get:
      description: '**This endpoint allows you to retrieve a list of all mail
        settings.**


        Each setting will be returned with an `enabled` status set to `true` or
        `false` and a short description that explains what the setting does.'
      operationId: GET_mail_settings
      parameters:
        - description: The number of settings to return.
          in: query
          name: limit
          schema:
            type: integer
        - description:
            Where in the list of results to begin displaying settings.
          in: query
          name: offset
          schema:
            type: integer
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    result:
                      - description:
                          Address / domains that should never have email
                          suppressed.
                        enabled: false
                        name: address_whitelist
                        title: Address Whitelist
                      - description:
                          Allows you to automatically purge bounce records from
                          SendGrid after a specified number of days.
                        enabled: false
                        name: bounce_purge
                        title: Bounce Purge
                      - description:
                          Controls notifications for events, such as bounces,
                          clicks, and opens.
                        enabled: true
                        name: event_notify
                        title: Event Notification
                      - description:
                          Allows you to add a custom footer to outgoing email.
                        enabled: false
                        name: footer
                        title: Footer
                      - description:
                          Allows you to forward bounces to a specific email
                          address.
                        enabled: true
                        name: forward_bounce
                        title: Forward Bounce
                      - description:
                          Allows for a copy of spam reports to be forwarded to
                          an email address.
                        enabled: false
                        name: forward_spam
                        title: Forward Spam
                      - description:
                          Allows you to customize your outgoing HTML emails.
                        enabled: true
                        name: template
                        title: Legacy Email Template
                      - description: Convert your plain text emails to HTML.
                        enabled: false
                        name: plain_content
                        title: Plain Content
                      - description: Check outbound messages for spam content.
                        enabled: true
                        name: spam_check
                        title: Spam Checker
              schema:
                properties:
                  result:
                    description: The list of all mail settings.
                    items:
                      properties:
                        description:
                          description: A description of the mail setting.
                          type: string
                        enabled:
                          description:
                            Indicates if this mail setting is currently enabled.
                          type: boolean
                        name:
                          description: The name of the mail setting.
                          type: string
                        title:
                          description: The title of the mail setting.
                          type: string
                      required:
                        - title
                        - enabled
                        - name
                        - description
                      type: object
                    type: array
                required:
                  - result
                type: object
          description: ''
        '400':
          $ref: '#/components/responses/trait_makoErrorResponse_400'
        '401':
          $ref: '#/components/responses/trait_makoErrorResponse_401'
        '403':
          $ref: '#/components/responses/trait_makoErrorResponse_403'
        '404':
          $ref: '#/components/responses/trait_makoErrorResponse_404'
        '500':
          $ref: '#/components/responses/trait_makoErrorResponse_500'
      security:
        - Authorization: []
      summary: Retrieve all mail settings
      tags:
        - Settings - Mail
  /mail_settings/address_whitelist:
    get:
      description: '**This endpoint allows you to retrieve your current email
        address whitelist settings.**


        The Address Whitelist setting allows you to specify email addresses or
        domains for which mail should never be suppressed.


        For example, if you own the domain `example.com`, and one or more of
        your recipients use `email@example.com` addresses, placing `example.com`
        in the address whitelist setting instructs Twilio SendGrid to ignore all
        bounces, blocks, and unsubscribes logged for that domain. In other
        words, all bounces, blocks, and unsubscribes will still be sent to
        `example.com` as if they were sent under normal sending conditions.'
      operationId: GET_mail_settings-address_whitelist
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    enabled: true
                    list:
                      - example.com
                      - jane_doe@example1.com
              schema:
                $ref: '#/components/schemas/mail_settings_address_whitelabel'
          description: ''
        '400':
          $ref: '#/components/responses/trait_makoErrorResponse_400'
        '401':
          $ref: '#/components/responses/trait_makoErrorResponse_401'
        '403':
          $ref: '#/components/responses/trait_makoErrorResponse_403'
        '404':
          $ref: '#/components/responses/trait_makoErrorResponse_404'
        '500':
          $ref: '#/components/responses/trait_makoErrorResponse_500'
      security:
        - Authorization: []
      summary: Retrieve address whitelist mail settings
      tags:
        - Settings - Mail
    patch:
      description: "**This endpoint allows you to update your current email
        address whitelist settings.**


        You can select whether or not this setting should be enabled by
        assigning the `enabled` field a `true` or `false` value.


        Passing only the `enabled` field to this endpoint will not alter your
        current `list` of whitelist entries. However, any modifications to your
        `list` of entries will overwrite the entire list. For this reason, you
        must included all existing entries you wish to retain in your `list` in
        addition to any new entries you intend to add. To remove one or more
        `list` entries, pass a `list` with only the entries you wish to retain.


        You should not add generic domains such as `gmail.com` or
        `yahoo.com`  in your `list` because your emails will not honor
        recipients' unsubscribes. This may cause a legal violation of
        [CAN-SPAM](https://sendgrid.com/docs/glossary/can-spam/) and could
        damage your sending reputation.


        The Address Whitelist setting allows you to specify email addresses or
        domains for which mail should never be suppressed.


        For example, if you own the domain `example.com`, and one or more of
        your recipients use `email@example.com` addresses, placing `example.com`
        in the address whitelist setting instructs Twilio SendGrid to ignore all
        bounces, blocks, and unsubscribes logged for that domain. In other
        words, all bounces, blocks, and unsubscribes will still be sent to
        `example.com` as if they were sent under normal sending conditions."
      operationId: PATCH_mail_settings-address_whitelist
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      requestBody:
        content:
          application/json:
            schema:
              example:
                enabled: true
                list:
                  - email1@example.com
                  - example.com
              properties:
                enabled:
                  description:
                    Indicates if your email address whitelist is enabled.
                  type: boolean
                list:
                  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.
                  items:
                    type: string
                  type: array
              type: object
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    enabled: true
                    list:
                      - email1@example.com
              schema:
                $ref: '#/components/schemas/mail_settings_address_whitelabel'
          description: ''
        '400':
          $ref: '#/components/responses/trait_makoErrorResponse_400'
        '401':
          $ref: '#/components/responses/trait_makoErrorResponse_401'
        '403':
          $ref: '#/components/responses/trait_makoErrorResponse_403'
        '404':
          $ref: '#/components/responses/trait_makoErrorResponse_404'
        '500':
          $ref: '#/components/responses/trait_makoErrorResponse_500'
      security:
        - Authorization: []
      summary: Update address whitelist mail settings
      tags:
        - Settings - Mail
  /mail_settings/bounce_purge:
    get:
      description: "**This endpoint allows you to retrieve your current bounce
        and purge settings.**


        The Bounce Perge setting allows you to set a schedule that Twilio
        SendGrid will use to automatically delete contacts from your soft and
        hard bounce suppression lists.


        A hard bounce occurs when an email message has been returned to the
        sender because the recipient's address is invalid. A hard bounce might
        occur because the domain name doesn't exist or because the recipient is
        unknown.


        A soft bounce occurs when an email message reaches the recipient's mail
        server but is bounced back undelivered before it actually reaches the
        recipient. A soft bounce might occur because the recipient's inbox is
        full.


        You can also manage this setting in the [Mail Settings section of the
        Twilio SendGrid App](https://app.sendgrid.com/settings/mail_settings).
        You can manage your bounces manually using the [Bounces
        API](https://sendgrid.api-docs.io/v3.0/bounces-api) or the [Bounces menu
        in the Twilio SendGrid
        App](https://app.sendgrid.com/suppressions/bounces)."
      operationId: GET_mail_settings-bounce_purge
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    enabled: false
                    hard_bounces: 5
                    soft_bounces: 5
              schema:
                $ref: '#/components/schemas/mail_settings_bounce_purge'
          description: ''
        '400':
          $ref: '#/components/responses/trait_makoErrorResponse_400'
        '401':
          $ref: '#/components/responses/trait_makoErrorResponse_401'
        '403':
          $ref: '#/components/responses/trait_makoErrorResponse_403'
        '404':
          $ref: '#/components/responses/trait_makoErrorResponse_404'
        '500':
          $ref: '#/components/responses/trait_makoErrorResponse_500'
      security:
        - Authorization: []
      summary: Retrieve bounce purge mail settings
      tags:
        - Settings - Mail
    patch:
      description: "**This endpoint allows you to update your current bounce and
        purge settings.**


        The Bounce Perge setting allows you to set a schedule that Twilio
        SendGrid will use to automatically delete contacts from your soft and
        hard bounce suppression lists. The schedule is set in full days by
        assigning the number of days, an integer, to the `soft_bounces` and/or
        `hard_bounces` fields.


        A hard bounce occurs when an email message has been returned to the
        sender because the recipient's address is invalid. A hard bounce might
        occur because the domain name doesn't exist or because the recipient is
        unknown.


        A soft bounce occurs when an email message reaches the recipient's mail
        server but is bounced back undelivered before it actually reaches the
        recipient. A soft bounce might occur because the recipient's inbox is
        full.


        You can also manage this setting in the [Mail Settings section of the
        Twilio SendGrid App](https://app.sendgrid.com/settings/mail_settings).
        You can manage your bounces manually using the [Bounces
        API](https://sendgrid.api-docs.io/v3.0/bounces-api) or the [Bounces menu
        in the Twilio SendGrid
        App](https://app.sendgrid.com/suppressions/bounces)."
      operationId: PATCH_mail_settings-bounce_purge
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/mail_settings_bounce_purge'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    enabled: false
                    hard_bounces: 5
                    soft_bounces: 5
              schema:
                $ref: '#/components/schemas/mail_settings_bounce_purge'
          description: ''
        '400':
          $ref: '#/components/responses/trait_makoErrorResponse_400'
        '401':
          $ref: '#/components/responses/trait_makoErrorResponse_401'
        '403':
          $ref: '#/components/responses/trait_makoErrorResponse_403'
        '404':
          $ref: '#/components/responses/trait_makoErrorResponse_404'
        '500':
          $ref: '#/components/responses/trait_makoErrorResponse_500'
      security:
        - Authorization: []
      summary: Update bounce purge mail settings
      tags:
        - Settings - Mail
  /mail_settings/footer:
    get:
      description: '**This endpoint allows you to retrieve your current Footer
        mail settings.**


        The Footer setting will insert a custom footer at the bottom of your
        text and HTML email message bodies.


        You can insert your HTML or plain text directly using the "Update footer
        mail settings" endpoint, or you can create the footer using the [Mail
        Settings menu in the Twilio SendGrid
        App](https://app.sendgrid.com/settings/mail_settings).'
      operationId: GET_mail_settings-footer
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    enabled: true
                    html_content: '<p><a href="http://example.com"
                      target="_blank">Ahoy, World!</a></p>

                      '
                    plain_content: ''
              schema:
                $ref: '#/components/schemas/mail_settings_footer'
          description: ''
        '400':
          $ref: '#/components/responses/trait_makoErrorResponse_400'
        '401':
          $ref: '#/components/responses/trait_makoErrorResponse_401'
        '403':
          $ref: '#/components/responses/trait_makoErrorResponse_403'
        '404':
          $ref: '#/components/responses/trait_makoErrorResponse_404'
        '500':
          $ref: '#/components/responses/trait_makoErrorResponse_500'
      security:
        - Authorization: []
      summary: Retrieve footer mail settings
      tags:
        - Settings - Mail
    patch:
      description: '**This endpoint allows you to update your current Footer
        mail settings.**


        The Footer setting will insert a custom footer at the bottom of your
        text and HTML email message bodies.


        You can insert your HTML or plain text directly using this endpoint, or
        you can create the footer using the [Mail Settings menu in the Twilio
        SendGrid App](https://app.sendgrid.com/settings/mail_settings).'
      operationId: PATCH_mail_settings-footer
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/mail_settings_footer'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    enabled: true
                    html_content: '<p><a href="http://example.com"
                      target="_blank">Ahoy, World!</a></p>

                      '
                    plain_content: ''
              schema:
                $ref: '#/components/schemas/mail_settings_footer'
          description: ''
        '400':
          $ref: '#/components/responses/trait_makoErrorResponse_400'
        '401':
          $ref: '#/components/responses/trait_makoErrorResponse_401'
        '403':
          $ref: '#/components/responses/trait_makoErrorResponse_403'
        '404':
          $ref: '#/components/responses/trait_makoErrorResponse_404'
        '500':
          $ref: '#/components/responses/trait_makoErrorResponse_500'
      security:
        - Authorization: []
      summary: Update footer mail settings
      tags:
        - Settings - Mail
  /mail_settings/forward_bounce:
    get:
      description: '**This endpoint allows you to retrieve your current bounce
        forwarding mail settings.**


        Enabling the Forward Bounce setting allows you to specify `email`
        addresses to which bounce reports will be forwarded. This endpoint
        returns the email address you have set to receive forwarded bounces and
        an `enabled` status indicating if the setting is active.'
      operationId: GET_mail_settings-forward_bounce
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    email: bounces@example.com
                    enabled: true
              schema:
                $ref: '#/components/schemas/mail_settings_forward_bounce'
          description: ''
        '400':
          $ref: '#/components/responses/trait_makoErrorResponse_400'
        '401':
          $ref: '#/components/responses/trait_makoErrorResponse_401'
        '403':
          $ref: '#/components/responses/trait_makoErrorResponse_403'
        '404':
          $ref: '#/components/responses/trait_makoErrorResponse_404'
        '500':
          $ref: '#/components/responses/trait_makoErrorResponse_500'
      security:
        - Authorization: []
      summary: Retrieve forward bounce mail settings
      tags:
        - Settings - Mail
    patch:
      description: '**This endpoint allows you to update your current bounce
        forwarding mail settings.**


        Enabling the Forward Bounce setting allows you to specify an `email`
        address to which bounce reports will be forwarded.


        You can also configure the Forward Spam mail settings in the [Mail
        Settings section of the Twilio SendGrid
        App](https://app.sendgrid.com/settings/mail_settings).'
      operationId: PATCH_mail_settings-forward_bounce
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/mail_settings_forward_bounce'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    email: bounces@example.com
                    enabled: true
              schema:
                $ref: '#/components/schemas/mail_settings_forward_bounce'
          description: ''
        '400':
          $ref: '#/components/responses/trait_makoErrorResponse_400'
        '401':
          $ref: '#/components/responses/trait_makoErrorResponse_401'
        '403':
          $ref: '#/components/responses/trait_makoErrorResponse_403'
        '404':
          $ref: '#/components/responses/trait_makoErrorResponse_404'
        '500':
          $ref: '#/components/responses/trait_makoErrorResponse_500'
      security:
        - Authorization: []
      summary: Update forward bounce mail settings
      tags:
        - Settings - Mail
  /mail_settings/forward_spam:
    get:
      description: '**This endpoint allows you to retrieve your current Forward
        Spam mail settings.**


        Enabling the Forward Spam setting allows you to specify `email`
        addresses to which spam reports will be forwarded. This endpoint returns
        any email address(es) you have set to receive forwarded spam and an
        `enabled` status indicating if the setting is active.'
      operationId: GET_mail_settings-forward_spam
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    email: abuse@example.com
                    enabled: true
              schema:
                $ref: '#/components/schemas/mail_settings_forward_spam'
          description: ''
        '400':
          $ref: '#/components/responses/trait_makoErrorResponse_400'
        '401':
          $ref: '#/components/responses/trait_makoErrorResponse_401'
        '403':
          $ref: '#/components/responses/trait_makoErrorResponse_403'
        '404':
          $ref: '#/components/responses/trait_makoErrorResponse_404'
        '500':
          $ref: '#/components/responses/trait_makoErrorResponse_500'
      security:
        - Authorization: []
      summary: Retrieve forward spam mail settings
      tags:
        - Settings - Mail
    patch:
      description: "**This endpoint allows you to update your current Forward
        Spam mail settings.**\n\nEnabling the Forward Spam setting allows you to
        specify `email` addresses to which spam reports will be forwarded. You
        can set multiple addresses by passing this endpoint a comma separated
        list of emails in a single string.\n\n```\n{\n  \"email\":
        \"address1@example.com, address2@exapmle.com\",\n  \"enabled\":
        true\n}\n```\n\nThe Forward Spam setting may also be used to receive
        emails sent to `abuse@` and `postmaster@` role addresses if you have
        authenticated your domain.\n\nFor example, if you authenticated
        `example.com` as your root domain and set a custom return path of `sub`
        for that domain, you could turn on Forward Spam, and any emails sent to
        `abuse@sub.example.com` or `postmaster@sub.example.com` would be
        forwarded to the email address you entered in the `email` field.\n\nYou
        can authenticate your domain using the \"Authenticate a domain\"
        endpoint or in the [Sender Authentication\
        \ section of the Twilio SendGrid
        App](https://app.sendgrid.com/settings/sender_auth). You can also
        configure the Forward Spam mail settings in the [Mail Settings section
        of the Twilio SendGrid
        App](https://app.sendgrid.com/settings/mail_settings)."
      operationId: PATCH_mail_settings-forward_spam
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/mail_settings_forward_spam'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    email: abuse@example.com
                    enabled: true
              schema:
                $ref: '#/components/schemas/mail_settings_forward_spam'
          description: ''
        '400':
          $ref: '#/components/responses/trait_makoErrorResponse_400'
        '401':
          $ref: '#/components/responses/trait_makoErrorResponse_401'
        '403':
          $ref: '#/components/responses/trait_makoErrorResponse_403'
        '404':
          $ref: '#/components/responses/trait_makoErrorResponse_404'
        '500':
          $ref: '#/components/responses/trait_makoErrorResponse_500'
      security:
        - Authorization: []
      summary: Update forward spam mail settings
      tags:
        - Settings - Mail
  /mail_settings/template:
    get:
      description: '**This endpoint allows you to retrieve your current legacy
        email template settings.**


        This setting refers to our original email templates. We currently
        support more fully featured [Dynamic Transactional
        Templates](https://sendgrid.com/docs/ui/sending-email/how-to-send-an-email-with-dynamic-transactional-templates/).


        The legacy email template setting wraps an HTML template around your
        email content. This can be useful for sending out marketing email and/or
        other HTML formatted messages. For instructions on using legacy
        templates, see how to ["Create and Edit Legacy Transactional
        Templates](https://sendgrid.com/docs/ui/sending-email/create-and-edit-legacy-transactional-templates/).
        For help migrating to our current template system, see ["Migrating from
        Legacy
        Templates"](https://sendgrid.com/docs/ui/sending-email/migrating-from-legacy-templates/).'
      operationId: GET_mail_settings-template
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    enabled: false
                    html_content: '<p><% body %>Example</p>

                      '
              schema:
                $ref: '#/components/schemas/mail_settings_template'
          description: ''
        '400':
          $ref: '#/components/responses/trait_makoErrorResponse_400'
        '401':
          $ref: '#/components/responses/trait_makoErrorResponse_401'
        '403':
          $ref: '#/components/responses/trait_makoErrorResponse_403'
        '404':
          $ref: '#/components/responses/trait_makoErrorResponse_404'
        '500':
          $ref: '#/components/responses/trait_makoErrorResponse_500'
      security:
        - Authorization: []
      summary: Retrieve legacy template mail settings
      tags:
        - Settings - Mail
    patch:
      description: '**This endpoint allows you to update your current legacy
        email template settings.**


        This setting refers to our original email templates. We currently
        support more fully featured [Dynamic Transactional
        Templates](https://sendgrid.com/docs/ui/sending-email/how-to-send-an-email-with-dynamic-transactional-templates/).


        The legacy email template setting wraps an HTML template around your
        email content. This can be useful for sending out marketing email and/or
        other HTML formatted messages. For instructions on using legacy
        templates, see how to ["Create and Edit Legacy Transactional
        Templates](https://sendgrid.com/docs/ui/sending-email/create-and-edit-legacy-transactional-templates/).
        For help migrating to our current template system, see ["Migrating from
        Legacy
        Templates"](https://sendgrid.com/docs/ui/sending-email/migrating-from-legacy-templates/).'
      operationId: PATCH_mail_settings-template
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      requestBody:
        content:
          application/json:
            schema:
              example:
                enabled: true
                html_content: <% body %>
              properties:
                enabled:
                  description:
                    Indicates if you want to enable the legacy email template
                    mail setting.
                  type: boolean
                html_content:
                  description:
                    The new HTML content for your legacy email template.
                  type: string
              type: object
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    enabled: false
                    html_content: '<p><% body %>Example</p>

                      '
              schema:
                properties:
                  enabled:
                    description:
                      Indicates if the legacy email template mail setting is
                      enabled.
                    type: boolean
                  html_content:
                    description: The HTML content of your legacy email template.
                    type: string
                required:
                  - enabled
                  - html_content
                type: object
          description: ''
        '400':
          $ref: '#/components/responses/trait_makoErrorResponse_400'
        '401':
          $ref: '#/components/responses/trait_makoErrorResponse_401'
        '403':
          $ref: '#/components/responses/trait_makoErrorResponse_403'
        '404':
          $ref: '#/components/responses/trait_makoErrorResponse_404'
        '500':
          $ref: '#/components/responses/trait_makoErrorResponse_500'
      security:
        - Authorization: []
      summary: Update template mail settings
      tags:
        - Settings - Mail
  /mailbox_providers/stats:
    get:
      description: '**This endpoint allows you to retrieve your email statistics
        segmented by recipient mailbox provider.**


        **We only store up to 7 days of email activity in our database.** By
        default, 500 items will be returned per request via the Advanced Stats
        API endpoints.


        Advanced Stats provide a more in-depth view of your email statistics and
        the actions taken by your recipients. You can segment these statistics
        by geographic location, device type, client type, browser, and mailbox
        provider. For more information about statistics, please see our
        [Statistics
        Overview](https://sendgrid.com/docs/ui/analytics-and-reporting/stats-overview/).'
      operationId: GET_mailbox_providers-stats
      parameters:
        - description:
            The mail box providers to get statistics for. You can include up to
            10 by including this parameter multiple times.
          in: query
          name: mailbox_providers
          schema:
            type: string
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
        - $ref: '#/components/parameters/trait_statsAdvancedQueryStringsLimitOffset_limit'
        - $ref: '#/components/parameters/trait_statsAdvancedQueryStringsLimitOffset_offset'
        - $ref: '#/components/parameters/trait_statsAdvancedQueryStringsLimitOffset_aggregated_by'
        - $ref: '#/components/parameters/trait_statsAdvancedQueryStringsLimitOffset_start_date'
        - $ref: '#/components/parameters/trait_statsAdvancedQueryStringsLimitOffset_end_date'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    - date: '2015-10-11'
                      stats:
                        - metrics:
                            blocks: 0
                            bounces: 0
                            clicks: 0
                            deferred: 0
                            delivered: 0
                            drops: 0
                            opens: 0
                            processed: 0
                            requests: 0
                            spam_reports: 0
                            unique_clicks: 0
                            unique_opens: 0
                          name: Gmail
                          type: mailbox_provider
                    - date: '2015-10-12'
                      stats:
                        - metrics:
                            blocks: 0
                            bounces: 0
                            clicks: 0
                            deferred: 0
                            delivered: 0
                            drops: 0
                            opens: 0
                            processed: 0
                            requests: 0
                            spam_reports: 0
                            unique_clicks: 0
                            unique_opens: 0
                          name: Gmail
                          type: mailbox_provider
                    - date: '2015-10-13'
                      stats:
                        - metrics:
                            blocks: 0
                            bounces: 0
                            clicks: 0
                            deferred: 0
                            delivered: 0
                            drops: 0
                            opens: 0
                            processed: 0
                            requests: 0
                            spam_reports: 0
                            unique_clicks: 0
                            unique_opens: 0
                          name: Gmail
                          type: mailbox_provider
                    - date: '2015-10-14'
                      stats:
                        - metrics:
                            blocks: 0
                            bounces: 0
                            clicks: 0
                            deferred: 0
                            delivered: 0
                            drops: 0
                            opens: 0
                            processed: 0
                            requests: 0
                            spam_reports: 0
                            unique_clicks: 0
                            unique_opens: 0
                          name: Gmail
                          type: mailbox_provider
                    - date: '2015-10-15'
                      stats:
                        - metrics:
                            blocks: 0
                            bounces: 0
                            clicks: 0
                            deferred: 0
                            delivered: 0
                            drops: 0
                            opens: 0
                            processed: 0
                            requests: 0
                            spam_reports: 0
                            unique_clicks: 0
                            unique_opens: 0
                          name: Gmail
                          type: mailbox_provider
                    - date: '2015-10-16'
                      stats:
                        - metrics:
                            blocks: 0
                            bounces: 0
                            clicks: 0
                            deferred: 0
                            delivered: 0
                            drops: 0
                            opens: 0
                            processed: 0
                            requests: 0
                            spam_reports: 0
                            unique_clicks: 0
                            unique_opens: 0
                          name: Gmail
                          type: mailbox_provider
                    - date: '2015-10-17'
                      stats:
                        - metrics:
                            blocks: 0
                            bounces: 0
                            clicks: 0
                            deferred: 0
                            delivered: 0
                            drops: 0
                            opens: 0
                            processed: 0
                            requests: 0
                            spam_reports: 0
                            unique_clicks: 0
                            unique_opens: 0
                          name: Gmail
                          type: mailbox_provider
                    - date: '2015-10-18'
                      stats:
                        - metrics:
                            blocks: 0
                            bounces: 0
                            clicks: 0
                            deferred: 0
                            delivered: 0
                            drops: 0
                            opens: 0
                            processed: 0
                            requests: 0
                            spam_reports: 0
                            unique_clicks: 0
                            unique_opens: 0
                          name: Gmail
                          type: mailbox_provider
                    - date: '2015-10-19'
                      stats:
                        - metrics:
                            blocks: 0
                            bounces: 0
                            clicks: 0
                            deferred: 0
                            delivered: 0
                            drops: 0
                            opens: 0
                            processed: 0
                            requests: 0
                            spam_reports: 0
                            unique_clicks: 0
                            unique_opens: 0
                          name: Gmail
                          type: mailbox_provider
                    - date: '2015-10-20'
                      stats:
                        - metrics:
                            blocks: 0
                            bounces: 0
                            clicks: 0
                            deferred: 0
                            delivered: 0
                            drops: 0
                            opens: 0
                            processed: 0
                            requests: 0
                            spam_reports: 0
                            unique_clicks: 0
                            unique_opens: 0
                          name: Gmail
                          type: mailbox_provider
                    - date: '2015-10-21'
                      stats:
                        - metrics:
                            blocks: 0
                            bounces: 0
                            clicks: 0
                            deferred: 0
                            delivered: 1
                            drops: 0
                            opens: 1
                            processed: 0
                            requests: 0
                            spam_reports: 0
                            unique_clicks: 0
                            unique_opens: 1
                          name: Gmail
                          type: mailbox_provider
                    - date: '2015-10-22'
                      stats:
                        - metrics:
                            blocks: 0
                            bounces: 0
                            clicks: 0
                            deferred: 0
                            delivered: 0
                            drops: 0
                            opens: 0
                            spam_reports: 0
                            unique_clicks: 0
                            unique_opens: 0
                          name: Gmail
                          type: mailbox_provider
                    - date: '2015-10-23'
                      stats:
                        - metrics:
                            blocks: 0
                            bounces: 0
                            clicks: 0
                            deferred: 0
                            delivered: 0
                            drops: 0
                            opens: 0
                            processed: 0
                            requests: 0
                            spam_reports: 0
                            unique_clicks: 0
                            unique_opens: 0
                          name: Gmail
                          type: mailbox_provider
                    - date: '2015-10-24'
                      stats:
                        - metrics:
                            blocks: 0
                            bounces: 0
                            clicks: 0
                            deferred: 0
                            delivered: 0
                            drops: 0
                            opens: 0
                            processed: 0
                            requests: 0
                            spam_reports: 0
                            unique_clicks: 0
                            unique_opens: 0
                          name: Gmail
                          type: mailbox_provider
                    - date: '2015-10-25'
                      stats:
                        - metrics:
                            blocks: 0
                            bounces: 0
                            clicks: 0
                            deferred: 0
                            delivered: 0
                            drops: 0
                            opens: 0
                            processed: 0
                            requests: 0
                            spam_reports: 0
                            unique_clicks: 0
                            unique_opens: 0
                          name: Gmail
                          type: mailbox_provider
                    - date: '2015-10-26'
                      stats:
                        - metrics:
                            blocks: 0
                            bounces: 0
                            clicks: 0
                            deferred: 0
                            delivered: 2
                            drops: 0
                            opens: 2
                            processed: 0
                            requests: 0
                            spam_reports: 0
                            unique_clicks: 0
                            unique_opens: 2
                          name: Gmail
                          type: mailbox_provider
                    - date: '2015-10-27'
                      stats:
                        - metrics:
                            blocks: 0
                            bounces: 0
                            clicks: 0
                            deferred: 0
                            delivered: 0
                            drops: 0
                            opens: 0
                            processed: 0
                            requests: 0
                            spam_reports: 0
                            unique_clicks: 0
                            unique_opens: 0
                          name: Gmail
                          type: mailbox_provider
                    - date: '2015-10-28'
                      stats:
                        - metrics:
                            blocks: 0
                            bounces: 0
                            clicks: 0
                            deferred: 0
                            delivered: 0
                            drops: 0
                            opens: 0
                            processed: 0
                            requests: 0
                            spam_reports: 0
                            unique_clicks: 0
                            unique_opens: 0
                          name: Gmail
                          type: mailbox_provider
                    - date: '2015-10-29'
                      stats:
                        - metrics:
                            blocks: 0
                            bounces: 0
                            clicks: 0
                            deferred: 0
                            delivered: 0
                            drops: 0
                            opens: 0
                            processed: 0
                            requests: 0
                            spam_reports: 0
                            unique_clicks: 0
                            unique_opens: 0
                          name: Gmail
                          type: mailbox_provider
                    - date: '2015-10-30'
                      stats:
                        - metrics:
                            blocks: 0
                            bounces: 0
                            clicks: 0
                            deferred: 0
                            delivered: 0
                            drops: 0
                            opens: 0
                            processed: 0
                            requests: 0
                            spam_reports: 0
                            unique_clicks: 0
                            unique_opens: 0
                          name: Gmail
                          type: mailbox_provider
                    - date: '2015-10-31'
                      stats:
                        - metrics:
                            blocks: 0
                            bounces: 0
                            clicks: 0
                            deferred: 0
                            delivered: 0
                            drops: 0
                            opens: 0
                            processed: 0
                            requests: 0
                            spam_reports: 0
                            unique_clicks: 0
                            unique_opens: 0
                          name: Gmail
                          type: mailbox_provider
                    - date: '2015-11-01'
                      stats:
                        - metrics:
                            blocks: 0
                            bounces: 0
                            clicks: 0
                            deferred: 0
                            delivered: 0
                            drops: 0
                            opens: 0
                            processed: 0
                            requests: 0
                            spam_reports: 0
                            unique_clicks: 0
                            unique_opens: 0
                          name: Gmail
                          type: mailbox_provider
                    - date: '2015-11-02'
                      stats:
                        - metrics:
                            blocks: 0
                            bounces: 0
                            clicks: 0
                            deferred: 0
                            delivered: 0
                            drops: 0
                            opens: 0
                            processed: 0
                            requests: 0
                            spam_reports: 0
                            unique_clicks: 0
                            unique_opens: 0
                          name: Gmail
                          type: mailbox_provider
                    - date: '2015-11-03'
                      stats:
                        - metrics:
                            blocks: 0
                            bounces: 0
                            clicks: 0
                            deferred: 0
                            delivered: 0
                            drops: 0
                            opens: 0
                            processed: 0
                            requests: 0
                            spam_reports: 0
                            unique_clicks: 0
                            unique_opens: 0
                          name: Gmail
                          type: mailbox_provider
                    - date: '2015-11-04'
                      stats:
                        - metrics:
                            blocks: 0
                            bounces: 0
                            clicks: 0
                            deferred: 0
                            delivered: 0
                            drops: 0
                            opens: 0
                            processed: 0
                            requests: 0
                            spam_reports: 0
                            unique_clicks: 0
                            unique_opens: 0
                          name: Gmail
                          type: mailbox_provider
                    - date: '2015-11-05'
                      stats:
                        - metrics:
                            blocks: 0
                            bounces: 0
                            clicks: 0
                            deferred: 0
                            delivered: 0
                            drops: 0
                            opens: 0
                            processed: 0
                            requests: 0
                            spam_reports: 0
                            unique_clicks: 0
                            unique_opens: 0
                          name: Gmail
                          type: mailbox_provider
                    - date: '2015-11-06'
                      stats:
                        - metrics:
                            blocks: 0
                            bounces: 0
                            clicks: 0
                            deferred: 0
                            delivered: 0
                            drops: 0
                            opens: 0
                            processed: 0
                            requests: 0
                            spam_reports: 0
                            unique_clicks: 0
                            unique_opens: 0
                          name: Gmail
                          type: mailbox_provider
                    - date: '2015-11-07'
                      stats:
                        - metrics:
                            blocks: 0
                            bounces: 0
                            clicks: 0
                            deferred: 0
                            delivered: 0
                            drops: 0
                            opens: 0
                            processed: 0
                            requests: 0
                            spam_reports: 0
                            unique_clicks: 0
                            unique_opens: 0
                          name: Gmail
                          type: mailbox_provider
                    - date: '2015-11-08'
                      stats:
                        - metrics:
                            blocks: 0
                            bounces: 0
                            clicks: 0
                            deferred: 0
                            delivered: 0
                            drops: 0
                            opens: 0
                            processed: 0
                            requests: 0
                            spam_reports: 0
                            unique_clicks: 0
                            unique_opens: 0
                          name: Gmail
                          type: mailbox_provider
                    - date: '2015-11-09'
                      stats:
                        - metrics:
                            blocks: 0
                            bounces: 0
                            clicks: 0
                            deferred: 0
                            delivered: 0
                            drops: 0
                            opens: 0
                            processed: 0
                            requests: 0
                            spam_reports: 0
                            unique_clicks: 0
                            unique_opens: 0
                          name: Gmail
                          type: mailbox_provider
                    - date: '2015-11-10'
                      stats:
                        - metrics:
                            blocks: 0
                            bounces: 0
                            clicks: 0
                            deferred: 0
                            delivered: 0
                            drops: 0
                            opens: 0
                            processed: 0
                            requests: 0
                            spam_reports: 0
                            unique_clicks: 0
                            unique_opens: 0
                          name: Gmail
                          type: mailbox_provider
              schema:
                items:
                  properties:
                    date:
                      description: The date that the statistics were gathered.
                      type: string
                    stats:
                      description: The list of statistics.
                      items:
                        properties:
                          metrics:
                            $ref: '#/components/schemas/advanced_stats_mailbox_provider'
                          name:
                            description: The name of the specific segmentation.
                            type: string
                          type:
                            description: The type of segmentation.
                            type: string
                        type: object
                      type: array
                  type: object
                type: array
          description: ''
      security:
        - Authorization: []
      summary: Retrieve email statistics by mailbox provider.
      tags:
        - Stats
  /marketing/contacts:
    delete:
      description:
        "**This endpoint can be used to delete one or more contacts**.\n\nThe
        query parameter `ids` must set to a comma-separated list of contact IDs
        for bulk contact deletion.\n\nThe query parameter `delete_all_contacts`
        must be set to `\"true\"` to delete **all** contacts. \n\nYou must set
        either `ids` or `delete_all_contacts`.\n\nDeletion jobs are processed
        asynchronously.\n\nTwilio SendGrid recommends exporting your contacts
        regularly as a backup to avoid issues or lost data."
      operationId: DELETE_mc-contacts
      parameters:
        - description: Must be set to `"true"` to delete all contacts.
          in: query
          name: delete_all_contacts
          required: false
          schema:
            type: string
        - description: A comma-separated list of contact IDs.
          in: query
          name: ids
          required: false
          schema:
            type: string
      responses:
        '202':
          content:
            application/json:
              schema:
                description:
                  The deletion job has been accepted and is being processed.
                properties:
                  job_id:
                    description: The deletion job ID.
                    type: object
                required:
                  - job_id
                type: object
          description: ''
        '400':
          content:
            application/json:
              schema:
                properties:
                  errors:
                    items:
                      type: object
                    type: array
                required:
                  - errors
                type: object
          description: ''
        '401':
          $ref: '#/components/responses/trait_globalErrors_401'
        '403':
          $ref: '#/components/responses/trait_globalErrors_403'
        '404':
          $ref: '#/components/responses/trait_globalErrors_404'
        '500':
          $ref: '#/components/responses/trait_globalErrors_500'
      security:
        - Authorization: []
      summary: Delete Contacts
      tags:
        - Contacts
    get:
      description:
        "**This endpoint will return up to 50 of the most recent contacts
        uploaded or attached to a list**. \n\nThis list will then be sorted by
        email address.\n\nThe full contact count is also returned.\n\nPlease
        note that pagination of the contacts has been deprecated.\n\nTwilio
        SendGrid recommends exporting your contacts regularly as a backup to
        avoid issues or lost data."
      operationId: GET_mc-contats
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  _metadata:
                    $ref: '#/components/schemas/selfmetadata'
                  contact_count:
                    type: integer
                  result:
                    items:
                      $ref: '#/components/schemas/contact-details3'
                    type: array
                type: object
          description: ''
        '400':
          content:
            application/json:
              schema:
                properties:
                  errors:
                    items:
                      $ref: '#/components/schemas/error'
                    type: array
                type: object
          description: ''
        '401':
          $ref: '#/components/responses/trait_globalErrors_401'
        '403':
          $ref: '#/components/responses/trait_globalErrors_403'
        '404':
          content:
            application/json:
              schema:
                type: object
          description: ''
        '500':
          $ref: '#/components/responses/trait_globalErrors_500'
      security:
        - Authorization: []
      summary: Get Sample Contacts
      tags:
        - Contacts
    put:
      description: "**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**. \n\nBecause
        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. \n\nPlease 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.\n\nYou 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.\n\nIf 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.\n\nThe 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.\n\nTwilio SendGrid recommends
        exporting your contacts regularly as a backup to avoid issues or lost
        data."
      operationId: PUT_mc-contacts
      requestBody:
        content:
          application/json:
            schema:
              properties:
                contacts:
                  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.
                  items:
                    $ref: '#/components/schemas/contact-request'
                  maxItems: 30000
                  minItems: 1
                  type: array
                list_ids:
                  description:
                    An array of List ID strings that this contact will be added
                    to.
                  items:
                    format: uuid
                    type: string
                  type: array
              required:
                - contacts
              type: object
      responses:
        '202':
          content:
            application/json:
              schema:
                properties:
                  job_id:
                    description:
                      Indicates that the contacts are queued for processing.
                      Check the job status with the "Import Contacts Status"
                      endpoint.
                    type: string
                type: object
          description: ''
        '400':
          content:
            application/json:
              schema:
                properties:
                  errors:
                    items:
                      $ref: '#/components/schemas/error'
                    type: array
                type: object
          description: ''
        '401':
          $ref: '#/components/responses/trait_globalErrors_401'
        '403':
          $ref: '#/components/responses/trait_globalErrors_403'
        '404':
          $ref: '#/components/responses/trait_globalErrors_404'
        '500':
          $ref: '#/components/responses/trait_globalErrors_500'
      security:
        - Authorization: []
      summary: Add or Update a Contact
      tags:
        - Contacts
  /marketing/contacts/batch:
    post:
      description: '**This endpoint is used to retrieve a set of contacts
        identified by their IDs.**


        This can be more efficient endpoint to get contacts than making a series
        of individual `GET` requests to the "Get a Contact by ID" endpoint.


        You can supply up to 100 IDs. Pass them into the `ids` field in your
        request body as an array or one or more strings.


        Twilio SendGrid recommends exporting your contacts regularly as a backup
        to avoid issues or lost data.'
      operationId: POST_marketing-contacts-batch
      requestBody:
        content:
          application/json:
            schema:
              description: Array of IDs
              example:
                ids:
                  - '1234'
                  - '1235'
              properties:
                ids:
                  items:
                    type: string
                  maxItems: 100
                  type: array
              required:
                - ids
              type: object
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  result:
                    items:
                      $ref: '#/components/schemas/contact-details3'
                    type: array
                type: object
          description: ''
        '401':
          $ref: '#/components/responses/trait_globalErrors_401'
        '403':
          $ref: '#/components/responses/trait_globalErrors_403'
        '404':
          content:
            application/json:
              schema:
                type: object
          description: ''
        '500':
          $ref: '#/components/responses/trait_globalErrors_500'
      summary: Get Batched Contacts by IDs
      tags:
        - Contacts
  /marketing/contacts/count:
    get:
      description: '**This endpoint returns the total number of contacts you
        have stored.**



        Twilio SendGrid recommends exporting your contacts regularly as a backup
        to avoid issues or lost data.'
      operationId: GET_mc-contacts-count
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  billable_breakdown:
                    description:
                      '`billable_breakdown` will only appear to the parent user
                      in an account with subusers.'
                    properties:
                      breakdown:
                        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
                        type: object
                      total:
                        description:
                          The sum of all the subuser's billable contacts
                        type: integer
                    type: object
                  billable_count:
                    default: 0
                    description:
                      The count of contacts this month for billing purposes.
                    minimum: 0
                    type: integer
                  contact_count:
                    description: The total number of contacts.
                    type: integer
                required:
                  - contact_count
                type: object
          description: ''
        '401':
          $ref: '#/components/responses/trait_globalErrors_401'
        '403':
          $ref: '#/components/responses/trait_globalErrors_403'
        '404':
          $ref: '#/components/responses/trait_globalErrors_404'
        '500':
          $ref: '#/components/responses/trait_globalErrors_500'
      security:
        - Authorization: []
      summary: Get Total Contact Count
      tags:
        - Contacts
  /marketing/contacts/exports:
    get:
      description:
        "**Use this endpoint to retrieve details of all current exported
        jobs**.\n\nIt will return an array of objects, each of which records an
        export job in flight or recently completed. \n\nEach object's
        `export_type` field will tell you which kind of export it is and its
        `status` field will indicate what stage of processing it has reached.
        Exports which are `ready` will be accompanied by a `urls` field which
        lists the URLs of the export's downloadable files — there will be more
        than one if you specified a maximum file size in your initial export
        request.\n\nUse this endpoint if you have exports in flight but do not
        know their IDs, which are required for the \"Export Contacts Status\"
        endpoint.\n\nTwilio SendGrid recommends exporting your contacts
        regularly as a backup to avoid issues or lost data."
      operationId: GET_marketing-contacts-exports
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  _metadata:
                    properties:
                      next:
                        description: Link to next page.
                        type: string
                      prev:
                        type: string
                      self:
                        description: Link to this page.
                        type: string
                    type: object
                  result:
                    items:
                      properties:
                        _metadata:
                          properties:
                            next:
                              type: string
                            prev:
                              type: string
                            self:
                              type: string
                          type: object
                        completed_at:
                          description:
                            This ISO8601 timestamp when the export was
                            completed.
                          type: string
                        created_at:
                          description:
                            This ISO8601 timestamp when the export was created.
                          type: string
                        expires_at:
                          description:
                            This ISO8601 timestamp when the export expires.
                          type: string
                        export_type:
                          description:
                            'Allowed types: `contacts_export`, `list_export`, or
                            `segment_export`.'
                          type: string
                        id:
                          description: Export jobs ID.
                          type: string
                        lists:
                          items:
                            properties:
                              ID:
                                type: string
                              Name:
                                type: string
                            type: object
                          type: array
                        segments:
                          items:
                            properties:
                              ID:
                                type: string
                              Name:
                                type: string
                            type: object
                          type: array
                        status:
                          description:
                            'Allowed values: `pending`, `ready`, or `failure`.'
                          type: string
                        urls:
                          description:
                            One or more download URLs for the contact file(s) if
                            the status is `ready`.
                          items:
                            type: string
                          type: array
                        user_id:
                          description: User ID.
                          type: string
                      type: object
                    type: array
                type: object
          description: ''
        '400':
          content:
            application/json:
              schema:
                properties:
                  errors:
                    items:
                      properties:
                        '':
                          type: string
                        error_id:
                          type: string
                        message:
                          type: string
                      required:
                        - message
                      type: object
                    type: array
                type: object
          description: ''
        '401':
          $ref: '#/components/responses/trait_globalErrors_401'
        '403':
          $ref: '#/components/responses/trait_globalErrors_403'
        '404':
          $ref: '#/components/responses/trait_globalErrors_404'
        '500':
          $ref: '#/components/responses/trait_globalErrors_500'
      security:
        - Authorization: []
      summary: Get All Existing Exports
      tags:
        - Contacts
    post:
      description: '**Use this endpoint to export lists or segments of
        contacts**.


        If you would just like to have a link to the exported list sent to your
        email set the `notifications.email` option to `true` in the `POST`
        payload.


        If you would like to download the list, take the `id` that is returned
        and use the "Export Contacts Status" endpoint to get the `urls`. Once
        you have the list of URLs, make a `GET` request to each URL provided to
        download your CSV file(s).


        You specify the segements and or/contact lists you wish to export by
        providing the relevant IDs in, respectively, the `segment_ids` and
        `list_ids` fields in the request body.


        The lists will be provided in either JSON or CSV files. To specify which
        of these you would required, set the request body `file_type` field to
        `json` or `csv`.


        You can also specify a maximum file size (in MB). If the export file is
        larger than this, it will be split into multiple files.


        Twilio SendGrid recommends exporting your contacts regularly as a backup
        to avoid issues or lost data.'
      operationId: POST_mc-contacts-exports
      requestBody:
        content:
          application/json:
            schema:
              properties:
                file_type:
                  default: csv
                  description:
                    File type for export file. Choose from `json` or `csv`.
                  enum:
                    - csv
                    - json
                  type: string
                list_ids:
                  description: IDs of the contact lists you want to export.
                  items:
                    format: uuid
                    type: string
                  type: array
                max_file_size:
                  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.
                  type: integer
                notifications:
                  properties:
                    email:
                      type: boolean
                  type: object
                segment_ids:
                  description: IDs of the contact segments you want to export.
                  items:
                    type: string
                  type: array
              type: object
      responses:
        '202':
          content:
            application/json:
              schema:
                properties:
                  _metadata:
                    $ref: '#/components/schemas/metadata'
                  id:
                    description: The ID of the export job.
                    type: string
                required:
                  - _metadata
                type: object
          description: ''
        '400':
          content:
            application/json:
              schema:
                properties:
                  errors:
                    items:
                      $ref: '#/components/schemas/error'
                    type: array
                type: object
          description: ''
        '401':
          $ref: '#/components/responses/trait_globalErrors_401'
        '403':
          $ref: '#/components/responses/trait_globalErrors_403'
        '404':
          $ref: '#/components/responses/trait_globalErrors_404'
        '500':
          $ref: '#/components/responses/trait_globalErrors_500'
      security:
        - Authorization: []
      summary: Export Contacts
      tags:
        - Contacts
  /marketing/contacts/exports/{id}:
    get:
      description:
        "**This endpoint can be used to check the status of a contact export
        job**. \n\nTo use this call, you will need the `id` from the \"Export
        Contacts\" call.\n\nIf you would like to download a list, take the `id`
        that is returned from the \"Export Contacts\" endpoint and make an API
        request here to get the `urls`. Once you have the list of URLs, make a
        `GET` request on each URL to download your CSV file(s).\n\nTwilio
        SendGrid recommends exporting your contacts regularly as a backup to
        avoid issues or lost data."
      operationId: GET_mc-contacts-exports-id
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/contact-export'
          description: ''
        '400':
          content:
            application/json:
              schema:
                properties:
                  errors:
                    items:
                      $ref: '#/components/schemas/error'
                    type: array
                type: object
          description: ''
        '401':
          $ref: '#/components/responses/trait_globalErrors_401'
        '403':
          $ref: '#/components/responses/trait_globalErrors_403'
        '404':
          $ref: '#/components/responses/trait_globalErrors_404'
        '500':
          $ref: '#/components/responses/trait_globalErrors_500'
      security:
        - Authorization: []
      summary: Export Contacts Status
      tags:
        - Contacts
    parameters:
      - in: path
        name: id
        required: true
        schema:
          type: string
  /marketing/contacts/imports:
    put:
      description: "**This endpoint allows a CSV upload containing up to one
        million contacts or 5GB of data, whichever is smaller.**\n\nImports 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.\n\nUploaded CSV files
        may also be [gzip-compressed](https://en.wikipedia.org/wiki/Gzip).\n\nIn
        either case, you must include the field `file_type` with the value `csv`
        in your request body.\n\nThe `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. \n\nFor 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`.\n\nOnce 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:\n\n`curl --upload-file
        \"file/path.csv\" \"URL_GIVEN\" -H 'HEADER_GIVEN'`\n\nIf you'd like to
        monitor the status of your import job, use the `job_id` and the \"Import
        Contacts Status\" endpoint.\nTwilio SendGrid recommends exporting your
        contacts regularly as a backup to avoid issues or lost data."
      operationId: PUT_mc-contacts-imports
      requestBody:
        content:
          application/json:
            schema:
              properties:
                field_mappings:
                  description:
                    Import file header to reserved/custom field mapping.
                  items:
                    anyOf:
                      - type: string
                      - nullable: true
                  minItems: 1
                  type: array
                  uniqueItems: false
                file_type:
                  description: Upload file type.
                  enum:
                    - csv
                  type: string
                list_ids:
                  description:
                    All contacts will be added to each of the specified lists.
                  items:
                    type: string
                  type: array
              required:
                - file_type
                - field_mappings
              type: object
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  job_id:
                    description: The ID of the import job.
                    type: string
                  upload_headers:
                    description:
                      A list of headers that must be included in PUT request.
                    items:
                      properties:
                        header:
                          type: string
                        value:
                          type: string
                      required:
                        - header
                        - value
                      type: object
                    type: array
                  upload_uri:
                    description: The URI to PUT the upload file to.
                    type: string
                type: object
          description: ''
        '400':
          content:
            application/json:
              schema:
                properties:
                  errors:
                    items:
                      $ref: '#/components/schemas/error'
                    type: array
                    uniqueItems: true
                required:
                  - errors
                type: object
          description: ''
        '401':
          $ref: '#/components/responses/trait_globalErrors_401'
        '403':
          $ref: '#/components/responses/trait_globalErrors_403'
        '404':
          content:
            application/json:
              schema:
                description: If any of the specified lists do not exist.
                properties:
                  errors:
                    items:
                      $ref: '#/components/schemas/error'
                    type: array
                    uniqueItems: true
                required:
                  - errors
                type: object
          description: ''
        '500':
          $ref: '#/components/responses/trait_globalErrors_500'
      security:
        - Authorization: []
      summary: Import Contacts
      tags:
        - Contacts
  /marketing/contacts/imports/{id}:
    get:
      description:
        "**This endpoint can be used to check the status of a contact import
        job**. \n\nUse the `job_id` from the \"Import Contacts,\" \"Add or
        Update a Contact,\" or \"Delete Contacts\" endpoints as the `id` in the
        path parameter.\n\nIf there is an error with your `PUT` request,
        download the `errors_url` file and open it to view more details.\n\nThe
        job `status` field indicates whether the job is `pending`, `completed`,
        `errored`, or `failed`. \n\nPending means not started. Completed means
        finished without any errors. Errored means finished with some errors.
        Failed means finshed with all errors, or the job was entirely
        unprocessable: for example, if you attempt to import file format we do
        not support.\n\nThe `results` object will have fields depending on the
        job type.\n\nTwilio SendGrid recommends exporting your contacts
        regularly as a backup to avoid issues or lost data."
      operationId: GET_marketing-contacts-imports-id
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/contact-import'
          description: ''
        '400':
          content:
            application/json:
              schema:
                properties:
                  errors:
                    $ref: '#/components/schemas/error'
                type: object
          description: ''
        '401':
          $ref: '#/components/responses/trait_globalErrors_401'
        '403':
          $ref: '#/components/responses/trait_globalErrors_403'
        '404':
          $ref: '#/components/responses/trait_globalErrors_404'
        '500':
          $ref: '#/components/responses/trait_globalErrors_500'
      security:
        - Authorization: []
      summary: Import Contacts Status
      tags:
        - Contacts
    parameters:
      - in: path
        name: id
        required: true
        schema:
          type: string
  /marketing/contacts/search:
    post:
      description: "**Use this endpoint to locate contacts**.


        The request body's `query` field accepts valid
        [SGQL](https://sendgrid.com/docs/for-developers/sending-email/segmentation-query-language/)
        for searching for a contact.


        Because contact emails are stored in lower case, using SGQL to search by
        email address requires the provided email address to be in lower case.
        The SGQL `lower()` function can be used for this.


        Only the first 50 contacts that meet the search criteria will be
        returned.


        If the query takes longer than 20 seconds, a `408 Request Timeout`
        status will be returned.


        Formatting the `created_at` and `updated_at` values as Unix timestamps
        is deprecated. Instead they are returned as ISO format as string.

        Twilio SendGrid recommends exporting your contacts regularly as a backup
        to avoid issues or lost data."
      operationId: POST_mc-contacts-search
      requestBody:
        content:
          application/json:
            schema:
              example:
                query:
                  email LIKE 'ENTER_COMPLETE_OR_PARTIAL_EMAIL_ADDRESS_HERE%' AND
                  CONTAINS(list_ids, 'YOUR_LIST_IDs')
              properties:
                query:
                  type: string
                  x-Description: An SGQL search string or other pattern.
              required:
                - query
              type: object
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  _metadata:
                    $ref: '#/components/schemas/selfmetadata'
                  contact_count:
                    description: The total number of contacts matched.
                    type: number
                  result:
                    items:
                      $ref: '#/components/schemas/contact-details3'
                    type: array
                required:
                  - contact_count
                type: object
          description: ''
        '400':
          content:
            application/json:
              schema:
                properties:
                  errors:
                    items:
                      properties:
                        field:
                          type: string
                        message:
                          type: string
                      type: object
                    type: array
                type: object
          description: ''
        '401':
          $ref: '#/components/responses/trait_globalErrors_401'
        '403':
          $ref: '#/components/responses/trait_globalErrors_403'
        '404':
          $ref: '#/components/responses/trait_globalErrors_404'
        '408':
          description: ''
        '500':
          content:
            application/json:
              schema:
                properties:
                  errors:
                    items:
                      properties:
                        message:
                          type: string
                      type: object
                    type: array
                type: object
          description: ''
      security:
        - Authorization: []
      summary: Search Contacts
      tags:
        - Contacts
  /marketing/contacts/search/emails:
    post:
      description: "**This endpoint allows you to retrieve up to 100 contacts
        matching the searched `email` address(es), including any
        `alternate_emails`.** \n\nEmail addresses are unique to a contact,
        meaning this endpoint can treat an email address as a primary key to
        search by. The contact object associated with the address, whether it is
        their `email` or one of their `alternate_emails` will be returned if
        matched.\n\nEmail addresses in the search request do not need to match
        the case in which they're stored, but the email addresses in the result
        will be all lower case. Empty strings are excluded from the search and
        will not be returned.\n\nThis endpoint should be used in place of the
        \"Search Contacts\" endpoint when you can provide exact email addresses
        and do not need to include other [Segmentation Query Language
        (SGQL)](https://sendgrid.com/docs/for-developers/sending-email/segmentation-query-language/)
        filters when searching.\n\nIf you need to access a large percentage of
        your contacts,\
        \ we recommend exporting your contacts with the \"Export Contacts\"
        endpoint and filtering the results client side.\n\nThis endpoint returns
        a `200` status code when any contacts match the address(es) you
        supplied. When searching multiple addresses in a single request, it is
        possible that some addresses will match a contact while others will not.
        When a partially successful search like this is made, the matching
        contacts are returned in an object and an error message is returned for
        the email address(es) that are not found. \n\nThis endpoint returns a
        `404` status code when no contacts are found for the provided email
        address(es).\n\nA `400` status code is returned if any searched
        addresses are invalid.\n\nTwilio SendGrid recommends exporting your
        contacts regularly as a backup to avoid issues or lost data."
      operationId: POST_marketing-contacts-search-emails
      requestBody:
        content:
          application/json:
            schema:
              description: ''
              example:
                emails:
                  - jane_doe@example.com
                  - john_doe@example.com
                  - joann_doe@example.com
              properties:
                emails:
                  description:
                    One or more primary emails and/or alternate emails to search
                    through your contacts for.
                  items:
                    maxLength: 100
                    type: string
                  type: array
              required:
                - emails
              type: object
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    result:
                      jane_doe@example.com:
                        contact:
                          _metadata:
                            self: <metadata_url>
                          address_line_1: ''
                          address_line_2: ''
                          alternate_emails:
                            - janedoe@example1.com
                          city: ''
                          country: ''
                          created_at: '2021-03-02T15:25:47Z'
                          custom_fields: {}
                          email: jane_doe@example.com
                          facebook: ''
                          first_name: Jane
                          id: asdf-Jkl-zxCvBNm
                          last_name: Doe
                          line: ''
                          list_ids: []
                          phone_number: ''
                          postal_code: ''
                          segment_ids: []
                          state_province_region: ''
                          unique_name: ''
                          updated_at: '2021-03-30T15:26:16Z'
                          whatsapp: ''
                      joann_doe@example.com:
                        error: contact not found
                      john_doe@example.com:
                        contact:
                          _metadata:
                            self: <metadata_url>
                          address_line_1: ''
                          address_line_2: ''
                          alternate_emails: []
                          city: ''
                          country: ''
                          created_at: '2020-01-02T15:25:47Z'
                          custom_fields: {}
                          email: john_doe@example.com
                          facebook: ''
                          first_name: Jane
                          id: asdf-Jkl-qWeRTy
                          last_name: Doe
                          line: ''
                          list_ids: []
                          phone_number: ''
                          postal_code: ''
                          segment_ids: []
                          state_province_region: ''
                          unique_name: ''
                          updated_at: '2020-12-20T15:26:16Z'
                          whatsapp: ''
              schema:
                properties:
                  result:
                    additionalProperties: false
                    type: object
                    x-patternProperties:
                      ^[A-Za-z0-9\._%\+-]+@[A-Za-z0-9\.-]+\.[A-Za-z]{2,6}$:
                        description:
                          This will be one of the specified email adresses.
                        properties:
                          contact:
                            $ref: '#/components/schemas/contact-details3'
                          error:
                            type: string
                        type: object
                type: object
          description: ''
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/global_error_response_schema'
          description: ''
        '401':
          $ref: '#/components/responses/trait_globalErrors_401'
        '403':
          $ref: '#/components/responses/trait_globalErrors_403'
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/global_error_response_schema'
          description: ''
        '500':
          content:
            application/json:
              schema:
                properties:
                  errors:
                    items:
                      properties:
                        message:
                          type: string
                      type: object
                    type: array
                type: object
          description: ''
      security:
        - Authorization: []
      summary: Get Contacts by Emails
      tags:
        - Contacts
  /marketing/contacts/{id}:
    get:
      description: '**This endpoint returns the full details and all fields for
        the specified contact**.


        The "Get Contacts by Emails" endpoint can be used to get the ID of a
        contact.


        Twilio SendGrid recommends exporting your contacts regularly as a backup
        to avoid issues or lost data.'
      operationId: GET_mc-contacts-id
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/contact-details3'
          description: ''
        '401':
          $ref: '#/components/responses/trait_globalErrors_401'
        '403':
          $ref: '#/components/responses/trait_globalErrors_403'
        '404':
          description: ''
        '500':
          $ref: '#/components/responses/trait_globalErrors_500'
      security:
        - Authorization: []
      summary: Get a Contact by ID
      tags:
        - Contacts
    parameters:
      - in: path
        name: id
        required: true
        schema:
          type: string
  /marketing/field_definitions:
    get:
      description:
        '**This endpoint retrieves all defined Custom Fields and Reserved
        Fields.**'
      operationId: GET_mc-field_definitions
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    _metadata:
                      self: https://example.com/marketing/field_definitions
                    custom_fields:
                      - field_type: Number
                        id: w1
                        name: num_orders
                      - field_type: Date
                        id: w2
                        name: dob
                    reserved_fields:
                      - field_type: Text
                        id: _rf0_T
                        name: first_name
                      - field_type: Text
                        id: _rf1_T
                        name: last_name
                      - field_type: Text
                        id: _rf2_T
                        name: email
                      - field_type: Text
                        id: _rf3_T
                        name: alternate_emails
                      - field_type: Text
                        id: _rf4_T
                        name: address_line_1
                      - field_type: Text
                        id: _rf5_T
                        name: address_line_2
                      - field_type: Text
                        id: _rf6_T
                        name: city
                      - field_type: Text
                        id: _rf7_T
                        name: state_province_region
                      - field_type: Text
                        id: _rf8_T
                        name: postal_code
                      - field_type: Text
                        id: _rf9_T
                        name: country
                      - field_type: Text
                        id: _rf10_T
                        name: phone_number
                      - field_type: Text
                        id: _rf11_T
                        name: whatsapp
                      - field_type: Text
                        id: _rf12_T
                        name: line
                      - field_type: Text
                        id: _rf13_T
                        name: facebook
                      - field_type: Text
                        id: _rf14_T
                        name: unique_name
                      - field_type: Text
                        id: _rf15_T
                        name: email_domains
                        read_only: true
                      - field_type: Date
                        id: _rf16_D
                        name: last_clicked
                        read_only: true
                      - field_type: Date
                        id: _rf17_D
                        name: last_opened
                        read_only: true
                      - field_type: Date
                        id: _rf18_D
                        name: last_emailed
                        read_only: true
                      - field_type: Text
                        id: _rf19_T
                        name: singlesend_id
                        read_only: true
                      - field_type: Text
                        id: _rf20_T
                        name: automation_id
                        read_only: true
                      - field_type: Date
                        id: _rf21_D
                        name: created_at
                        read_only: true
                      - field_type: Date
                        id: _rf22_D
                        name: updated_at
                        read_only: true
                      - field_type: Text
                        id: _rf23_T
                        name: contact_id
                        read_only: true
              schema:
                maxProperties: 120
                minProperties: 0
                properties:
                  _metadata:
                    $ref: '#/components/schemas/_metadata'
                  custom_fields:
                    items:
                      $ref: '#/components/schemas/custom_field_definitions_response'
                    type: array
                  reserved_fields:
                    $ref: '#/components/schemas/reserved_field_definitions_response'
                required:
                  - custom_fields
                  - reserved_fields
                type: object
          description: ''
      security:
        - Authorization: []
      summary: Get All Field Definitions
      tags:
        - Custom Fields
    post:
      description: '**This endpoint creates a new custom field definition.**


        Custom field definitions are created with the given `name` and
        `field_type`. Although field names are stored in a case-sensitive
        manner, all field names must be case-insensitively unique. This means
        you may create a field named `CamelCase` or `camelcase`, but not both.
        Additionally, a Custom Field name cannot collide with any Reserved Field
        names. You should save the returned `id` value in order to update or
        delete the field at a later date. You can have up to 120 custom fields.


        The custom field name should be created using only alphanumeric
        characters (A-Z and 0-9) and underscores (\_). Custom fields can only
        begin with letters  A-Z or underscores (_). The field type can be date,
        text, or number fields. The field type is important for creating
        segments from your contact database.


        **Note: Creating a custom field that begins with a number will cause
        issues with sending in Marketing Campaigns.**'
      operationId: POST_mc-field_definitions
      requestBody:
        content:
          application/json:
            schema:
              example:
                field_type: Text
                name: custom_field_name
              properties:
                field_type:
                  enum:
                    - Text
                    - Number
                    - Date
                  type: string
                name:
                  maxLength: 100
                  minLength: 1
                  type: string
              required:
                - name
                - field_type
              type: object
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    _metadata:
                      self: https://api.sendgrid.com/v3/marketing/field_definitions/a1_B
                    field_type: Text
                    id: a1_T
                    name: custom_field_name
              schema:
                allOf:
                  - $ref: '#/components/schemas/custom_field_definitions_response'
                  - properties:
                      _metadata:
                        $ref: '#/components/schemas/_metadata'
                    type: object
          description: ''
        '400':
          content:
            application/json:
              schema:
                properties:
                  errors:
                    items:
                      $ref: '#/components/schemas/error'
                    type: array
                    uniqueItems: true
                required:
                  - errors
                type: object
          description: ''
      security:
        - Authorization: []
      summary: Create Custom Field Definition
      tags:
        - Custom Fields
  /marketing/field_definitions/{custom_field_id}:
    delete:
      description: '**This endpoint deletes a defined Custom Field.**


        You cand delete only Custom Fields; Reserved Fields cannot be deleted.'
      operationId: DELETE_mc-field_definitions-custom_field_id
      responses:
        '204':
          description: ''
        '404':
          content:
            application/json:
              schema:
                properties:
                  errors:
                    items:
                      $ref: '#/components/schemas/error'
                    type: array
                    uniqueItems: true
                required:
                  - errors
                type: object
          description: ''
      security:
        - Authorization: []
      summary: Delete Custom Field Definition
      tags:
        - Custom Fields
    parameters:
      - in: path
        name: custom_field_id
        required: true
        schema:
          type: string
    patch:
      description: '**This endopoint allows you to update a defined Custom
        Field.**


        Only your Custom fields can be modified; Reserved Fields cannot be
        updated.'
      operationId: PATCH_mc-field_definitions-custom_field_id
      requestBody:
        content:
          application/json:
            schema:
              example:
                name: new_custom_field_name
              properties:
                name:
                  maxLength: 100
                  minLength: 1
                  type: string
              required:
                - name
              type: object
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    _metadata:
                      self: https://api.sendgrid.com/v3/marketing/field_definitions/a1_B
                    field_type: Text
                    id: a1_T
                    name: custom_field_name
              schema:
                allOf:
                  - $ref: '#/components/schemas/custom_field_definitions_response'
                  - properties:
                      _metadata:
                        $ref: '#/components/schemas/_metadata'
                    type: object
          description: ''
        '400':
          content:
            application/json:
              schema:
                properties:
                  errors:
                    items:
                      $ref: '#/components/schemas/error'
                    type: array
                    uniqueItems: true
                required:
                  - errors
                type: object
          description: ''
        '404':
          content:
            application/json:
              schema:
                properties:
                  errors:
                    items:
                      $ref: '#/components/schemas/error'
                    type: array
                    uniqueItems: true
                required:
                  - errors
                type: object
          description: ''
      security:
        - Authorization: []
      summary: Update Custom Field Definition
      tags:
        - Custom Fields
  /marketing/lists:
    get:
      description:
        '**This endpoint returns an array of all of your contact lists.**'
      operationId: GET_mc-lists
      parameters:
        - description:
            Maximum number of elements to return. Defaults to 100, returns 1000
            max
          in: query
          name: page_size
          required: false
          schema:
            default: 100
            maximum: 1000
            minimum: 1
            type: number
        - in: query
          name: page_token
          required: false
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    _metadata:
                      self: https://api.sendgrid.com/v3/marketing/lists?page_size=100&page_token=
                    result:
                      - _metadata:
                          self: https://api.sendgrid.com/v3/marketing/lists/abc12312-x3y4-1234-abcd-123qwe456rty
                        contact_count: 0
                        id: abc12312-x3y4-1234-abcd-123qwe456rty
                        name: list-name
              schema:
                properties:
                  _metadata:
                    $ref: '#/components/schemas/metadata'
                  result:
                    items:
                      $ref: '#/components/schemas/list'
                    type: array
                type: object
          description: ''
      security:
        - Authorization: []
      summary: Get All Lists
      tags:
        - Lists
    post:
      description: '**This endpoint creates a new contacts list.**


        Once you create a list, you can use the UI to [trigger an
        automation](https://sendgrid.com/docs/ui/sending-email/getting-started-with-automation/#create-an-automation)
        every time you add a new contact to the list.


        A link to the newly created object is in `_metadata`.'
      operationId: POST_mc-lists
      requestBody:
        content:
          application/json:
            schema:
              example:
                name: list-name
              properties:
                name:
                  description: Your name for your list
                  maxLength: 100
                  minLength: 1
                  type: string
              required:
                - name
              type: object
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    _metadata:
                      self: https://api.sendgrid.com/v3/marketing/lists/ca7a3796-e8a8-4029-9ccb-df8937940562
                    contact_count: 0
                    id: ca7a3796-e8a8-4029-9ccb-df8937940562
                    name: list-name
              schema:
                $ref: '#/components/schemas/list'
          description: ''
        '400':
          content:
            application/json:
              schema:
                properties:
                  errors:
                    items:
                      $ref: '#/components/schemas/error'
                    type: array
                type: object
          description: ''
      security:
        - Authorization: []
      summary: Create List
      tags:
        - Lists
  /marketing/lists/{id}:
    delete:
      description: '**This endpoint allows you to deletes a specific list.**


        Optionally, you can also delete contacts associated to the list. The
        query parameter, `delete_contacts=true`, will delete the list and start
        an asynchronous job to delete associated contacts.'
      operationId: DELETE_lists-id
      parameters:
        - description:
            Flag indicates that all contacts on the list are also to be deleted.
          in: query
          name: delete_contacts
          required: false
          schema:
            default: false
            type: boolean
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    job_id: abc12312-x3y4-1234-abcd-123qwe456rty
              schema:
                description: The delete has been accepted and is processing.
                properties:
                  job_id:
                    description: job_id of the async job
                    type: string
                type: object
          description: ''
        '204':
          content:
            application/json:
              schema:
                description: 'The delete has been processed. '
                type: string
          description: ''
        '404':
          content:
            application/json:
              schema:
                properties:
                  errors:
                    items:
                      type: object
                    type: array
                required:
                  - errors
                type: object
          description: ''
      security:
        - Authorization: []
      summary: Delete a list
      tags:
        - Lists
    get:
      description: '**This endpoint returns data about a specific list.**


        Setting the optional parameter `contact_sample=true` returns the
        `contact_sample` in the response body. Up to fifty of the most recent
        contacts uploaded or attached to a list will be returned, sorted
        alphabetically, by email address.


        The full contact count is also returned.'
      operationId: GET_mc-lists-id
      parameters:
        - description:
            Setting this parameter to the true  will cause the contact_sample to
            be returned
          in: query
          name: contact_sample
          schema:
            default: false
            type: boolean
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    _metadata:
                      self: https://api.sendgrid.com/v3/marketing/lists/199abb98-0af3-4a8d-b371-6811ff85d062
                    contact_count: 2
                    contact_sample:
                      created_at: '2620-06-16T17:03:54.867Z'
                      id: c3445f88-5c69-4237-86e6-9ec9de958050
                      list_ids:
                        - 199abb98-0af3-4a8d-b371-6811ff85d062
                      updated_at: '4780-12-06T06:51:30.024Z'
                    id: 199abb98-0af3-4a8d-b371-6811ff85d062
                    name: list-name
              schema:
                allOf:
                  - $ref: '#/components/schemas/list'
                  - properties:
                      contact_sample:
                        $ref: '#/components/schemas/contact-details2'
                    type: object
          description: ''
        '404':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/error'
                type: array
          description: ''
      security:
        - Authorization: []
      summary: Get a List by ID
      tags:
        - Lists
    parameters:
      - in: path
        name: id
        required: true
        schema:
          type: string
    patch:
      description: '**This endpoint updates the name of a list.**'
      operationId: PATCH_mc-lists-id
      requestBody:
        content:
          application/json:
            schema:
              example:
                name: updated-list-name
              properties:
                name:
                  description: Your name for your list.
                  type: string
              type: object
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    _metadata:
                      self: https://api.sendgrid.com/v3/marketing/lists/abc12312-x3y4-1234-abcd-123qwe456rty
                    contact_count: 0
                    id: abc12312-x3y4-1234-abcd-123qwe456rty
                    name: updated-list-name
              schema:
                $ref: '#/components/schemas/list'
          description: ''
        '400':
          content:
            application/json:
              schema:
                properties:
                  errors:
                    items:
                      $ref: '#/components/schemas/error'
                    type: array
                type: object
          description: ''
        '404':
          content:
            application/json:
              schema:
                type: object
          description: ''
      security:
        - Authorization: []
      summary: Update List
      tags:
        - Lists
  /marketing/lists/{id}/contacts:
    delete:
      description: '**This endpoint allows you to remove contacts from a given
        list.**


        The contacts will not be deleted. Only their list membership will be
        changed.'
      operationId: DELETE_mc-lists-id-contacts
      parameters:
        - description: comma separated list of contact ids
          in: query
          name: contact_ids
          required: true
          schema:
            minLength: 1
            type: string
      responses:
        '202':
          content:
            application/json:
              schema:
                description: The removal is accepted and processing.
                properties:
                  job_id:
                    description: job_id of the async job
                    type: string
                type: object
          description: ''
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
          description: ''
        '404':
          content:
            application/json:
              schema:
                description:
                  If the specified list id does not exist. If the specified
                  contact does not exist.
          description: ''
      security:
        - Authorization: []
      summary: Remove Contacts from a List
      tags:
        - Lists
    parameters:
      - in: path
        name: id
        required: true
        schema:
          type: string
  /marketing/lists/{id}/contacts/count:
    get:
      description:
        '**This endpoint returns the number of contacts on a specific list.**'
      operationId: GET_mc-lists-id-contacts-count
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    'billable_count:': 0
                    contact_count: 0
              schema:
                properties:
                  billable_count:
                    type: integer
                  contact_count:
                    type: integer
                type: object
          description: ''
        '404':
          content:
            application/json:
              schema:
                type: object
          description: ''
      security:
        - Authorization: []
      summary: Get List Contact Count
      tags:
        - Lists
    parameters:
      - in: path
        name: id
        required: true
        schema:
          type: string
  /marketing/segments:
    get:
      description: '**This endpoint allows you to retrieve a list of segments.**


        The query param `parent_list_ids` is treated as a filter.  Any match
        will be returned.  0 matches will return a response code of 200 with an
        empty `results` array.


        `parent_list_ids` | `no_parent_list_id` | `result`

        -----------------:|:--------------------:|:-------------

        empty | false | all segments

        values | false | segments filtered by list_ids

        values | true | segments filtered by list_ids and segments with no
        parent list_ids

        empty | true | segments with no parent list_ids'
      operationId: GET_marketing-segments
      parameters:
        - description:
            A comma separated list of list ids to be used when searching for
            segments with the specified parent_list_id, no more than 50 is
            allowed
          in: query
          name: parent_list_ids
          schema:
            type: string
        - description:
            If set to `true` segments with an empty value of `parent_list_id`
            will be returned in the filter.  If the value is not present it
            defaults to 'false'.
          in: query
          name: no_parent_list_id
          schema:
            default: false
            type: boolean
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    results:
                      - contacts_count: 78434802
                        created_at: '2921-01-27T19:33:36.479Z'
                        id: 12099613-91e5-4d09-a900-df7626325288
                        sample_updated_at: '4685-11-26T07:05:04.660Z'
                        updated_at: '2883-07-10T13:13:37.697Z'
                      - contacts_count: 34177253
                        created_at: '2575-07-26T23:17:20.984Z'
                        id: 60c37015-3734-4c8e-b293-68cfa2ae4fa5
                        name: amet
                        parent_list_id: fd38af3d-3f69-4947-8dca-5fa967e7be82
                        sample_updated_at: '3074-09-04T09:49:58.127Z'
                        updated_at: '5116-10-15T07:37:40.838Z'
              schema:
                properties:
                  results:
                    items:
                      $ref: '#/components/schemas/segment_summary'
                    minItems: 0
                    type: array
                    uniqueItems: true
                required:
                  - results
                type: object
          description: ''
        '401':
          $ref: '#/components/responses/trait_globalErrors_401'
        '403':
          $ref: '#/components/responses/trait_globalErrors_403'
        '404':
          $ref: '#/components/responses/trait_globalErrors_404'
        '500':
          content:
            application/json:
              schema:
                properties:
                  errors:
                    items:
                      properties:
                        message:
                          type: string
                      required:
                        - message
                      type: object
                    type: array
                required:
                  - errors
                type: object
          description: ''
      security:
        - Authorization: []
      summary: Get List of Segments
      tags:
        - segmenting contacts
        - Segmenting Contacts
    post:
      description: '**This endpoint allows you to create a segment.**'
      operationId: POST_marketing-segments
      requestBody:
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/segment_write_v2'
                - properties:
                    parent_list_id:
                      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})`
                      format: uuid
                      maxLength: 36
                      minLength: 36
                      type: string
                  type: object
      responses:
        '201':
          content:
            application/json:
              examples:
                response:
                  value:
                    contact_summary:
                      address_line_1: ut sunt Duis eu
                      address_line_2: in culpa esse non
                      city: ÔXƫɋƄř
                      contact_id: 1a541ca7-9fef-42c8-8947-f3f8a3b33ffe
                      country: eiusmod
                      custom_fields:
                        custom_field_name1: est mollit officia adipisicing dolo
                        custom_field_name2: dolore cillum
                      first_name: exercitation Duis nisi
                      last_name: aut
                      list_ids:
                        - c856a255-12f1-4b55-8564-218fd7eb34a7
                        - 130c8813-0d6f-4b9e-b154-736bb9db2ff8
                        - c245021d-4444-4086-a498-3ffee7fa8cdf
                      postal_code: -88086402
                      primary_email: D8OsYF5ok@YtX.kcg
                      state_province_region: consequat culpa in
                    contacts_count: 0
                    created_at: mollit labore aute deserunt ad
                    id: 864feb2e-5e93-47bf-b63e-21746c988105
                    name: aute amet deserunt adipisicing
                    next_sample_update: culpa sit occaecat fugiat quis
                    query_dsl: email LIKE %twilio.com
                    sample_updated_at: enim culpa in
                    updated_at: minim
              schema:
                $ref: '#/components/schemas/full-segment'
          description: ''
        '401':
          $ref: '#/components/responses/trait_globalErrors_401'
        '403':
          $ref: '#/components/responses/trait_globalErrors_403'
        '404':
          $ref: '#/components/responses/trait_globalErrors_404'
        '500':
          content:
            application/json:
              schema:
                properties:
                  errors:
                    items:
                      properties:
                        message:
                          type: string
                      required:
                        - message
                      type: object
                    type: array
                required:
                  - errors
                type: object
          description: ''
      security:
        - Authorization: []
      summary: Create Segment
      tags:
        - segmenting contacts
        - Segmenting Contacts
  /marketing/segments/2.0:
    get:
      description: "**The Segmentation V2 API is currently in private beta. If
        you'd like to be added to the beta, please fill out this
        [form]({https://docs.google.com/forms/d/e/1FAIpQLSd5zwC9dRk8lAp1oTWjdGc-aSY69flW_7wnutvKBhpUluSnfQ/viewform)**


        The query param `parent_list_ids` is treated as a filter.  Any match
        will be returned.  0 matches will return a response code of 200 with an
        empty `results` array.


        `parent_list_ids` | `no_parent_list_id` | `result`

        -----------------:|:--------------------:|:-------------

        empty | false | all segments

        values | false | segments filtered by list_ids

        values | true | segments filtered by list_ids and segments with no
        parent list_ids

        empty | true | segments with no parent list_ids"
      operationId: GET_segments
      parameters:
        - description:
            A comma separated list up to 50 in size, to filter segments
            on.  Only segments that have any of these list ids as the parent
            list will be retrieved. This is different from the parameter of the
            same name used when creating a segment.
          in: query
          name: parent_list_ids
          required: false
          schema:
            type: string
        - description:
            If set to `true` segments with an empty value of `parent_list_id`
            will be returned in the filter.  If the value is not present it
            defaults to 'false'.
          in: query
          name: no_parent_list_id
          required: false
          schema:
            default: false
            type: boolean
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/all_segments_response'
          description: ''
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errors-seg-v2'
          description: ''
        '404':
          description: ''
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errors-seg-v2'
          description: ''
      security:
        - Authorization: []
      summary: Get List of Segments
      tags:
        - Segmenting Contacts V2 - Beta
    post:
      description: "**The Segmentation V2 API is currently in private beta. If
        you'd like to be added to the beta, please fill out this
        [form]({https://docs.google.com/forms/d/e/1FAIpQLSd5zwC9dRk8lAp1oTWjdGc-aSY69flW_7wnutvKBhpUluSnfQ/viewform)**


        Segment `name` has to be unique. A user can not create a new segment
        with an existing segment name."
      operationId: POST_segments
      requestBody:
        $ref: '#/components/requestBodies/segment_write_v2'
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/segment_response'
          description: ''
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errors-seg-v2'
          description: ''
        '404':
          description: ''
        '429':
          description: ''
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errors-seg-v2'
          description: ''
      security:
        - Authorization: []
      summary: Create Segment
      tags:
        - Segmenting Contacts V2 - Beta
  /marketing/segments/2.0/{segment_id}:
    delete:
      description:
        "**The Segmentation V2 API is currently in private beta. If you'd like
        to be added to the beta, please fill out this
        [form]({https://docs.google.com/forms/d/e/1FAIpQLSd5zwC9dRk8lAp1oTWjdGc-aSY69flW_7wnutvKBhpUluSnfQ/viewform)**"
      operationId: DELETE_segments-segment_id
      responses:
        '202':
          description: ''
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errors-seg-v2'
          description: ''
        '404':
          description: ''
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errors-seg-v2'
          description: ''
      security:
        - Authorization: []
      summary: Delete segment
      tags:
        - Segmenting Contacts V2 - Beta
    get:
      description:
        "**The Segmentation V2 API is currently in private beta. If you'd like
        to be added to the beta, please fill out this
        [form]({https://docs.google.com/forms/d/e/1FAIpQLSd5zwC9dRk8lAp1oTWjdGc-aSY69flW_7wnutvKBhpUluSnfQ/viewform)**"
      operationId: GET_segments-segment_id
      parameters:
        - description:
            Defaults to `true`. Set to `false` to exclude the contacts_sample in
            the response.
          in: query
          name: contacts_sample
          schema:
            type: boolean
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/segment_response'
          description: ''
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errors-seg-v2'
          description: ''
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errors-seg-v2'
          description: ''
      security:
        - Authorization: []
      summary: Get Segment by ID
      tags:
        - Segmenting Contacts V2 - Beta
    parameters:
      - in: path
        name: segment_id
        required: true
        schema:
          type: string
    patch:
      description: "**The Segmentation V2 API is currently in private beta. If
        you'd like to be added to the beta, please fill out this
        [form]({https://docs.google.com/forms/d/e/1FAIpQLSd5zwC9dRk8lAp1oTWjdGc-aSY69flW_7wnutvKBhpUluSnfQ/viewform)**


        Segment `name` has to be unique. A user can not create a new segment
        with an existing segment name."
      operationId: PATCH_segments-segment_id
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/segment_update'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/segment_response'
          description: ''
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errors-seg-v2'
          description: ''
        '429':
          description: ''
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errors-seg-v2'
          description: ''
      security:
        - Authorization: []
      summary: Update Segment
      tags:
        - Segmenting Contacts V2 - Beta
  /marketing/segments/delete:
    post:
      description: 'This endpoint allows you to delete segments in bulk.


        If the segments are used by automations or the segments do not exist in
        the database, the segment IDs that could not be deleted along with
        automation IDs that are associated to those segments will be returned.'
      operationId: POST_marketing-segments-delete
      requestBody:
        content:
          application/json:
            schema:
              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:
                  items:
                    format: uuid
                    type: string
                  type: array
              type: object
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  errors:
                    items:
                      properties:
                        error:
                          description:
                            error message that indicates why segment cannot be
                            deleted ("in-use", "segment not found", "invalid
                            uuid")
                          type: string
                        id:
                          description: Segment ID
                          type: string
                        resources:
                          description: resources in which segment is being used
                          properties:
                            ids:
                              description: the resource ids
                              items:
                                type: string
                              type: array
                            type:
                              description:
                                the type of resource in use (e.g., "automation")
                              type: string
                          type: object
                      type: object
                    type: array
                type: object
          description: ''
        '202':
          content:
            application/json:
              schema:
                type: object
          description: ''
        '400':
          content:
            application/json:
              schema:
                properties:
                  errors:
                    items:
                      properties:
                        field:
                          type: string
                        message:
                          type: string
                      type: object
                    type: array
                type: object
          description: ''
        '401':
          $ref: '#/components/responses/trait_globalErrors_401'
        '403':
          $ref: '#/components/responses/trait_globalErrors_403'
        '404':
          $ref: '#/components/responses/trait_globalErrors_404'
        '500':
          $ref: '#/components/responses/trait_globalErrors_500'
      security:
        - Authorization: []
      summary: Bulk Delete Segments
      tags:
        - Segmenting Contacts
  /marketing/segments/{segment_id}:
    delete:
      description: '**This endpoint allows you to delete a segment by
        `segment_id`.**


        Note that deleting a segment does not delete the contacts associated
        with the segment by default. Contacts associated with a deleted segment
        will remain in your list of all contacts and any other segments they
        belong to.'
      operationId: DELETE_marketing-segments-segment_id
      responses:
        '202':
          content:
            application/json:
              schema:
                type: object
          description: ''
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/global_error_response_schema'
          description: ''
        '401':
          $ref: '#/components/responses/trait_globalErrors_401'
        '403':
          $ref: '#/components/responses/trait_globalErrors_403'
        '404':
          content:
            application/json:
              schema:
                properties:
                  errors:
                    items:
                      properties:
                        field:
                          type: string
                        message:
                          type: string
                      required:
                        - message
                        - field
                      type: object
                    type: array
                required:
                  - errors
                type: object
          description: ''
        '500':
          content:
            application/json:
              schema:
                properties:
                  errors:
                    items:
                      properties:
                        message:
                          type: string
                      required:
                        - message
                      type: object
                    type: array
                required:
                  - errors
                type: object
          description: ''
      security:
        - Authorization: []
      summary: Delete Segment
      tags:
        - segmenting contacts
        - Segmenting Contacts
    get:
      description:
        '**This endpoint allows you to retrieve a single segment by ID.**'
      operationId: GET_marketing-segments-segment_id
      parameters:
        - description:
            Defaults to `false`.  Set to `true` to return the parsed SQL AST as
            a JSON object in the field `query_json`
          in: query
          name: query_json
          schema:
            type: boolean
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    contacts_count: -83213117
                    contacts_sample:
                      - address_line_1: in occaecat labore est tempor
                        address_line_2: magna adipisicing
                        alternate_emails:
                          - dTeJZgU5uN9UYSo@nfIB.ijxg
                        city: ƞó
                        contact_id: e70eac25-1431-4231-bccd-1cfab432301e
                        country: voluptate in in reprehenderit aliquip
                        custom_fields:
                          custom_field_name1: amet deserunt mollit
                          custom_field_name2: minim consequat id
                        first_name: ullamco esse culpa do
                        last_name: officia laboris veniam consequat
                        postal_code: -75218567
                        primary_email: KLTF@SurgGzlAxCPOqhOUHYNBLsfpfE.trh
                        state_province_region: culpa ut
                      - address_line_1: labore
                        address_line_2: non
                        alternate_emails:
                          - gQol@Xcfilli.hc
                          - n4K7OdaVQh@YfsnF.ie
                          - TdnvS3nMStREn@miFjGzNDCPZWhiswJNxrFnOYdUAZEpesQ.yxpu
                          - xRzGDTTzzbYK@eJ.wpgb
                          - iI1rOpx2ct@aZhuYGZBxJLZ.phr
                        city: ĔȸąÂ¸ȠɏbɄ
                        contact_id: db637d33-bce1-462c-ae9c-91ec4f761de6
                        country: do
                        first_name: ea et eu
                        last_name: velit Ut laborum ipsu
                        list_ids:
                          - c712288b-2300-4069-bef4-2e05b5948ec3
                          - 9003ef29-5eb7-4951-898b-1b102e490d6e
                        postal_code: -95171713
                        primary_email: t7N5TjDmKhC0@gfdifW.ua
                        state_province_region: deserunt dolore
                    created_at: voluptate sunt non fugiat
                    id: 3b049926-0a54-4a91-83f0-086ace63c530
                    name: enim et anim
                    query_dsl: nostrud
                    sample_updated_at: labore occaecat sunt enim
                    updated_at: sunt aliqui
              schema:
                $ref: '#/components/schemas/full-segment'
          description: ''
        '401':
          $ref: '#/components/responses/trait_globalErrors_401'
        '403':
          $ref: '#/components/responses/trait_globalErrors_403'
        '404':
          content:
            application/json:
              schema:
                properties:
                  errors:
                    items:
                      properties:
                        field:
                          type: string
                        message:
                          type: string
                      required:
                        - message
                        - field
                      type: object
                    type: array
                required:
                  - errors
                type: object
          description: ''
        '500':
          content:
            application/json:
              schema:
                properties:
                  errors:
                    items:
                      properties:
                        message:
                          type: string
                      required:
                        - message
                      type: object
                    type: array
                required:
                  - errors
                type: object
          description: ''
      security:
        - Authorization: []
      summary: Get Segment by ID
      tags:
        - segmenting contacts
        - Segmenting Contacts
    parameters:
      - in: path
        name: segment_id
        required: true
        schema:
          format: uuid
          maxLength: 36
          minLength: 36
          type: string
    patch:
      description: '**This endpoint allows you to update a segment.**


        Segment `name` needs to be unique. A user can not update a segment name
        to an existing one.'
      operationId: PATCH_marketing-segments-segment_id
      requestBody:
        $ref: '#/components/requestBodies/segment_write_v2'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    contacts_count: -35493018
                    contacts_sample:
                      - address_line_1: deserunt cillum aliqua nostrud ullamco
                        address_line_2: sint
                        alternate_emails:
                          - qXP-RD97fLl@oEDaUynqnNRHJHdoJAWVGXwvI.qlv
                          - W0ngFWmR@WcQuSbPFVPZvLrjCFadfimFi.eqf
                          - mYBC0ea5UxFI@qwO.jh
                          - Nhf1OmY@KCSjTQsXYpbKrBUsQFHrnLuY.oef
                        city: ŷ(ç
                        contact_id: 4cff9fdf-1bee-44f7-95dc-a101f9ed3cfe
                        country: consectetur quis voluptate
                        first_name: consequat nulla in
                        last_name: irure nostrud elit eu
                        list_ids:
                          - f9d5987d-7a01-4a66-b77e-1f08a392304b
                          - b4e3b028-01d4-428b-9ef5-24bcd90fa02c
                          - fedab84f-9aa5-449d-99e2-7b1361f8ee61
                        postal_code: 62721676
                        primary_email: exmS@KIzibBSmaUUHQa.uvv
                        state_province_region: minim
                      - address_line_1: culpa eu eiusmod sint
                        address_line_2: sed velit sint
                        alternate_emails:
                          - Zs6vnQbMU@XTamDsXEGJWBMMEacOc.hitv
                          - Epl@ySBrQCFJZnjggkAYLu.ppta
                        city: BĊJ
                        contact_id: 093a66b8-bca8-4d8a-b32a-091d939c1928
                        country: in laboris Excepteur consequat
                        custom_fields:
                          custom_field_name1: esse magna Ut
                          custom_field_name2: culpa Excepteur
                        first_name: est
                        last_name: in
                        postal_code: 33736880
                        primary_email: atNeYGC4nbF42@VOCUWuGaYr.ystm
                        state_province_region: Lorem Ut aliqua elit
                      - address_line_1: occaecat aute enim
                        address_line_2: ipsum quis in
                        alternate_emails:
                          - S8u@ZVGjHsXdSWtlhhad.ximc
                          - GA1MN72v3uA@MPDvMUmTYjwFCsEaGnFnvVzJVqUTl.ehws
                        city: ɌſĕĝȤ¶Ǖ
                        contact_id: 08939f9c-2c87-4639-bd07-16d41f90a5eb
                        country: occaecat veniam
                        first_name: sed eu veli
                        last_name: aliqua sit culpa
                        postal_code: -66445052
                        primary_email: Jx660QHClqRrC@SavQvcdRpJlLqepwoEUCm.ar
                        state_province_region: ut nisi sed esse
                      - address_line_1: et incididunt
                        address_line_2: veniam quis non exercitation Duis
                        alternate_emails:
                          - F5WhHCA3oL6Ix@wOKzwIsvHbFi.mrlc
                        city: ǲƐȹŲǆ
                        contact_id: 0667ed97-7b7b-44aa-a115-0301067660d7
                        country: reprehenderit
                        custom_fields:
                          custom_field_name1: dolor aute irure Excepteur
                        first_name: do mollit velit
                        last_name: voluptate dolor
                        list_ids:
                          - ffd225a8-2008-4457-87af-1cffff5b1ccb
                        postal_code: -19694583
                        primary_email: AnoFtJq@IolRDmfj.njt
                        state_province_region: occaecat
                      - address_line_1: dolor
                        address_line_2: elit ex labore sunt aliquip
                        alternate_emails:
                          - ksqbx6BInlB@ouWBjjxwFBwVQjdnEKXy.xi
                          - TAe7F2m8dFlF@SirYykzbe.aj
                          - T9c2Y@HjVQY.zz
                          - p7ShfET@vMMnTUqoqngPSEqbpyoeWN.jlqn
                          - 0VJSIhIUT2k@mJXVtdZVKKswW.xoca
                        city: ÝǘźƝǝƉƝ
                        contact_id: 449767ca-d446-45f1-aa9b-432f441b5ca1
                        country: id sunt nisi
                        custom_fields:
                          custom_field_name1: amet
                          custom_field_name2: enim quis
                        first_name: irure laboris minim
                        last_name: id nostrud aliqua sit
                        list_ids:
                          - 2870627c-b9ea-4dcf-bde0-36c3e0e3eca9
                          - 575d86aa-4dcc-4b7d-b7de-ded856913198
                          - fb82a17f-5777-439d-9b8c-2c565c8ddf20
                        postal_code: 60466925
                        primary_email: kF4@gYYdAxzetJrWszLAHuBUTu.rzq
                        state_province_region: nostrud Duis non nulla laborum
                    created_at: '2014-12-23T17:18:52.907Z'
                    id: 5fff6250-b766-4959-a183-2e1fa565c4ce
                    name: List Name
                    query_dsl: Email LIKE %twilio.com
                    sample_updated_at: '2146-04-13T16:46:32.328Z'
                    updated_at: '4389-06-21T16:59:51.403Z'
              schema:
                $ref: '#/components/schemas/full-segment'
          description: ''
        '401':
          $ref: '#/components/responses/trait_globalErrors_401'
        '403':
          $ref: '#/components/responses/trait_globalErrors_403'
        '404':
          content:
            application/json:
              schema:
                properties:
                  errors:
                    items:
                      properties:
                        field:
                          type: string
                        message:
                          type: string
                      required:
                        - message
                        - field
                      type: object
                    type: array
                required:
                  - errors
                type: object
          description: ''
        '500':
          content:
            application/json:
              schema:
                properties:
                  errors:
                    items:
                      properties:
                        message:
                          type: string
                      required:
                        - message
                      type: object
                    type: array
                required:
                  - errors
                type: object
          description: ''
      security:
        - Authorization: []
      summary: Update Segment
      tags:
        - segmenting contacts
        - Segmenting Contacts
  /marketing/senders:
    post:
      description: '**This endpoint allows you to create a new sender
        identity.**


        *You may create up to 100 unique sender identities.*


        Sender identities are required to be verified before use. If your domain
        has been authenticated, a new sender identity will auto verify on
        creation. Otherwise an email will be sent to the `from.email`.'
      operationId: POST_marketing-senders
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      requestBody:
        content:
          application/json:
            schema:
              example:
                address: 1234 Fake St.
                address_2: ''
                city: San Francisco
                country: United States
                from:
                  email: orders@example.com
                  name: Example Orders
                nickname: Example Orders
                reply_to:
                  email: support@example.com
                  name: Example Support
                state: CA
                zip: '94105'
              properties:
                address:
                  description: The physical address of the sender identity.
                  type: string
                address_2:
                  description: Additional sender identity address information.
                  type: string
                city:
                  description: The city of the sender identity.
                  type: string
                country:
                  description: The country of the sender identity.
                  type: string
                from:
                  properties:
                    email:
                      description:
                        This is where the email will appear to originate from
                        for your recipient
                      type: string
                    name:
                      description:
                        This is the name appended to the from email field. IE -
                        Your name or company name.
                      type: string
                  required:
                    - email
                    - name
                  type: object
                nickname:
                  description:
                    A nickname for the sender identity. Not used for sending.
                  type: string
                reply_to:
                  properties:
                    email:
                      description:
                        This is the email that your recipient will reply to.
                      type: string
                    name:
                      description:
                        This is the name appended to the reply to email field.
                        IE - Your name or company name.
                      type: string
                  required:
                    - email
                  type: object
                state:
                  description: The state of the sender identity.
                  type: string
                zip:
                  description: The zipcode of the sender identity.
                  type: string
              required:
                - nickname
                - from
                - address
                - city
                - country
              type: object
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/senderID'
          description: ''
        '401':
          $ref: '#/components/responses/trait_globalErrors_401'
        '403':
          $ref: '#/components/responses/trait_globalErrors_403'
        '404':
          $ref: '#/components/responses/trait_globalErrors_404'
        '500':
          $ref: '#/components/responses/trait_globalErrors_500'
      security:
        - Authorization: []
      summary: Create a Sender Identity
      tags:
        - Senders
  /marketing/singlesends:
    delete:
      description: "**This endpoint allows you to delete multiple Single Sends
        using an array of Single Sends IDs.**


        To first retrieve all your Single Sends' IDs, you can make a GET request
        to the `/marketing/singlensends` endpoint.


        Please note that a DELETE request is permanent, and your Single Sends
        will not be recoverable after deletion."
      operationId: DELETE_marketing-singlesends
      parameters:
        - description: Single Send IDs to delete
          explode: false
          in: query
          name: ids
          schema:
            items:
              type: string
            maxItems: 50
            minItems: 1
            type: array
          style: form
      responses:
        '204':
          description: ''
        '404':
          content:
            application/json:
              schema:
                properties:
                  errors:
                    items:
                      properties:
                        error_id:
                          type: string
                        field:
                          type: string
                        message:
                          type: string
                      type: object
                    type: array
                type: object
          description: ''
        '500':
          content:
            application/json:
              schema:
                properties:
                  errors:
                    items:
                      properties:
                        error_id:
                          type: string
                        field:
                          type: string
                        message:
                          type: string
                      type: object
                    type: array
                type: object
          description: ''
      security:
        - Authorization: []
      summary: Bulk Delete Single Sends
      tags:
        - Single Sends
    get:
      description: "**This endpoint allows you to retrieve all your Single
        Sends.**


        Returns all of your Single Sends with condensed details about each,
        including the Single Sends' IDs. For more details about an individual
        Single Send, pass the Single Send's ID to the
        `/marketing/singlesends/{id}` endpoint."
      operationId: GET_marketing-singlesends
      parameters:
        - in: query
          name: page_size
          schema:
            type: integer
        - in: query
          name: page_token
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  _metadata:
                    $ref: '#/components/schemas/_metadata'
                  result:
                    items:
                      $ref: '#/components/schemas/singlesend_response_short'
                    type: array
                type: object
          description: ''
        '500':
          content:
            application/json:
              schema:
                properties:
                  errors:
                    items:
                      properties:
                        error_id:
                          type: string
                        field:
                          type: string
                        message:
                          type: string
                      type: object
                    type: array
                type: object
          description: ''
      security:
        - Authorization: []
      summary: Get All Single Sends
      tags:
        - Single Sends
    post:
      description: '**This endpoint allows you to create a new Single Send.**


        Please note that if you are migrating from the previous version of
        Single Sends, you no longer need to pass a template ID with your request
        to this endpoint. Instead, you will pass all template data in the
        `email_config` object.'
      operationId: POST_marketing-singlesends
      requestBody:
        $ref: '#/components/requestBodies/singlesend_request'
      responses:
        '201':
          content:
            application/json:
              examples:
                response:
                  value:
                    categories:
                      - unique opens
                    created_at: '2020-05-18T17:28:27.272Z'
                    email_config:
                      custom_unsubscribe_url: null
                      editor: code
                      generate_plain_content: true
                      html_content: ''
                      ip_pool: null
                      plain_content: ''
                      sender_id: null
                      subject: ''
                      suppression_group_id: null
                    id: 27c21bbf-a12c-440b-b8bf-c526975328ca
                    name: Example API Created Single Send
                    send_at: '2020-06-16T00:19:55.106Z'
                    send_to:
                      list_ids:
                        - f2fe66a1-43f3-4e3a-87b1-c6a600d805f0
                    status: scheduled
              schema:
                $ref: '#/components/schemas/singlesend_response'
          description: ''
        '400':
          content:
            application/json:
              schema:
                properties:
                  errors:
                    items:
                      properties:
                        error_id:
                          type: string
                        field:
                          type: string
                        message:
                          type: string
                      type: object
                    type: array
                type: object
          description: ''
        '500':
          content:
            application/json:
              schema:
                properties:
                  errors:
                    items:
                      properties:
                        error_id:
                          type: string
                        field:
                          type: string
                        message:
                          type: string
                      type: object
                    type: array
                type: object
          description: ''
      security:
        - Authorization: []
      summary: Create Single Send
      tags:
        - Single Sends
  /marketing/singlesends/categories:
    get:
      description: '**This endpoint allows you to retrieve all the categories
        associated with your Single Sends.**


        This endpoint will return your latest 1,000 categories.'
      operationId: GET_marketing-singlesends-categories
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    categories:
                      - equipment
                      - shoes
                      - sports
              schema:
                properties:
                  categories:
                    description:
                      list of latest one thousand unique categories associated
                      with all Single Sends in ascending order
                    items:
                      type: string
                    maxItems: 1000
                    type: array
                    uniqueItems: true
                type: object
          description: ''
        '500':
          content:
            application/json:
              schema:
                properties:
                  errors:
                    items:
                      properties:
                        error_id:
                          type: string
                        field:
                          type: string
                        message:
                          type: string
                      type: object
                    type: array
                type: object
          description: ''
      security:
        - Authorization: []
      summary: Get All Categories
      tags:
        - Single Sends
  /marketing/singlesends/search:
    post:
      description:
        "**This endpoint allows you to search for Single Sends based on
        specified criteria.**\n\nYou can search for Single Sends by passing a
        combination of values using the `name`, `status`, and `categories`
        request body fields.\n\nFor example, if you want to search for all
        Single Sends that are \"drafts\" or \"scheduled\" and also associated
        with the category \"shoes,\" your request body may look like the example
        below.\n\n```javascript\n{\n  \"status\":
        [\n    \"draft\",\n    \"scheduled\"\n  ],\n  \"categories\":
        [\n    \"shoes\"\n  ],\n}\n```"
      operationId: POST_marketing-singlesends-search
      parameters:
        - in: query
          name: page_size
          schema:
            type: integer
        - in: query
          name: page_token
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/singlesend_search'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    _metadata:
                      count: 1
                      next: DYEsTUDww9-
                      prev: P0Enoayd
                      self: nwNSrPSWt7d
                    result:
                      - categories:
                          - shoes
                        created_at: '4739-10-29T07:11:32.476Z'
                        id: df25ffdf-6a96-458a-9419-6d87d3094c6b
                        is_abtest: true
                        name: single-send-1
                        send_at: '2471-05-31T15:46:18.797Z'
                        status: triggered
                        updated_at: '3263-04-09T09:05:08.193Z'
              schema:
                properties:
                  _metadata:
                    $ref: '#/components/schemas/_metadata'
                  result:
                    items:
                      $ref: '#/components/schemas/singlesend_response_short'
                    type: array
                type: object
          description: ''
        '404':
          content:
            application/json:
              schema:
                properties:
                  errors:
                    items:
                      properties:
                        error_id:
                          type: string
                        field:
                          type: string
                        message:
                          type: string
                      type: object
                    type: array
                type: object
          description: ''
      security:
        - Authorization: []
      summary: Get Single Sends Search
      tags:
        - Single Sends
  /marketing/singlesends/{id}:
    delete:
      description: "**This endpoint allows you to delete one Single Send using a
        Single Send ID.**


        To first retrieve all your Single Sends' IDs, you can make a GET request
        to the `/marketing/singlensends` endpoint.


        Please note that a `DELETE` request is permanent, and your Single Send
        will not be recoverable after deletion."
      operationId: DELETE_marketing-singlesends-id
      responses:
        '204':
          description: ''
        '404':
          content:
            application/json:
              schema:
                properties:
                  errors:
                    items:
                      properties:
                        error_id:
                          type: string
                        field:
                          type: string
                        message:
                          type: string
                      type: object
                    type: array
                type: object
          description: ''
        '500':
          content:
            application/json:
              schema:
                properties:
                  errors:
                    items:
                      properties:
                        error_id:
                          type: string
                        field:
                          type: string
                        message:
                          type: string
                      type: object
                    type: array
                type: object
          description: ''
      security:
        - Authorization: []
      summary: Delete Single Send by ID
      tags:
        - Single Sends
    get:
      description: '**This endpoint allows you to retrieve details about one
        Single Send using a Single Send ID.**


        You can retrieve all of your Single Sends by making a GET request to the
        `/marketing/singlesends` endpoint.'
      operationId: GET_marketing-singlesends-id
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    created_at: '2020-12-13T16:24:42.013Z'
                    id: 2f6dec81-43b9-4c67-a890-3a38cb63b54a
                    name: single-send-1
                    send_to:
                      all: true
                      segment_ids:
                        - dad84de3-bec4-4e04-b132-2cbfd4bb3789
                        - 7dce758d-1155-4102-88d2-ca65565ac98b
                    status: scheduled
              schema:
                $ref: '#/components/schemas/singlesend_response'
          description: ''
        '404':
          content:
            application/json:
              schema:
                properties:
                  errors:
                    items:
                      properties:
                        error_id:
                          type: string
                        field:
                          type: string
                        message:
                          type: string
                      type: object
                    type: array
                type: object
          description: ''
        '500':
          content:
            application/json:
              schema:
                properties:
                  errors:
                    items:
                      properties:
                        error_id:
                          type: string
                        field:
                          type: string
                        message:
                          type: string
                      type: object
                    type: array
                type: object
          description: ''
      security:
        - Authorization: []
      summary: Get Single Send by ID
      tags:
        - Single Sends
    parameters:
      - in: path
        name: id
        required: true
        schema:
          type: string
    patch:
      description: '**This endpoint allows you to update a Single Send using a
        Single Send ID.**


        You only need to pass the fields you want to update. Any blank/missing
        fields will remain unaltered.'
      operationId: PATCH_marketing-singlesends-id
      requestBody:
        $ref: '#/components/requestBodies/singlesend_request'
      responses:
        '202':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/singlesend_response'
          description: ''
        '400':
          content:
            application/json:
              schema:
                properties:
                  errors:
                    items:
                      properties:
                        error_id:
                          type: string
                        field:
                          type: string
                        message:
                          type: string
                      type: object
                    type: array
                type: object
          description: ''
        '404':
          content:
            application/json:
              schema:
                properties:
                  errors:
                    items:
                      properties:
                        error_id:
                          type: string
                        field:
                          type: string
                        message:
                          type: string
                      type: object
                    type: array
                type: object
          description: ''
        '500':
          content:
            application/json:
              schema:
                properties:
                  errors:
                    items:
                      properties:
                        error_id:
                          type: string
                        field:
                          type: string
                        message:
                          type: string
                      type: object
                    type: array
                type: object
          description: ''
      security:
        - Authorization: []
      summary: Update Single Send
      tags:
        - Single Sends
    post:
      description:
        "**This endpoint allows you to duplicate an existing Single Send using
        its Single Send ID.**\n\nDuplicating a Single Send is useful when you
        want to create a Single Send but don't want to start from scratch. Once
        duplicated, you can update or edit the Single Send by making a PATCH
        request to the `/marketing/singlesends/{id}` endpoint.\n \nIf you leave
        the `name` field blank, your duplicate will be assigned the name of the
        Single Send it was copied from with the text “Copy of ” prepended to it.
        The `name` field length is limited to 100 characters, so the end of the
        new Single Send name, including “Copy of ”, will be trimmed if the name
        exceeds this limit."
      operationId: POST_marketing-singlesends-id
      requestBody:
        content:
          application/json:
            schema:
              properties:
                name:
                  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.
                  maxLength: 100
                  minLength: 1
                  type: string
              type: object
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/singlesend_response'
          description: ''
        '404':
          content:
            application/json:
              schema:
                properties:
                  errors:
                    items:
                      properties:
                        error_id:
                          type: string
                        field:
                          type: string
                        message:
                          type: string
                      type: object
                    type: array
                type: object
          description: ''
        '500':
          content:
            application/json:
              schema:
                properties:
                  errors:
                    items:
                      properties:
                        error_id:
                          type: string
                        field:
                          type: string
                        message:
                          type: string
                      type: object
                    type: array
                type: object
          description: ''
      security:
        - Authorization: []
      summary: Duplicate Single Send
      tags:
        - Single Sends
  /marketing/singlesends/{id}/schedule:
    delete:
      description: '**This endpoint allows you to cancel a scheduled Single Send
        using a Single Send ID.**


        Making a DELETE request to this endpoint will cancel the scheduled
        sending of a Single Send. The request will not delete the Single Send
        itself. Deleting a Single Send can be done by passing a DELETE request
        to `/marketing/singlesends/{id}`.'
      operationId: DELETE_marketing-singlesends-id-schedule
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/singlesend_schedule'
          description: ''
        '404':
          content:
            application/json:
              schema:
                properties:
                  errors:
                    items:
                      properties:
                        error_id:
                          type: string
                        field:
                          type: string
                        message:
                          type: string
                      type: object
                    type: array
                type: object
          description: ''
        '500':
          content:
            application/json:
              schema:
                properties:
                  errors:
                    items:
                      properties:
                        error_id:
                          type: string
                        field:
                          type: string
                        message:
                          type: string
                      type: object
                    type: array
                type: object
          description: ''
      security:
        - Authorization: []
      summary: Delete Single Send Schedule
      tags:
        - Single Sends
    parameters:
      - in: path
        name: id
        required: true
        schema:
          type: string
    put:
      description: '**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: PUT_marketing-singlesends-id-schedule
      requestBody:
        content:
          application/json:
            schema:
              example:
                send_at: '3752-01-28T23:21:52.575Z'
              properties:
                send_at:
                  description:
                    This is the ISO 8601 time at which to send the Single Send;
                    must be in future, or the string "now"
                  enum:
                    - now
                  format: date-time
                  type: string
              required:
                - send_at
              type: object
      responses:
        '201':
          content:
            application/json:
              examples:
                response:
                  value:
                    send_at: '3752-01-28T23:21:52.575Z'
                    status: scheduled
              schema:
                properties:
                  send_at:
                    description: ''
                    format: date-time
                    type: string
                  status:
                    enum:
                      - scheduled
                    type: string
                type: object
          description: ''
        '404':
          content:
            application/json:
              schema:
                properties:
                  errors:
                    items:
                      properties:
                        error_id:
                          type: string
                        field:
                          type: string
                        message:
                          type: string
                      type: object
                    type: array
                type: object
          description: ''
        '500':
          content:
            application/json:
              schema:
                properties:
                  errors:
                    items:
                      properties:
                        error_id:
                          type: string
                        field:
                          type: string
                        message:
                          type: string
                      type: object
                    type: array
                type: object
          description: ''
      security:
        - Authorization: []
      summary: Schedule Single Send
      tags:
        - Single Sends
  /marketing/stats/automations:
    get:
      description: '**This endpoint allows you to retrieve stats for all your
        Automations.**


        By default, all of your Automations will be returned, but you can
        specify a selection by passing in a comma-separated list of Automation
        IDs as the value of the query string parameter `automation_ids`.


        Responses are paginated. You can limit the number of responses returned
        per batch using the `page_size` query string parameter. The default is
        50, but you specify a value between 1 and 100.


        You can retrieve a specific page of responses with the `page_token`
        query string parameter.'
      operationId: getall-automation-stats
      parameters:
        - description:
            This endpoint returns all automation IDs if no `automation_ids` are
            specified.
          explode: false
          in: query
          name: automation_ids
          schema:
            items:
              type: string
            maxItems: 25
            minItems: 1
            type: array
          style: form
        - $ref: '#/components/parameters/trait_pagination_page_size'
        - $ref: '#/components/parameters/trait_pagination_page_token'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/automations-response'
          description: ''
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/global_error_response_schema'
          description: ''
      security:
        - Authorization: []
      summary: Get All Automation Stats
      tags:
        - Marketing Campaigns Stats
  /marketing/stats/automations/export:
    get:
      description: '**This endpoint allows you to export Automation stats as CSV
        data**.


        You can specify one Automation or many: include as many Automation IDs
        as you need, separating them with commas, as the value of the `ids`
        query string paramter.


        The data is returned as plain text response but in CSV format, so your
        application making the call can present the information in whatever way
        is most appropriate, or just save the data as a `.csv` file.'
      operationId: get-automations-stats-export
      parameters:
        - description: The IDs of Automations for which to export stats.
          explode: false
          in: query
          name: ids
          schema:
            items:
              type: string
            maxItems: 50
            minItems: 1
            type: array
          style: form
        - description:
            The [IANA
            Area/Region](https://en.wikipedia.org/wiki/Tz_database#Names_of_time_zones)
            string representing the timezone in which the stats are to be
            presented; i.e. `"America/Chicago"`. This parameter changes the
            timezone format only; it does not alter which stats are returned.
          in: query
          name: timezone
          schema:
            default: UTC
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                description: CSV data
                type: string
          description: ''
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/global_error_response_schema'
          description: ''
      security:
        - Authorization: []
      summary: Export Automation Stats
      tags:
        - Marketing Campaigns Stats
  /marketing/stats/automations/{id}:
    get:
      description: '**This endpoint allows you to retrieve stats for a single
        Automation using its ID.**


        Multiple Automation IDs can be retrieved using the "Get All Automation
        Stats" endpoint. Once you have an ID, this endpoint will return detailed
        stats for the single automation specified.


        You may constrain the stats returned using the `start_date` and
        `end_date` query string parameters. You can also use the `group_by` and
        `aggregated_by` query string parameters to further refine the stats
        returned.'
      operationId: get-automation-stat
      parameters:
        - $ref: '#/components/parameters/trait_automationQueryParams_group_by'
        - $ref: '#/components/parameters/trait_automationQueryParams_step_ids'
        - $ref: '#/components/parameters/trait_baseParams_aggregated_by'
        - $ref: '#/components/parameters/trait_baseParams_start_date'
        - $ref: '#/components/parameters/trait_baseParams_end_date'
        - $ref: '#/components/parameters/trait_baseParams_timezone'
        - $ref: '#/components/parameters/trait_pagination_page_size'
        - $ref: '#/components/parameters/trait_pagination_page_token'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/automations-response'
          description: ''
        '400':
          $ref: '#/components/responses/trait_errorResponse_400'
        '404':
          description: ''
      security:
        - Authorization: []
      summary: Get Automation Stats by ID
      tags:
        - Marketing Campaigns Stats
    parameters:
      - in: path
        name: id
        required: true
        schema:
          type: string
  /marketing/stats/automations/{id}/links:
    get:
      description: '**This endpoint lets you retrieve click-tracking stats for a
        single Automation**.


        The stats returned list the URLs embedded in your Automation and the
        number of clicks each one received.


        Responses are paginated. You can limit the number of responses returned
        per batch using the `page_size` query string parameter. The default is
        50, but you specify a value between 1 and 100.


        You can retrieve a specific page of responses with the `page_token`
        query string parameter.'
      operationId: get-automation-link-stat
      parameters:
        - $ref: '#/components/parameters/trait_automationQueryParams_group_by'
        - $ref: '#/components/parameters/trait_automationQueryParams_step_ids'
        - $ref: '#/components/parameters/trait_pagination_page_size'
        - $ref: '#/components/parameters/trait_pagination_page_token'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/automations-link-stats-response'
          description: ''
        '400':
          $ref: '#/components/responses/trait_errorResponse_400'
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/global_error_response_schema'
          description: ''
      security:
        - Authorization: []
      summary: Get Automation Click Tracking Stats by ID
      tags:
        - Marketing Campaigns Stats
    parameters:
      - description:
          'The ID of the Automation you want to get click tracking stats for. '
        in: path
        name: id
        required: true
        schema:
          format: uuid
          type: string
  /marketing/stats/singlesends:
    get:
      description: '**This endpoint allows you to retrieve stats for all your
        Single Sends.**


        By default, all of your Single Sends will be returned, but you can
        specify a selection by passing in a comma-separated list of Single Send
        IDs as the value of the query string parameter `singlesend_ids`.


        Responses are paginated. You can limit the number of responses returned
        per batch using the `page_size` query string parameter. The default is
        50, but you specify a value between 1 and 100.


        You can retrieve a specific page of responses with the `page_token`
        query string parameter.'
      operationId: getall-singlesend-stats
      parameters:
        - description:
            This endpoint returns all Single Send IDs if no IDs are included in
            `singlesend_ids`.
          explode: false
          in: query
          name: singlesend_ids
          schema:
            items:
              type: string
            maxItems: 25
            minItems: 1
            type: array
          style: form
        - $ref: '#/components/parameters/trait_pagination_page_size'
        - $ref: '#/components/parameters/trait_pagination_page_token'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/singlesends-response'
          description: ''
        '400':
          $ref: '#/components/responses/trait_errorResponse_400'
      security:
        - Authorization: []
      summary: Get All Single Sends Stats
      tags:
        - Marketing Campaigns Stats
  /marketing/stats/singlesends/export:
    get:
      description: '**This endpoint allows you to export Single Send stats as
        .CSV data**.


        You can specify one Single Send or many: include as many Single Send IDs
        as you need, separating them with commas, as the value of the `ids`
        query string paramter.


        The data is returned as plain text response but in .CSV format, so your
        application making the call can present the information in whatever way
        is most appropriate, or just save the data as a .csv file.'
      operationId: get-singlesend-stats-export
      parameters:
        - description: The IDs of Single Sends for which to export stats.
          explode: false
          in: query
          name: ids
          schema:
            items:
              type: string
            maxItems: 50
            minItems: 1
            type: array
          style: form
        - description:
            The [IANA
            Area/Region](https://en.wikipedia.org/wiki/Tz_database#Names_of_time_zones)
            string representing the timezone in which the stats are to be
            presented; i.e. `"America/Chicago"`. This parameter changes the
            timezone format only; it does not alter which stats are returned.
          in: query
          name: timezone
          schema:
            default: UTC
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                description: CSV data
                type: string
          description: ''
        '400':
          description: ''
      security:
        - Authorization: []
      summary: Export Single Send Stats
      tags:
        - Marketing Campaigns Stats
  /marketing/stats/singlesends/{id}:
    get:
      description: '**This endpoint allows you to retrieve stats for an
        individual Single Send using a Single Send ID.**


        Multiple Single Send IDs can be retrieved using the "Get All Single
        Sends Stats" endpoint. Once you have an ID, this endpoint will return
        detailed stats for the Single Send specified.


        You may constrain the stats returned using the `start_date` and
        `end_date` query string parameters. You can also use the `group_by` and
        `aggregated_by` query string parameters to further refine the stats
        returned.'
      operationId: get-singlesend-stat
      parameters:
        - $ref: '#/components/parameters/trait_baseParams_aggregated_by'
        - $ref: '#/components/parameters/trait_baseParams_start_date'
        - $ref: '#/components/parameters/trait_baseParams_end_date'
        - $ref: '#/components/parameters/trait_baseParams_timezone'
        - $ref: '#/components/parameters/trait_pagination_page_size'
        - $ref: '#/components/parameters/trait_pagination_page_token'
        - $ref: '#/components/parameters/trait_singlesendQueryParams_group_by'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/singlesends-response'
          description: ''
        '400':
          $ref: '#/components/responses/trait_errorResponse_400'
        '404':
          description: ''
      security:
        - Authorization: []
      summary: Get Single Send Stats by ID
      tags:
        - Marketing Campaigns Stats
    parameters:
      - in: path
        name: id
        required: true
        schema:
          type: string
  /marketing/stats/singlesends/{id}/links:
    get:
      description: '**This endpoint lets you retrieve click-tracking stats for
        one Single Send**.


        The stats returned list the URLs embedded in the specified Single Send
        and the number of clicks each one received.


        Responses are paginated. You can limit the number of responses returned
        per batch using the `page_size` query string parameter. The default is
        50, but you specify a value between 1 and 100.


        You can retrieve a specific page of responses with the `page_token`
        query string parameter.'
      operationId: get-singlesend-link-stat
      parameters:
        - $ref: '#/components/parameters/trait_pagination_page_size'
        - $ref: '#/components/parameters/trait_pagination_page_token'
        - $ref: '#/components/parameters/trait_singlesendQueryParams2_group_by'
        - $ref: '#/components/parameters/trait_singlesendQueryParams2_ab_variation_id'
        - $ref: '#/components/parameters/trait_singlesendQueryParams2_ab_phase_id'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/singlesends-link-stats-response'
          description: ''
        '400':
          $ref: '#/components/responses/trait_errorResponse_400'
        '404':
          content:
            application/json:
              schema:
                type: object
          description: ''
      security:
        - Authorization: []
      summary: Get Single Send Click Tracking Stats by ID
      tags:
        - Marketing Campaigns Stats
    parameters:
      - in: path
        name: id
        required: true
        schema:
          type: string
  /marketing/test/send_email:
    post:
      description: '**This endpoint allows you to send a test marketing email to
        a list of email addresses**.


        Before sending a marketing message, you can test it using this endpoint.
        You may specify up to **10 contacts** in the `emails` request body
        field. You must also specify a `template_id` and include either a
        `from_address` or `sender_id`. You can manage your templates with the
        [Twilio SendGrid App](https://mc.sendgrid.com/dynamic-templates) or the
        [Transactional Templates
        API](https://sendgrid.api-docs.io/v3.0/transactional-templates).


        > Please note that this endpoint works with Dynamic Transactional
        Templates only. Legacy Transactional Templates will not be delivered.


        For more information about managing Dynamic Transactional Templates, see
        [How to Send Email with Dynamic Transactional
        Templates](https://sendgrid.com/docs/ui/sending-email/how-to-send-an-email-with-dynamic-transactional-templates/).


        You can also test your Single Sends in the [Twilio SendGrid Marketing
        Campaigns UI](https://mc.sendgrid.com/single-sends).'
      operationId: POST_marketing-test-send_email
      requestBody:
        content:
          application/json:
            schema:
              example:
                custom_unsubscribe_url: https://example.com/unsubscribe
                emails:
                  - janedoe@example.com
                  - tiramisu@example.com
                  - bundt@example.com
                sender_id: 6060664
                suppression_group_id: 21865513
                template_id: f8f77db8-b9fa-4b3c-9ee8-de3d582016b8
                version_id_override: 7734f757-8eb8-4d22-b7f0-779a72f32986
              properties:
                custom_unsubscribe_url:
                  description: A custom unsubscribe URL.
                  type: string
                emails:
                  description:
                    An array of email addresses you want to send the test
                    message to.
                  items:
                    format: email
                    type: string
                  maxItems: 10
                  minItems: 1
                  type: array
                  uniqueItems: true
                from_address:
                  description:
                    You can either specify this address or specify a verified
                    sender ID.
                  format: email
                  type: string
                sender_id:
                  description:
                    This ID must belong to a verified sender. Alternatively, you
                    may supply a `from_address` email.
                  type: integer
                suppression_group_id:
                  type: integer
                template_id:
                  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.
                  format: uuid
                  type: string
                version_id_override:
                  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.'
                  format: uuid
                  type: string
              required:
                - template_id
                - emails
              type: object
      responses:
        '202':
          content:
            application/json:
              schema:
                type: object
          description: ''
        '400':
          $ref: '#/components/responses/trait_errorResponse_400'
      security:
        - Authorization: []
      summary: Send a Test Marketing Email
      tags:
        - Send Test Email
  /messages:
    get:
      description: 'This is **BETA** functionality. You may not have access, and
        we reserve the right to change functionality without notice.


        Filter all messages to search your Email Activity. All queries need to
        be [URL encoded](https://meyerweb.com/eric/tools/dencoder/), and have
        this format:


        `query={query_type}="{query_content}"`


        encoded, this would look like this:


        `query=type%3D%22query_content%22`


        for example:


        Filter by a specific email -
        `query=to_email%3D%22example%40example.com%22`


        Filter by subject line - `query=subject%3d%22A%20Great%20Subject%22`


        **Full list of basic query types and examples:**



        | **Filter query**    | **Unencoded Example** (put this one into the try
        it out query - it''ll automatically encode it for you) | **Encoded
        Example** (use this one in your code)                        |

        |-----------------|----------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------|

        | msg_id          |
        msg_id=“filter0307p1las1-16816-5A023E36-1.0”                                                                               |
        msg_id%3D%22filter0307p1las1-16816-5A023E36-1.0%22           |

        | from_email      |
        from_email=“testing@sendgrid.net”                                                                                          |
        from_email%3D%22testing%40sendgrid.net%22                    |

        | subject         | subject="This is a subject
        test"                                                                                      |
        subject%22This%20is%20a%20subject%20test%22                  |

        | to_email        |
        to_email="example@example.com"                                                                                       |
        to_email%3D%22example%40example.com%22                       |

        |
        status          |                                                                                                                            |
        status%22processed%22                                        |

        |
        template_id     |                                                                                                                            |                                                                    |

        |
        asm_group_id    |                                                                                                                            |                                                                    |

        |
        api_key_id      |                                                                                                                            |                                                                    |

        | events          |
        status="processed"                                                                                                   |
        status%3D%22processed%22                                     |

        |
        originating_ip  |                                                                                                                            |                                                                    |

        |
        categories      |                                                                                                                            |                                                                    |

        |
        unique_args     |                                                                                                                            |                                                                    |

        |
        outbound_ip     |                                                                                                                            |                                                                    |

        | last_event_time |
        last_event_time=“2017-11-07T23:13:58Z”                                                                               |
        last_event_time%3D%E2%80%9C2017-11-07T23%3A13%3A58Z%E2%80%9D |

        | clicks          |
        clicks="0"                                                                                                           |
        clicks%3D%220%22                                             |


        For information about building compound queries, and for the full query
        language functionality, see the [query language
        reference](https://docs.google.com/a/sendgrid.com/document/d/1fWoKTFNfg5UUsB6t9KuIcSo9CetKF_T0bGfWJ_gdPCs/edit?usp=sharing).


        Coming soon, example compound queries: limit + to email + date'
      operationId: GET-messages
      parameters:
        - description: Use the query syntax  to filter your email activity.
          in: query
          name: query
          required: true
          schema:
            type: string
        - description:
            The number of messages returned. This parameter must be greater than
            0 and less than or equal to 1000
          in: query
          name: limit
          required: false
          schema:
            default: 10
            maximum: 1000
            minimum: 1
            type: number
        - in: header
          name: X-Query-Id
          required: false
          schema:
            type: string
        - in: header
          name: X-Cursor
          required: false
          schema:
            type: string
        - $ref: '#/components/parameters/trait_authorizationHeader_Authorization'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    messages:
                      - clicks_count: 0
                        from_email: from@test.com
                        last_event_time: 1495064728
                        last_timestamp: 1495064728
                        msg_id: abc123
                        opens_count: 0
                        status: processed
                        subject: something profound
                        to_email: to@test.com
                      - clicks_count: 200
                        from_email: yeah@test.com
                        last_event_time: 1495064793
                        last_timestamp: 1495064793
                        msg_id: 321befe
                        opens_count: 500
                        status: delivered
                        subject: something profound
                        to_email: nah@test.com
                      - clicks_count: 0
                        from_email: sad@test.com
                        last_event_time: 1495064993
                        last_timestamp: 1495064993
                        msg_id: 434512dfg
                        opens_count: 0
                        status: not delivered
                        subject: something sad
                        to_email: reject@test.com
              schema:
                properties:
                  messages:
                    items:
                      allOf:
                        - $ref: '#/components/schemas/email-activity-response-common-fields'
                        - properties:
                            clicks_count:
                              description:
                                The number of times links in the message were
                                clicked.
                              type: integer
                            last_event_time:
                              description:
                                A timestamp of the last event received for the
                                specific message.
                              type: integer
                            opens_count:
                              description:
                                The number of times the message was opened.
                              type: integer
                          type: object
                      example:
                        clicks_count: 2
                        from_email: from@test.com
                        last_event_time: '2017-10-13T18:56:21Z'
                        msg_id: abc123
                        opens_count: 1
                        status: processed
                        subject: anim Duis sint veniam
                        to_email: test@test.com
                      properties:
                        clicks_count:
                          type: integer
                        from_email:
                          type: string
                        last_event_time:
                          description: iso 8601 format
                          type: string
                        msg_id:
                          type: string
                        opens_count:
                          type: integer
                        status:
                          enum:
                            - processed
                            - delivered
                            - not_delivered
                          type: string
                        subject:
                          type: string
                        to_email:
                          type: string
                      required:
                        - from_email
                        - msg_id
                        - subject
                        - to_email
                        - status
                        - opens_count
                        - clicks_count
                        - last_event_time
                      title: Abbv. Message
                      type: object
                    type: array
                type: object
          description: ''
        '400':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - message:
                          "invalid syntax: 'bad_field' is not a known field"
              schema:
                properties:
                  errors:
                    items:
                      properties:
                        message:
                          type: string
                      required:
                        - message
                      type: object
                    type: array
                required:
                  - errors
                type: object
          description: ''
        '429':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - message: too many requests
              schema:
                properties:
                  errors:
                    items:
                      properties:
                        message:
                          type: string
                      type: object
                    type: array
                type: object
          description: ''
      security:
        - Authorization: []
      summary: Filter all messages
      tags:
        - Query
        - Messages
  /messages/download:
    post:
      description: 'This is BETA functionality. You may not have access, and we
        reserve the right to change functionality without notice.


        This request will kick off a backend process to generate a CSV file.
        Once generated, the worker will then send an email for the user download
        the file. The link will expire in 3 days.


        The CSV fill contain the last 1 million messages. This endpoint will be
        rate limited to 1 request every 12 hours (rate limit may change).


        This endpoint is similar to the GET Single Message endpoint - the only
        difference is that /download is added to indicate that this is a CSV
        download requests but the same query is used to determine what the CSV
        should contain.'
      operationId: POST_v3-messages-download
      parameters:
        - description:
            Uses a SQL like syntax to indicate which messages to include in the
            CSV
          in: query
          name: query
          required: false
          schema:
            type: string
        - $ref: '#/components/parameters/trait_authorizationHeader_Authorization'
      responses:
        '202':
          content:
            application/json:
              examples:
                response:
                  value:
                    message:
                      An email will be sent to jane_doe@example.com when the CSV
                      is ready to download.
                    status: pending
              schema:
                properties:
                  message:
                    type: string
                  status:
                    enum:
                      - pending
                    type: string
                type: object
          description: ''
        '400':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - message: some error
              schema:
                properties:
                  errors:
                    items:
                      properties:
                        message:
                          type: string
                      type: object
                    type: array
                type: object
          description: ''
        '429':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: ''
                        message: too many requests
              schema:
                properties:
                  errors:
                    items:
                      properties:
                        message:
                          type: string
                      type: object
                    type: array
                type: object
          description: ''
        '500':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - message: internal server error
              schema:
                properties:
                  errors:
                    items:
                      properties:
                        message:
                          type: string
                      type: object
                    type: array
                type: object
          description: ''
      security:
        - Authorization: []
      summary: Request CSV
      tags:
        - CSV (UI only)
        - V3
  /messages/download/{download_uuid}:
    get:
      description:
        '**This endpoint will return a presigned URL that can be used to
        download the CSV that was requested from the "Request a CSV" endpoint.**'
      operationId: GET_v3-messages-download-download_uuid
      parameters:
        - $ref: '#/components/parameters/trait_authorizationHeader_Authorization'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    csv: https://s3-us-west-2.amazonaws.com/sendgrid-rts-development-queries/013c31af-7c9a-49e6-922c-d990f4aff151.csv?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Expires=3600&X-Amz-Credential=AKIAI4NOW7APZHRFYGWQ%2F20170728%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-SignedHeaders=host&X-Amz-Date=20170728T223936Z&X-Amz-Signature=5c13ede58b211799ab1a556280bd316c404eac3aef1450c47906a077166c4ab4
                    presigned_url: https://example.com
              schema:
                properties:
                  csv:
                    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
                    minLength: 5
                    pattern: ^((http[s]?|ftp):\/)?\/?([^:\/\s]+)((\/\w+)*\/)([\w\-\.]+[^#?\s]+)(.*)?(#[\w\-]+)?$
                    type: string
                  presigned_url:
                    description:
                      A signed link that will allow you to download the CSV file
                      requested by the Request a CSV endpoint.
                    format: uri
                    type: string
                required:
                  - csv
                type: object
          description: ''
        '404':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: ''
                        message: download token is invalid or expired
              schema:
                properties:
                  errors:
                    items:
                      properties:
                        message:
                          type: string
                      type: object
                    type: array
                type: object
          description: ''
        '500':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - message: internal server error
              schema:
                properties:
                  errors:
                    items:
                      properties:
                        message:
                          type: string
                      type: object
                    type: array
                type: object
          description: ''
      security:
        - Authorization: []
      summary: Download CSV
      tags:
        - CSV (UI only)
        - V3
    parameters:
      - description: 'UUID used to locate the download csv request entry in the
          DB.


          This is the UUID provided in the email sent to the user when their csv
          file is ready to download'
        in: path
        name: download_uuid
        required: true
        schema:
          format: uuid
          type: string
  /messages/{msg_id}:
    get:
      description: 'This is BETA functionality. You may not have access, and we
        reserve the right to change functionality without notice.


        Get all of the details about the specified message.'
      operationId: GET-v3-messages-msg_id
      parameters:
        - $ref: '#/components/parameters/trait_authorizationHeader_Authorization'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    api_key_id: bUshz3LGa3coToxA2sWViYAEJJmYZJRyY9BCQY
                    asm_group_id: 5464443
                    categories:
                      - dolor
                      - pie
                    events:
                      - attempt_num: 8
                        bounce_type: soft
                        event_name: unsubscribe
                        http_user_agent:
                          Mozilla/5.0 (Windows NT 5.1; rv:11.0) Gecko
                          Firefox/11.0
                        mx_server: s
                        processed: 7085461846
                      - attempt_num: 3
                        bounce_type: soft
                        event_name: dropped
                        http_user_agent: quis re
                        mx_server: laborum nisi
                        processed: 9878933331
                        url: G_3c-1HtUkN4`puC&&!u>0OiStFG.ZoRi2=j%fUVa]&re6k{hKqD-8vWE<hw-Bd>12Fb5JC6z>S@@'cWS~w5KtuIwv$8/JDD94CXx1n5yjC_I2lQ66zDj4MXe/4bqlcqqQ7evnQWTYx5roaEYMapyuzb/USpsyalh/HcYc9PmQfF8ND_C7bXnwFQ_fb_BHMXbIV8JN28/NjZdawDJ6kSWxLykSVTHzcISGPBRfs_rt3Uc65Vzj6LDSSMN8WRs70m0tAWs/fkDvjvm_7ZeV08YZeB9j9mS9BcE089Fn5UzDlTJW9vqDF5uipjlIVrNbM7oWE/MIJcjg2vJO20jA24WHrchrEXCvKcxriviSDl3tuyDxqdqRSekpm2aH6yW7_ylXj/nWsex4jm3rKvYw1uLq3Tp7qb9edhj8B_TnwLv1yjHSkgbA5jKI4BTqxugmwVTnFf2OFCFp/ZILLkoKgfwOyIK4reUIkhCjuhkwp/cqGaFAkeCFQXPB6DLYesLZ2M3KPuBsBrs3pr3HRbTtwaOzdKtGc8e0C0VTjrJ3GwljStMPrSuQWh6/vigHRasZ4P9kFv5DPVbHWZzPvtwUw0AMByt44YH678WpbAXXy4I/IVOHmErZTbw1mJ/3vd4uI5rr2zEO_YA9qJZLJT/wmBimbOyaMtmTNYr_FhgfkKMN3_1la7RCK8CIP3p26mbuHbdJV1j/5sTIKibInM5l2BoWdEi49bPqzagsfjKpGVbg0YQ8mjrLhI92/qy0eVYi34kBGVuLzxK2FLC8vwYUrbupjUYE23Mc_6nmHYRK1HF1QmZDZG1hw96I3MPbTZqeJOWGch230qDNxOgnHRNNM52k/3c7FeuRr88RwZGpif/4FaSAbdqkUNvJ9J9qX2tJS9x5vZlgD8k4YHIXDztrnwg2VPquj/uo_2MjbWybIF/NGJM2RFAsKV1S5iOejuTV4p12KlH1p0Dt5EpxCSIl0XoWuvyLYar77f_hzqNdWAyL0FDxGfj4ma4jwqdTTLNyeZEtguYoCHTFfY/HgJkpHx/yO23G7gLhKPvD459ceffHidFh7LipTxNF0GFXhIAPrWfhv7PkPmVofBoFFlo6/rMcHQ82d5VS8i1CCyLtfuT5WH9GqrsOY7xo3lxi7BNL93/PLRdQT3SObRFRERw68V5ZFvIuEQqFOFZQ848rWPLXYDGY658dyjZALf/Ug4EROi_ehNtzPwecer_RGBHxeMnpxrPAFZEL6YXNKzm8hh3HY4Uc4fgkjge5fXsR4CeTSkS66/FOD00deDKmN7XcHEj1LGlAmd4XlV8vFpXg2VazX4OLW8z6vXn5vntNGYO6eBCEKUwupRz9nQSMeZ/Pbmjoopyt6TxQBUfPkHBdgCIhqA1zDV72ARqGlK_ao9KVjvgbB98YeiieIyogkuOa4y0E5iUEdBopzovVgtY88yLijh9ww/tl0R5rI2P2_OxguTbv_wrfEm8jRjISEIqSE9q29RB3n8PeD4hu24rcsaEuTMCqniiLN0a2OtZiKxHnbsNB660Aq3/tEo2SHZBkkIFYXBbDNE7gLfvFz9ZaC_E2oV2quyK1Id5SkNkJBVRRgROWBc_XEOXktc4vRUKxy1MQ526Xilyo8/uI67lHH1Vlr4V3GVmweT4A16KMqzmVzvRDRFLpkBv2iu3Okc1vIqkC/426aOqeUm6SXIx16d8BWVRcmqKqizxDEF3JkLFgX0ab73CZ4GdJ9YaakJO7y4adFGzzIVLcn08UZ/pwDQ9BAuwuMc2yMnKihdvmLKbnAa1ATk9jFXQ9QAEMBHZLbPNvtS3pkpk0s6fyh2ceHa9Myy3fL/oqvPmq_14KzLgPZHaOlyb3tUoQM52fv/I78TqTGyB4WYD_vkm8gYHZcCF0dFIXsiXUbAbwR90Ldk8lsgxSL6rBvjPSlQq7N66NPzUVRYr3zSISupG_66uS4rJszHwmxmmraT3/zfVKxHXFHgxUDRmnwIMfdFKm4sf/qnRRccOLExJYGcZy8u65jo4gHDvO6vnpsdf0YtVWqDBJXa95/Y/qL7EYS73_t6/2xnWra9TTO0OtQNXEQ1XXLSLt6vPw1FTlE2aYCitDgUo7DyxiwuGtvmMKUkYCo/lqXouo2TGXZFF80lrCu1vKdxBgOOerlrsKrOJawGEzL8XzXdxkOMUT8HOzHPNOvDwsxc47mvpVzXEbX5DRaioOlm2U4flTG/6bZfLqJqHNtrKwC5U5NNG6_yNOW5Jg_bLmzUosi86IXxn7i04vRXXn92JmdE70TcdujehT1n15wtiD8ld5A65IV2W1801/wr0XcDIGiUSmxFfCozUCtBTFwln0uJ0cquSDXhj7JQADhYDGyz8WhqcPE7CP9xN93EUBrWczINbA4IsfckY8CZh68/Tak5dEhw8i_3rz/8U39D/iML1G_A8TsnKQ9/_S8o89fFc7Wx/f1nXF8H6OLVbPpp5IZg7UTZ2K0bSe3iBpsmkkJpxY_6zEHTJE3LbIANwF9Ik5Tu0ZJpjck7I07xlHR8mDW9FXclSQC/qJUGL5qByf2SY2Wd24hqKGrahLfqApQuRI8_DtU/Y8kH6DDif5kD6as3sIe6VbKYnU9c1URq/npTlE72m107FXxW9zktdzbBJAxt4udMFzjt2LPcBpqrMKGkrg4BHqKXwhFTspCWyYCjxJ/eFb3fd3BB5kb9D0yl3oOjeWtbJBqsboyzdLisRBn2MCtXO2O8eo4Hkm/2uJDoRjRCyIi2GNRkH0B3EkN6Z3vG40C985bAtM8eqHABzP2QRcKCz4ICOw_Xz249bJk8qM0/m4EeIWnx2ISf9TBU6_0KZ5QJ0VPOCPXxV9jCeK5W5/RV5nd7GUUXG0btDqUAa3DzpaRHX3klMAqL73hK4AGD3ItikmxF8vnSaqtsgOCpEePERt9qcUOJJP2aR0scPAf_1TkGSrgr5VF/XLM2i7YhC_3J9fA2Qwa0dbTedY/xGayjimEkuWSWvh7P5FNOum_l7qJPnA31lQq6ixqR0NKhO328rWfijqKHF6WR/5O0MJ4WNuIXk6xBtTOA9mK7CGUgWjaF5mB72PVnDpN8G6ERO39GqO/fCO96/A1mwIPWedF6HklU8jaQ_M5EUzwCsBE3/7FW2hbcD3GCOFCiLvObjn59o6CKoYlmTop/PZw2CLzvARAr5KaLhjIuZRSKTGlmYjvSoSELuvWi/QHUV7SJ0kF_1O3b_3a88cm/z7qD3Rp6MmoQdGPSyu1lXTpoETypgOMywfsr4ycV2LQr5XaE3UrQP/RzobA4rI_I3ceCUaRASmil2rV1TUiyljhdCFt8zmi1o2NyTzSBRNGP0lXU5Qtm6dKKp7lGRC19P2oSSFrxt85vWRNo1mv8odcL/TF7/MN1Ev7gY20MqlRSBrlwg5LZ4_Az7QnBnpbU3LkTC/oVb743VFtXMW4cK/3lw6wfBJZe_8DobxT_6/gCXp6QOs/LuqmrQHMQvTS6jfbqVFnPfLjrQ01Mb_F4lr3md6m87wpc1CYd9hdzgUL/aqz68HMDCxjGauC00Rajq9wGVYcWJ3j6rIaHIPwclftjARXFDg0yH8v/L6qDgIgGwbB3eZfjOXHAMXRFNMMihseZxYkcFAzLtYr94q9XpQeK4bKi9h_rWAMwcEHnS8/MHHlySbgy8azGEA0u9xsY96MRi45Qe74kZ9xlsI1t4Yutx8/gsjIiu7vNsKEyeTwd88BMExjWNcJHOSHRff57pJBMEAtPdbMETYorvUkRyErsqprxX0W45n0RRQ85w/JCOsYaxZOAFfzO0AdLpMCguFwl01fkFOKYrQeXfNn8w0KF4XS0k/fPx02fU7fFjUoXcPH7_9xo755WL8DNIU2ne4b6DpiROe473yUfD8_zSNUI1tpxzVYNA7GvVSYt8UtqHn3/_QwuOc4VeAI6RiAG5O5bcAxzQl96Q35emNwtTT_CYqHORCmyPj6By2hT_SCLf8m_xFxxe3YzvnxDZGq3qf__pq7Tw181/GosBAJy3MotiIxcYDASbY9sV4T2V/KoGHyJ64spdkQbJOHJ216JMSKj8ii5m8gxqJ2ypL81p5hbjWtjbUgSc8M_KTLuc0Owf1R/3vr/dKbQ2pJ4XEfXhnZTBQY7ZrClnVCnd5cMe9ic/aNF0yyOSQVVOecUFkK9IYFVR8VHdVf4/Nfu3nOEskHki1_r3At1HLOMniS6qNTvhS0hfqIuBiQBsd5aB7OdfVpYy1HdIR72gMToBlpHPsE5GrVO0J9/gcyB2xcyZ3UpTom8G3V48LUkk6kcJ6l1SL5Fgzbst0z3pDA4dzBfswbC8dW57_MkswDANNd8atPrOBSU5m2z66dP/mIYQ8iq/DcmBexkARDI47VzYuw5gwy8Lvym2_B2gxBokU9_T/fHCPjlpqjTsY6SgBOz1nlDh_HcSWYAqnyrZxbEO2erVJ4WPKNzjM3KaPXGH/dZryna1E28wxCrMqLCs9aL9oVBlDMjUcEryAyRh7xwN0uWGopdpkd7Du6O9EPjAj37sHkUiVs7WL6JyexoDF_n67MICvQnJ9FK/FVrp1uMZnmr7ijkMW87moNRBkXbVc2EA_hHOHmpbVGqr6WgNtJ7bBk1LrAPT8sKtE75vbe_L9VYqBHJ/njk.WIIj-V23pwC7ZahcIL0XnDPupL7ltwEc779Ofhrk9dt_wIOFsA8XwnCjrYqH2ty.F0XdS"*;@kDYgfL4dwE/5I@>k|u0D:wGz"_8=}RJM!Ybbwd}eN=ZB*esF&(iQ%FW]_FSA:3Ze4O*6&tG-Fe**/j^a&S8zIa#6gxL2NmnNMSVGF-Bf3z08tt0ug_UfNshhs4HJh0l1o24gjAN-Uck1OvWkGQSXH0glB7CnOm0gI
                    from_email: LKb.pOGYIZbfxMgi7Le0K1YWym%e5pz2PiuGbwByM2tR+wRPqfoFg1__35DaWF8CDhzYJg@ZTSFDjbgdxD23oq34Lun1NUnyymoGT4G.5i1IEzQpXWAvNwx.BNckAJiBCnwEVnwBfrbMlouoOPmtTSEbdPp
                    id: 2mMUdxV2HRfAeDiBTYs2IP
                    msg_id: hznSfJ1RfKeIKS1B4mShNnkRMpdt5IXXKf
                    originating_ip: 204.173.18.0
                    outbound_ip: 181.40.184.87
                    outbound_ip_type: dedicated
                    status: delivered
                    subject: culpa aute amet magna sint
                    teammate: 9a8F0EP88wSSJeuOyXtbfc7BkK
                    template_id: d674d9b7-e8e5-4e30-87be-1b3b026235fd
                    to_email: +lOnUtHodefMsuBw.kunNalfcxRos5USSRoR@r5uEXYPP6wrQGRQ-vBg33fLY6MVkkMd-DKT8Z1iqt4qnrL23xMOZ8GWd.fyghGEFceTHIUpgwNGlwEtFHJikSaPzsnYfrJPKydPVPAlItJtqykRHZSGW
                    unique_args: eu
              schema:
                allOf:
                  - $ref: '#/components/schemas/email-activity-response-common-fields'
                  - example:
                      api_key_id: sdfsdfsdf123
                      asm_group_id: 11376349
                      categories:
                        - hi
                        - bye
                      events:
                        - event_name: bounced
                          processed: 1492453589
                          server_response: some error message
                      from_email: jane_doe@example.com
                      msg_id: in aliquip id aliqua
                      originating_ip: 2.3.4.5
                      outbound_ip: 1.2.3.4
                      outbound_ip_type: dedicated
                      status: not delivered
                      subject: est incididunt adipisicing pariatur
                      teammate: ''
                      template_id: 123e4567-e89b-12d3-a456-426655440000
                      to_email: send@test.com
                      unique_args: "{'key': 'value'}"
                    properties:
                      api_key_id:
                        description:
                          The ID of the API Key used to authenticate the sending
                          request for the message.
                        maxLength: 50
                        minLength: 3
                        pattern: ^[A-Za-z0-9]+
                        type: string
                      asm_group_id:
                        description:
                          The unsubscribe group associated with this email.
                        minimum: 1
                        type: integer
                      categories:
                        description: Categories users associated to the message
                        items:
                          type: string
                        type: array
                      events:
                        description: List of events related to email message
                        items:
                          example:
                            bounce_type: blocked
                            event_name: bounced
                            http_user_agent: in tempor ex dolore est
                            mx_server: quis proident
                            processed: '2017-10-13T18:56:21Z'
                            reason: some reason
                            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
                          properties:
                            attempt_num:
                              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. '
                              maximum: 10
                              minimum: 1
                              type: integer
                            bounce_type:
                              description:
                                Use to distinguish between types of bounces
                              enum:
                                - soft
                                - hard
                              type: string
                            event_name:
                              description: Name of event
                              enum:
                                - bounced
                                - opened
                                - clicked
                                - processed
                                - dropped
                                - delivered
                                - deferred
                                - spam_report
                                - unsubscribe
                                - group_unsubscribe
                                - group_resubscribe
                              type: string
                            http_user_agent:
                              description:
                                Client recipient used to click or open message
                              type: string
                            mx_server:
                              description:
                                The MX server that received the email. For
                                example, mx.gmail.com
                              type: string
                            processed:
                              description: The date when the event was processed
                              type: string
                            reason:
                              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.
                              maxLength: 1024
                              type: string
                            url:
                              description:
                                Used with "clicked" event to indicate which url
                                the user clicked.
                              pattern: ^((http[s]?|ftp):\/)?\/?([^:\/\s]+)((\/\w+)*\/)([\w\-\.]+[^#?\s]+)(.*)?(#[\w\-]+)?$
                              type: string
                          required:
                            - event_name
                            - processed
                            - bounce_type
                            - http_user_agent
                            - mx_server
                          title: Event
                          type: object
                        type: array
                      originating_ip:
                        description:
                          This is the IP of the user who sent the message.
                        format: ipv4
                        type: string
                      outbound_ip:
                        description:
                          IP used to send to the remote Mail Transfer Agent.
                        format: ipv4
                        type: string
                      outbound_ip_type:
                        description:
                          Whether or not the outbound IP is dedicated vs shared
                        enum:
                          - dedicated
                          - shared
                        type: string
                      teammate:
                        description: Teammate's username
                        maxLength: 64
                        minLength: 0
                        pattern: ^$|^[A-Za-z0-9]+
                        type: string
                      template_id:
                        description:
                          The ID associated with a Twilio SendGrid email
                          template used to format the message.
                        type: string
                      unique_args:
                        default: 'Null'
                        description:
                          JSON hash of key-value pairs associated with the
                          message.
                        type: string
                    required:
                      - template_id
                      - asm_group_id
                      - teammate
                      - api_key_id
                      - events
                      - originating_ip
                      - categories
                      - unique_args
                      - outbound_ip
                      - outbound_ip_type
                    type: object
                example:
                  api_key_id: sdfsdfsdf123
                  asm_group_id: 11376349
                  categories:
                    - hi
                    - bye
                  events:
                    - event_name: bounced
                      processed: 1492453589
                      server_response: some error message
                  from_email: test@test.com
                  msg_id: in aliquip id aliqua
                  originating_ip: 2.3.4.5
                  outbound_ip: 1.2.3.4
                  outbound_ip_type: dedicated
                  status: not delivered
                  subject: est incididunt adipisicing pariatur
                  teammate: ''
                  template_id: 123e4567-e89b-12d3-a456-426655440000
                  to_email: send@test.com
                  unique_args: "{'key': 'value'}"
                properties:
                  api_key_id:
                    maxLength: 50
                    minLength: 3
                    pattern: ^[A-Za-z0-9]+
                    type: string
                  asm_group_id:
                    minimum: 1
                    type: integer
                  categories:
                    description: Categories users associated to the message
                    items:
                      type: string
                    type: array
                  events:
                    description: List of events related to email message
                    items:
                      example:
                        bounce_type: blocked
                        event_name: bounced
                        http_user_agent: in tempor ex dolore est
                        mx_server: quis proident
                        processed: '2017-10-13T18:56:21Z'
                        reason: some reason
                        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
                      properties:
                        attempt_num:
                          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. '
                          maximum: 10
                          minimum: 1
                          type: integer
                        bounce_type:
                          description:
                            Use to distinguish between types of bounces
                          enum:
                            - bounced
                            - blocked
                            - expired
                          type: string
                        event_name:
                          description: Name of event
                          enum:
                            - bounced
                            - opened
                            - clicked
                            - processed
                            - dropped
                            - delivered
                            - deferred
                            - spam_report
                            - unsubscribe
                            - group_unsubscribe
                            - group_resubscribe
                          type: string
                        http_user_agent:
                          description:
                            Client recipient used to click or open message
                          type: string
                        mx_server:
                          description: For example mx.gmail.com
                          type: string
                        processed:
                          description: Date of when event occurred
                          type: string
                        reason:
                          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
                          maxLength: 1024
                          type: string
                        url:
                          description:
                            Used with "clicked" event to indicate which url the
                            user clicked.
                          pattern: ^((http[s]?|ftp):\/)?\/?([^:\/\s]+)((\/\w+)*\/)([\w\-\.]+[^#?\s]+)(.*)?(#[\w\-]+)?$
                          type: string
                      required:
                        - event_name
                        - processed
                        - url
                        - bounce_type
                        - http_user_agent
                        - mx_server
                      title: Event
                      type: object
                    type: array
                  from_email:
                    pattern: \b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}\b
                    type: string
                  msg_id:
                    maxLength: 50
                    minLength: 5
                    pattern: ^[A-Za-z0-9]+
                    type: string
                  originating_ip:
                    description:
                      This is the IP of the user who sent the message.
                    format: ipv4
                    type: string
                  outbound_ip:
                    description:
                      IP used to send to the remote MTA. Used by UI to display
                      IP in detailed view
                    format: ipv4
                    type: string
                  outbound_ip_type:
                    description:
                      Whether or not the outbound IP is dedicated vs shared
                    enum:
                      - dedicated
                      - shared
                    type: string
                  status:
                    description: Quick summary of the status of a message
                    enum:
                      - processed
                      - not delivered
                      - delivered
                    type: string
                  subject:
                    maxLength: 255
                    minLength: 3
                    type: string
                  teammate:
                    description: Teammate's username
                    maxLength: 64
                    minLength: 0
                    pattern: ^$|^[A-Za-z0-9]+
                    type: string
                  template_id:
                    format: uuid
                    type: string
                  to_email:
                    pattern: \b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}\b
                    type: string
                  unique_args:
                    default: 'Null'
                    description: JSON hash of arbitrary key-value pairs
                    type: string
                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
                title: Message
                type: object
          description: ''
        '400':
          content:
            application/json:
              schema:
                x-errors:
                  - message: "invalid syntax: 'bad_field' is not a known field"
          description: ''
        '404':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: message_id
                        message: not found
              schema:
                properties:
                  errors:
                    items:
                      properties:
                        field:
                          type: string
                        message:
                          type: string
                      type: object
                    type: array
                type: object
          description: ''
        '429':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - message: too many requests
              schema:
                properties:
                  errors:
                    items:
                      properties:
                        message:
                          type: string
                      type: object
                    type: array
                type: object
          description: ''
      security:
        - Authorization: []
      summary: Filter messages by message ID
      tags:
        - Query
        - Messages
    parameters:
      - description: The ID of the message you are requesting details for.
        in: path
        name: msg_id
        required: true
        schema:
          type: string
  /partner_settings:
    get:
      description: '**This endpoint allows you to retrieve a list of all partner
        settings that you can enable.**


        Our partner settings allow you to integrate your SendGrid account with
        our partners to increase your SendGrid experience and functionality. For
        more information about our partners, and how you can begin integrating
        with them, please visit our [Partners
        documentation](https://sendgrid.com/docs/ui/account-and-settings/partners/).'
      operationId: GET_partner_settings
      parameters:
        - description: The number of settings to return per page.
          in: query
          name: limit
          schema:
            type: integer
        - description: The paging offset.
          in: query
          name: offset
          schema:
            type: integer
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    result:
                      - description: A description of a partner.
                        enabled: true
                        name: partner_name
                        title: Partner title
              schema:
                properties:
                  result:
                    items:
                      properties:
                        description:
                          description: A description of this partner setting.
                          type: string
                        enabled:
                          description:
                            Indicates if this partner setting has been enabled.
                          type: boolean
                        name:
                          description: The name of the partner setting.
                          type: string
                        title:
                          description: The title of the partner.
                          type: string
                      required:
                        - title
                        - enabled
                        - name
                        - description
                      type: object
                    type: array
                type: object
          description: ''
      security:
        - Authorization: []
      summary: Returns a list of all partner settings.
      tags:
        - Settings - Partner
  /partner_settings/new_relic:
    get:
      description: '**This endpoint allows you to retrieve your current New
        Relic partner settings.**


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


        By integrating with New Relic, you can send your SendGrid email
        statistics to your New Relic Dashboard. If you enable this setting, your
        stats will be sent to New Relic every 5 minutes. You will need your New
        Relic License Key to enable this setting. For more information, please
        see our [SendGrid for New Relic
        documentation](https://sendgrid.com/docs/ui/analytics-and-reporting/tracking-stats-using-new-relic/).'
      operationId: GET_partner_settings-new_relic
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    enable_subuser_statistics: false
                    enabled: true
                    license_key: ''
              schema:
                $ref: '#/components/schemas/partner_settings_new_relic'
          description: ''
      security:
        - Authorization: []
      summary: Returns all New Relic partner settings.
      tags:
        - Settings - Partner
    patch:
      description: '**This endpoint allows you to update or change your New
        Relic partner settings.**


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


        By integrating with New Relic, you can send your SendGrid email
        statistics to your New Relic Dashboard. If you enable this setting, your
        stats will be sent to New Relic every 5 minutes. You will need your New
        Relic License Key to enable this setting. For more information, please
        see our [SendGrid for New Relic
        documentation](https://sendgrid.com/docs/ui/analytics-and-reporting/tracking-stats-using-new-relic/).'
      operationId: PATCH_partner_settings-new_relic
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      requestBody:
        content:
          application/json:
            schema:
              example:
                enable_subuser_statistics: true
                enabled: true
                license_key: ''
              properties:
                enable_subuser_statistics:
                  description:
                    Indicates if your subuser statistics will be sent to your
                    New Relic Dashboard.
                  type: boolean
                enabled:
                  description: Indicates if this partner setting is enabled.
                  type: boolean
                license_key:
                  description: The license key for your New Relic account.
                  type: string
              type: object
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    enable_subuser_statistics: true
                    enabled: true
                    license_key: ''
              schema:
                $ref: '#/components/schemas/partner_settings_new_relic'
          description: ''
      security:
        - Authorization: []
      summary: Updates New Relic partner settings.
      tags:
        - Settings - Partner
  /scopes:
    get:
      description: '**This endpoint returns a list of all scopes that this user
        has access to.**


        API Keys are used to authenticate with [SendGrid''s v3
        API](https://sendgrid.api-docs.io/v3.0/how-to-use-the-sendgrid-v3-api/api-authorization).


        API Keys may be assigned certain permissions, or scopes, that limit
        which API endpoints they are able to access.


        This endpoint returns all the scopes assigned to the key you use to
        authenticate with it. To retrieve the scopes assigned to another key,
        you can pass an API key ID to the "Retrieve an existing API key"
        endpoint.


        For a more detailed explanation of how you can use API Key permissions,
        please visit our [API Keys
        documentation](https://sendgrid.com/docs/ui/account-and-settings/api-keys/).'
      operationId: GET_scopes
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    scopes:
                      - mail.send
                      - alerts.create
                      - alerts.read
              schema:
                properties:
                  scopes:
                    description:
                      The list of scopes for which this user has access.
                    items:
                      type: string
                    type: array
                    uniqueItems: true
                required:
                  - scopes
                type: object
          description: ''
        '401':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: null
                        message: authorization required
              schema:
                properties:
                  errors:
                    description:
                      This 401 response indicates that the user making the call
                      doesn't have the authorization to view the list of scopes.
                    items:
                      properties:
                        field:
                          description:
                            This empty field is returned instead of the list of
                            scopes if the user making the call doesn't have the
                            authorization required.
                          nullable: true
                        message:
                          description:
                            Explains why the scopes cannot be returned.
                          type: string
                      required:
                        - message
                      type: object
                    type: array
                required:
                  - errors
                type: object
          description: ''
        '403':
          $ref: '#/components/responses/trait_globalErrors_403'
        '404':
          $ref: '#/components/responses/trait_globalErrors_404'
        '500':
          $ref: '#/components/responses/trait_globalErrors_500'
      security:
        - Authorization: []
      summary: Retrieve a list of scopes for which this user has access.
      tags:
        - API Key Permissions
  /scopes/requests:
    get:
      description: "**This endpoint allows you to retrieve a list of all recent
        access requests.**


        The Response Header's `link` parameter will include pagination info."
      operationId: GET_v3-scopes-requests
      parameters:
        - description: Optional field to limit the number of results returned.
          in: query
          name: limit
          schema:
            default: 50
            type: integer
        - description: Optional beginning point in the list to retrieve from.
          in: query
          name: offset
          schema:
            default: 0
            type: integer
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    - email: teammate1@example.com
                      first_name: Teammate
                      id: 1
                      last_name: One
                      scope_group_name: Mail Settings
                      username: teammate1
                    - email: teammate2@example.com
                      first_name: Teammate
                      id: 2
                      last_name: Two
                      scope_group_name: Stats
                      username: teammate2
              schema:
                items:
                  properties:
                    email:
                      description: Teammate's email
                      type: string
                    first_name:
                      description: Teammate's first name
                      type: string
                    id:
                      description: Request ID
                      type: integer
                    last_name:
                      description: Teammate's last name
                      type: string
                    scope_group_name:
                      description:
                        Name of group of scopes associated to page teammate is
                        requesting access to
                      type: string
                    username:
                      description: Teammate's username
                      type: string
                  type: object
                type: array
          description: ''
      security:
        - Authorization: []
      summary: Retrieve access requests
      tags:
        - Teammates
  /scopes/requests/{request_id}:
    delete:
      description: "**This endpoint allows you to deny an attempt to access your
        account.**


        **Note:** Only teammate admins may delete a teammate's access request."
      operationId: DELETE_v3-scopes-requests-request_id
      responses:
        '204':
          description: ''
        '401':
          description: ''
        '404':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: request_id
                        message: Cannot find request
              schema:
                properties:
                  errors:
                    items:
                      properties:
                        field:
                          type: string
                        message:
                          type: string
                      type: object
                    type: array
                type: object
          description: ''
      security:
        - Authorization: []
      summary: Deny access request
      tags:
        - Teammates
    parameters:
      - description: The ID of the request that you want to deny.
        in: path
        name: request_id
        required: true
        schema:
          type: string
  /scopes/requests/{request_id}/approve:
    parameters:
      - description: The ID of the request that you want to approve.
        in: path
        name: request_id
        required: true
        schema:
          type: string
    patch:
      description: '**This endpoint allows you to approve an access attempt.**


        **Note:** Only teammate admins may approve another teammate’s access
        request.'
      operationId: PATCH_v3-scopes-requests-approve-id
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    scope_group_name: Stats
              schema:
                properties:
                  scope_group_name:
                    description:
                      name of feature teammate will be given access to
                    type: string
                type: object
          description: ''
        '401':
          content:
            application/json:
              schema:
                type: object
          description: ''
        '404':
          content:
            application/json:
              schema:
                properties:
                  errors:
                    items:
                      properties:
                        field:
                          type: string
                        message:
                          type: string
                      type: object
                    type: array
                type: object
          description: ''
      security:
        - Authorization: []
      summary: Approve access request
      tags:
        - Teammates
  /senders:
    get:
      description:
        '**This endpoint allows you to retrieve a list of all sender identities
        that have been created for your account.**'
      operationId: GET_v3-senders
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    result:
                      - address: 123 Elm St.
                        address_2: Apt. 456
                        city: Denver
                        country: United States
                        created_at: 1449872165
                        from:
                          email: from@example.com
                          name: Example INC
                        id: 1
                        locked: false
                        nickname: My Sender ID
                        reply_to:
                          email: replyto@example.com
                          name: Example INC
                        state: Colorado
                        updated_at: 1449872165
                        verified: true
                        zip: '80202'
              schema:
                properties:
                  result:
                    items:
                      $ref: '#/components/schemas/senderID'
                    type: array
                type: object
          description: ''
      security:
        - Authorization: []
      summary: Get all Sender Identities
      tags:
        - Sender Identities API
    post:
      description: '**This endpoint allows you to create a new sender
        identity.**


        You may create up to 100 unique sender identities.'
      operationId: POST_senders
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      requestBody:
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/sender-id-request'
                - properties:
                    from:
                      required:
                        - email
                      type: object
                    reply_to:
                      required:
                        - email
                      type: object
                  required:
                    - nickname
                    - address
                    - city
                    - country
                  type: object
              example:
                address: 123 Elm St.
                address_2: Apt. 456
                city: Denver
                country: United States
                from:
                  email: from@example.com
                  name: Example INC
                nickname: My Sender ID
                reply_to:
                  email: replyto@example.com
                  name: Example INC
                state: Colorado
                zip: '80202'
      responses:
        '201':
          content:
            application/json:
              examples:
                response:
                  value:
                    address: 123 Elm St.
                    address_2: Apt. 456
                    city: Denver
                    country: United States
                    created_at: 1449872165
                    from:
                      email: from@example.com
                      name: Example INC
                    id: 1
                    locked: false
                    nickname: My Sender ID
                    reply_to:
                      email: replyto@example.com
                      name: Example INC
                    state: Colorado
                    updated_at: 1449872165
                    verified: true
                    zip: '80202'
              schema:
                $ref: '#/components/schemas/senderID'
          description: ''
        '400':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: ''
                        message: The JSON you have submitted cannot be parsed.
                      - field: ''
                        message:
                          You've reached your limit of 100 sender identities.
                          Please delete one or more and try again.
                      - field: nickname
                        message: nickname is required.
                      - field: nickname
                        message:
                          You already have a sender identity with the same
                          nickname.
                      - field: from_name
                        message: from_name is required.
                      - field: from_email
                        message: from_email is required.
                      - field: from_email
                        message: From email is not a valid email address.
                      - field: reply_to
                        message: reply_to is required.
                      - field: reply_to
                        message: Reply to email is not a valid email address.
                      - field: address
                        message: address is required.
                      - field: city
                        message: city is required.
                      - field: country
                        message: country is required.
              schema:
                properties:
                  errors:
                    items:
                      properties:
                        field:
                          type: string
                        message:
                          type: string
                      type: object
                    type: array
                type: object
          description: ''
      security:
        - Authorization: []
      summary: Create a Sender Identity
      tags:
        - Sender Identities API
  /senders/{sender_id}:
    delete:
      description:
        '**This endoint allows you to delete one of your sender identities.**'
      operationId: DELETE_v3-senders-sender_id
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '204':
          content:
            application/json:
              schema:
                properties: {}
                type: object
          description: ''
        '403':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: locked
                        message:
                          You may only delete a sender identity when it is
                          unlocked.
              schema:
                properties:
                  errors:
                    items:
                      properties:
                        field:
                          type: string
                        message:
                          type: string
                      type: object
                    type: array
                type: object
          description: ''
        '404':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: id
                        message: resource not found
              schema:
                properties:
                  errors:
                    items:
                      properties:
                        field:
                          type: string
                        message:
                          type: string
                      type: object
                    type: array
                type: object
          description: ''
      security:
        - Authorization: []
      summary: Delete a Sender Identity
      tags:
        - Sender Identities API
    get:
      description:
        '**This endpoint allows you to retrieve a specific sender identity.**'
      operationId: GET_v3-senders-sender_id
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    address: 123 Elm St.
                    address_2: Apt. 456
                    city: Denver
                    country: United States
                    created_at: 1449872165
                    from:
                      email: from@example.com
                      name: Example INC
                    id: 1
                    locked: false
                    nickname: My Sender ID
                    reply_to:
                      email: replyto@example.com
                      name: Example INC
                    state: Colorado
                    updated_at: 1449872165
                    verified: true
                    zip: '80202'
              schema:
                $ref: '#/components/schemas/senderID'
          description: ''
        '404':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: id
                        message: resource not found
              schema:
                properties:
                  errors:
                    items:
                      properties:
                        field:
                          type: string
                        message:
                          type: string
                      type: object
                    type: array
                type: object
          description: ''
      security:
        - Authorization: []
      summary: View a Sender Identity
      tags:
        - Sender Identities API
    parameters:
      - description: The ID of the sender identity that you want to retrieve.
        in: path
        name: sender_id
        required: true
        schema:
          type: integer
    patch:
      description: '**This endpoint allows you to update a sender identity.**


        Updates to `from.email` require re-verification.


        Partial updates are allowed, but fields that are marked as "required" in
        the POST (create) endpoint must not be nil if that field is included in
        the PATCH request.'
      operationId: PATCH_v3-senders-sender_id
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/sender-id-request'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    address: 123 Elm St.
                    address_2: Apt. 456
                    city: Denver
                    country: United States
                    created_at: 1449872165
                    from:
                      email: from@example.com
                      name: Example INC
                    id: 1
                    locked: false
                    nickname: My Sender ID
                    reply_to:
                      email: replyto@example.com
                      name: Example INC
                    state: Colorado
                    updated_at: 1449872165
                    verified: true
                    zip: '80202'
              schema:
                $ref: '#/components/schemas/senderID'
          description: ''
        '400':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: ''
                        message: The JSON you have submitted cannot be parsed.
                      - field: nickname
                        message: nickname is required.
                      - field: nickname
                        message:
                          You already have a sender identity with the same
                          nickname.
                      - field: from_name
                        message: from_name is required.
                      - field: from_email
                        message: from_email is required.
                      - field: from_email
                        message: From email is not a valid email address.
                      - field: reply_to
                        message: reply_to is required.
                      - field: reply_to
                        message: Reply to email is not a valid email address.
                      - field: address
                        message: address is required.
                      - field: city
                        message: city is required.
                      - field: country
                        message: country is required.
              schema:
                properties:
                  errors:
                    items:
                      properties:
                        field:
                          type: string
                        message:
                          type: string
                      type: object
                    type: array
                type: object
          description: ''
        '403':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: locked
                        message:
                          You may only update a sender identity when it is
                          unlocked.
              schema:
                properties:
                  errors:
                    items:
                      properties:
                        field:
                          type: string
                        message:
                          type: string
                      type: object
                    type: array
                type: object
          description: ''
        '404':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: id
                        message: resource not found
              schema:
                properties:
                  errors:
                    items:
                      properties:
                        field:
                          type: string
                        message:
                          type: string
                      type: object
                    type: array
                type: object
          description: ''
      security:
        - Authorization: []
      summary: Update a Sender Identity
      tags:
        - Sender Identities API
  /senders/{sender_id}/resend_verification:
    parameters:
      - description:
          The ID of the sender identity for which you would like to resend a
          verification email.
        in: path
        name: sender_id
        required: true
        schema:
          type: integer
    post:
      description:
        '**This enpdoint allows you to resend a sender identity verification
        email.**'
      operationId: POST_v3-senders-sender_id-resend_verification
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '204':
          content:
            application/json:
              schema:
                properties: {}
                type: object
          description: ''
        '400':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: ''
                        message:
                          The Sender Identity is already verified.  No email
                          sent.
              schema:
                properties:
                  errors:
                    items:
                      properties:
                        field:
                          type: string
                        message:
                          type: string
                      type: object
                    type: array
                type: object
          description: ''
        '404':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: id
                        message: resource not found
              schema:
                properties:
                  errors:
                    items:
                      properties:
                        field:
                          type: string
                        message:
                          type: string
                      type: object
                    type: array
                type: object
          description: ''
      security:
        - Authorization: []
      summary: Resend Sender Identity Verification
      tags:
        - Sender Identities API
  /sso/certificates:
    post:
      description: '**This endpoint allows you to create an SSO certificate.**'
      operationId: POST_sso-certificates
      requestBody:
        content:
          application/json:
            schema:
              description: ''
              example:
                enabled: false
                integration_id: b0b98502-9408-4b24-9e3d-31ed7cb15312
                public_certificate: <your x509 certificate>
              properties:
                enabled:
                  description: Indicates if the certificate is enabled.
                  type: boolean
                integration_id:
                  description:
                    An ID that matches a certificate to a specific IdP
                    integration. This is the `id` returned by the "Get All SSO
                    Integrations" endpoint.
                  type: string
                public_certificate:
                  description:
                    This public certificate allows SendGrid to verify that SAML
                    requests it receives are signed by an IdP that it
                    recognizes.
                  type: string
              required:
                - public_certificate
                - integration_id
              type: object
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    id: 66138975
                    intergration_id: b0b98502-9408-4b24-9e3d-31ed7cb15312
                    not_after: 1621289880
                    not_before: 1621289880
                    public_certificate: <your x509 certificate>
              schema:
                $ref: '#/components/schemas/sso-certificate-body'
          description: ''
        '400':
          $ref: '#/components/responses/trait_singleSignOnErrorsTrait_400'
        '401':
          $ref: '#/components/responses/trait_singleSignOnErrorsTrait_401'
        '403':
          $ref: '#/components/responses/trait_singleSignOnErrorsTrait_403'
        '429':
          $ref: '#/components/responses/trait_singleSignOnErrorsTrait_429'
        '500':
          $ref: '#/components/responses/trait_singleSignOnErrorsTrait_500'
      summary: Create an SSO Certificate
      tags:
        - Certificates
  /sso/certificates/{cert_id}:
    delete:
      description: '**This endpoint allows you to delete an SSO certificate.**


        You can retrieve a certificate''s ID from the response provided by the
        "Get All SSO Integrations" endpoint.'
      operationId: DELETE_sso-certificates-cert_id
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    id: 66138975
                    intergration_id: b0b98502-9408-4b24-9e3d-31ed7cb15312
                    not_after: 1621289880
                    not_before: 1621289880
                    public_certificate: <your x509 certificate>
              schema:
                $ref: '#/components/schemas/sso-certificate-body'
          description: ''
        '400':
          $ref: '#/components/responses/trait_singleSignOnErrorsTrait_400'
        '401':
          $ref: '#/components/responses/trait_singleSignOnErrorsTrait_401'
        '403':
          $ref: '#/components/responses/trait_singleSignOnErrorsTrait_403'
        '429':
          $ref: '#/components/responses/trait_singleSignOnErrorsTrait_429'
        '500':
          $ref: '#/components/responses/trait_singleSignOnErrorsTrait_500'
      summary: Delete an SSO Certificate
      tags:
        - Certificates
    get:
      description:
        '**This endpoint allows you to retrieve an individual SSO certificate.**'
      operationId: GET_sso-certificates-cert_id
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    id: 66138975
                    intergration_id: b0b98502-9408-4b24-9e3d-31ed7cb15312
                    not_after: 1621289880
                    not_before: 1621289880
                    public_certificate: <your x509 certificate>
              schema:
                $ref: '#/components/schemas/sso-certificate-body'
          description: ''
        '400':
          $ref: '#/components/responses/trait_singleSignOnErrorsTrait_400'
        '401':
          $ref: '#/components/responses/trait_singleSignOnErrorsTrait_401'
        '403':
          $ref: '#/components/responses/trait_singleSignOnErrorsTrait_403'
        '429':
          $ref: '#/components/responses/trait_singleSignOnErrorsTrait_429'
        '500':
          $ref: '#/components/responses/trait_singleSignOnErrorsTrait_500'
      summary: Get an SSO Certificate
      tags:
        - Certificates
    parameters:
      - in: path
        name: cert_id
        required: true
        schema:
          type: string
    patch:
      description: '**This endpoint allows you to update an existing certificate
        by ID.**


        You can retrieve a certificate''s ID from the response provided by the
        "Get All SSO Integrations" endpoint.'
      operationId: PATCH_sso-certificates-cert_id
      requestBody:
        content:
          application/json:
            schema:
              example:
                enabled: false
                intergration_id: b0b98502-9408-4b24-9e3d-31ed7cb15312
                public_certificate: <your x509 certificate>
              properties:
                enabled:
                  description:
                    Indicates whether or not the certificate is enabled.
                  type: boolean
                integration_id:
                  description:
                    An ID that matches a certificate to a specific IdP
                    integration.
                  type: string
                public_certificate:
                  description:
                    This public certificate allows SendGrid to verify that SAML
                    requests it receives are signed by an IdP that it
                    recognizes.
                  type: string
              type: object
      responses:
        '400':
          $ref: '#/components/responses/trait_singleSignOnErrorsTrait_400'
        '401':
          $ref: '#/components/responses/trait_singleSignOnErrorsTrait_401'
        '403':
          $ref: '#/components/responses/trait_singleSignOnErrorsTrait_403'
        '429':
          $ref: '#/components/responses/trait_singleSignOnErrorsTrait_429'
        '500':
          $ref: '#/components/responses/trait_singleSignOnErrorsTrait_500'
      summary: Update SSO Certificate
      tags:
        - Certificates
  /sso/integrations:
    get:
      description: '**This endpoint allows you to retrieve all SSO integrations
        tied to your Twilio SendGrid account.**


        The IDs returned by this endpoint can be used by the APIs additional
        endpoints to modify your SSO integrations.'
      operationId: GET_sso-integrations
      parameters:
        - description:
            If this parameter is set to `true`, the response will include the
            `completed_integration` field.
          in: query
          name: si
          schema:
            type: boolean
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    - audience_url: https://api.sendgrid.com/v3/public/sso/saml/response/id/b0b98502-9408-4b24-9e3d-31ed7cb15312
                      completed_integration: true
                      enabled: true
                      entity_id: http://www.okta.com/${org.externalKey}
                      id: b0b98502-9408-4b24-9e3d-31ed7cb15312
                      last_updated: 1621288520
                      name: Twilio SendGrid
                      signin_url: https://example.okta.com/home/examplecompany/yokpGWsmpRUcuvXFb4x6/nfaVADNhuHvvReAEV4x6
                      signout_url: https://example.okta.com/login/signout?fromURI=exampleappurl
                      single_signon_url: https://api.sendgrid.com/v3/public/sso/saml/response/id/b0b98502-9408-4b24-9e3d-31ed7cb15312
              schema:
                items:
                  $ref: '#/components/schemas/sso-integration'
                type: array
          description: ''
        '400':
          $ref: '#/components/responses/trait_singleSignOnErrorsTrait_400'
        '401':
          $ref: '#/components/responses/trait_singleSignOnErrorsTrait_401'
        '403':
          $ref: '#/components/responses/trait_singleSignOnErrorsTrait_403'
        '429':
          $ref: '#/components/responses/trait_singleSignOnErrorsTrait_429'
        '500':
          $ref: '#/components/responses/trait_singleSignOnErrorsTrait_500'
      summary: Get All SSO Integrations
      tags:
        - Single Sign-On Settings
    post:
      description: '**This endpoint allows you to create an SSO integration.**'
      operationId: POST_sso-integrations
      requestBody:
        $ref: '#/components/requestBodies/create-integration-request'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    enabled: true
                    entity_id: http://www.okta.com/${org.externalKey}
                    last_updated: 1621288964
                    name: Twilio SendGrid
                    signin_url: https://example.okta.com/home/examplecompany/yokpGWsmpRUcuvXFb4x6/nfaVADNhuHvvReAEV4x6
                    signout_url: https://example.okta.com/login/signout?fromURI=exampleappurl
              schema:
                $ref: '#/components/schemas/sso-integration'
          description: ''
        '400':
          $ref: '#/components/responses/trait_singleSignOnErrorsTrait_400'
        '401':
          $ref: '#/components/responses/trait_singleSignOnErrorsTrait_401'
        '403':
          $ref: '#/components/responses/trait_singleSignOnErrorsTrait_403'
        '429':
          $ref: '#/components/responses/trait_singleSignOnErrorsTrait_429'
        '500':
          $ref: '#/components/responses/trait_singleSignOnErrorsTrait_500'
      summary: Create an SSO Integration
      tags:
        - Single Sign-On Settings
  /sso/integrations/{id}:
    delete:
      description: '**This endpoint allows you to delete an IdP configuration by
        ID.**


        You can retrieve the IDs for your configurations from the response
        provided by the "Get All SSO Integrations" endpoint.'
      operationId: DELETE_sso-integrations-id
      responses:
        '204':
          description: ''
        '400':
          $ref: '#/components/responses/trait_singleSignOnErrorsTrait_400'
        '401':
          $ref: '#/components/responses/trait_singleSignOnErrorsTrait_401'
        '403':
          $ref: '#/components/responses/trait_singleSignOnErrorsTrait_403'
        '429':
          $ref: '#/components/responses/trait_singleSignOnErrorsTrait_429'
        '500':
          $ref: '#/components/responses/trait_singleSignOnErrorsTrait_500'
      summary: Delete an SSO Integration
      tags:
        - Single Sign-On Settings
    get:
      description: '**This endpoint allows you to retrieve an SSO integration by
        ID.**


        You can retrieve the IDs for your configurations from the response
        provided by the "Get All SSO Integrations" endpoint.'
      operationId: GET_sso-integrations-id
      parameters:
        - description:
            If this parameter is set to `true`, the response will include the
            `completed_integration` field.
          in: query
          name: si
          schema:
            type: boolean
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    audience_url: https://api.sendgrid.com/v3/public/sso/saml/response/id/b0b98502-9408-4b24-9e3d-31ed7cb15312
                    completed_integration: true
                    enabled: true
                    entity_id: http://www.okta.com/${org.externalKey}
                    id: b0b98502-9408-4b24-9e3d-31ed7cb15312
                    last_updated: 1621288964
                    name: Twilio SendGrid
                    signin_url: https://example.okta.com/home/examplecompany/yokpGWsmpRUcuvXFb4x6/nfaVADNhuHvvReAEV4x6
                    signout_url: https://example.okta.com/login/signout?fromURI=exampleappurl
              schema:
                $ref: '#/components/schemas/sso-integration'
          description: ''
        '400':
          $ref: '#/components/responses/trait_singleSignOnErrorsTrait_400'
        '401':
          $ref: '#/components/responses/trait_singleSignOnErrorsTrait_401'
        '403':
          $ref: '#/components/responses/trait_singleSignOnErrorsTrait_403'
        '429':
          $ref: '#/components/responses/trait_singleSignOnErrorsTrait_429'
        '500':
          $ref: '#/components/responses/trait_singleSignOnErrorsTrait_500'
      summary: Get an SSO Integration
      tags:
        - Single Sign-On Settings
    parameters:
      - in: path
        name: id
        required: true
        schema:
          type: string
    patch:
      description: '**This endpoint allows you to modify an exisiting SSO
        integration.**


        You can retrieve the IDs for your configurations from the response
        provided by the "Get All SSO Integrations" endpoint.'
      operationId: PATCH_sso-integrations-id
      parameters:
        - description:
            If this parameter is set to `true`, the response will include the
            `completed_integration` field.
          in: query
          name: si
          schema:
            type: boolean
      requestBody:
        $ref: '#/components/requestBodies/create-integration-request'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    audience_url: https://api.sendgrid.com/v3/public/sso/saml/response/id/b0b98502-9408-4b24-9e3d-31ed7cb15312
                    enabled: true
                    entity_id: http://www.okta.com/${org.externalKey}
                    id: b0b98502-9408-4b24-9e3d-31ed7cb15312
                    last_updated: 1621288964
                    name: Twilio SendGrid
                    signin_url: https://example.okta.com/home/examplecompany/yokpGWsmpRUcuvXFb4x6/nfaVADNhuHvvReAEV4x6
                    signout_url: https://example.okta.com/login/signout?fromURI=exampleappurl
                    single_signon_url: https://api.sendgrid.com/v3/public/sso/saml/response/id/b0b98502-9408-4b24-9e3d-31ed7cb15312
              schema:
                $ref: '#/components/schemas/sso-integration'
          description: ''
        '400':
          $ref: '#/components/responses/trait_singleSignOnErrorsTrait_400'
        '401':
          $ref: '#/components/responses/trait_singleSignOnErrorsTrait_401'
        '403':
          $ref: '#/components/responses/trait_singleSignOnErrorsTrait_403'
        '429':
          $ref: '#/components/responses/trait_singleSignOnErrorsTrait_429'
        '500':
          $ref: '#/components/responses/trait_singleSignOnErrorsTrait_500'
      summary: Update an SSO Integration
      tags:
        - Single Sign-On Settings
  /sso/integrations/{integration_id}/certificates:
    get:
      description: '**This endpoint allows you to retrieve all your IdP
        configurations by configuration ID.**


        The `integration_id` expected by this endpoint is the `id` returned in
        the response by the "Get All SSO Integrations" endpoint.'
      operationId: GET_sso-integrations-integration_id-certificates
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    - id: 66138975
                      intergration_id: b0b98502-9408-4b24-9e3d-31ed7cb15312
                      not_after: 1621289880
                      not_before: 1621289880
                      public_certificate: <your x509 certificate>
              schema:
                items:
                  $ref: '#/components/schemas/sso-certificate-body'
                type: array
          description: ''
        '400':
          $ref: '#/components/responses/trait_singleSignOnErrorsTrait_400'
        '401':
          $ref: '#/components/responses/trait_singleSignOnErrorsTrait_401'
        '403':
          $ref: '#/components/responses/trait_singleSignOnErrorsTrait_403'
        '429':
          $ref: '#/components/responses/trait_singleSignOnErrorsTrait_429'
        '500':
          $ref: '#/components/responses/trait_singleSignOnErrorsTrait_500'
      summary: Get All SSO Certificates by Integration
      tags:
        - Certificates
    parameters:
      - description:
          An ID that matches a certificate to a specific IdP integration.
        in: path
        name: integration_id
        required: true
        schema:
          type: string
  /sso/teammates:
    post:
      description: '**This endpoint allows you to create an SSO Teammate.**


        The email provided for this user will also function as the Teammate’s
        username.'
      operationId: POST_sso-teammates
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/sso-teammate-request'
      responses:
        '201':
          content:
            application/json:
              examples:
                response:
                  value:
                    email: jane_doe@example.com
                    first_name: Jane
                    is_read_only: true
                    is_sso: true
                    last_name: Doe
                    username: jane_doe@example.com
              schema:
                $ref: '#/components/schemas/sso-teammate-response'
          description: ''
        '400':
          $ref: '#/components/responses/trait_singleSignOnErrorsTrait_400'
        '401':
          $ref: '#/components/responses/trait_singleSignOnErrorsTrait_401'
        '403':
          $ref: '#/components/responses/trait_singleSignOnErrorsTrait_403'
        '429':
          $ref: '#/components/responses/trait_singleSignOnErrorsTrait_429'
        '500':
          $ref: '#/components/responses/trait_singleSignOnErrorsTrait_500'
      summary: Create SSO Teammate
      tags:
        - Single Sign-On Teammates
  /sso/teammates/{username}:
    parameters:
      - description:
          This email address must be the same address assigned to the teammate
          in your IdP
        in: path
        name: username
        required: true
        schema:
          format: email
          type: string
    patch:
      description: '**This endpoint allows you to modify an existing SSO
        Teammate.**


        To turn a teammate into an admin, the request body should contain the
        `is_admin` field set to `true`. Otherwise, set `is_admin` to false and
        pass in all the scopes that a teammate should have.


        Only the parent user and Teammates with admin permissions can update
        another Teammate’s permissions. Admin users can only update permissions.'
      operationId: PATCH_sso-teammates-username
      requestBody:
        content:
          application/json:
            schema:
              example:
                email: jane_doe@example.com
                first_name: Jane
                is_admin: false
                last_name: Doe
                scopes:
                  - mail.batch.create
                  - mail.batch.delete
                  - mail.batch.read
                  - mail.batch.update
                  - mail.send
              properties:
                first_name:
                  type: string
                is_admin:
                  type: boolean
                last_name:
                  type: string
                scopes:
                  items:
                    type: string
                  type: array
              type: object
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    Country: United States
                    address: 1234 Fake St.
                    address2: Suite 5
                    city: San Francisco
                    email: jane_doe@example.com
                    first_name: Jane
                    is_admin: false
                    is_sso: true
                    last_name: Doe
                    phone: '+15555555555'
                    state: CA
                    user_type: teammate
                    username: jane_doe@example.com
                    zip: '94105'
              schema:
                $ref: '#/components/schemas/sso-teammates-patch-response'
          description: ''
        '400':
          $ref: '#/components/responses/trait_singleSignOnErrorsTrait_400'
        '401':
          $ref: '#/components/responses/trait_singleSignOnErrorsTrait_401'
        '403':
          $ref: '#/components/responses/trait_singleSignOnErrorsTrait_403'
        '429':
          $ref: '#/components/responses/trait_singleSignOnErrorsTrait_429'
        '500':
          $ref: '#/components/responses/trait_singleSignOnErrorsTrait_500'
      summary: Edit an SSO Teammate
      tags:
        - Single Sign-On Teammates
  /stats:
    get:
      description: '**This endpoint allows you to retrieve all of your global
        email statistics between a given date range.**


        Parent accounts will see aggregated stats for their account and all
        subuser accounts. Subuser accounts will only see their own stats.'
      operationId: GET_stats
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
        - $ref: '#/components/parameters/trait_statsAdvancedQueryStringsLimitOffset_limit'
        - $ref: '#/components/parameters/trait_statsAdvancedQueryStringsLimitOffset_offset'
        - $ref: '#/components/parameters/trait_statsAdvancedQueryStringsLimitOffset_aggregated_by'
        - $ref: '#/components/parameters/trait_statsAdvancedQueryStringsLimitOffset_start_date'
        - $ref: '#/components/parameters/trait_statsAdvancedQueryStringsLimitOffset_end_date'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    - date: '2015-11-03'
                      stats:
                        - metrics:
                            blocks: 0
                            bounce_drops: 0
                            bounces: 0
                            clicks: 0
                            deferred: 0
                            delivered: 0
                            invalid_emails: 0
                            opens: 0
                            processed: 0
                            requests: 0
                            spam_report_drops: 0
                            spam_reports: 0
                            unique_clicks: 0
                            unique_opens: 0
                            unsubscribe_drops: 0
                            unsubscribes: 0
                    - date: '2015-11-04'
                      stats:
                        - metrics:
                            blocks: 0
                            bounce_drops: 0
                            bounces: 0
                            clicks: 0
                            deferred: 0
                            delivered: 0
                            invalid_emails: 0
                            opens: 0
                            processed: 0
                            requests: 0
                            spam_report_drops: 0
                            spam_reports: 0
                            unique_clicks: 0
                            unique_opens: 0
                            unsubscribe_drops: 0
                            unsubscribes: 0
                    - date: '2015-11-05'
                      stats:
                        - metrics:
                            blocks: 0
                            bounce_drops: 0
                            bounces: 0
                            clicks: 0
                            deferred: 0
                            delivered: 0
                            invalid_emails: 0
                            opens: 0
                            processed: 0
                            requests: 0
                            spam_report_drops: 0
                            spam_reports: 0
                            unique_clicks: 0
                            unique_opens: 0
                            unsubscribe_drops: 0
                            unsubscribes: 0
                    - date: '2015-11-06'
                      stats:
                        - metrics:
                            blocks: 0
                            bounce_drops: 0
                            bounces: 0
                            clicks: 0
                            deferred: 0
                            delivered: 0
                            invalid_emails: 0
                            opens: 0
                            processed: 0
                            requests: 0
                            spam_report_drops: 0
                            spam_reports: 0
                            unique_clicks: 0
                            unique_opens: 0
                            unsubscribe_drops: 0
                            unsubscribes: 0
                    - date: '2015-11-07'
                      stats:
                        - metrics:
                            blocks: 0
                            bounce_drops: 0
                            bounces: 0
                            clicks: 0
                            deferred: 0
                            delivered: 0
                            invalid_emails: 0
                            opens: 0
                            processed: 0
                            requests: 0
                            spam_report_drops: 0
                            spam_reports: 0
                            unique_clicks: 0
                            unique_opens: 0
                            unsubscribe_drops: 0
                            unsubscribes: 0
                    - date: '2015-11-08'
                      stats:
                        - metrics:
                            blocks: 0
                            bounce_drops: 0
                            bounces: 0
                            clicks: 0
                            deferred: 0
                            delivered: 0
                            invalid_emails: 0
                            opens: 0
                            processed: 0
                            requests: 0
                            spam_report_drops: 0
                            spam_reports: 0
                            unique_clicks: 0
                            unique_opens: 0
                            unsubscribe_drops: 0
                            unsubscribes: 0
                    - date: '2015-11-09'
                      stats:
                        - metrics:
                            blocks: 0
                            bounce_drops: 0
                            bounces: 0
                            clicks: 0
                            deferred: 0
                            delivered: 0
                            invalid_emails: 0
                            opens: 0
                            processed: 0
                            requests: 0
                            spam_report_drops: 0
                            spam_reports: 0
                            unique_clicks: 0
                            unique_opens: 0
                            unsubscribe_drops: 0
                            unsubscribes: 0
              schema:
                items:
                  properties:
                    date:
                      description: The date the stats were gathered.
                      type: string
                    stats:
                      description: The individual email activity stats.
                      items:
                        properties:
                          metrics:
                            $ref: '#/components/schemas/stats-advanced-global-stats'
                        type: object
                      type: array
                  required:
                    - date
                    - stats
                  type: object
                type: array
          description: ''
      security:
        - Authorization: []
      summary: Retrieve global email statistics
      tags:
        - Stats
  /subusers:
    get:
      description: '**This endpoint allows you to retrieve a list of all of your
        subusers.**


        You can choose to retrieve specific subusers as well as limit the
        results that come back from the API.'
      operationId: GET_subusers
      parameters:
        - description: The username of this subuser.
          in: query
          name: username
          schema:
            type: string
        - description:
            The number of results you would like to get in each request.
          in: query
          name: limit
          schema:
            type: integer
        - description: The number of subusers to skip.
          in: query
          name: offset
          schema:
            type: integer
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    - disabled: false
                      email: example@example.com
                      id: 1234
                      username: example_subuser
                    - disabled: false
                      email: example2@example.com
                      id: 1234
                      username: example_subuser2
              schema:
                items:
                  $ref: '#/components/schemas/subuser'
                type: array
          description: ''
        '401':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: null
                        message: authorization required
              schema:
                $ref: '#/components/schemas/global_error_response_schema'
          description:
            Unexpected error in API call. See HTTP response body for details.
      security:
        - Authorization: []
      summary: List all Subusers
      tags:
        - Subusers API
    post:
      description: '**This endpoint allows you to create a new subuser.**'
      operationId: POST_subusers
      requestBody:
        content:
          application/json:
            schema:
              example:
                email: John@example.com
                ips:
                  - 1.1.1.1
                  - 2.2.2.2
                password: johns_password
                username: John@example.com
              properties:
                email:
                  description: The email address of the subuser.
                  format: email
                  type: string
                ips:
                  description:
                    The IP addresses that should be assigned to this subuser.
                  items:
                    format: ipv4
                    type: string
                  type: array
                password:
                  description:
                    The password this subuser will use when logging into
                    SendGrid.
                  type: string
                username:
                  description: The username for this subuser.
                  type: string
              required:
                - username
                - email
                - password
                - ips
              type: object
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    authorization_token: ''
                    credit_allocation:
                      type: unlimited
                    email: example@example.com
                    signup_session_token: ''
                    user_id: 1234
                    username: example_subuser
              schema:
                $ref: '#/components/schemas/subuser_post'
          description: ''
        '400':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - message: username exists
                      - message: unable to validate IPs at this time
              schema:
                $ref: '#/components/schemas/global_error_response_schema'
          description: ''
        '401':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: null
                        message: authorization required
              schema:
                $ref: '#/components/schemas/global_error_response_schema'
          description: ''
        '403':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - message:
                          you dont have permission to access this resource
              schema:
                $ref: '#/components/schemas/global_error_response_schema'
          description: ''
        '500':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - message: unable to validate IPs at this time
              schema:
                type: object
          description: ''
      security:
        - Authorization: []
      summary: Create Subuser
      tags:
        - Subusers API
  /subusers/reputations:
    get:
      description: '**This endpoint allows you to request the reputations for
        your subusers.**


        Subuser sender reputations give a good idea how well a sender is doing
        with regards to how recipients and recipient servers react to the mail
        that is being received. When a bounce, spam report, or other negative
        action happens on a sent email, it will affect your sender rating.'
      operationId: GET_subusers-reputations
      parameters:
        - in: query
          name: usernames
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    - reputation: 99
                      username: example_subuser
                    - reputation: 95.2
                      username: example_subuser2
              schema:
                items:
                  properties:
                    reputation:
                      description:
                        The sender reputation this subuser has attained.
                      type: number
                    username:
                      description: The subuser that has this reputation.f
                      type: string
                  required:
                    - reputation
                    - username
                  type: object
                type: array
          description: ''
      security:
        - Authorization: []
      summary: Retrieve Subuser Reputations
      tags:
        - Subusers API
  /subusers/stats:
    get:
      description: '**This endpoint allows you to retrieve the email statistics
        for the given subusers.**


        You may retrieve statistics for up to 10 different subusers by including
        an additional _subusers_ parameter for each additional subuser.'
      operationId: GET_subusers-stats
      parameters:
        - description: Limits the number of results returned per page.
          in: query
          name: limit
          required: false
          schema:
            type: integer
        - description: The point in the list to begin retrieving results from.
          in: query
          name: offset
          required: false
          schema:
            type: integer
        - description:
            How to group the statistics. Must be either "day", "week", or
            "month".
          in: query
          name: aggregated_by
          required: false
          schema:
            enum:
              - day
              - week
              - month
            type: string
        - description:
            The subuser you want to retrieve statistics for. You may include
            this parameter up to 10 times to retrieve statistics for multiple
            subusers.
          in: query
          name: subusers
          required: true
          schema:
            type: string
        - description:
            The starting date of the statistics to retrieve. Must follow format
            YYYY-MM-DD.
          in: query
          name: start_date
          required: true
          schema:
            type: string
        - description:
            The end date of the statistics to retrieve. Defaults to today.
          in: query
          name: end_date
          required: false
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    - date: '2015-10-01'
                      stats:
                        - metrics:
                            blocks: 0
                            bounce_drops: 0
                            bounces: 0
                            clicks: 0
                            deferred: 0
                            delivered: 0
                            invalid_emails: 0
                            opens: 0
                            processed: 0
                            requests: 0
                            spam_report_drops: 0
                            spam_reports: 0
                            unique_clicks: 0
                            unique_opens: 0
                            unsubscribe_drops: 0
                            unsubscribes: 0
                          name: Matt_subuser
                          type: subuser
                    - date: '2015-10-02'
                      stats:
                        - metrics:
                            blocks: 0
                            bounce_drops: 0
                            bounces: 0
                            clicks: 0
                            deferred: 0
                            delivered: 0
                            invalid_emails: 0
                            opens: 0
                            processed: 0
                            requests: 0
                            spam_report_drops: 0
                            spam_reports: 0
                            unique_clicks: 0
                            unique_opens: 0
                            unsubscribe_drops: 0
                            unsubscribes: 0
                          name: Matt_subuser
                          type: subuser
                    - date: '2015-10-03'
                      stats:
                        - metrics:
                            blocks: 0
                            bounce_drops: 0
                            bounces: 0
                            clicks: 0
                            deferred: 0
                            delivered: 0
                            invalid_emails: 0
                            opens: 0
                            processed: 0
                            requests: 0
                            spam_report_drops: 0
                            spam_reports: 0
                            unique_clicks: 0
                            unique_opens: 0
                            unsubscribe_drops: 0
                            unsubscribes: 0
                          name: Matt_subuser
                          type: subuser
                    - date: '2015-10-04'
                      stats:
                        - metrics:
                            blocks: 0
                            bounce_drops: 0
                            bounces: 0
                            clicks: 0
                            deferred: 0
                            delivered: 0
                            invalid_emails: 0
                            opens: 0
                            processed: 0
                            requests: 0
                            spam_report_drops: 0
                            spam_reports: 0
                            unique_clicks: 0
                            unique_opens: 0
                            unsubscribe_drops: 0
                            unsubscribes: 0
                          name: Matt_subuser
                          type: subuser
                    - date: '2015-10-05'
                      stats:
                        - metrics:
                            blocks: 0
                            bounce_drops: 0
                            bounces: 0
                            clicks: 0
                            deferred: 0
                            delivered: 0
                            invalid_emails: 0
                            opens: 0
                            processed: 0
                            requests: 0
                            spam_report_drops: 0
                            spam_reports: 0
                            unique_clicks: 0
                            unique_opens: 0
                            unsubscribe_drops: 0
                            unsubscribes: 0
                          name: Matt_subuser
                          type: subuser
                    - date: '2015-10-06'
                      stats:
                        - metrics:
                            blocks: 0
                            bounce_drops: 0
                            bounces: 0
                            clicks: 0
                            deferred: 0
                            delivered: 0
                            invalid_emails: 0
                            opens: 0
                            processed: 0
                            requests: 0
                            spam_report_drops: 0
                            spam_reports: 0
                            unique_clicks: 0
                            unique_opens: 0
                            unsubscribe_drops: 0
                            unsubscribes: 0
                          name: Matt_subuser
                          type: subuser
                    - date: '2015-10-07'
                      stats:
                        - metrics:
                            blocks: 0
                            bounce_drops: 0
                            bounces: 0
                            clicks: 0
                            deferred: 0
                            delivered: 0
                            invalid_emails: 0
                            opens: 0
                            processed: 0
                            requests: 0
                            spam_report_drops: 0
                            spam_reports: 0
                            unique_clicks: 0
                            unique_opens: 0
                            unsubscribe_drops: 0
                            unsubscribes: 0
                          name: Matt_subuser
                          type: subuser
                    - date: '2015-10-08'
                      stats:
                        - metrics:
                            blocks: 0
                            bounce_drops: 0
                            bounces: 0
                            clicks: 0
                            deferred: 0
                            delivered: 0
                            invalid_emails: 0
                            opens: 0
                            processed: 0
                            requests: 0
                            spam_report_drops: 0
                            spam_reports: 0
                            unique_clicks: 0
                            unique_opens: 0
                            unsubscribe_drops: 0
                            unsubscribes: 0
                          name: Matt_subuser
                          type: subuser
                    - date: '2015-10-09'
                      stats:
                        - metrics:
                            blocks: 0
                            bounce_drops: 0
                            bounces: 0
                            clicks: 0
                            deferred: 0
                            delivered: 0
                            invalid_emails: 0
                            opens: 0
                            processed: 0
                            requests: 0
                            spam_report_drops: 0
                            spam_reports: 0
                            unique_clicks: 0
                            unique_opens: 0
                            unsubscribe_drops: 0
                            unsubscribes: 0
                          name: Matt_subuser
                          type: subuser
                    - date: '2015-10-10'
                      stats:
                        - metrics:
                            blocks: 0
                            bounce_drops: 0
                            bounces: 0
                            clicks: 0
                            deferred: 0
                            delivered: 0
                            invalid_emails: 0
                            opens: 0
                            processed: 0
                            requests: 0
                            spam_report_drops: 0
                            spam_reports: 0
                            unique_clicks: 0
                            unique_opens: 0
                            unsubscribe_drops: 0
                            unsubscribes: 0
                          name: Matt_subuser
                          type: subuser
              schema:
                $ref: '#/components/schemas/category_stats'
          description: ''
      security:
        - Authorization: []
      summary: Retrieve email statistics for your subusers.
      tags:
        - Subuser Statistics
  /subusers/stats/monthly:
    get:
      description: '**This endpoint allows you to retrieve the monthly email
        statistics for all subusers over the given date range.**


        When using the `sort_by_metric` to sort your stats by a specific metric,
        you can not sort by the following metrics:

        `bounce_drops`, `deferred`, `invalid_emails`, `processed`,
        `spam_report_drops`, `spam_reports`, or `unsubscribe_drops`.'
      operationId: GET_subusers-stats-monthly
      parameters:
        - description:
            The date of the month to retrieve statistics for. Must be formatted
            YYYY-MM-DD
          in: query
          name: date
          required: true
          schema:
            type: string
        - description: A substring search of your subusers.
          in: query
          name: subuser
          required: false
          schema:
            type: string
        - description:
            "The metric that you want to sort by. Metrics that you can sort by
            are: `blocks`, `bounces`, `clicks`, `delivered`, `opens`,
            `requests`, `unique_clicks`, `unique_opens`, and `unsubscribes`.'"
          in: query
          name: sort_by_metric
          required: false
          schema:
            default: delivered
            enum:
              - blocks
              - bounces
              - clicks
              - delivered
              - opens
              - requests
              - unique_clicks
              - unique_opens
              - unsubscribes
            type: string
        - description: The direction you want to sort.
          in: query
          name: sort_by_direction
          required: false
          schema:
            default: desc
            enum:
              - desc
              - asc
            type: string
        - description: Optional field to limit the number of results returned.
          in: query
          name: limit
          required: false
          schema:
            default: 5
            type: integer
        - description: Optional beginning point in the list to retrieve from.
          in: query
          name: offset
          required: false
          schema:
            default: 0
            type: integer
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    date: '2016-02-01'
                    stats:
                      - first_name: John
                        last_name: Doe
                        metrics:
                          blocks: 0
                          bounce_drops: 0
                          bounces: 0
                          clicks: 0
                          deferred: 0
                          delivered: 0
                          invalid_emails: 0
                          opens: 1
                          processed: 0
                          requests: 100
                          spam_report_drops: 0
                          spam_reports: 99
                          unique_clicks: 0
                          unique_opens: 0
                          unsubscribe_drops: 0
                          unsubscribes: 0
                        name: user1
                        type: subuser
                      - first_name: Jane
                        last_name: Doe
                        metrics:
                          blocks: 0
                          bounce_drops: 0
                          bounces: 0
                          clicks: 5
                          deferred: 0
                          delivered: 0
                          invalid_emails: 0
                          opens: 10
                          processed: 10
                          requests: 10
                          spam_report_drops: 0
                          spam_reports: 0
                          unique_clicks: 0
                          unique_opens: 0
                          unsubscribe_drops: 0
                          unsubscribes: 0
                        name: user2
                        type: subuser
              schema:
                $ref: '#/components/schemas/subuser_stats'
          description: ''
      security:
        - Authorization: []
      summary: Retrieve monthly stats for all subusers
      tags:
        - Subuser Statistics
  /subusers/stats/sums:
    get:
      description:
        '**This endpoint allows you to retrieve the total sums of each email
        statistic metric for all subusers over the given date range.**'
      operationId: GET_subusers-stats-sums
      parameters:
        - description: 'The direction you want to sort. '
          in: query
          name: sort_by_direction
          required: false
          schema:
            default: desc
            enum:
              - desc
              - asc
            type: string
        - description:
            The starting date of the statistics to retrieve. Must follow format
            YYYY-MM-DD.
          in: query
          name: start_date
          required: true
          schema:
            type: string
        - description:
            The end date of the statistics to retrieve. Defaults to today. Must
            follow format YYYY-MM-DD.
          in: query
          name: end_date
          required: false
          schema:
            type: string
        - description: Limits the number of results returned per page.
          in: query
          name: limit
          required: false
          schema:
            default: 5
            type: integer
        - description: The point in the list to begin retrieving results from.
          in: query
          name: offset
          required: false
          schema:
            default: 0
            type: integer
        - description:
            How to group the statistics. Defaults to today. Must follow format
            YYYY-MM-DD.
          in: query
          name: aggregated_by
          required: false
          schema:
            type: string
        - description:
            The metric that you want to sort by.  Must be a single metric.
          in: query
          name: sort_by_metric
          required: false
          schema:
            default: delivered
            type: string
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    date: '2015-10-11'
                    stats: []
              schema:
                $ref: '#/components/schemas/category_stats'
          description: ''
      security:
        - Authorization: []
      summary:
        Retrieve the totals for each email statistic metric for all subusers.
      tags:
        - Subuser Statistics
  /subusers/{subuser_name}:
    delete:
      description: '**This endpoint allows you to delete a subuser.**


        This is a permanent action. Once deleted, a subuser cannot be retrieved.'
      operationId: DELETE_subusers-subuser_name
      responses:
        '204':
          content:
            application/json:
              schema:
                properties: {}
                type: object
          description: ''
        '401':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: null
                        message: authorization required
              schema:
                $ref: '#/components/schemas/global_error_response_schema'
          description: ''
      security:
        - Authorization: []
      summary: Delete a subuser
      tags:
        - Subusers API
    parameters:
      - in: path
        name: subuser_name
        required: true
        schema:
          type: string
    patch:
      description:
        '**This endpoint allows you to enable or disable a subuser.**'
      operationId: PATCH_subusers-subuser_name
      requestBody:
        content:
          application/json:
            schema:
              example:
                disabled: false
              properties:
                disabled:
                  description:
                    Whether or not this subuser is disabled. True means
                    disabled, False means enabled.
                  type: boolean
              type: object
      responses:
        '204':
          content:
            application/json:
              schema:
                properties: {}
                type: object
          description: ''
        '400':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - message: invalid username
                      - message: no fields provided
              schema:
                $ref: '#/components/schemas/global_error_response_schema'
          description: ''
        '401':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: null
                        message: authorization required
              schema:
                $ref: '#/components/schemas/global_error_response_schema'
          description: ''
        '500':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - message: unable to enable user
              schema:
                $ref: '#/components/schemas/global_error_response_schema'
          description: ''
      security:
        - Authorization: []
      summary: Enable/disable a subuser
      tags:
        - Subusers API
  /subusers/{subuser_name}/ips:
    parameters:
      - in: path
        name: subuser_name
        required: true
        schema:
          type: string
    put:
      description:
        "**This endpoint allows you update your subusers' assigned IP.**\n\nEach
        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. \n\nMore information:\n\n* [How to request more
        IPs](https://sendgrid.com/docs/ui/account-and-settings/dedicated-ip-addresses/)\n*
        [Setup Reverse
        DNS](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-reverse-dns/)"
      operationId: PUT_subusers-subuser_name-ips
      requestBody:
        content:
          application/json:
            schema:
              description:
                The IP addresses you would like to assign to the subuser.
              example:
                - 127.0.0.1
              items:
                format: ipv4
                type: string
              type: array
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    ips:
                      - 127.0.0.1
              schema:
                properties:
                  ips:
                    description:
                      The IP addresses that are assigned to the subuser.
                    items:
                      format: ipv4
                      type: string
                    type: array
                type: object
          description: ''
        '401':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: null
                        message: authorization required
              schema:
                $ref: '#/components/schemas/global_error_response_schema'
          description: ''
      security:
        - Authorization: []
      summary: Update IPs assigned to a subuser
      tags:
        - Subusers API
  /subusers/{subuser_name}/monitor:
    delete:
      operationId: DELETE_subusers-subuser_name-monitor
      responses:
        '204':
          content:
            application/json:
              schema:
                properties: {}
                type: object
          description: ''
        '401':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: null
                        message: authorization required
              schema:
                $ref: '#/components/schemas/global_error_response_schema'
          description: ''
        '404':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: null
                        message: No monitor settings for this user
              schema:
                $ref: '#/components/schemas/global_error_response_schema'
          description: ''
      security:
        - Authorization: []
      summary: Delete monitor settings
      tags:
        - Subuser Monitor Settings
    get:
      operationId: GET_subusers-subuser_name-monitor
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    email: example@example.com
                    frequency: 500
              schema:
                $ref: '#/components/schemas/monitor'
          description: ''
        '401':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: null
                        message: authorization required
              schema:
                $ref: '#/components/schemas/global_error_response_schema'
          description: ''
        '404':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: null
                        message: No monitor settings for this user
              schema:
                $ref: '#/components/schemas/global_error_response_schema'
          description: ''
      security:
        - Authorization: []
      summary: Retrieve monitor settings for a subuser
      tags:
        - Subuser Monitor Settings
    parameters:
      - description:
          The name of the subuser for which to retrieve monitor settings.
        in: path
        name: subuser_name
        required: true
        schema:
          type: string
    post:
      operationId: POST_subusers-subuser_name-monitor
      requestBody:
        $ref: '#/components/requestBodies/monitor'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    email: example@example.com
                    frequency: 50000
              schema:
                $ref: '#/components/schemas/monitor'
          description: ''
        '400':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: null
                        message: User already has a monitor
              schema:
                $ref: '#/components/schemas/global_error_response_schema'
          description: ''
        '401':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: null
                        message: authorization required
              schema:
                $ref: '#/components/schemas/global_error_response_schema'
          description: ''
      security:
        - Authorization: []
      summary: Create monitor settings
      tags:
        - Subuser Monitor Settings
    put:
      operationId: PUT_subusers-subuser_name-monitor
      requestBody:
        $ref: '#/components/requestBodies/monitor'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    email: example@example.com
                    frequency: 500
              schema:
                $ref: '#/components/schemas/monitor'
          description: ''
        '400':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: email
                        message: Email is required
              schema:
                $ref: '#/components/schemas/global_error_response_schema'
          description: ''
        '401':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: null
                        message: authorization required
              schema:
                $ref: '#/components/schemas/global_error_response_schema'
          description: ''
      security:
        - Authorization: []
      summary: Update Monitor Settings for a subuser
      tags:
        - Subuser Monitor Settings
  /subusers/{subuser_name}/stats/monthly:
    get:
      description: '**This endpoint allows you to retrive the monthly email
        statistics for a specific subuser.**


        When using the `sort_by_metric` to sort your stats by a specific metric,
        you can not sort by the following metrics:

        `bounce_drops`, `deferred`, `invalid_emails`, `processed`,
        `spam_report_drops`, `spam_reports`, or `unsubscribe_drops`.'
      operationId: GET_subusers-subuser_name-stats-monthly
      parameters:
        - description:
            The date of the month to retrieve statistics for. Must be formatted
            YYYY-MM-DD
          in: query
          name: date
          required: true
          schema:
            type: string
        - description:
            "The metric that you want to sort by. Metrics that you can sort by
            are: `blocks`, `bounces`, `clicks`, `delivered`, `opens`,
            `requests`, `unique_clicks`, `unique_opens`, and `unsubscribes`.'"
          in: query
          name: sort_by_metric
          required: false
          schema:
            default: delivered
            type: string
        - description: The direction you want to sort.
          in: query
          name: sort_by_direction
          required: false
          schema:
            default: desc
            enum:
              - desc
              - asc
            type: string
        - description: Optional field to limit the number of results returned.
          in: query
          name: limit
          required: false
          schema:
            default: 5
            type: integer
        - description: Optional beginning point in the list to retrieve from.
          in: query
          name: offset
          required: false
          schema:
            default: 0
            type: integer
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    date: '2016-02-01'
                    stats:
                      - first_name: John
                        last_name: Doe
                        metrics:
                          blocks: 0
                          bounce_drops: 0
                          bounces: 0
                          clicks: 5
                          deferred: 0
                          delivered: 0
                          invalid_emails: 0
                          opens: 10
                          processed: 10
                          requests: 10
                          spam_report_drops: 0
                          spam_reports: 0
                          unique_clicks: 0
                          unique_opens: 0
                          unsubscribe_drops: 0
                          unsubscribes: 0
                        name: user1
                        type: subuser
              schema:
                $ref: '#/components/schemas/subuser_stats'
          description: ''
      security:
        - Authorization: []
      summary: Retrieve the monthly email statistics for a single subuser
      tags:
        - Subuser Statistics
    parameters:
      - in: path
        name: subuser_name
        required: true
        schema:
          type: string
  /suppression/blocks:
    delete:
      description:
        "**This endpoint allows you to delete all email addresses on your blocks
        list.**\n\nThere are two options for deleting blocked emails: \n\n1. You
        can delete all blocked emails by setting `delete_all` to `true` in the
        request body. \n2. You can delete a selection of blocked emails by
        specifying the email addresses in the `emails` array of the request
        body."
      operationId: DELETE_suppression-blocks
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      requestBody:
        content:
          application/json:
            schema:
              example:
                delete_all: false
                emails:
                  - example1@example.com
                  - example2@example.com
              properties:
                delete_all:
                  description:
                    Indicates if you want to delete all blocked email addresses.
                  type: boolean
                emails:
                  description:
                    The specific blocked email addresses that you want to
                    delete.
                  items:
                    type: string
                  type: array
              type: object
      responses:
        '204':
          content:
            application/json:
              schema:
                properties: {}
                type: object
          description: ''
      security:
        - Authorization: []
      summary: Delete blocks
      tags:
        - Blocks API
    get:
      description:
        '**This endpoint allows you to retrieve all email addresses that are
        currently on your blocks list.**'
      operationId: GET_suppression-blocks
      parameters:
        - description:
            The start of the time range when a blocked email was created
            (inclusive). This is a unix timestamp.
          in: query
          name: start_time
          schema:
            type: integer
        - description:
            The end of the time range when a blocked email was created
            (inclusive). This is a unix timestamp.
          in: query
          name: end_time
          schema:
            type: integer
        - description: Limit the number of results to be displayed per page.
          in: query
          name: limit
          schema:
            type: integer
        - description: The point in the list to begin displaying results.
          in: query
          name: offset
          schema:
            type: integer
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    - created: 1443651154
                      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: 1443651155
                      email: example1@example.com
                      reason:
                        'unable to resolve MX record for example.com: servfail'
                      status: 4.0.0
              schema:
                $ref: '#/components/schemas/blocks-response'
          description: ''
      security:
        - Authorization: []
      summary: Retrieve all blocks
      tags:
        - Blocks API
  /suppression/blocks/{email}:
    delete:
      description:
        '**This endpoint allows you to delete a specific email address from your
        blocks list.**'
      operationId: DELETE_suppression-blocks-email
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '204':
          content:
            application/json:
              schema:
                properties: {}
                type: object
          description: ''
      security:
        - Authorization: []
      summary: Delete a specific block
      tags:
        - Blocks API
    get:
      description:
        '**This endpoint allows you to retrieve a specific email address from
        your blocks list.**'
      operationId: GET_suppression-blocks-email
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    - created: 1443651154
                      email: example@example.com
                      reason:
                        'error dialing remote address: dial tcp
                        10.57.152.165:25: no route to host'
                      status: 4.0.0
              schema:
                $ref: '#/components/schemas/blocks-response'
          description: ''
      security:
        - Authorization: []
      summary: Retrieve a specific block
      tags:
        - Blocks API
    parameters:
      - description: The email address of the specific block.
        in: path
        name: email
        required: true
        schema:
          format: email
          type: string
  /suppression/bounces:
    delete:
      description:
        "**This endpoint allows you to delete all emails on your bounces
        list.**\n\nThere are two options for deleting bounced emails: \n\n1. You
        can delete all bounced emails by setting `delete_all` to `true` in the
        request body. \n2. You can delete a selection of bounced emails by
        specifying the email addresses in the `emails` array of the request
        body."
      operationId: DELETE_suppression-bounces
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      requestBody:
        content:
          application/json:
            schema:
              example:
                delete_all: false
                emails:
                  - example@example.com
                  - example2@example.com
              properties:
                delete_all:
                  description:
                    This parameter allows you to delete **every** email in your
                    bounce list. This should not be used with the emails
                    parameter.
                  type: boolean
                emails:
                  description:
                    Delete multiple emails from your bounce list at the same
                    time. This should not be used with the delete_all parameter.
                  items:
                    type: string
                  type: array
              type: object
      responses:
        '204':
          content:
            application/json:
              schema:
                nullable: true
          description: ''
        '401':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: null
                        message: authorization required
              schema:
                $ref: '#/components/schemas/global_error_response_schema'
          description: ''
      security:
        - Authorization: []
      summary: Delete bounces
      tags:
        - Bounces API
    get:
      description:
        '**This endpoint allows you to retrieve all of your bounces.**'
      operationId: GET_suppression-bounces
      parameters:
        - description:
            Refers start of the time range in unix timestamp when a bounce was
            created (inclusive).
          in: query
          name: start_time
          schema:
            type: integer
        - description:
            Refers end of the time range in unix timestamp when a bounce was
            created (inclusive).
          in: query
          name: end_time
          schema:
            type: integer
        - in: header
          name: Accept
          required: true
          schema:
            default: application/json
            type: string
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    - created: 1250337600
                      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
                      email: example@example.com
                      reason:
                        '550 5.1.1 <testemail2@testing.com>: Recipient address
                        rejected: User unknown in virtual alias table '
                      status: 5.1.1
              schema:
                items:
                  $ref: '#/components/schemas/bounce_response'
                type: array
          description: ''
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/global_error_response_schema'
          description: ''
      security:
        - Authorization: []
      summary: Retrieve all bounces
      tags:
        - Bounces API
  /suppression/bounces/{email}:
    delete:
      description:
        '**This endpoint allows you to remove an email address from your bounce
        list.**'
      operationId: DELETE_suppression-bounces-email
      parameters:
        - description:
            The email address you would like to remove from the bounce list.
          in: query
          name: email_address
          required: true
          schema:
            format: email
            type: string
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      requestBody:
        $ref: '#/components/requestBodies/DELETE_contactdb-lists-list_idBody'
      responses:
        '204':
          content:
            application/json:
              schema:
                type: object
          description: ''
        '401':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: null
                        message: authorization required
              schema:
                $ref: '#/components/schemas/global_error_response_schema'
          description: ''
      security:
        - Authorization: []
      summary: Delete a bounce
      tags:
        - Bounces API
    get:
      description:
        '**This endpoint allows you to retrieve a specific bounce by email
        address.**'
      operationId: GET_suppression-bounces-email
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    - created: 1443651125
                      email: bounce1@test.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
              schema:
                items:
                  $ref: '#/components/schemas/bounce_response'
                type: array
          description: ''
      security:
        - Authorization: []
      summary: Retrieve a Bounce
      tags:
        - Bounces API
    parameters:
      - in: path
        name: email
        required: true
        schema:
          type: string
  /suppression/invalid_emails:
    delete:
      description:
        "**This endpoint allows you to remove email addresses from your invalid
        email address list.**\n\nThere are two options for deleting invalid
        email addresses: \n\n1) You can delete all invalid email addresses by
        setting `delete_all` to true in the request body.\n2) You can delete
        some invalid email addresses by specifying certain addresses in an array
        in the request body."
      operationId: DELETE_suppression-invalid_emails
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      requestBody:
        content:
          application/json:
            schema:
              example:
                delete_all: false
                emails:
                  - example1@example.com
                  - example2@example.com
              properties:
                delete_all:
                  description:
                    Indicates if you want to remove all email address from the
                    invalid emails list.
                  type: boolean
                emails:
                  description:
                    The list of specific email addresses that you want to
                    remove.
                  items:
                    format: email
                    type: string
                  type: array
              type: object
      responses:
        '204':
          content:
            application/json:
              schema:
                properties: {}
                type: object
          description: ''
      security:
        - Authorization: []
      summary: Delete invalid emails
      tags:
        - Invalid Emails API
    get:
      description:
        '**This endpoint allows you to retrieve a list of all invalid email
        addresses.**'
      operationId: GET_suppression-invalid_emails
      parameters:
        - description:
            Refers start of the time range in unix timestamp when an invalid
            email was created (inclusive).
          in: query
          name: start_time
          schema:
            type: integer
        - description:
            Refers end of the time range in unix timestamp when an invalid email
            was created (inclusive).
          in: query
          name: end_time
          schema:
            type: integer
        - description: Limit the number of results to be displayed per page.
          in: query
          name: limit
          schema:
            type: integer
        - description:
            Paging offset. The point in the list to begin displaying results.
          in: query
          name: offset
          schema:
            type: integer
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    - created: 1449953655
                      email: user1@example.com
                      reason: Mail domain mentioned in email address is unknown
                    - created: 1449939373
                      email: user2@example.com
                      reason: Mail domain mentioned in email address is unknown
              schema:
                description: The list of invalid email addresses.
                items:
                  $ref: '#/components/schemas/invalid-email'
                type: array
          description: ''
      security:
        - Authorization: []
      summary: Retrieve all invalid emails
      tags:
        - Invalid Emails API
  /suppression/invalid_emails/{email}:
    delete:
      description:
        '**This endpoint allows you to remove a specific email address from the
        invalid email address list.**'
      operationId: DELETE_suppression-invalid_emails-email
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '204':
          content:
            application/json:
              schema:
                properties: {}
                type: object
          description: ''
      security:
        - Authorization: []
      summary: Delete a specific invalid email
      tags:
        - Invalid Emails API
    get:
      description:
        '**This endpoint allows you to retrieve a specific invalid email
        addresses.**'
      operationId: GET_suppression-invalid_emails-email
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    - created: 1454433146
                      email: test1@example.com
                      reason: Mail domain mentioned in email address is unknown
              schema:
                description: A specific invalid email.
                items:
                  $ref: '#/components/schemas/invalid-email'
                maxItems: 1
                minItems: 0
                type: array
          description: ''
      security:
        - Authorization: []
      summary: Retrieve a specific invalid email
      tags:
        - Invalid Emails API
    parameters:
      - description:
          The specific email address of the invalid email entry that you want to
          retrieve.
        in: path
        name: email
        required: true
        schema:
          type: string
  /suppression/spam_reports:
    delete:
      description:
        "**This endpoint allows you to delete your spam reports.**\n\nDeleting a
        spam report will remove the suppression, meaning email will once again
        be sent to the previously suppressed address. This should be avoided
        unless a recipient indicates they wish to receive email from you again.
        You can use our [bypass
        filters](https://sendgrid.com/docs/ui/sending-email/index-suppressions/#bypass-suppressions)
        to deliver messages to otherwise suppressed addresses when exceptions
        are required.\n\nThere are two options for deleting spam reports: \n\n1.
        You can delete all spam reports by setting the `delete_all` field to
        `true` in the request body.\n2. You can delete a list of select spam
        reports by specifying the email addresses in the `emails` array of the
        request body."
      operationId: DELETE_suppression-spam_reports
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      requestBody:
        content:
          application/json:
            schema:
              example:
                delete_all: false
                emails:
                  - example1@example.com
                  - example2@example.com
              properties:
                delete_all:
                  description:
                    Indicates if you want to delete all email addresses on the
                    spam report list.
                  type: boolean
                emails:
                  description:
                    A list of specific email addresses that you want to remove
                    from the spam report list.
                  items:
                    type: string
                  type: array
              type: object
      responses:
        '204':
          content:
            application/json:
              schema:
                properties: {}
                type: object
          description: ''
      security:
        - Authorization: []
      summary: Delete spam reports
      tags:
        - Spam Reports API
    get:
      description: '**This endpoint allows you to retrieve all spam reports.**'
      operationId: GET_suppression-spam_reports
      parameters:
        - description:
            The start of the time range when a spam report was created
            (inclusive). This is a unix timestamp.
          in: query
          name: start_time
          schema:
            type: integer
        - description:
            The end of the time range when a spam report was created
            (inclusive). This is a unix timestamp.
          in: query
          name: end_time
          schema:
            type: integer
        - description: Limit the number of results to be displayed per page.
          in: query
          name: limit
          schema:
            type: integer
        - description:
            Paging offset. The point in the list to begin displaying results.
          in: query
          name: offset
          schema:
            type: integer
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    - created: 1443651141
                      email: user1@example.com
                      ip: 10.63.202.100
                    - created: 1443651154
                      email: user2@example.com
                      ip: 10.63.202.100
              schema:
                $ref: '#/components/schemas/spam-reports-response'
          description: ''
      security:
        - Authorization: []
      summary: Retrieve all spam reports
      tags:
        - Spam Reports API
  /suppression/spam_reports/{email}:
    delete:
      description: '**This endpoint allows you to delete a specific spam report
        by email address.**


        Deleting a spam report will remove the suppression, meaning email will
        once again be sent to the previously suppressed address. This should be
        avoided unless a recipient indicates they wish to receive email from you
        again. You can use our [bypass
        filters](https://sendgrid.com/docs/ui/sending-email/index-suppressions/#bypass-suppressions)
        to deliver messages to otherwise suppressed addresses when exceptions
        are required.'
      operationId: DELETE_suppression-spam_reports-email
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '204':
          content:
            application/json:
              schema:
                properties: {}
                type: object
          description: ''
      security:
        - Authorization: []
      summary: Delete a specific spam report
      tags:
        - Spam Reports API
    get:
      description:
        '**This endpoint allows you to retrieve a specific spam report by email
        address.**'
      operationId: GET_suppression-spam_reports-email
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    - created: 1454433146
                      email: test1@example.com
                      ip: 10.89.32.5
              schema:
                $ref: '#/components/schemas/spam-reports-response'
          description: ''
      security:
        - Authorization: []
      summary: Retrieve a specific spam report
      tags:
        - Spam Reports API
    parameters:
      - description:
          The email address of a specific spam report that you want to retrieve.
        in: path
        name: email
        required: true
        schema:
          format: email
          type: string
  /suppression/unsubscribes:
    get:
      description:
        '**This endpoint allows you to retrieve a list of all email address that
        are globally suppressed.**'
      operationId: GET_suppression-unsubscribes
      parameters:
        - description:
            Refers start of the time range in unix timestamp when an unsubscribe
            email was created (inclusive).
          in: query
          name: start_time
          schema:
            type: integer
        - description:
            Refers end of the time range in unix timestamp when an unsubscribe
            email was created (inclusive).
          in: query
          name: end_time
          schema:
            type: integer
        - description: The number of results to display on each page.
          in: query
          name: limit
          schema:
            type: integer
        - description:
            The point in the list of results to begin displaying global
            suppressions.
          in: query
          name: offset
          schema:
            type: integer
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    - created: 1443651141
                      email: user1@example.com
                    - created: 1443651154
                      email: user2@example.com
              schema:
                items:
                  properties:
                    created:
                      description:
                        A Unix timestamp indicating when the recipient was added
                        to the global suppression list.
                      type: integer
                    email:
                      description:
                        The email address of the recipient who is globally
                        suppressed.
                      format: email
                      type: string
                  required:
                    - created
                    - email
                  type: object
                type: array
          description: ''
      security:
        - Authorization: []
      summary: Retrieve all global suppressions
      tags:
        - Suppressions - Global Suppressions
  /teammates:
    get:
      description: '**This endpoint allows you to retrieve a list of all current
        Teammates.**


        You can limit the number of results returned using the `limit` query
        paramater. To return results from a specific Teammate, use the `offset`
        paramter. The Response Headers will include pagination info.'
      operationId: GET_v3-teammates
      parameters:
        - description: Number of items to return
          in: query
          name: limit
          schema:
            default: 500
            maximum: 500
            minimum: 0
            type: integer
        - description: Paging offset
          in: query
          name: offset
          schema:
            default: 0
            minimum: 0
            type: integer
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    results:
                      - address: 123 Acme St
                        address2: ''
                        city: City
                        company: ACME Inc.
                        country: USA
                        email: teammate1@example.com
                        first_name: Jane
                        is_admin: true
                        last_name: Doe
                        phone: 123-345-3453
                        state: CA
                        user_type: owner
                        username: teammate1
                        website: www.example.com
                        zip: '12345'
                      - address: 123 Acme St
                        address2: ''
                        city: City
                        company: ACME Inc.
                        country: USA
                        email: teammate2@example.com
                        first_name: John
                        is_admin: false
                        last_name: Doe
                        phone: 123-345-3453
                        state: CA
                        user_type: teammate
                        username: teammate2
                        website: www.example.com
                        zip: '12345'
                      - address: 123 Acme St
                        address2: ''
                        city: City
                        company: ACME Inc.
                        country: USA
                        email: teammate3@example.com
                        first_name: Steve
                        is_admin: true
                        last_name: Doe
                        phone: 123-345-3453
                        state: CA
                        user_type: admin
                        username: teammate3
                        website: www.example.com
                        zip: '12345'
              schema:
                properties:
                  result:
                    items:
                      properties:
                        address:
                          description: (optional) Teammate's address
                          type: string
                        address2:
                          description: (optional) Teammate's address
                          type: string
                        city:
                          description: (optional) Teammate's city
                          type: string
                        country:
                          description: (optional) Teammate's country
                          type: string
                        email:
                          description: Teammate's email
                          type: string
                        first_name:
                          description: Teammate's first name
                          type: string
                        is_admin:
                          description:
                            Set to true if teammate has admin privileges
                          type: boolean
                        last_name:
                          description: Teammate's last name
                          type: string
                        phone:
                          description: (optional) Teammate's phone number
                          type: string
                        state:
                          description: (optional) Teammate's state
                          type: string
                        user_type:
                          description:
                            'Indicate the type of user: owner user, teammate
                            admin user, or normal teammate'
                          enum:
                            - admin
                            - owner
                            - teammate
                          type: string
                        username:
                          description: Teammate's username
                          type: string
                        website:
                          description: (optional) Teammate's website
                          type: string
                        zip:
                          description: (optional) Teammate's zip
                          type: string
                      type: object
                    type: array
                type: object
          description: ''
      security:
        - Authorization: []
      summary: Retrieve all teammates
      tags:
        - Teammates
    post:
      description: "**This endpoint allows you to invite a Teammate to your
        account via email.**


        You can set a Teammate's initial permissions using the `scopes` array in
        the request body. Teammate's will receive a minimum set of scopes from
        Twilio SendGrid that are necessary for the Teammate to function.


        **Note:** A teammate invite will expire after 7 days, but you may resend
        the invitation at any time to reset the expiration date."
      operationId: POST_v3-teammates
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      requestBody:
        content:
          application/json:
            schema:
              example:
                email: teammate1@example.com
                is_admin: false
                scopes:
                  - user.profile.read
                  - user.profile.update
              properties:
                email:
                  description: New teammate's email
                  maxLength: 255
                  minLength: 5
                  pattern: ^.*@.*\..*
                  type: string
                is_admin:
                  default: false
                  description: Set to true if teammate should be an admin user
                  type: boolean
                scopes:
                  description:
                    Set to specify list of scopes that teammate should have.
                    Should be empty if teammate is an admin.
                  items:
                    type: string
                  type: array
              required:
                - email
                - scopes
                - is_admin
              type: object
      responses:
        '201':
          content:
            application/json:
              examples:
                response:
                  value:
                    email: teammate1@example.com
                    is_admin: false
                    scopes:
                      - user.profile.read
                      - user.profile.update
              schema:
                properties:
                  email:
                    description: Teammate's email address
                    type: string
                  is_admin:
                    description:
                      Set to true if teammate should have admin privileges
                    type: boolean
                  scopes:
                    description:
                      Initial set of permissions to give to teammate if they
                      accept the invite
                    items: {}
                    type: array
                  token:
                    description: Token to identify invite
                    type: string
                type: object
          description: ''
        '400':
          content:
            application/json:
              schema:
                properties:
                  errors:
                    items:
                      properties:
                        field:
                          type: string
                        message:
                          type: string
                      type: object
                    type: array
                type: object
          description: ''
      security:
        - Authorization: []
      summary: Invite teammate
      tags:
        - Teammates
  /teammates/pending:
    get:
      description: '**This endpoint allows you to retrieve a list of all pending
        Teammate invitations.**


        Each teammate invitation is valid for 7 days. Users may resend the
        invitation to refresh the expiration date.'
      operationId: GET_v3-teammates-pending
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    result:
                      - email: user1@example.com
                        expiration_date: 1456424263
                        is_admin: false
                        pending_id: abcd123abc
                        scopes:
                          - user.profile.read
                          - user.profile.edit
                      - email: user2@example.com
                        expiration_date: 1456424263
                        is_admin: true
                        pending_id: bcde234bcd
                        scopes: []
              schema:
                properties:
                  result:
                    items:
                      properties:
                        email:
                          description:
                            Email address teammate invite will be sent to
                          type: string
                        expiration_date:
                          description:
                            timestamp indicates when invite will expire.
                            Expiration is 7 days after invite creation
                          type: integer
                        is_admin:
                          description:
                            Set to true to indicate teammate should have the
                            same set of permissions as parent user
                          type: boolean
                        scopes:
                          description:
                            List of permissions to give teammate if they accept
                          items:
                            type: string
                          type: array
                        token:
                          description: Invitation token used to identify user
                          type: string
                      type: object
                    type: array
                type: object
          description: ''
      security:
        - Authorization: []
      summary: Retrieve all pending teammates
      tags:
        - Teammates
  /teammates/pending/{token}:
    delete:
      description:
        '**This endpoint allows you to delete a pending teammate invite.**'
      operationId: DELETE_v3-teammates-pending-token
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '204':
          description: ''
        '404':
          content:
            application/json:
              schema:
                properties:
                  errors:
                    items:
                      properties:
                        field:
                          type: string
                        message:
                          type: string
                      type: object
                    type: array
                type: object
          description: ''
      security:
        - Authorization: []
      summary: Delete pending teammate
      tags:
        - Teammates
    parameters:
      - description: The token for the invite you want to delete.
        in: path
        name: token
        required: true
        schema:
          type: string
  /teammates/pending/{token}/resend:
    parameters:
      - description: The token for the invite that you want to resend.
        in: path
        name: token
        required: true
        schema:
          type: string
    post:
      description: '**This endpoint allows you to resend a Teammate
        invitation.**


        Teammate invitations will expire after 7 days. Resending an invitation
        will reset the expiration date.'
      operationId: POST_v3-teammates-pending-token-resend
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    email: teammate1@example.com
                    is_admin: false
                    pending_id: abc123abc
                    scopes:
                      - user.profile.read
                      - user.profile.update
              schema:
                properties:
                  email:
                    description: Teammate's email address
                    type: string
                  is_admin:
                    description:
                      Set to true if teammate should have admin privileges
                    type: boolean
                  scopes:
                    description:
                      Initial set of permissions to give to teammate if they
                      accept the invite
                    items:
                      type: string
                    type: array
                  token:
                    description: ID to identify invite
                    type: string
                type: object
          description: ''
        '404':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: pending_key
                        message: invalid pending key
              schema:
                properties:
                  errors:
                    items:
                      properties:
                        field:
                          type: string
                        message:
                          type: string
                      type: object
                    type: array
                type: object
          description: ''
      security:
        - Authorization: []
      summary: Resend teammate invite
      tags:
        - Teammates
  /teammates/{username}:
    delete:
      description: '**This endpoint allows you to delete a teammate.**


        **Only the parent user or an admin teammate can delete another
        teammate.**'
      operationId: DELETE_v3-teammates-username
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '204':
          content:
            application/json:
              schema:
                properties:
                  errors:
                    items:
                      properties:
                        field:
                          type: string
                        message:
                          type: string
                      type: object
                    type: array
                type: object
          description: ''
        '404':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: username
                        message: username not found
              schema:
                properties:
                  errors:
                    items:
                      properties:
                        field:
                          type: string
                        message:
                          type: string
                      type: object
                    type: array
                type: object
          description: ''
      security:
        - Authorization: []
      summary: Delete teammate
      tags:
        - Teammates
    get:
      description: '**This endpoint allows you to retrieve a specific Teammate
        by username.**


        You can retrieve the username''s for each of your Teammates using the
        "Retrieve all Teammates" endpoint.'
      operationId: GET_v3-teammates-username
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    address: 123 Acme St
                    address2: ''
                    city: City
                    company: ACME Inc.
                    country: USA
                    email: teammate1@example.com
                    first_name: Jane
                    is_admin: true
                    last_name: Doe
                    phone: 123-345-3453
                    scopes:
                      - user.profile.read
                      - user.profile.update
                      - '...'
                    state: CA
                    user_type: admin
                    username: teammate1
                    website: www.example.com
                    zip: '12345'
              schema:
                properties:
                  address:
                    description: (optional) Teammate's address
                    type: string
                  address2:
                    description: (optional) Teammate's address
                    type: string
                  city:
                    description: (optional) Teammate's city
                    type: string
                  country:
                    description: (optional) Teammate's country
                    type: string
                  email:
                    description: Teammate's email
                    type: string
                  first_name:
                    description: Teammate's first name
                    type: string
                  is_admin:
                    description: Set to true if teammate has admin privileges
                    type: boolean
                  last_name:
                    description: Teammate's last name
                    type: string
                  phone:
                    description: (optional) Teammate's phone number
                    type: string
                  scopes:
                    description: Scopes associated to teammate
                    items: {}
                    type: array
                  state:
                    description: (optional) Teammate's state
                    type: string
                  user_type:
                    description:
                      'Indicate the type of user: account owner, teammate admin
                      user, or normal teammate'
                    enum:
                      - admin
                      - owner
                      - teammate
                    type: string
                  username:
                    description: Teammate's username
                    type: string
                  website:
                    description: (optional) Teammate's website
                    type: string
                  zip:
                    description: (optional) Teammate's zip
                    type: string
                type: object
          description: ''
      security:
        - Authorization: []
      summary: Retrieve specific teammate
      tags:
        - Teammates
    parameters:
      - description: The username of the teammate that you want to retrieve.
        in: path
        name: username
        required: true
        schema:
          type: string
    patch:
      description: '**This endpoint allows you to update a teammate’s
        permissions.**


        To turn a teammate into an admin, the request body should contain an
        `is_admin` set to `true`. Otherwise, set `is_admin` to `false` and pass
        in all the scopes that a teammate should have.


        **Only the parent user or other admin teammates can update another
        teammate’s permissions.**


        **Admin users can only update permissions.**'
      operationId: PATCH_v3-teammates-username
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      requestBody:
        content:
          application/json:
            schema:
              example:
                is_admin: false
                scopes:
                  - user.profile.read
                  - user.profile.edit
              properties:
                is_admin:
                  description:
                    Set to True if this teammate should be promoted to an admin
                    user. If True, scopes should be an empty array.
                  type: boolean
                scopes:
                  description:
                    Provide list of scopes that should be given to teammate. If
                    specifying list of scopes, is_admin should be set to False.
                  items:
                    type: string
                  type: array
              required:
                - scopes
                - is_admin
              type: object
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    address: 123 Acme St
                    address2: ''
                    city: City
                    company: ACME Inc.
                    country: USA
                    email: teammate1@example.com
                    first_name: Jane
                    is_admin: false
                    last_name: Doe
                    phone: 123-345-3453
                    scopes:
                      - user.profile.read
                      - user.profile.edit
                    state: CA
                    user_type: teammate
                    username: teammate1
                    website: www.example.com
                    zip: '12345'
              schema:
                properties:
                  address:
                    description: (optional) Teammate's address
                    type: string
                  address2:
                    description: (optional) Teammate's address
                    type: string
                  city:
                    description: (optional) Teammate's city
                    type: string
                  country:
                    description: (optional) Teammate's country
                    type: string
                  email:
                    description: Teammate's email address
                    type: string
                  first_name:
                    description: Teammate's first name
                    type: string
                  is_admin:
                    description: Set to true if teammate has admin priveleges
                    type: boolean
                  last_name:
                    description: Teammate's last name
                    type: string
                  phone:
                    description: (optional) Teammate's phone number
                    type: string
                  scopes:
                    description: Scopes given to teammate
                    items:
                      type: string
                    type: array
                  state:
                    description: (optional) Teammate's state
                    type: string
                  user_type:
                    description:
                      'Indicate the type of user: owner user, teammate admin
                      user, or normal teammate'
                    enum:
                      - admin
                      - owner
                      - teammate
                    type: string
                  username:
                    description: Teammate's username
                    type: string
                  website:
                    description: (optional) Teammate's website
                    type: string
                  zip:
                    description: (optional) Teammate's zip
                    type: string
                type: object
          description: ''
        '400':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: scopes
                        message: one or more of given scopes are invalid
              schema:
                properties:
                  errors:
                    items:
                      properties:
                        field:
                          type: string
                        message:
                          type: string
                      type: object
                    type: array
                type: object
          description: ''
        '404':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: username
                        message: username not found
              schema:
                properties:
                  errors:
                    items:
                      properties:
                        field:
                          type: string
                        message:
                          type: string
                      type: object
                    type: array
                type: object
          description: ''
      security:
        - Authorization: []
      summary: Update teammate's permissions
      tags:
        - Teammates
  /templates:
    get:
      description:
        '**This endpoint allows you to retrieve all transactional templates.**'
      operationId: GET_templates
      parameters:
        - description:
            Comma-delimited list specifying which generations of templates to
            return. Options are `legacy`, `dynamic` or `legacy,dynamic`.
          in: query
          name: generations
          required: false
          schema:
            default: legacy
            enum:
              - legacy
              - dynamic
              - legacy,dynamic
            type: string
        - description:
            The number of templates to be returned in each page of results
          in: query
          name: page_size
          required: true
          schema:
            maximum: 200
            minimum: 1
            type: number
        - description:
            A token corresponding to a specific page of results, as provided by
            metadata
          in: query
          name: page_token
          required: false
          schema:
            type: string
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    _metadata:
                      count: 1
                      self: https://api.sendgrid.com/v3/templates
                    result:
                      - generation: legacy
                        id: fae7c985-eb92-4b47-9987-28ec29dbc698
                        name: example_name
                        'updated_at ': '2020-11-12 12:00:09'
                        versions: []
              schema:
                properties:
                  _metadata:
                    $ref: '#/components/schemas/_metadata'
                  result:
                    description: ''
                    items:
                      $ref: '#/components/schemas/transactional-templates-template-lean'
                    type: array
                type: object
          description: ''
        '400':
          content:
            application/json:
              schema:
                properties:
                  errors:
                    items:
                      properties:
                        '':
                          type: string
                        error_id:
                          type: string
                        message:
                          type: string
                      type: object
                    type: array
                type: object
          description: ''
      security:
        - Authorization: []
      summary: Retrieve paged transactional templates.
      tags:
        - Transactional Templates
    post:
      description:
        '**This endpoint allows you to create a transactional template.**'
      operationId: POST_templates
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      requestBody:
        content:
          application/json:
            schema:
              example:
                generation: dynamic
                name: example_name
              properties:
                generation:
                  default: legacy
                  description:
                    Defines whether the template supports dynamic replacement.
                  enum:
                    - legacy
                    - dynamic
                  type: string
                name:
                  description: The name for the new transactional template.
                  maxLength: 100
                  type: string
              required:
                - name
              type: object
      responses:
        '201':
          content:
            application/json:
              examples:
                response:
                  value:
                    generation: legacy
                    id: 733ba07f-ead1-41fc-933a-3976baa23716
                    name: example_name
                    versions: []
              schema:
                $ref: '#/components/schemas/transactional_template'
          description: ''
      security:
        - Authorization: []
      summary: Create a transactional template.
      tags:
        - Transactional Templates
  /templates/{template_id}:
    delete:
      description:
        '**This endpoint allows you to delete a transactional template.**'
      operationId: DELETE_templates-template_id
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '204':
          content:
            application/json:
              schema:
                type: object
          description: ''
      security:
        - Authorization: []
      summary: Delete a template.
      tags:
        - Transactional Templates
    get:
      description:
        '**This endpoint allows you to retrieve a single transactional
        template.**'
      operationId: GET_templates-template_id
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    generation: legacy
                    id: 40da60e6-66f3-4223-9406-ba58b7f55a62
                    name: Duis in dolor
                    'updated_at ': '2020-12-12 58:26:65'
                    versions: []
              schema:
                $ref: '#/components/schemas/transactional_template'
          description: ''
      security:
        - Authorization: []
      summary: Retrieve a single transactional template.
      tags:
        - Transactional Templates
    parameters:
      - in: path
        name: template_id
        required: true
        schema:
          type: string
    patch:
      description: '**This endpoint allows you to edit the name of a
        transactional template.**


        To edit the template itself, [create a new transactional template
        version](https://sendgrid.api-docs.io/v3.0/transactional-templates-versions/create-a-new-transactional-template-version).'
      operationId: PATCH_templates-template_id
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      requestBody:
        content:
          application/json:
            schema:
              example:
                name: new_example_name
              properties:
                name:
                  description: The name of the transactional template.
                  maxLength: 100
                  type: string
              type: object
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    id: 733ba07f-ead1-41fc-933a-3976baa23716
                    name: new_example_name
                    versions: []
              schema:
                $ref: '#/components/schemas/transactional_template'
          description: ''
      security:
        - Authorization: []
      summary: Edit a transactional template.
      tags:
        - Transactional Templates
    post:
      description:
        '**This endpoint allows you to duplicate a transactional template.**'
      operationId: POST_templates-template_id
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      requestBody:
        content:
          application/json:
            schema:
              example:
                name: example_name
              properties:
                name:
                  description: The name for the new transactional template.
                  maxLength: 100
                  type: string
              type: object
      responses:
        '201':
          content:
            application/json:
              examples:
                response:
                  value:
                    generation: dynamic
                    id: 733ba07f-ead1-41fc-933a-3976baa2371
                    name: example_name
                    'updated_at ': '2019-03-13T11:52:41.009Z'
                    versions: []
              schema:
                $ref: '#/components/schemas/transactional_template'
          description: ''
      security:
        - Authorization: []
      summary: Duplicate a transactional template.
      tags:
        - Transactional Templates
  /templates/{template_id}/versions:
    parameters:
      - in: path
        name: template_id
        required: true
        schema:
          format: uuid
          type: string
    post:
      description:
        '**This endpoint allows you to create a new version of a template.**'
      operationId: POST_templates-template_id-versions
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      requestBody:
        $ref: '#/components/requestBodies/transactional_template_version_create'
      responses:
        '201':
          content:
            application/json:
              examples:
                response:
                  value:
                    active: 1
                    editor: code
                    generate_plain_content: true
                    html_content: <%body%>
                    id: 8aefe0ee-f12b-4575-b5b7-c97e21cb36f3
                    name: example_version_name
                    plain_content: <%body%>
                    subject: <%subject%>
                    template_id: ddb96bbc-9b92-425e-8979-99464621b543
                    updated_at: '2019-03-13 18:56:33'
              schema:
                $ref: '#/components/schemas/transactional_template_version_output'
          description: ''
      security:
        - Authorization: []
      summary: Create a new transactional template version.
      tags:
        - Transactional Templates Versions
  /templates/{template_id}/versions/{version_id}:
    delete:
      description:
        '**This endpoint allows you to delete a transactional template
        version.**'
      operationId: DELETE_templates-template_id-versions-version_id
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '204':
          description: ''
      security:
        - Authorization: []
      summary: Delete a transactional template version.
      tags:
        - Transactional Templates Versions
    get:
      description:
        '**This endpoint allows you to retrieve a specific version of a
        template.**'
      operationId: GET_templates-template_id-versions-version_id
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    active: 1
                    editor: code
                    generate_plain_content: true
                    html_content: <%body%>
                    id: 8aefe0ee-f12b-4575-b5b7-c97e21cb36f3
                    name: example_version_name
                    plain_content: <%body%>
                    subject: <%subject%>
                    template_id: ddb96bbc-9b92-425e-8979-99464621b543
                    updated_at: '2019-03-13 18:56:33'
              schema:
                $ref: '#/components/schemas/transactional_template_version_output'
          description: ''
      security:
        - Authorization: []
      summary: Retrieve a specific transactional template version.
      tags:
        - Transactional Templates Versions
    parameters:
      - description: ' The ID of the original template'
        in: path
        name: template_id
        required: true
        schema:
          format: uuid
          type: string
      - description: The ID of the template version
        in: path
        name: version_id
        required: true
        schema:
          format: uuid
          type: string
    patch:
      description:
        '**This endpoint allows you to edit the content of your template
        version.**'
      operationId: PATCH_templates-template_id-versions-version_id
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      requestBody:
        $ref: '#/components/requestBodies/transactional_template_version_create'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    active: 1
                    editor: code
                    generate_plain_content: true
                    html_content: <%body%>
                    id: 8aefe0ee-f12b-4575-b5b7-c97e21cb36f3
                    name: example_version_name
                    plain_content: <%body%>
                    subject: <%subject%>
                    template_id: ddb96bbc-9b92-425e-8979-99464621b543
                    updated_at: '2019-03-13 18:56:33'
              schema:
                $ref: '#/components/schemas/transactional_template_version_output'
          description: ''
      security:
        - Authorization: []
      summary: Edit a transactional template version.
      tags:
        - Transactional Templates Versions
  /templates/{template_id}/versions/{version_id}/activate:
    parameters:
      - description: The ID of the original template
        in: path
        name: template_id
        required: true
        schema:
          format: uuid
          type: string
      - description: The ID of the template version
        in: path
        name: version_id
        required: true
        schema:
          format: uuid
          type: string
    post:
      description:
        '**This endpoint allows you to activate a version of one of your
        templates.**'
      operationId: POST_templates-template_id-versions-version_id-activate
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    active: 1
                    editor: code
                    generate_plain_content: true
                    html_content: <%body%>
                    id: 8aefe0ee-f12b-4575-b5b7-c97e21cb36f3
                    name: example_version_name
                    plain_content: <%body%>
                    subject: <%subject%>
                    template_id: ddb96bbc-9b92-425e-8979-99464621b543
                    updated_at: '2019-03-13 18:56:33'
              schema:
                $ref: '#/components/schemas/transactional_template_version_output'
          description: ''
      security:
        - Authorization: []
      summary: Activate a transactional template version.
      tags:
        - Transactional Templates Versions
  /tracking_settings:
    get:
      description:
        '**This endpoint allows you to retrieve a list of all tracking settings
        on your account.**'
      operationId: GET_tracking_settings
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    result:
                      - description: lorem ipsum... .
                        enabled: true
                        name: open
                        title: Open Tracking
              schema:
                properties:
                  result:
                    description: The list of all tracking settings.
                    items:
                      properties:
                        description:
                          description:
                            A description about the event that is being tracked.
                          type: string
                        enabled:
                          description:
                            Indicates if this tracking setting is currently
                            enabled.
                          type: boolean
                        name:
                          description: The name of the event being tracked.
                          type: string
                        title:
                          description: The title of the tracking setting.
                          type: string
                      type: object
                    type: array
                type: object
          description: ''
      security:
        - Authorization: []
      summary: Retrieve Tracking Settings
      tags:
        - Settings - Tracking
  /tracking_settings/click:
    get:
      description: '**This endpoint allows you to retrieve your current click
        tracking setting.**


        Click Tracking overrides all the links and URLs in your emails and
        points them to either SendGrid’s servers or the domain with which you
        branded your link. When a customer clicks a link, SendGrid tracks those
        [clicks](https://sendgrid.com/docs/glossary/clicks/).


        Click tracking helps you understand how users are engaging with your
        communications. SendGrid can track up to 1000 links per email'
      operationId: GET_tracking_settings-click
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    enable_text: false
                    enabled: true
              schema:
                $ref: '#/components/schemas/click-tracking'
          description: ''
      security:
        - Authorization: []
      summary: Retrieve Click Track Settings
      tags:
        - Settings - Tracking
    patch:
      description: '**This endpoint allows you to enable or disable your current
        click tracking setting.**


        Click Tracking overrides all the links and URLs in your emails and
        points them to either SendGrid’s servers or the domain with which you
        branded your link. When a customer clicks a link, SendGrid tracks those
        [clicks](https://sendgrid.com/docs/glossary/clicks/).


        Click tracking helps you understand how users are engaging with your
        communications. SendGrid can track up to 1000 links per email'
      operationId: PATCH_tracking_settings-click
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      requestBody:
        content:
          application/json:
            schema:
              example:
                enabled: true
              properties:
                enabled:
                  description: The setting you want to use for click tracking.
                  type: boolean
              type: object
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    enable_text: false
                    enabled: true
              schema:
                $ref: '#/components/schemas/click-tracking'
          description: ''
      security:
        - Authorization: []
      summary: Update Click Tracking Settings
      tags:
        - Settings - Tracking
  /tracking_settings/google_analytics:
    get:
      description: '**This endpoint allows you to retrieve your current setting
        for Google Analytics.**



        Google Analytics helps you understand how users got to your site and
        what they''re doing there. For more information about using Google
        Analytics, please refer to [Google’s URL
        Builder](https://support.google.com/analytics/answer/1033867?hl=en) and
        their article on ["Best Practices for Campaign
        Building"](https://support.google.com/analytics/answer/1037445).


        We default the settings to Google’s recommendations. For more
        information, see [Google Analytics
        Demystified](https://sendgrid.com/docs/ui/analytics-and-reporting/google-analytics/).'
      operationId: GET_tracking_settings-google_analytics
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    enabled: true
                    utm_campaign: ''
                    utm_content: lotsandlotsofcontent
                    utm_medium: ''
                    utm_source: ''
                    utm_term: ''
              schema:
                $ref: '#/components/schemas/google_analytics_settings'
          description: ''
      security:
        - Authorization: []
      summary: Retrieve Google Analytics Settings
      tags:
        - Settings - Tracking
    patch:
      description: '**This endpoint allows you to update your current setting
        for Google Analytics.**


        Google Analytics helps you understand how users got to your site and
        what they''re doing there. For more information about using Google
        Analytics, please refer to [Google’s URL
        Builder](https://support.google.com/analytics/answer/1033867?hl=en) and
        their article on ["Best Practices for Campaign
        Building"](https://support.google.com/analytics/answer/1037445).


        We default the settings to Google’s recommendations. For more
        information, see [Google Analytics
        Demystified](https://sendgrid.com/docs/ui/analytics-and-reporting/google-analytics/).'
      operationId: PATCH_tracking_settings-google_analytics
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/google_analytics_settings'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    enabled: true
                    utm_campaign: ''
                    utm_content: lotsandlotsofcontent
                    utm_medium: ''
                    utm_source: ''
                    utm_term: ''
              schema:
                $ref: '#/components/schemas/google_analytics_settings'
          description: ''
      security:
        - Authorization: []
      summary: Update Google Analytics Settings
      tags:
        - Settings - Tracking
  /tracking_settings/open:
    get:
      description: '**This endpoint allows you to retrieve your current settings
        for open tracking.**


        Open Tracking adds an invisible image at the end of the email which can
        track email opens.


        If the email recipient has images enabled on their email client, a
        request to SendGrid’s server for the invisible image is executed and an
        open event is logged.


        These events are logged in the Statistics portal, Email Activity
        interface, and are reported by the Event Webhook.'
      operationId: GET_tracking_settings-open
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    enabled: true
              schema:
                properties:
                  enabled:
                    description: Indicates if open tracking is enabled.
                    type: boolean
                required:
                  - enabled
                type: object
          description: ''
      security:
        - Authorization: []
      summary: Get Open Tracking Settings
      tags:
        - Settings - Tracking
    patch:
      description: '**This endpoint allows you to update your current settings
        for open tracking.**


        Open Tracking adds an invisible image at the end of the email which can
        track email opens.


        If the email recipient has images enabled on their email client, a
        request to SendGrid’s server for the invisible image is executed and an
        open event is logged.


        These events are logged in the Statistics portal, Email Activity
        interface, and are reported by the Event Webhook.'
      operationId: PATCH_tracking_settings-open
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      requestBody:
        content:
          application/json:
            schema:
              example:
                enabled: true
              properties:
                enabled:
                  description:
                    The new status that you want to set for open tracking.
                  type: boolean
              type: object
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    enabled: true
              schema:
                properties:
                  enabled:
                    description: Indicates if open tracking is enabled.
                    type: boolean
                required:
                  - enabled
                type: object
          description: ''
      security:
        - Authorization: []
      summary: Update Open Tracking Settings
      tags:
        - Settings - Tracking
  /tracking_settings/subscription:
    get:
      description: '**This endpoint allows you to retrieve your current settings
        for subscription tracking.**


        Subscription tracking adds links to the bottom of your emails that
        allows your recipients to subscribe to, or unsubscribe from, your
        emails.'
      operationId: GET_tracking_settings-subscription
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    enabled: true
                    html_content: '<p>Something something unsubscribe <% %>
                      something something</p>

                      '
                    landing: '<p>subscribehere</p>

                      '
                    plain_content:
                      Something something unsubscribe <% %> something something
                    replace: thetag
                    url: ''
              schema:
                $ref: '#/components/schemas/subscription_tracking_settings'
          description: ''
      security:
        - Authorization: []
      summary: Retrieve Subscription Tracking Settings
      tags:
        - Settings - Tracking
    patch:
      description: '**This endpoint allows you to update your current settings
        for subscription tracking.**


        Subscription tracking adds links to the bottom of your emails that
        allows your recipients to subscribe to, or unsubscribe from, your
        emails.'
      operationId: PATCH_tracking_settings-subscription
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/subscription_tracking_settings'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    enabled: true
                    html_content: html content
                    landing: landing page html
                    plain_content: text content
                    replace: replacement tag
                    url: url
              schema:
                $ref: '#/components/schemas/subscription_tracking_settings'
          description: ''
      security:
        - Authorization: []
      summary: Update Subscription Tracking Settings
      tags:
        - Settings - Tracking
  /user/account:
    get:
      description: "**This endpoint allows you to retrieve your user account
        details.**


        Your user's account information includes the user's account type and
        reputation."
      operationId: GET_user-account
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    reputation: 100
                    type: paid
              schema:
                properties:
                  reputation:
                    description: The sender reputation for this user.
                    type: number
                  type:
                    description: The type of account for this user.
                    enum:
                      - free
                      - paid
                    type: string
                required:
                  - type
                  - reputation
                title: GET User Account response
                type: object
          description: ''
      security:
        - Authorization: []
      summary: Get a user's account information.
      tags:
        - Users API
  /user/credits:
    get:
      description: '**This endpoint allows you to retrieve the current credit
        balance for your account.**


        Each account has a credit balance, which is a base number of emails it
        can send before receiving per-email charges. For more information about
        credits and billing, see [Billing and Plan details
        information](https://sendgrid.com/docs/ui/account-and-settings/billing/).'
      operationId: GET_user-credits
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    last_reset: '2013-01-01'
                    next_reset: '2013-02-01'
                    overage: 0
                    remain: 200
                    reset_frequency: monthly
                    total: 200
                    used: 0
              schema:
                properties:
                  last_reset:
                    description:
                      The date that your credit balance was last reset.
                    type: string
                  next_reset:
                    description:
                      The next date that your credit balance will be reset.
                    type: string
                  overage:
                    description:
                      The number of overdrawn credits for your account.
                    type: integer
                  remain:
                    description:
                      The remaining number of credits available on your account.
                    type: integer
                  reset_frequency:
                    description:
                      The frequency at which your credit balance will be reset.
                    type: string
                  total:
                    description:
                      The total number of credits assigned to your account.
                    type: integer
                  used:
                    description: The number of credits that you have used.
                    type: integer
                required:
                  - remain
                  - total
                  - overage
                  - used
                  - last_reset
                  - next_reset
                  - reset_frequency
                type: object
          description: ''
      security:
        - Authorization: []
      summary: Retrieve your credit balance
      tags:
        - Users API
  /user/email:
    get:
      description:
        '**This endpoint allows you to retrieve the email address currently on
        file for your account.**'
      operationId: GET_user-email
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    email: test@example.com
              schema:
                properties:
                  email:
                    description:
                      The email address currently on file for your account.
                    format: email
                    type: string
                required:
                  - email
                type: object
          description: ''
      security:
        - Authorization: []
      summary: Retrieve your account email address
      tags:
        - Users API
    put:
      description:
        '**This endpoint allows you to update the email address currently on
        file for your account.**'
      operationId: PUT_user-email
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      requestBody:
        content:
          application/json:
            schema:
              example:
                email: example@example.com
              properties:
                email:
                  description:
                    The new email address that you would like to use for your
                    account.
                  type: string
              type: object
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    email: example@example.com
              schema:
                properties:
                  email:
                    description:
                      The current email address on file for your account.
                    format: email
                    type: string
                required:
                  - email
                type: object
          description: ''
      security:
        - Authorization: []
      summary: Update your account email address
      tags:
        - Users API
  /user/password:
    put:
      description: '**This endpoint allows you to update your password.**'
      operationId: PUT_user-password
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      requestBody:
        content:
          application/json:
            schema:
              example:
                new_password: new_password
                old_password: old_password
              properties:
                new_password:
                  description:
                    The new password you would like to use for your account.
                  type: string
                old_password:
                  description: The old password for your account.
                  type: string
              required:
                - new_password
                - old_password
              type: object
      responses:
        '200':
          content:
            application/json:
              schema:
                properties: {}
                type: object
          description: ''
      security:
        - Authorization: []
      summary: Update your password
      tags:
        - Users API
  /user/profile:
    get:
      operationId: GET_user-profile
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    address: 814 West Chapman Avenue
                    address2: ''
                    city: Orange
                    company: SendGrid
                    country: US
                    first_name: Test
                    last_name: User
                    phone: 555-555-5555
                    state: CA
                    website: http://www.sendgrid.com
                    zip: '92868'
              schema:
                properties:
                  address:
                    description: The user's address.
                    type: string
                  address2:
                    description: The second line of the user's address.
                    type: string
                  city:
                    description: The user's city.
                    type: string
                  company:
                    description: The name of the user's company.
                    type: string
                  country:
                    description: The user's country.
                    type: string
                  first_name:
                    description: The user's first name.
                    type: string
                  last_name:
                    description: The user's last name.
                    type: string
                  phone:
                    description: The user's phone number.
                    type: string
                  state:
                    description: The user's state.
                    type: string
                  website:
                    description: The user's website URL.
                    type: string
                  zip:
                    description: The user's zip code.
                    type: string
                required:
                  - address
                  - city
                  - company
                  - country
                  - first_name
                  - last_name
                  - phone
                  - state
                  - website
                  - zip
                title: GET User Profile response
                type: object
          description: ''
      security:
        - Authorization: []
      summary: Get a user's profile
      tags:
        - Users API
    patch:
      description: '**This endpoint allows you to update your current profile
        details.**


        Any one or more of the parameters can be updated via the PATCH
        `/user/profile` endpoint. You must include at least one when you PATCH.'
      operationId: PATCH_user-profile
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/user_profile'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    address: 814 West Chapman Avenue
                    address2: ''
                    city: Orange
                    company: SendGrid
                    country: US
                    first_name: Example
                    last_name: User
                    phone: 555-555-5555
                    state: CA
                    website: http://www.sendgrid.com
                    zip: '92868'
              schema:
                $ref: '#/components/schemas/user_profile'
          description: ''
        '401':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: null
                        message: authorization required
              schema:
                $ref: '#/components/schemas/global_error_response_schema'
          description: ''
      security:
        - Authorization: []
      summary: Update a user's profile
      tags:
        - Users API
  /user/scheduled_sends:
    get:
      description: '**This endpoint allows you to retrieve all cancelled and
        paused scheduled send information.**


        This endpoint will return only the scheduled sends that are associated
        with a `batch_id`. If you have scheduled a send using the `/mail/send`
        endpoint and the `send_at` field but no `batch_id`, the send will be
        scheduled for delivery; however, it will not be returned by this
        endpoint. For this reason, you should assign a `batch_id` to any
        scheduled send you may need to pause or cancel in the future.'
      operationId: GET_user-scheduled_sends
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    - batch_id: QzZmYzLTVWIwYgYzJlM2NhNWI
                      status: cancel
                    - batch_id: mQzZmYzLTVlM2NhNWIwYgYzJl
                      status: cancel
              schema:
                items:
                  $ref: '#/components/schemas/user_scheduled_send_status'
                type: array
          description: ''
        '400':
          $ref: '#/components/responses/trait_cancelScheduledSendsErrors_400'
        '401':
          $ref: '#/components/responses/trait_globalErrors_401'
        '403':
          $ref: '#/components/responses/trait_globalErrors_403'
        '404':
          $ref: '#/components/responses/trait_globalErrors_404'
        '500':
          $ref: '#/components/responses/trait_globalErrors_500'
      security:
        - Authorization: []
      summary: Retrieve all scheduled sends
      tags:
        - Cancel Scheduled Sends
    post:
      description: '**This endpoint allows you to cancel or pause a scheduled
        send associated with a `batch_id`.**


        Passing this endpoint a `batch_id` and status will cancel or pause the
        scheduled send.


        Once a scheduled send is set to `pause` or `cancel` you must use the
        "Update a scheduled send" endpoint to change its status or the "Delete a
        cancellation or pause from a scheduled send" endpoint to remove the
        status. Passing a status change to a scheduled send that has already
        been paused or cancelled will result in a `400` level status code.


        If the maximum number of cancellations/pauses are added to a send, a
        `400` level status code will be returned.'
      operationId: POST_user-scheduled_sends
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      requestBody:
        content:
          application/json:
            schema:
              example:
                batch_id: YOUR_BATCH_ID
                status: pause
              properties:
                batch_id:
                  description:
                    The batch ID is the identifier that your scheduled mail
                    sends share.
                  pattern: ^[a-zA-Z0-9]
                  type: string
                status:
                  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}
                  enum:
                    - pause
                    - cancel
                  type: string
              required:
                - batch_id
                - status
              title: Cancel or pause a scheduled send request
              type: object
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/user_scheduled_send_status'
          description: ''
        '400':
          $ref: '#/components/responses/trait_cancelScheduledSendsErrors_400'
        '401':
          $ref: '#/components/responses/trait_globalErrors_401'
        '403':
          $ref: '#/components/responses/trait_globalErrors_403'
        '404':
          $ref: '#/components/responses/trait_globalErrors_404'
        '500':
          $ref: '#/components/responses/trait_globalErrors_500'
      security:
        - Authorization: []
      summary: Cancel or pause a scheduled send
      tags:
        - Cancel Scheduled Sends
  /user/scheduled_sends/{batch_id}:
    delete:
      description: '**This endpoint allows you to delete the cancellation/pause
        of a scheduled send.**


        Scheduled sends cancelled less than 10 minutes before the scheduled time
        are not guaranteed to be cancelled.'
      operationId: DELETE_user-scheduled_sends-batch_id
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '204':
          description: ''
        '400':
          $ref: '#/components/responses/trait_cancelScheduledSendsErrors_400'
        '401':
          $ref: '#/components/responses/trait_globalErrors_401'
        '403':
          $ref: '#/components/responses/trait_globalErrors_403'
        '404':
          $ref: '#/components/responses/trait_globalErrors_404'
        '500':
          $ref: '#/components/responses/trait_globalErrors_500'
      security:
        - Authorization: []
      summary: Delete a cancellation or pause from a scheduled send
      tags:
        - Cancel Scheduled Sends
    get:
      description:
        '**This endpoint allows you to retrieve the cancel/paused scheduled send
        information for a specific `batch_id`.**'
      operationId: GET_user-scheduled_sends-batch_id
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    - batch_id: HkJ5yLYULb7Rj8GKSx7u025ouWVlMgAi
                      status: cancel
                    - batch_id: IbLdyLYULb7Rj8GKSx7u025ouWVlAiMg
                      status: pause
              schema:
                items:
                  $ref: '#/components/schemas/user_scheduled_send_status'
                title: Retrieve scheduled send response
                type: array
          description: ''
        '400':
          $ref: '#/components/responses/trait_cancelScheduledSendsErrors_400'
        '401':
          $ref: '#/components/responses/trait_globalErrors_401'
        '403':
          $ref: '#/components/responses/trait_globalErrors_403'
        '404':
          $ref: '#/components/responses/trait_globalErrors_404'
        '500':
          $ref: '#/components/responses/trait_globalErrors_500'
      security:
        - Authorization: []
      summary: Retrieve scheduled send
      tags:
        - Cancel Scheduled Sends
    parameters:
      - in: path
        name: batch_id
        required: true
        schema:
          type: string
    patch:
      description: '**This endpoint allows you to update the status of a
        scheduled send for the given `batch_id`.**


        If you have already set a `cancel` or `pause` status on a scheduled send
        using the "Cancel or pause a scheduled send" endpoint, you can update
        it''s status using this endpoint. Attempting to update a status once it
        has been set with the "Cancel or pause a scheduled send" endpoint will
        result in a `400` error.'
      operationId: PATCH_user-scheduled_sends-batch_id
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      requestBody:
        content:
          application/json:
            schema:
              example:
                status: pause
              properties:
                status:
                  description:
                    The status you would like the scheduled send to have.
                  enum:
                    - cancel
                    - pause
                  type: string
              required:
                - status
              type: object
      responses:
        '204':
          content:
            application/json:
              schema:
                nullable: true
          description: ''
        '400':
          $ref: '#/components/responses/trait_cancelScheduledSendsErrors_400'
        '401':
          $ref: '#/components/responses/trait_globalErrors_401'
        '403':
          $ref: '#/components/responses/trait_globalErrors_403'
        '404':
          $ref: '#/components/responses/trait_globalErrors_404'
        '500':
          $ref: '#/components/responses/trait_globalErrors_500'
      security:
        - Authorization: []
      summary: Update a scheduled send
      tags:
        - Cancel Scheduled Sends
  /user/settings/enforced_tls:
    get:
      description: '**This endpoint allows you to retrieve your current Enforced
        TLS settings.**


        The Enforced TLS settings specify whether or not the recipient is
        required to support TLS or have a valid certificate.


        If either `require_tls` or `require_valid_cert` is set to `true`, the
        recipient must support TLS 1.1 or higher or have a valid certificate. If
        these conditions are not met, Twilio SendGrid will drop the message and
        send a block event with “TLS required but not supported” as the
        description.'
      operationId: GET_user-settings-enforced_tls
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    require_tls: false
                    require_valid_cert: false
              schema:
                $ref: '#/components/schemas/enforced-tls-request-response'
          description: ''
        '401':
          $ref: '#/components/responses/trait_globalErrors_401'
        '403':
          $ref: '#/components/responses/trait_globalErrors_403'
        '404':
          $ref: '#/components/responses/trait_globalErrors_404'
        '500':
          $ref: '#/components/responses/trait_globalErrors_500'
      security:
        - Authorization: []
      summary: Retrieve current Enforced TLS settings.
      tags:
        - Settings - Enforced TLS
    patch:
      description: '**This endpoint allows you to update your Enforced TLS
        settings.**


        To require TLS from recipients, set `require_tls` to `true`. If either
        `require_tls` or `require_valid_cert` is set to `true`, the recipient
        must support TLS 1.1 or higher or have a valid certificate. If these
        conditions are not met, Twilio SendGrid will drop the message and send a
        block event with “TLS required but not supported” as the description.


        > Twilio SendGrid supports TLS 1.1 and higher and does not support older
        versions of TLS due to security vulnerabilities.'
      operationId: PATCH_user-settings-enforced_tls
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/enforced-tls-request-response'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    require_tls: true
                    require_valid_cert: false
              schema:
                $ref: '#/components/schemas/enforced-tls-request-response'
          description: ''
        '401':
          $ref: '#/components/responses/trait_globalErrors_401'
        '403':
          $ref: '#/components/responses/trait_globalErrors_403'
        '404':
          $ref: '#/components/responses/trait_globalErrors_404'
        '500':
          $ref: '#/components/responses/trait_globalErrors_500'
      security:
        - Authorization: []
      summary: Update Enforced TLS settings
      tags:
        - Settings - Enforced TLS
  /user/username:
    get:
      description:
        '**This endpoint allows you to retrieve your current account username.**'
      operationId: GET_user-username
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    user_id: 1
                    username: test_username
              schema:
                properties:
                  user_id:
                    description: The user ID for your account.
                    type: integer
                  username:
                    description: Your account username.
                    type: string
                required:
                  - username
                  - user_id
                type: object
          description: ''
      security:
        - Authorization: []
      summary: Retrieve your username
      tags:
        - Users API
    put:
      description:
        '**This endpoint allows you to update the username for your account.**'
      operationId: PUT_user-username
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      requestBody:
        content:
          application/json:
            schema:
              example:
                username: test_username
              properties:
                username:
                  description:
                    The new username you would like to use for your account.
                  type: string
              type: object
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    username: test_username
              schema:
                properties:
                  username:
                    description: The current username on file for your account.
                    type: string
                required:
                  - username
                type: object
          description: ''
      security:
        - Authorization: []
      summary: Update your username
      tags:
        - Users API
  /user/webhooks/event/settings:
    get:
      description: '**This endpoint allows you to retrieve your current event
        webhook settings.**


        If an event type is marked as `true`, then the event webhook will
        include information about that event.


        SendGrid’s Event Webhook will notify a URL of your choice via HTTP POST
        with information about events that occur as SendGrid processes your
        email.


        Common uses of this data are to remove unsubscribes, react to spam
        reports, determine unengaged recipients, identify bounced email
        addresses, or create advanced analytics of your email program.'
      operationId: GET_user-webhooks-event-settings
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    bounce: false
                    click: true
                    deferred: false
                    delivered: false
                    dropped: true
                    enabled: false
                    group_resubscribe: false
                    group_unsubscribe: false
                    oauth_client_id: est fugiat
                    oauth_token_url: Duis in laborum sunt
                    open: true
                    processed: false
                    spam_report: false
                    unsubscribe: true
                    url: incididunt reprehenderit
              schema:
                $ref: '#/components/schemas/event-webhook-response'
          description: ''
      security:
        - Authorization: []
      summary: Retrieve Event Webhook settings
      tags:
        - Webhooks
    patch:
      description: '**This endpoint allows you to update your current event
        webhook settings.**


        If an event type is marked as `true`, then the event webhook will
        include information about that event.


        SendGrid’s Event Webhook will notify a URL of your choice via HTTP POST
        with information about events that occur as SendGrid processes your
        email.


        Common uses of this data are to remove unsubscribes, react to spam
        reports, determine unengaged recipients, identify bounced email
        addresses, or create advanced analytics of your email program.'
      operationId: PATCH_user-webhooks-event-settings
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/event-webhook-update-oauth-request'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    bounce: true
                    click: false
                    deferred: true
                    delivered: true
                    dropped: true
                    enabled: true
                    group_resubscribe: false
                    group_unsubscribe: true
                    oauth_client_id: anim sunt
                    oauth_token_url: ex
                    open: true
                    processed: true
                    spam_report: true
                    unsubscribe: true
                    url: mollit laborum
              schema:
                $ref: '#/components/schemas/event-webhook-response'
          description: ''
      security:
        - Authorization: []
      summary: Update Event Notification Settings
      tags:
        - Webhooks
  /user/webhooks/event/settings/signed:
    get:
      description: "**This endpoint allows you to retrieve your signed webhook's
        public key.**


        Once you have enabled signing of the Event Webhook, you will need the
        public key provided to verify the signatures on requests coming from
        Twilio SendGrid. You can retrieve the public key from this endpoint at
        any time.


        For more information about cryptographically signing the Event Webhook,
        see [Getting Started with the Event Webhook Security
        Features](https://sendgrid.com/docs/for-developers/tracking-events/getting-started-event-webhook-security-features)."
      operationId: GET_user-webhooks-event-settings-signed
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    public_key: anim quis in sint
              schema:
                properties:
                  public_key:
                    description:
                      The public key you can use to verify the Twilio SendGrid
                      signature.
                    type: string
                required:
                  - public_key
                type: object
          description: ''
      security:
        - Authorization: []
      summary: Retrieve Signed Webhook Public Key
      tags:
        - Webhooks
    patch:
      description: '**This endpoint allows you to enable or disable signing of
        the Event Webhook.**


        This endpoint takes a single boolean request parameter, `enabled`. You
        may either enable or disable signing of the Event Webhook using this
        endpoint. Once enabled, you can retrieve your public key using the
        `/webhooks/event/settings/signed` endpoint.


        For more information about cryptographically signing the Event Webhook,
        see [Getting Started with the Event Webhook Security
        Features](https://sendgrid.com/docs/for-developers/tracking-events/getting-started-event-webhook-security-features).'
      operationId: PATCH_user-webhooks-event-settings-signed
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      requestBody:
        content:
          application/json:
            schema:
              example:
                enabled: true
              properties:
                enabled:
                  type: boolean
              required:
                - enabled
              type: object
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    public_key: voluptate id Excepteur proident
              schema:
                properties:
                  public_key:
                    description:
                      The public key you can use to verify the Twilio SendGrid
                      signature.
                    type: string
                required:
                  - public_key
                type: object
          description: ''
        '400':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: anim Ut
                        message: mollit consequat dolore commodo
                      - message: qui
                      - message: commodo dolor ipsum
                      - field: quis consectetur eiusmod ullamco laboris
                        message: minim fugiat amet
              schema:
                properties:
                  errors:
                    items:
                      properties:
                        field:
                          nullable: true
                          type: string
                        message:
                          type: string
                      required:
                        - message
                      type: object
                    type: array
                type: object
          description: ''
        '401':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - field: in proident
                        message: fugiat
                      - field: ut
                        message: adipisicing veniam laboris sunt ullamco
                      - message: id sunt consequat Duis irure
                      - field: in qui
                        message: nisi
                      - message: tempor in eiusmod elit
              schema:
                properties:
                  errors:
                    items:
                      properties:
                        field:
                          nullable: true
                          type: string
                        message:
                          type: string
                      required:
                        - message
                      type: object
                    type: array
                type: object
          description: ''
        '500':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - message: Excepteur culpa esse ea ut
                      - message: enim Excepteur dolore dolore
                      - message: dolor occaecat
              schema:
                properties:
                  errors:
                    items:
                      properties:
                        field:
                          nullable: true
                          type: string
                        message:
                          type: string
                      required:
                        - message
                      type: object
                    type: array
                type: object
          description: ''
      security:
        - Authorization: []
      summary: Enable/Disable Signed Webhook
      tags:
        - Webhooks
  /user/webhooks/event/test:
    post:
      description: '**This endpoint allows you to test your event webhook by
        sending a fake event notification post to the provided URL.**


        SendGrid’s Event Webhook will notify a URL of your choice via HTTP POST
        with information about events that occur as SendGrid processes your
        email.


        Common uses of this data are to remove unsubscribes, react to spam
        reports, determine unengaged recipients, identify bounced email
        addresses, or create advanced analytics of your email program.


        >**Tip**: Retry logic for this endpoint differs from other endpoints,
        which use a rolling 24-hour retry.


        If your web server does not return a 2xx response type, we will retry a
        POST request until we receive a 2xx response or the maximum time of 10
        minutes has expired.'
      operationId: POST_user-webhooks-event-test
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      requestBody:
        content:
          application/json:
            schema:
              example:
                oauth_client_id: nisi
                oauth_client_secret: veniam commodo ex sunt
                oauth_token_url: dolor Duis
                url: mollit non ipsum magna
              properties:
                oauth_client_id:
                  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.
                  type: string
                oauth_client_secret:
                  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.
                  type: string
                oauth_token_url:
                  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.
                  type: string
                url:
                  description:
                    The URL where you would like the test notification to be
                    sent.
                  type: string
              type: object
      responses:
        '204':
          description: ''
      security:
        - Authorization: []
      summary: Test Event Notification Settings
      tags:
        - Webhooks
  /user/webhooks/parse/settings:
    get:
      description:
        '**This endpoint allows you to retrieve all of your current inbound
        parse settings.**'
      operationId: GET_user-webhooks-parse-settings
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    result:
                      - hostname: mail.mydomain.com
                        send_raw: true
                        spam_check: true
                        url: http://mydomain.com/parse
              schema:
                properties:
                  result:
                    description:
                      The list of your current inbound parse settings.
                    items:
                      $ref: '#/components/schemas/parse-setting'
                    type: array
                type: object
          description: ''
        '401':
          $ref: '#/components/responses/trait_globalErrors_401'
        '403':
          $ref: '#/components/responses/trait_globalErrors_403'
        '404':
          $ref: '#/components/responses/trait_globalErrors_404'
        '500':
          $ref: '#/components/responses/trait_globalErrors_500'
      security:
        - Authorization: []
      summary: Retrieve all parse settings
      tags:
        - Webhooks
    post:
      description: '**This endpoint allows you to create a new inbound parse
        setting.**


        Creating an Inbound Parse setting requires two pieces of information: a
        `url` and a `hostname`.


        The `hostname` must correspond to a domain authenticated by Twilio
        SendGrid on your account. If you need to complete domain authentication,
        you can use the [Twilio SendGrid
        App](https://app.sendgrid.com/settings/sender_auth) or the "Authenticate
        a domain" endpoint. See "[How to Set Up Domain
        Authentication](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/)"
        for instructions.


        Any email received by the `hostname` will be parsed when you complete
        this setup. You must also add a Twilio SendGrid MX record to this
        domain''s DNS records. See "[Setting up the Inbound Parse
        Webhook](https://sendgrid.com/docs/for-developers/parsing-email/setting-up-the-inbound-parse-webhook/)"
        for full instructions.


        The `url` represents a location where the parsed message data will be
        delivered. Twilio SendGrid will make an HTTP POST request to this `url`
        with the message data. The `url` must be publicly reachable, and your
        application must return a `200` status code to signal that the message
        data has been received.'
      operationId: POST_user-webhooks-parse-settings
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      requestBody:
        $ref: '#/components/requestBodies/parse-setting'
      responses:
        '201':
          content:
            application/json:
              examples:
                response:
                  value:
                    hostname: myhostname.com
                    send_raw: true
                    spam_check: false
                    url: http://email.myhostname.com
              schema:
                $ref: '#/components/schemas/parse-setting'
          description: ''
        '401':
          $ref: '#/components/responses/trait_globalErrors_401'
        '403':
          $ref: '#/components/responses/trait_globalErrors_403'
        '404':
          $ref: '#/components/responses/trait_globalErrors_404'
        '500':
          $ref: '#/components/responses/trait_globalErrors_500'
      security:
        - Authorization: []
      summary: Create a parse setting
      tags:
        - Settings - Inbound Parse
  /user/webhooks/parse/settings/{hostname}:
    delete:
      description: '**This endpoint allows you to delete a specific inbound
        parse setting by hostname.**


        You can retrieve all your Inbound Parse settings and their associated
        host names with the "Retrieve all parse settings" endpoint.'
      operationId: DELETE_user-webhooks-parse-settings-hostname
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '204':
          content:
            application/json:
              schema:
                type: object
          description: ''
        '401':
          $ref: '#/components/responses/trait_globalErrors_401'
        '403':
          $ref: '#/components/responses/trait_globalErrors_403'
        '404':
          $ref: '#/components/responses/trait_globalErrors_404'
        '500':
          $ref: '#/components/responses/trait_globalErrors_500'
      security:
        - Authorization: []
      summary: Delete a parse setting
      tags:
        - Settings - Inbound Parse
    get:
      description: '**This endpoint allows you to retrieve a specific inbound
        parse setting by hostname.**


        You can retrieve all your Inbound Parse settings and their associated
        host names with the "Retrieve all parse settings" endpoint.'
      operationId: GET_user-webhooks-parse-settings-hostname
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    hostname: mail.mydomain.com
                    send_raw: true
                    spam_check: true
                    url: http://mydomain.com/parse
              schema:
                $ref: '#/components/schemas/parse-setting'
          description: ''
        '401':
          $ref: '#/components/responses/trait_globalErrors_401'
        '403':
          $ref: '#/components/responses/trait_globalErrors_403'
        '404':
          $ref: '#/components/responses/trait_globalErrors_404'
        '500':
          $ref: '#/components/responses/trait_globalErrors_500'
      security:
        - Authorization: []
      summary: Retrieve a specific parse setting
      tags:
        - Settings - Inbound Parse
    parameters:
      - description:
          The hostname associated with the inbound parse setting that you would
          like to retrieve.
        in: path
        name: hostname
        required: true
        schema:
          type: string
    patch:
      description: '**This endpoint allows you to update a specific inbound
        parse setting by hostname.**


        You can retrieve all your Inbound Parse settings and their associated
        host names with the "Retrieve all parse settings" endpoint.'
      operationId: PATCH_user-webhooks-parse-settings-hostname
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      requestBody:
        $ref: '#/components/requestBodies/parse-setting'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    hostname: mail.mydomain.com
                    send_raw: true
                    spam_check: true
                    url: http://mydomain.com/parse
              schema:
                $ref: '#/components/schemas/parse-setting'
          description: ''
        '401':
          $ref: '#/components/responses/trait_globalErrors_401'
        '403':
          $ref: '#/components/responses/trait_globalErrors_403'
        '404':
          $ref: '#/components/responses/trait_globalErrors_404'
        '500':
          $ref: '#/components/responses/trait_globalErrors_500'
      security:
        - Authorization: []
      summary: Update a parse setting
      tags:
        - Settings - Inbound Parse
  /user/webhooks/parse/stats:
    get:
      description: "**This endpoint allows you to retrieve the statistics for
        your Parse Webhook useage.**


        SendGrid's Inbound Parse Webhook allows you to parse the contents and
        attachments of incomming emails. The Parse API can then POST the parsed
        emails to a URL that you specify. The Inbound Parse Webhook cannot parse
        messages greater than 30MB in size, including all attachments.


        There are a number of pre-made integrations for the SendGrid Parse
        Webhook which make processing events easy. You can find these
        integrations in the [Library
        Index](https://sendgrid.com/docs/Integrate/libraries.html#-Webhook-Libraries)."
      operationId: GET_user-webhooks-parse-stats
      parameters:
        - description: The number of statistics to return on each page.
          in: query
          name: limit
          required: false
          schema:
            type: string
        - description: The number of statistics to skip.
          in: query
          name: offset
          required: false
          schema:
            type: string
        - description: 'How you would like the statistics to by grouped. '
          in: query
          name: aggregated_by
          required: false
          schema:
            enum:
              - day
              - week
              - month
            type: string
        - description:
            The starting date of the statistics you want to retrieve. Must be in
            the format YYYY-MM-DD
          in: query
          name: start_date
          required: true
          schema:
            type: string
        - description:
            The end date of the statistics you want to retrieve. Must be in the
            format YYYY-MM-DD
          in: query
          name: end_date
          required: false
          schema:
            default: The day the request is made.
            type: string
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    - date: '2015-10-11'
                      stats:
                        - metrics:
                            received: 0
                    - date: '2015-10-12'
                      stats:
                        - metrics:
                            received: 0
                    - date: '2015-10-13'
                      stats:
                        - metrics:
                            received: 0
                    - date: '2015-10-14'
                      stats:
                        - metrics:
                            received: 0
                    - date: '2015-10-15'
                      stats:
                        - metrics:
                            received: 0
                    - date: '2015-10-16'
                      stats:
                        - metrics:
                            received: 0
                    - date: '2015-10-17'
                      stats:
                        - metrics:
                            received: 0
                    - date: '2015-10-18'
                      stats:
                        - metrics:
                            received: 0
                    - date: '2015-10-19'
                      stats:
                        - metrics:
                            received: 0
                    - date: '2015-10-20'
                      stats:
                        - metrics:
                            received: 0
                    - date: '2015-10-21'
                      stats:
                        - metrics:
                            received: 0
                    - date: '2015-10-22'
                      stats:
                        - metrics:
                            received: 0
                    - date: '2015-10-23'
                      stats:
                        - metrics:
                            received: 0
                    - date: '2015-10-24'
                      stats:
                        - metrics:
                            received: 0
                    - date: '2015-10-25'
                      stats:
                        - metrics:
                            received: 0
                    - date: '2015-10-26'
                      stats:
                        - metrics:
                            received: 0
                    - date: '2015-10-27'
                      stats:
                        - metrics:
                            received: 0
                    - date: '2015-10-28'
                      stats:
                        - metrics:
                            received: 0
                    - date: '2015-10-29'
                      stats:
                        - metrics:
                            received: 0
                    - date: '2015-10-30'
                      stats:
                        - metrics:
                            received: 0
                    - date: '2015-10-31'
                      stats:
                        - metrics:
                            received: 0
                    - date: '2015-11-01'
                      stats:
                        - metrics:
                            received: 0
                    - date: '2015-11-02'
                      stats:
                        - metrics:
                            received: 0
                    - date: '2015-11-03'
                      stats:
                        - metrics:
                            received: 0
                    - date: '2015-11-04'
                      stats:
                        - metrics:
                            received: 0
                    - date: '2015-11-05'
                      stats:
                        - metrics:
                            received: 0
                    - date: '2015-11-06'
                      stats:
                        - metrics:
                            received: 0
                    - date: '2015-11-07'
                      stats:
                        - metrics:
                            received: 0
                    - date: '2015-11-08'
                      stats:
                        - metrics:
                            received: 0
                    - date: '2015-11-09'
                      stats:
                        - metrics:
                            received: 0
                    - date: '2015-11-10'
                      stats:
                        - metrics:
                            received: 0
              schema:
                items:
                  properties:
                    date:
                      description: The date that the stats were collected.
                      type: string
                    stats:
                      description: The Parse Webhook usage statistics.
                      items:
                        properties:
                          metrics:
                            properties:
                              received:
                                description:
                                  The number of emails received and parsed by
                                  the Parse Webhook.
                                type: number
                            required:
                              - received
                            type: object
                        type: object
                      type: array
                  required:
                    - date
                    - stats
                  type: object
                type: array
          description: ''
      security:
        - Authorization: []
      summary: Retrieves Inbound Parse Webhook statistics.
      tags:
        - Webhooks
  /validations/email:
    post:
      description: '**This endpoint allows you to validate an email address.**'
      operationId: POST_validations-email
      requestBody:
        content:
          application/json:
            schema:
              example:
                email: example@example.com
                source: signup
              properties:
                email:
                  description: The email address that you want to validate.
                  type: string
                source:
                  description:
                    A one-word classifier for where this validation originated.
                  type: string
              required:
                - email
              type: object
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    result:
                      checks:
                        additional:
                          has_known_bounces: false
                          has_suspected_bounces: false
                        domain:
                          has_mx_or_a_record: true
                          has_valid_address_syntax: true
                          is_suspected_disposable_address: false
                        local_part:
                          is_suspected_role_address: false
                      email: cedric@fogowl.com
                      host: fogowl.com
                      ip_address: 192.168.1.1
                      local: cedric
                      score: 0.85021
                      verdict: Valid
              schema:
                properties:
                  result:
                    properties:
                      checks:
                        description: Granular checks for email address validity.
                        properties:
                          additional:
                            description: Additional checks on the email address.
                            properties:
                              has_known_bounces:
                                description:
                                  WHether email sent to this address from your
                                  account has bounced.
                                type: boolean
                              has_suspected_bounces:
                                description:
                                  Whether our model predicts that the email
                                  address might bounce.
                                type: boolean
                            required:
                              - has_known_bounces
                              - has_suspected_bounces
                            type: object
                          domain:
                            description:
                              Checks on the domain portion of the email address.
                            properties:
                              has_mx_or_a_record:
                                description:
                                  'Whether the email has appropriate DNS records
                                  to deliver a message. '
                                type: boolean
                              has_valid_address_syntax:
                                description:
                                  Whether the email address syntax is valid.
                                type: boolean
                              is_suspected_disposable_address:
                                description:
                                  Whether the domain appears to be from a
                                  disposable email address service.
                                type: boolean
                            required:
                              - has_valid_address_syntax
                              - has_mx_or_a_record
                              - is_suspected_disposable_address
                            type: object
                          local_part:
                            description:
                              Checks on the local part of the email address.
                            properties:
                              is_suspected_role_address:
                                description:
                                  Whether the local part of email appears to be
                                  a role or group (e.g., hr, admin)
                                type: boolean
                            required:
                              - is_suspected_role_address
                            type: object
                        required:
                          - domain
                          - local_part
                          - additional
                        type: object
                      email:
                        description: The email being validated
                        format: email
                        type: string
                      host:
                        description: The domain of the email address.
                        format: hostname
                        type: string
                      ip_address:
                        description: The IP address associated with this email.
                        type: string
                      local:
                        description: The local part of the email address.
                        type: string
                      score:
                        description:
                          A numeric representation of the email validity.
                        type: number
                      source:
                        description:
                          The source of the validation, as per the API request.
                        type: string
                      suggestion:
                        description:
                          A suggested correction in the event of domain name
                          typos (e.g., gmial.com)
                        type: string
                      verdict:
                        description:
                          A generic classification of whether or not the email
                          address is valid.
                        enum:
                          - Valid
                          - Risky
                          - Invalid
                        type: string
                    required:
                      - email
                      - verdict
                      - score
                      - local
                      - host
                      - checks
                      - ip_address
                    type: object
                required:
                  - result
                type: object
          description: ''
      security:
        - Authorization: []
      summary: Validate an email
      tags:
        - Email Address Validation
  /verified_senders:
    get:
      description: '**This endpoint allows you to retrieve all the Sender
        Identities associated with an account.**


        This endpoint will return both verified and unverified senders.


        You can limit the number of results returned using the `limit`,
        `lastSeenID`, and `id` query string parameters.


        * `limit` allows you to specify an exact number of Sender Identities to
        return.

        * `lastSeenID` will return senders with an ID number occuring after the
        passed in ID. In other words, the `lastSeenID` provides a starting point
        from which SendGrid will iterate to find Sender Identities associated
        with your account.

        * `id` will return information about only the Sender Identity passed in
        the request.'
      operationId: GET_verified_senders
      parameters:
        - in: query
          name: limit
          schema:
            type: number
        - in: query
          name: lastSeenID
          schema:
            type: number
        - in: query
          name: id
          schema:
            type: integer
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    results:
                      - address: 1234 Fake St.
                        address2: PO Box 1234
                        city: San Francisco
                        country: USA
                        from_email: orders@example.com
                        from_name: Example Orders
                        id: 1234
                        locked: false
                        nickname: Example Orders
                        reply_to: orders@example.com
                        reply_to_name: Example Orders
                        state: CA
                        verified: true
                        zip: '94105'
                      - address: 1234 Fake St.
                        address2: PO Box 1234
                        city: San Francisco
                        country: USA
                        from_email: support@example.com
                        from_name: Example Support
                        id: 1235
                        locked: false
                        nickname: Example Support
                        reply_to: support@example.com
                        reply_to_name: Example Support
                        state: CA
                        verified: true
                        zip: '94105'
              schema:
                properties:
                  results:
                    items:
                      $ref: '#/components/schemas/verified-sender-response-schema'
                    type: array
                type: object
          description: ''
        '401':
          $ref: '#/components/responses/trait_globalErrors_401'
        '403':
          $ref: '#/components/responses/trait_globalErrors_403'
        '404':
          $ref: '#/components/responses/trait_globalErrors_404'
        '500':
          $ref: '#/components/responses/trait_globalErrors_500'
      security:
        - Authorization: []
      summary: Get All Verified Senders
      tags:
        - Sender Verification
    post:
      description: '**This endpoint allows you to create a new Sender
        Identify**.


        Upon successful submission of a `POST` request to this endpoint, an
        identity will be created, and a verification email will be sent to the
        address assigned to the `from_email` field. You must complete the
        verification process using the sent email to fully verify the sender.


        If you need to resend the verification email, you can do so with the
        Resend Verified Sender Request, `/resend/{id}`, endpoint.


        If you need to authenticate a domain rather than a Single Sender, see
        the [Domain Authentication
        API](https://sendgrid.api-docs.io/v3.0/domain-authentication/authenticate-a-domain).'
      operationId: POST_verified_senders
      requestBody:
        $ref: '#/components/requestBodies/verified-sender-request-schema'
      responses:
        '201':
          content:
            application/json:
              examples:
                response:
                  value:
                    address: 1234 Fake St.
                    address2: PO Box 1234
                    city: San Francisco
                    country: USA
                    from_email: orders@example.com
                    from_name: Example Orders
                    id: 1234
                    locked: false
                    nickname: Example Orders
                    reply_to: orders@example.com
                    reply_to_name: Example Orders
                    state: CA
                    verified: true
                    zip: '94105'
              schema:
                $ref: '#/components/schemas/verified-sender-response-schema'
          description: ''
        '400':
          content:
            application/json:
              schema:
                properties:
                  errors:
                    items:
                      properties:
                        error_id:
                          type: string
                        field:
                          type: string
                        message:
                          type: string
                      required:
                        - message
                        - error_id
                      type: object
                    type: array
                required:
                  - errors
                type: object
          description: ''
        '401':
          $ref: '#/components/responses/trait_globalErrors_401'
        '403':
          $ref: '#/components/responses/trait_globalErrors_403'
        '404':
          $ref: '#/components/responses/trait_globalErrors_404'
        '500':
          $ref: '#/components/responses/trait_globalErrors_500'
      security:
        - Authorization: []
      summary: Create Verified Sender Request
      tags:
        - Sender Verification
  /verified_senders/domains:
    get:
      description: "**This endpoint returns a list of domains known to implement
        DMARC and categorizes them by failure type — hard failure or soft
        failure**.


        Domains listed as hard failures will not deliver mail when used as a
        [Sender
        Identity](https://sendgrid.com/docs/for-developers/sending-email/sender-identity/)
        due to the domain's DMARC policy settings.


        For example, using a `yahoo.com` email address as a Sender Identity will
        likely result in the rejection of your mail. For more information about
        DMARC, see [Everything about
        DMARC](https://sendgrid.com/docs/ui/sending-email/dmarc/)."
      operationId: GET_verified_senders-domains
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    results:
                      hard_failures:
                        - yahoo.com
                      soft_failures:
                        - gmail.com
              schema:
                properties:
                  results:
                    properties:
                      hard_failures:
                        items:
                          type: string
                        type: array
                      soft_failures:
                        items:
                          type: string
                        type: array
                    required:
                      - soft_failures
                      - hard_failures
                    type: object
                required:
                  - results
                type: object
          description: ''
        '401':
          $ref: '#/components/responses/trait_globalErrors_401'
        '403':
          $ref: '#/components/responses/trait_globalErrors_403'
        '404':
          $ref: '#/components/responses/trait_globalErrors_404'
        '500':
          $ref: '#/components/responses/trait_globalErrors_500'
      security:
        - Authorization: []
      summary: Domain Warn List
      tags:
        - Sender Verification
  /verified_senders/resend/{id}:
    parameters:
      - in: path
        name: id
        required: true
        schema:
          type: string
    post:
      description: '**This endpoint allows you to resend a verification email to
        a specified Sender Identity**.


        Passing the `id` assigned to a Sender Identity to this endpoint will
        resend a verification email to the `from_address` associated with the
        Sender Identity. This can be useful if someone loses their verification
        email or needs to have it resent for any other reason.


        You can retrieve the IDs associated with Sender Identities by passing a
        "Get All Verified Senders" endpoint.'
      operationId: POST_verified_senders-resend-id
      responses:
        '204':
          content:
            application/json:
              schema:
                type: object
          description: ''
        '400':
          content:
            application/json:
              schema:
                properties:
                  errors:
                    items:
                      properties:
                        error_id:
                          type: string
                        message:
                          type: string
                      required:
                        - message
                        - error_id
                      type: object
                    type: array
                required:
                  - errors
                type: object
          description: ''
        '401':
          $ref: '#/components/responses/trait_globalErrors_401'
        '403':
          $ref: '#/components/responses/trait_globalErrors_403'
        '404':
          content:
            application/json:
              schema:
                properties:
                  errors:
                    items:
                      properties:
                        error_id:
                          type: string
                        message:
                          type: string
                      required:
                        - message
                        - error_id
                      type: object
                    type: array
                required:
                  - errors
                type: object
          description: ''
        '500':
          $ref: '#/components/responses/trait_globalErrors_500'
      security:
        - Authorization: []
      summary: Resend Verified Sender Request
      tags:
        - Sender Verification
  /verified_senders/steps_completed:
    get:
      description: '**This endpoint allows you to determine which of SendGrid’s
        verification processes have been completed for an account**.


        This endpoint returns boolean values, `true` and `false`, for [Domain
        Authentication](https://sendgrid.com/docs/for-developers/sending-email/sender-identity/#domain-authentication),
        `domain_verified`, and [Single Sender
        Verification](https://sendgrid.com/docs/for-developers/sending-email/sender-identity/#single-sender-verification),
        `sender_verified`, for the account.


        An account may have one, both, or neither verification steps completed.
        If you need to authenticate a domain rather than a Single Sender, see
        the "Authenticate a domain" endpoint.'
      operationId: GET_verified_senders-steps_completed
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    results:
                      domain_verified: true
                      sender_verified: true
              schema:
                properties:
                  results:
                    properties:
                      domain_verified:
                        type: boolean
                      sender_verified:
                        type: boolean
                    type: object
                type: object
          description: ''
        '401':
          $ref: '#/components/responses/trait_globalErrors_401'
        '403':
          $ref: '#/components/responses/trait_globalErrors_403'
        '404':
          $ref: '#/components/responses/trait_globalErrors_404'
        '500':
          $ref: '#/components/responses/trait_globalErrors_500'
      security:
        - Authorization: []
      summary: Completed Steps
      tags:
        - Sender Verification
  /verified_senders/verify/{token}:
    get:
      description: "**This endpoint allows you to verify a sender requests.**


        The token is generated by SendGrid and included in a verification email
        delivered to the address that's pending verification."
      operationId: GET_verified_senders-verify-token
      responses:
        '204':
          description: ''
        '401':
          $ref: '#/components/responses/trait_globalErrors_401'
        '403':
          $ref: '#/components/responses/trait_globalErrors_403'
        '404':
          content:
            application/json:
              schema:
                properties:
                  errors:
                    items:
                      properties:
                        error_id:
                          type: string
                        message:
                          type: string
                      required:
                        - message
                        - error_id
                      type: object
                    type: array
                required:
                  - errors
                type: object
          description: ''
        '500':
          $ref: '#/components/responses/trait_globalErrors_500'
      security:
        - Authorization: []
      summary: Verify Sender Request
      tags:
        - Sender Verification
    parameters:
      - in: path
        name: token
        required: true
        schema:
          type: string
  /verified_senders/{id}:
    delete:
      description: '**This endpoint allows you to delete a Sender Identity**.


        Pass the `id` assigned to a Sender Identity to this endpoint to delete
        the Sender Identity from your account.


        You can retrieve the IDs associated with Sender Identities using the
        "Get All Verified Senders" endpoint.'
      operationId: DELETE_verified_senders-id
      responses:
        '204':
          content:
            application/json:
              schema:
                type: object
          description: ''
        '401':
          $ref: '#/components/responses/trait_globalErrors_401'
        '403':
          content:
            application/json:
              schema:
                properties:
                  errors:
                    items:
                      properties:
                        error_id:
                          type: string
                        message:
                          type: string
                      required:
                        - message
                        - error_id
                      type: object
                    type: array
                type: object
          description: ''
        '404':
          content:
            application/json:
              schema:
                properties:
                  errors:
                    items:
                      properties:
                        error_id:
                          type: string
                        message:
                          type: string
                      required:
                        - message
                        - error_id
                      type: object
                    type: array
                required:
                  - errors
                type: object
          description: ''
        '500':
          $ref: '#/components/responses/trait_globalErrors_500'
      security:
        - Authorization: []
      summary: Delete Verified Sender
      tags:
        - Sender Verification
    parameters:
      - in: path
        name: id
        required: true
        schema:
          type: string
    patch:
      description: '**This endpoint allows you to update an existing Sender
        Identity**.


        Pass the `id` assigned to a Sender Identity to this endpoint as a path
        parameter. Include any fields you wish to update in the request body in
        JSON format.


        You can retrieve the IDs associated with Sender Identities by passing a
        `GET` request to the Get All Verified Senders endpoint,
        `/verified_senders`.


        **Note:** Unlike a `PUT` request, `PATCH` allows you to update only the
        fields you wish to edit. Fields that are not passed as part of a request
        will remain unaltered.'
      operationId: PATCH_verified_senders-id
      requestBody:
        $ref: '#/components/requestBodies/verified-sender-request-schema'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    address: 1234 Fake St.
                    address2: PO Box 1234
                    city: San Francisco
                    country: USA
                    from_email: orders@example.com
                    from_name: Example Orders
                    id: 1234
                    locked: false
                    nickname: Example Orders
                    reply_to: orders@example.com
                    reply_to_name: Example Orders
                    state: CA
                    verified: true
                    zip: '94105'
              schema:
                $ref: '#/components/schemas/verified-sender-response-schema'
          description: ''
        '400':
          content:
            application/json:
              schema:
                properties:
                  errors:
                    items:
                      properties:
                        error_id:
                          type: string
                        field:
                          type: string
                        message:
                          type: string
                      required:
                        - message
                        - error_id
                      type: object
                    type: array
                required:
                  - errors
                type: object
          description: ''
        '401':
          $ref: '#/components/responses/trait_globalErrors_401'
        '403':
          content:
            application/json:
              schema:
                properties:
                  errors:
                    items:
                      properties:
                        error_id:
                          type: string
                        message:
                          type: string
                      required:
                        - message
                        - error_id
                      type: object
                    type: array
                required:
                  - errors
                type: object
          description: ''
        '404':
          content:
            application/json:
              schema:
                properties:
                  errors:
                    items:
                      properties:
                        error_id:
                          type: string
                        message:
                          type: string
                      required:
                        - message
                        - error_id
                      type: object
                    type: array
                required:
                  - errors
                type: object
          description: ''
        '500':
          $ref: '#/components/responses/trait_globalErrors_500'
      security:
        - Authorization: []
      summary: Edit Verified Sender
      tags:
        - Sender Verification
  /whitelabel/dns/email:
    post:
      description: "**This endpoint is used to share DNS records with a
        colleagues**\n\nUse this endpoint to send SendGrid-generated DNS record
        information to a co-worker so they can enter it into your DNS provider
        to validate your domain and link branding. \n\nWhat type of records are
        sent will depend on whether you have chosen Automated Security or not.
        When using Automated Security, SendGrid provides you with three CNAME
        records. If you turn Automated Security off, you are instead given TXT
        and MX records.\n\nIf you pass a `link_id` to this endpoint, the
        generated email will supply the DNS records necessary to complete [Link
        Branding](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/)
        setup. If you pass a `domain_id` to this endpoint, the generated email
        will supply the DNS records needed to complete [Domain
        Authentication](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/).
        Passing both IDs will generate an email with\
        \ the records needed to complete both setup steps.\n\nYou can retrieve
        all your domain IDs from the returned `id` fields for each domain using
        the \"List all authenticated domains\" endpoint. You can retrieve all of
        your link IDs using the \"Retrieve all branded links\" endpoint."
      operationId: POST_whitelabel-dns-email
      requestBody:
        content:
          application/json:
            schema:
              example:
                domain_id: 46873408
                email: my_colleague@example.com
                link_id: 29719392
                message: DNS Record for verification
              properties:
                domain_id:
                  description: The ID of your SendGrid domain record.
                  minimum: 0
                  type: integer
                email:
                  description: The email address to send the DNS information to.
                  format: email
                  type: string
                link_id:
                  minimum: 0
                  type: integer
                  x-desc: The ID of the branded link.
                message:
                  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.
                  type: string
              required:
                - link_id
                - domain_id
                - email
              type: object
      responses:
        '204':
          description: ''
        '400':
          content:
            application/json:
              schema:
                properties:
                  errors:
                    properties:
                      error:
                        type: string
                      field:
                        type: string
                    type: object
                type: object
          description: ''
      security:
        - Authorization: []
      summary: Email DNS records to a co-worker
      tags:
        - Email CNAME records
  /whitelabel/domains:
    get:
      description:
        '**This endpoint allows you to retrieve a list of all domains you have
        authenticated.**'
      operationId: GET_whitelabel-domains
      parameters:
        - description: Number of domains to return.
          in: query
          name: limit
          schema:
            type: integer
        - description: Paging offset.
          in: query
          name: offset
          schema:
            type: integer
        - description: Exclude subuser domains from the result.
          in: query
          name: exclude_subusers
          schema:
            type: boolean
        - description: The username associated with an authenticated domain.
          in: query
          name: username
          schema:
            type: string
        - description: Search for authenticated domains.
          in: query
          name: domain
          schema:
            type: string
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    - automatic_security: true
                      custom_spf: true
                      default: true
                      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
                      domain: example.com
                      id: 1
                      ips:
                        - 192.168.1.1
                        - 192.168.1.2
                      legacy: false
                      subdomain: mail
                      user_id: 7
                      username: jane@example.com
                      valid: true
                    - automatic_security: true
                      custom_spf: false
                      default: true
                      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
                      domain: example2.com
                      id: 2
                      ips: []
                      legacy: false
                      subdomain: new
                      user_id: 8
                      username: john@example2.com
                      valid: false
              schema:
                $ref: '#/components/schemas/domain-authentication-200-response'
          description: ''
      security:
        - Authorization: []
      summary: List all authenticated domains
      tags:
        - Domain Authentication
    post:
      description: '**This endpoint allows you to authenticate a domain.**


        If you are authenticating a domain for a subuser, you have two options:

        1. Use the "username" parameter. This allows you to authenticate a
        domain on behalf of your subuser. This means the subuser is able to see
        and modify the authenticated domain.

        2. Use the Association workflow (see Associate Domain section). This
        allows you to authenticate a domain created by the parent to a subuser.
        This means the subuser will default to the assigned domain, but will not
        be able to see or modify that authenticated domain. However, if the
        subuser authenticates their own domain it will overwrite the assigned
        domain.'
      operationId: POST_whitelabel-domains
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      requestBody:
        content:
          application/json:
            schema:
              example:
                automatic_security: false
                custom_spf: true
                default: true
                domain: example.com
                ips:
                  - 192.168.1.1
                  - 192.168.1.2
                subdomain: news
                username: john@example.com
              properties:
                automatic_security:
                  description:
                    Whether to allow SendGrid to manage your SPF records, DKIM
                    keys, and DKIM key rotation.
                  type: boolean
                custom_dkim_selector:
                  description:
                    Add a custom DKIM selector. Accepts three letters or
                    numbers.
                  type: string
                custom_spf:
                  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.
                  type: boolean
                default:
                  description:
                    Whether to use this authenticated domain as the fallback if
                    no authenticated domains match the sender's domain.
                  type: boolean
                domain:
                  description: Domain being authenticated.
                  type: string
                ips:
                  description:
                    The IP addresses that will be included in the custom SPF
                    record for this authenticated domain.
                  items:
                    type: string
                  type: array
                subdomain:
                  description:
                    The subdomain to use for this authenticated domain.
                  type: string
                username:
                  description: The username associated with this domain.
                  type: string
              required:
                - domain
              type: object
      responses:
        '201':
          content:
            application/json:
              examples:
                response:
                  value:
                    automatic_security: true
                    custom_spf: false
                    default: true
                    dns:
                      dkim1:
                        data: s1.domainkey.u1446226.wl.sendgrid.net
                        host: s1._domainkey.example.com
                        type: cname
                        valid: false
                      dkim2:
                        data: s2.domainkey.u1446226.wl.sendgrid.net
                        host: s2._domainkey.example.com
                        type: cname
                        valid: false
                      mail_cname:
                        data: u1446226.wl.sendgrid.net
                        host: example.example.com
                        type: cname
                        valid: false
                    domain: example.com
                    id: 302183
                    ips: []
                    legacy: false
                    subdomain: example
                    user_id: 1446226
                    username: mbernier
                    valid: false
              schema:
                $ref: '#/components/schemas/authentication_domain'
          description: ''
      security:
        - Authorization: []
      summary: Authenticate a domain
      tags:
        - Domain Authentication
  /whitelabel/domains/default:
    get:
      description: '**This endpoint allows you to retrieve the default
        authentication for a domain.**


        When creating or updating a domain authentication, you can set the
        domain as a default. The default domain will be used to send all mail.
        If you have multiple authenticated domains, the authenticated domain
        matching the domain of the From address will be used, and the default
        will be overridden.


        This endpoint will return a default domain and its details only if a
        default is set. You are not required to set a default. If you do not set
        a default domain, this endpoint will return general information about
        your domain authentication status.'
      operationId: GET_whitelabel-domains-default
      parameters:
        - description: The domain to find a default authentication.
          in: query
          name: domain
          schema:
            type: string
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    - automatic_security: true
                      custom_spf: true
                      default: true
                      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
                      domain: example.com
                      id: 1
                      ips:
                        - 192.168.1.1
                        - 192.168.1.2
                      legacy: false
                      subdomain: mail
                      user_id: 7
                      username: jane@example.com
                      valid: true
              schema:
                $ref: '#/components/schemas/domain-authentication-200-response'
          description: ''
      security:
        - Authorization: []
      summary: Get the default authentication
      tags:
        - Domain Authentication
  /whitelabel/domains/subuser:
    delete:
      description: "**This endpoint allows you to disassociate a specific
        authenticated domain from a subuser.**


        Authenticated domains can be associated with (i.e. assigned to) subusers
        from a parent account. This functionality allows subusers to send mail
        using their parent's domain authentication. To associate an
        authenticated domain with a subuser, the parent account must first
        authenticate and validate the domain. The parent may then associate the
        authenticated domain via the subuser management tools."
      operationId: DELETE_whitelabel-domains-subuser
      parameters:
        - description:
            Username for the subuser to find associated authenticated domain.
          in: query
          name: username
          schema:
            type: string
      responses:
        '204':
          content:
            application/json:
              schema:
                type: object
          description: ''
      security:
        - Authorization: []
      summary: Disassociate an authenticated domain from a given user.
      tags:
        - Domain Authentication
    get:
      description: "**This endpoint allows you to retrieve all of the
        authenticated domains that have been assigned to a specific subuser.**


        Authenticated domains can be associated with (i.e. assigned to) subusers
        from a parent account. This functionality allows subusers to send mail
        using their parent's domain authentication. To associate an
        authenticated domain with a subuser, the parent account must first
        authenticate and validate the domain. The parent may then associate the
        authenticated domain via the subuser management tools."
      operationId: GET_whitelabel-domains-subuser
      parameters:
        - description:
            Username for the subuser to find associated authenticated domain.
          in: query
          name: username
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    automatic_security: false
                    custom_spf: true
                    default: false
                    dns:
                      dkim:
                        data: k=rsa; t=s; p=publicKey
                        host: s1._domainkey.example.com
                        type: txt
                        valid: false
                      domain_spf:
                        data: v=spf1 include:mail.example.com -all
                        host: example.com
                        type: txt
                        valid: false
                      mail_server:
                        data: sendgrid.net
                        host: mail.example.com
                        type: mx
                        valid: false
                      subdomain_spf:
                        data: v=spf1 ip4:192.168.1.1 ip4:192.168.0.1 -all
                        host: mail.example.com
                        type: txt
                        valid: false
                    domain: example.com
                    id: 1
                    ips: []
                    legacy: false
                    subdomain: mail
                    user_id: 7
                    username: mail@example.com
                    valid: false
              schema:
                $ref: '#/components/schemas/domain_authentication_domain_spf'
          description: ''
      security:
        - Authorization: []
      summary: List the authenticated domain associated with the given user.
      tags:
        - Domain Authentication
  /whitelabel/domains/{domain_id}:
    delete:
      description:
        '**This endpoint allows you to delete an authenticated domain.**'
      operationId: DELETE_whitelabel-domains-domain_id
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '204':
          content:
            application/json:
              schema:
                type: object
          description: ''
      security:
        - Authorization: []
      summary: Delete an authenticated domain.
      tags:
        - Domain Authentication
    get:
      description:
        '**This endpoint allows you to retrieve a specific authenticated
        domain.**'
      operationId: GET_whitelabel-domains-domain_id
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    automatic_security: true
                    custom_spf: false
                    default: true
                    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
                    domain: example.com
                    id: 45373692
                    ips:
                      - 127.0.0.1
                    legacy: false
                    subdomain: sub
                    user_id: 66036447
                    username: jdoe
                    valid: true
              schema:
                $ref: '#/components/schemas/authentication_domain'
          description: ''
      security:
        - Authorization: []
      summary: Retrieve an authenticated domain
      tags:
        - Domain Authentication
    parameters:
      - in: path
        name: domain_id
        required: true
        schema:
          type: string
    patch:
      description:
        '**This endpoint allows you to update the settings for an authenticated
        domain.**'
      operationId: PATCH_whitelabel-domains-domain_id
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      requestBody:
        content:
          application/json:
            schema:
              example:
                custom_spf: true
                default: false
              properties:
                custom_spf:
                  default: false
                  description:
                    Indicates whether to generate a custom SPF record for manual
                    security.
                  type: boolean
                default:
                  default: false
                  description:
                    Indicates whether this is the default authenticated domain.
                  type: boolean
              type: object
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    - automatic_security: true
                      custom_spf: true
                      default: true
                      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
                      domain: example.com
                      id: 1
                      ips:
                        - 192.168.1.1
                        - 192.168.1.2
                      legacy: false
                      subdomain: mail
                      user_id: 7
                      username: jane@example.com
                      valid: true
                    - automatic_security: true
                      custom_spf: false
                      default: true
                      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
                      domain: example2.com
                      id: 2
                      ips: []
                      legacy: false
                      subdomain: new
                      user_id: 8
                      username: john@example2.com
                      valid: false
              schema:
                $ref: '#/components/schemas/domain-authentication-200-response'
          description: ''
      security:
        - Authorization: []
      summary: Update an authenticated domain
      tags:
        - Domain Authentication
  /whitelabel/domains/{domain_id}/subuser:
    parameters:
      - description:
          ID of the authenticated domain to associate with the subuser
        in: path
        name: domain_id
        required: true
        schema:
          type: integer
    post:
      description: "**This endpoint allows you to associate a specific
        authenticated domain with a subuser.**


        Authenticated domains can be associated with (i.e. assigned to) subusers
        from a parent account. This functionality allows subusers to send mail
        using their parent's domain authentication. To associate an
        authenticated domain with a subuser, the parent account must first
        authenticate and validate the domain. The parent may then associate the
        authenticated domain via the subuser management tools."
      operationId: POST_whitelabel-domains-domain_id-subuser
      requestBody:
        content:
          application/json:
            schema:
              example:
                username: jdoe
              properties:
                username:
                  description:
                    Username to associate with the authenticated domain.
                  type: string
              required:
                - username
              type: object
      responses:
        '201':
          content:
            application/json:
              examples:
                response:
                  value:
                    automatic_security: false
                    custom_spf: true
                    default: false
                    dns:
                      dkim:
                        data: k=rsa; t=s; p=publicKey
                        host: s1._domainkey.example.com
                        type: txt
                        valid: false
                      domain_spf:
                        data: v=spf1 include:mail.example.com -all
                        host: example.com
                        type: txt
                        valid: false
                      mail_server:
                        data: sendgrid.net
                        host: mail.example.com
                        type: mx
                        valid: false
                      subdomain_spf:
                        data: v=spf1 ip4:192.168.1.1 ip4:192.168.0.1 -all
                        host: mail.example.com
                        type: txt
                        valid: false
                    domain: example.com
                    id: 1
                    ips: []
                    legacy: false
                    subdomain: mail
                    user_id: 7
                    username: mail@example.com
                    valid: false
              schema:
                $ref: '#/components/schemas/domain_authentication_domain_spf'
          description: ''
      security:
        - Authorization: []
      summary: Associate an authenticated domain with a given user.
      tags:
        - Domain Authentication
  /whitelabel/domains/{id}/ips:
    parameters:
      - description: ID of the domain to which you are adding an IP
        in: path
        name: id
        required: true
        schema:
          type: integer
    post:
      description:
        '**This endpoint allows you to add an IP address to an authenticated
        domain.**'
      operationId: POST_whitelabel-domains-id-ips
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      requestBody:
        content:
          application/json:
            schema:
              example:
                ip: 192.168.0.1
              properties:
                ip:
                  description:
                    IP to associate with the domain. Used for manually
                    specifying IPs for custom SPF.
                  type: string
              required:
                - ip
              type: object
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    automatic_security: false
                    custom_spf: true
                    default: false
                    dns:
                      dkim:
                        data: k=rsa; t=s; p=publicKey
                        host: s1._domainkey.example.com
                        type: txt
                        valid: false
                      domain_spf:
                        data: v=spf1 include:mail.example.com -all
                        host: example.com
                        type: txt
                        valid: false
                      mail_server:
                        data: sendgrid.net
                        host: mail.example.com
                        type: mx
                        valid: false
                      subdomain_spf:
                        data: v=spf1 ip4:192.168.1.1 ip4:192.168.0.1 -all
                        host: mail.example.com
                        type: txt
                        valid: false
                    domain: example.com
                    id: 1
                    ips: []
                    legacy: false
                    subdomain: mail
                    user_id: 7
                    username: john@example.com
                    valid: false
              schema:
                $ref: '#/components/schemas/domain_authentication_domain_spf'
          description: ''
      security:
        - Authorization: []
      summary: Add an IP to an authenticated domain
      tags:
        - Domain Authentication
  /whitelabel/domains/{id}/ips/{ip}:
    delete:
      description:
        "**This endpoint allows you to remove an IP address from that domain's
        authentication.**"
      operationId: DELETE_whitelabel-domains-id-ips-ip
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    automatic_security: false
                    custom_spf: true
                    default: false
                    dns:
                      dkim:
                        data: k=rsa; t=s; p=publicKey
                        host: s1._domainkey.example.com
                        type: txt
                        valid: false
                      domain_spf:
                        data: v=spf1 include:mail.example.com -all
                        host: example.com
                        type: txt
                        valid: false
                      mail_server:
                        data: sendgrid.net
                        host: mail.example.com
                        type: mx
                        valid: false
                      subdomain_spf:
                        data: v=spf1 ip4:192.168.1.1 ip4:192.168.0.1 -all
                        host: mail.example.com
                        type: txt
                        valid: false
                    domain: example.com
                    id: 1
                    ips: []
                    legacy: false
                    subdomain: mail
                    user_id: 7
                    username: mail@example.com
                    valid: false
              schema:
                $ref: '#/components/schemas/domain_authentication_domain_spf'
          description: ''
      security:
        - Authorization: []
      summary: Remove an IP from an authenticated domain.
      tags:
        - Domain Authentication
    parameters:
      - description: ID of the domain to delete the IP from.
        in: path
        name: id
        required: true
        schema:
          type: integer
      - description: IP to remove from the domain.
        in: path
        name: ip
        required: true
        schema:
          type: string
  /whitelabel/domains/{id}/validate:
    parameters:
      - description: ID of the domain to validate.
        in: path
        name: id
        required: true
        schema:
          type: integer
    post:
      description:
        '**This endpoint allows you to validate an authenticated domain. If it
        fails, it will return an error message describing why the domain could
        not be validated.**'
      operationId: POST_whitelabel-domains-id-validate
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    id: 1
                    valid: true
                    validation_resuts:
                      dkim1:
                        reason: null
                        valid: true
                      dkim2:
                        reason: null
                        valid: true
                      mail_cname:
                        reason:
                          Expected your MX record to be "mx.sendgrid.net" but
                          found "example.com".
                        valid: false
                      spf:
                        reason: null
                        valid: true
              schema:
                properties:
                  id:
                    description: The ID of the authenticated domain.
                    type: integer
                  valid:
                    description:
                      Indicates if this is a valid authenticated domain.
                    type: boolean
                  validation_results:
                    description:
                      The individual DNS records that are checked when
                      validating, including the reason for any invalid DNS
                      records.
                    properties:
                      dkim1:
                        description: A DNS record for this authenticated domain.
                        properties:
                          reason:
                            nullable: true
                            type: string
                          valid:
                            description: Indicates if the DNS record is valid.
                            type: boolean
                        type: object
                      dkim2:
                        description: A DNS record for this authenticated domain.
                        properties:
                          reason:
                            nullable: true
                            type: string
                          valid:
                            description: Indicates if the DNS record is valid.
                            type: boolean
                        type: object
                      mail_cname:
                        description:
                          The CNAME record for the authenticated domain.
                        properties:
                          reason:
                            description: The reason this record is invalid.
                            nullable: true
                            type: string
                          valid:
                            description: Indicates if this DNS record is valid.
                            type: boolean
                        type: object
                      spf:
                        description:
                          The SPF record for the authenticated domain.
                        properties:
                          reason:
                            nullable: true
                            type: string
                          valid:
                            description: Indicates if the SPF record is valid.
                            type: boolean
                        type: object
                    type: object
                type: object
          description: ''
        '500':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - message: internal error getting TXT
              schema:
                properties:
                  errors:
                    items:
                      properties:
                        message:
                          description:
                            A message explaining the reason for the error.
                          type: string
                      required:
                        - message
                      type: object
                    type: array
                type: object
          description: ''
      security:
        - Authorization: []
      summary: Validate a domain authentication.
      tags:
        - Domain Authentication
  /whitelabel/ips:
    get:
      description: '**This endpoint allows you to retrieve all of the Reverse
        DNS records created by this account.**


        You may include a search key by using the `ip` query string parameter.
        This enables you to perform a prefix search for a given IP segment
        (e.g., `?ip="192."`).


        Use the `limit` query string parameter to reduce the number of records
        returned. All records will be returned if you have fewer records than
        the specified limit.


        The `offset` query string parameter allows you to specify a non-zero
        index from which records will be returned. For example, if you have ten
        records, `?offset=5` will return the last five records (at indexes 5
        through 9). The list starts at index zero.'
      operationId: GET_whitelabel-ips
      parameters:
        - description: The maximum number of results to retrieve.
          in: query
          name: limit
          schema:
            type: integer
        - description:
            The point in the list of results to begin retrieving IP addresses
            from.
          in: query
          name: offset
          schema:
            type: integer
        - description:
            The IP address segment that you'd like to use in a prefix search.
          in: query
          name: ip
          schema:
            type: string
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    - a_record:
                        data: 192.168.1.1
                        host: o1.email.example.com
                        type: a
                        valid: true
                      domain: example.com
                      id: 1
                      ip: 192.168.1.1
                      legacy: false
                      rdns: o1.email.example.com
                      subdomain: email
                      users:
                        - user_id: 7
                          username: john@example.com
                        - user_id: 8
                          username: jane@example.com
                      valid: true
                    - a_record:
                        data: 192.168.1.2
                        host: o2.email.example.com
                        type: a
                        valid: true
                      domain: example.com
                      id: 2
                      ip: 192.168.1.2
                      legacy: false
                      rdns: o2.email.example.com
                      subdomain: email
                      users:
                        - user_id: 7
                          username: john@example.com
                        - user_id: 9
                          username: jane@example2.com
                      valid: true
              schema:
                items:
                  $ref: '#/components/schemas/reverse_dns'
                type: array
          description: ''
      security:
        - Authorization: []
      summary: Retrieve all reverse DNS records
      tags:
        - Reverse DNS
    post:
      description: '**This endpoint allows you to set up reverse DNS.**'
      operationId: POST_whitelabel-ips
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      requestBody:
        content:
          application/json:
            schema:
              example:
                domain: example.com
                ip: 192.168.1.1
                subdomain: email
              properties:
                domain:
                  description:
                    The root, or sending, domain that will be used to send
                    message from the IP address.
                  type: string
                ip:
                  description:
                    The IP address for which you want to set up reverse DNS.
                  type: string
                subdomain:
                  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.
                  type: string
              required:
                - ip
                - domain
              type: object
      responses:
        '201':
          content:
            application/json:
              examples:
                response:
                  value:
                    a_record:
                      data: 192.168.1.2
                      host: o1.email.example.com
                      type: a
                      valid: true
                    domain: example.com
                    id: 123
                    ip: 192.168.1.2
                    legacy: false
                    rdns: o1.email.example.com
                    subdomain: email
                    users: []
                    valid: true
              schema:
                $ref: '#/components/schemas/reverse_dns'
          description: ''
      security:
        - Authorization: []
      summary: Set up reverse DNS
      tags:
        - Reverse DNS
  /whitelabel/ips/{id}:
    delete:
      description: '**This endpoint allows you to delete a reverse DNS record.**


        A call to this endpoint will respond with a 204 status code if the
        deletion was successful.


        You can retrieve the IDs associated with all your reverse DNS records
        using the "Retrieve all reverse DNS records" endpoint.'
      operationId: DELETE_whitelabel-ips-id
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '204':
          content:
            application/json:
              schema:
                type: object
          description: ''
      security:
        - Authorization: []
      summary: Delete a reverse DNS record
      tags:
        - Reverse DNS
    get:
      description: '**This endpoint allows you to retrieve a reverse DNS
        record.**


        You can retrieve the IDs associated with all your reverse DNS records
        using the "Retrieve all reverse DNS records" endpoint.'
      operationId: GET_whitelabel-ips-id
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    a_record:
                      data: 192.168.1.1
                      host: o1.email.example.com
                      type: a
                      valid: true
                    domain: example.com
                    id: 123
                    ip: 192.168.1.1
                    legacy: false
                    rdns: o1.email.example.com
                    subdomain: email
                    users:
                      - user_id: 7
                        username: john@example.com
                    valid: true
              schema:
                $ref: '#/components/schemas/reverse_dns'
          description: ''
      security:
        - Authorization: []
      summary: Retrieve a reverse DNS record
      tags:
        - Reverse DNS
    parameters:
      - description:
          The ID of the reverse DNS record that you would like to retrieve.
        in: path
        name: id
        required: true
        schema:
          type: string
  /whitelabel/ips/{id}/validate:
    parameters:
      - description:
          The ID of the reverse DNS record that you would like to validate.
        in: path
        name: id
        required: true
        schema:
          type: string
    post:
      description: '**This endpoint allows you to validate a reverse DNS
        record.**


        Always check the `valid` property of the response’s
        `validation_results.a_record` object. This field will indicate whether
        it was possible to validate the reverse DNS record. If the
        `validation_results.a_record.valid` is `false`, this indicates only that
        Twilio SendGrid could not determine the validity your reverse DNS record
        — it may still be valid.


        If validity couldn’t be determined, you can check the value of
        `validation_results.a_record.reason` to find out why.


        You can retrieve the IDs associated with all your reverse DNS records
        using the "Retrieve all reverse DNS records" endpoint.'
      operationId: POST_whitelabel-ips-id-validate
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    id: 123456
                    valid: false
                    validation_results:
                      a_record:
                        reason:
                          'Failed to resolve A Record at o1.ptr4283.example.com:
                          lookup o1.ptr4283.example.com on 192.168.0.10:53: no
                          such host'
                        valid: false
              schema:
                properties:
                  id:
                    description: The ID of the reverse DNS record.
                    type: integer
                  valid:
                    description: Indicates if the reverse DNS record is valid.
                    enum:
                      - true
                      - false
                    type: boolean
                  validation_results:
                    description: The specific results of the validation.
                    properties:
                      a_record:
                        properties:
                          reason:
                            description:
                              The reason the reverse DNS record could not be
                              validated. Is `null` if the reverse DNS record was
                              validated.
                            nullable: true
                            type: string
                          valid:
                            description:
                              Indicates if the reverse DNS record could be
                              validated.
                            enum:
                              - true
                              - false
                            type: boolean
                        required:
                          - valid
                          - reason
                        type: object
                    type: object
                required:
                  - id
                  - valid
                  - validation_results
                type: object
          description: ''
        '404':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - message: Reverse DNS record not found.
              schema:
                properties:
                  errors:
                    description: The error messages for the failed validation.
                    items:
                      properties:
                        message:
                          description:
                            A message describing why the reverse DNS could not
                            be validated.
                          type: string
                      required:
                        - message
                      type: object
                    type: array
                required:
                  - errors
                type: object
          description:
            Unexpected error in API call. See HTTP response body for details.
        '500':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - message: internal error getting rDNS
              schema:
                properties:
                  errors:
                    description: The error messages for the failed validation.
                    items:
                      properties:
                        message:
                          description:
                            A message describing why the IP whitelabel could not
                            be validated.
                          type: string
                      required:
                        - message
                      type: object
                    type: array
                required:
                  - errors
                type: object
          description: ''
      security:
        - Authorization: []
      summary: Validate a reverse DNS record
      tags:
        - Reverse DNS
  /whitelabel/links:
    get:
      description: '**This endpoint allows you to retrieve all branded links**.


        You can submit this request as one of your subusers if you include their
        ID in the `on-behalf-of` header in the request.'
      operationId: GET_whitelabel-links
      parameters:
        - description: Limits the number of results returned per page.
          in: query
          name: limit
          schema:
            type: integer
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    - default: true
                      dns:
                        domain_cname:
                          data: sendgrid.net
                          host: mail.example.com
                          type: cname
                          valid: true
                        owner_cname:
                          data: sendgrid.net
                          host: 7.example.com
                          type: cname
                          valid: true
                      domain: example.com
                      id: 1
                      legacy: false
                      subdomain: mail
                      user_id: 7
                      username: john@example.com
                      valid: true
                    - default: false
                      dns:
                        domain_cname:
                          data: sendgrid.net
                          host: news.example2.com
                          type: cname
                          valid: true
                        owner_cname:
                          data: sendgrid.net
                          host: 8.example2.com
                          type: cname
                          valid: false
                      domain: example2.com
                      id: 2
                      legacy: false
                      subdomain: news
                      user_id: 8
                      username: john@example.com
                      valid: false
              schema:
                items:
                  $ref: '#/components/schemas/link_branding_200_response'
                type: array
          description: ''
      security:
        - Authorization: []
      summary: Retrieve all branded links
      tags:
        - Link branding
    post:
      description: '**This endpoint allows you to create a new branded link.**


        To create the link branding, supply the root domain and, optionally, the
        subdomain — these go into separate fields in your request body. The root
        domain should match your FROM email address. If you provide
        a  subdomain, it must be different from the subdomain you used for
        authenticating your domain.


        You can submit this request as one of your subusers if you include their
        ID in the `on-behalf-of` header in the request.'
      operationId: POST_whitelabel-links
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      requestBody:
        content:
          application/json:
            schema:
              example:
                default: true
                domain: example.com
                subdomain: mail
              properties:
                default:
                  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.
                  enum:
                    - true
                    - false
                  type: boolean
                domain:
                  description:
                    The root domain for the subdomain that you are creating the
                    link branding for. This should match your FROM email
                    address.
                  type: string
                subdomain:
                  description:
                    The subdomain to create the link branding for. Must be
                    different from the subdomain you used for authenticating
                    your domain.
                  type: string
              required:
                - domain
              type: object
      responses:
        '201':
          content:
            application/json:
              examples:
                response:
                  value:
                    default: false
                    dns:
                      domain_cname:
                        data: sendgrid.net
                        host: mail.example.com
                        type: cname
                        valid: true
                      owner_cname:
                        data: sendgrid.net
                        host: 7.example.com
                        type: cname
                        valid: true
                    domain: example.com
                    id: 1
                    legacy: false
                    subdomain: mail
                    user_id: 7
                    username: john@example.com
                    valid: true
              schema:
                $ref: '#/components/schemas/link_branding_200_response'
          description: ''
      security:
        - Authorization: []
      summary: Create a branded link
      tags:
        - Link branding
  /whitelabel/links/default:
    get:
      description: '**This endpoint allows you to retrieve the default branded
        link.**


        The default branded link is the actual URL to be used when sending
        messages. If you have more than one branded link, the default is
        determined by the following order:


        * The validated branded link marked as `default` (set when you call the
        "Create a branded link" endpoint or by calling the "Update a branded
        link" endpoint on an existing link)

        * Legacy branded links (migrated from the whitelabel wizard)

        * Default SendGrid-branded links (i.e., `100.ct.sendgrid.net`)


        You can submit this request as one of your subusers if you include their
        ID in the `on-behalf-of` header in the request.'
      operationId: GET_whitelabel-links-default
      parameters:
        - description:
            The domain to match against when finding the default branded link.
          in: query
          name: domain
          schema:
            type: string
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    default: false
                    dns:
                      domain_cname:
                        data: sendgrid.net
                        host: mail.example.com
                        type: cname
                        valid: true
                      owner_cname:
                        data: sendgrid.net
                        host: 7.example.com
                        type: cname
                        valid: true
                    domain: example.com
                    id: 1
                    legacy: false
                    subdomain: mail
                    user_id: 7
                    username: john@example.com
                    valid: true
              schema:
                $ref: '#/components/schemas/link_branding_200_response'
          description: ''
      security:
        - Authorization: []
      summary: Retrieve the default branded link
      tags:
        - Link branding
  /whitelabel/links/subuser:
    delete:
      description: "**This endpoint allows you to take a branded link away from
        a subuser.**


        Link branding can be associated with subusers from the parent account.
        This functionality allows subusers to send mail using their parent's
        link branding. To associate link branding, the parent account must first
        create a branded link and validate it. The parent may then associate
        that branded link with a subuser via the API or the [Subuser Management
        page of the Twilio SendGrid
        App](https://app.sendgrid.com/settings/subusers).


        Your request will receive a response with a 204 status code if the
        disassociation was successful."
      operationId: DELETE_whitelabel-links-subuser
      parameters:
        - description:
            The username of the subuser account that you want to disassociate a
            branded link from.
          in: query
          name: username
          required: true
          schema:
            type: string
      responses:
        '204':
          content:
            application/json:
              schema:
                type: object
          description: ''
      security:
        - Authorization: []
      summary: Disassociate a branded link from a subuser
      tags:
        - Link branding
    get:
      description: "**This endpoint allows you to retrieve the branded link
        associated with a subuser.**


        Link branding can be associated with subusers from the parent account.
        This functionality allows subusers to send mail using their parent's
        link branding. To associate link branding, the parent account must first
        create a branded link and then validate it. The parent may then
        associate that branded link with a subuser via the API or the [Subuser
        Management page of the Twilio SendGrid
        App](https://app.sendgrid.com/settings/subusers)."
      operationId: GET_whitelabel-links-subuser
      parameters:
        - description:
            The username of the subuser to retrieve associated branded links
            for.
          in: query
          name: username
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    default: false
                    dns:
                      domain_cname:
                        data: sendgrid.net
                        host: mail.example.com
                        type: cname
                        valid: true
                      owner_cname:
                        data: sendgrid.net
                        host: 7.example.com
                        type: cname
                        valid: true
                    domain: example.com
                    id: 1
                    legacy: false
                    subdomain: mail
                    user_id: 7
                    username: john@example.com
                    valid: true
              schema:
                $ref: '#/components/schemas/link_branding_200_response'
          description: ''
      security:
        - Authorization: []
      summary: Retrieve a subuser's branded link
      tags:
        - Link branding
  /whitelabel/links/{id}:
    delete:
      description: '**This endpoint allows you to delete a branded link.**


        Your request will receive a response with a 204 status code if the
        deletion was successful. The call does not return the link''s details,
        so if you wish to record these make sure you call the  "Retrieve a
        branded link" endpoint *before* you request its deletion.


        You can submit this request as one of your subusers if you include their
        ID in the `on-behalf-of` header in the request.'
      operationId: DELETE_whitelabel-links-id
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '204':
          content:
            application/json:
              schema:
                type: object
          description: ''
      security:
        - Authorization: []
      summary: Delete a branded link
      tags:
        - Link branding
    get:
      description: '**This endpoint allows you to retrieve a specific branded
        link by providing its ID.**


        You can submit this request as one of your subusers if you include their
        ID in the `on-behalf-of` header in the request.'
      operationId: GET_whitelabel-links-id
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    default: false
                    dns:
                      domain_cname:
                        data: sendgrid.net
                        host: mail.example.com
                        type: cname
                        valid: true
                      owner_cname:
                        data: sendgrid.net
                        host: 7.example.com
                        type: cname
                        valid: true
                    domain: example.com
                    id: 1
                    legacy: false
                    subdomain: mail
                    user_id: 7
                    username: john@example.com
                    valid: true
              schema:
                $ref: '#/components/schemas/link_branding_200_response'
          description: ''
      security:
        - Authorization: []
      summary: Retrieve a branded link
      tags:
        - Link branding
    parameters:
      - description: The ID of the branded link you want to retrieve.
        in: path
        name: id
        required: true
        schema:
          type: integer
    patch:
      description: "**This endpoint allows you to update a specific branded
        link. You can use this endpoint to change a branded link's default
        status.**


        You can submit this request as one of your subusers if you include their
        ID in the `on-behalf-of` header in the request."
      operationId: PATCH_whitelabel-links-id
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      requestBody:
        content:
          application/json:
            schema:
              example:
                default: true
              properties:
                default:
                  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.
                  enum:
                    - true
                    - false
                  type: boolean
              type: object
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    default: true
                    dns:
                      domain_cname:
                        data: sendgrid.net
                        host: mail.example.com
                        type: cname
                        valid: true
                      owner_cname:
                        data: sendgrid.net
                        host: 7.example.com
                        type: cname
                        valid: true
                    domain: example.com
                    id: 1
                    legacy: false
                    subdomain: mail
                    user_id: 7
                    username: john@example.com
                    valid: true
              schema:
                $ref: '#/components/schemas/link_branding_200_response'
          description: ''
      security:
        - Authorization: []
      summary: Update a branded link
      tags:
        - Link branding
  /whitelabel/links/{id}/validate:
    parameters:
      - description: The ID of the branded link that you want to validate.
        in: path
        name: id
        required: true
        schema:
          type: integer
    post:
      description: '**This endpoint allows you to validate a branded link.**


        You can submit this request as one of your subusers if you include their
        ID in the `on-behalf-of` header in the request.'
      operationId: POST_whitelabel-links-id-validate
      parameters:
        - $ref: '#/components/parameters/trait_onBehalfOfSubuser_on-behalf-of'
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    id: 1
                    valid: true
                    validation_results:
                      domain_cname:
                        reason:
                          Expected CNAME to match "sendgrid.net." but found
                          "example.com.".
                        valid: false
                      owner_cname:
                        reason: null
                        valid: true
              schema:
                properties:
                  id:
                    description: The ID of the branded link.
                    type: integer
                  valid:
                    description: Indicates if the link branding is valid.
                    enum:
                      - true
                      - false
                    type: boolean
                  validation_results:
                    description:
                      The individual validation results for each of the DNS
                      records associated with this branded link.
                    properties:
                      domain_cname:
                        description:
                          The DNS record generated for the sending domain used
                          for this branded link.
                        properties:
                          reason:
                            description:
                              Null if the DNS record is valid. If the DNS record
                              is invalid, this will explain why.
                            nullable: true
                            type: string
                          valid:
                            description: Indicates if this DNS record is valid.
                            enum:
                              - true
                              - false
                            type: boolean
                        required:
                          - valid
                          - reason
                        type: object
                      owner_cname:
                        description:
                          The DNS record created to verify the branded link.
                        properties:
                          reason:
                            description:
                              Null if valid. If the DNS record is invalid, this
                              will explain why.
                            nullable: true
                            type: string
                          valid:
                            description: Indicates if the DNS record is valid.
                            enum:
                              - true
                              - false
                            type: boolean
                        required:
                          - valid
                          - reason
                        type: object
                    required:
                      - domain_cname
                    type: object
                required:
                  - id
                  - valid
                  - validation_results
                type: object
          description: ''
        '500':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - message: internal error getting CNAME
              schema:
                properties:
                  errors:
                    description: The reasons why the validation failed.
                    items:
                      properties:
                        message:
                          description:
                            The reason why the link whitelabel could not be
                            validated.
                          type: string
                      required:
                        - message
                      type: object
                    type: array
                required:
                  - errors
                type: object
          description: ''
      security:
        - Authorization: []
      summary: Validate a branded link
      tags:
        - Link branding
  /whitelabel/links/{link_id}/subuser:
    parameters:
      - description: The ID of the branded link you want to associate.
        in: path
        name: link_id
        required: true
        schema:
          type: integer
    post:
      description: "**This endpoint allows you to associate a branded link with
        a subuser account.**


        Link branding can be associated with subusers from the parent account.
        This functionality allows subusers to send mail using their parent's
        link branding. To associate link branding, the parent account must first
        create a branded link and validate it. The parent may then associate
        that branded link with a subuser via the API or the [Subuser Management
        page of the Twilio SendGrid
        App](https://app.sendgrid.com/settings/subusers)."
      operationId: POST_whitelabel-links-link_id-subuser
      requestBody:
        content:
          application/json:
            schema:
              example:
                username: jane@example.com
              properties:
                username:
                  description:
                    The username of the subuser account that you want to
                    associate the branded link with.
                  type: string
              type: object
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    default: false
                    dns:
                      domain_cname:
                        data: sendgrid.net
                        host: mail.example.com
                        type: cname
                        valid: true
                      owner_cname:
                        data: sendgrid.net
                        host: 7.example.com
                        type: cname
                        valid: true
                    domain: example.com
                    id: 1
                    legacy: false
                    subdomain: mail
                    user_id: 7
                    username: john@example.com
                    valid: true
              schema:
                $ref: '#/components/schemas/link_branding_200_response'
          description: ''
      security:
        - Authorization: []
      summary: Associate a branded link with a subuser
      tags:
        - Link branding
components:
  parameters:
    trait_authorizationHeader_Authorization:
      in: header
      name: Authorization
      required: true
      schema:
        default: Bearer <<YOUR_API_KEY_HERE>>
        type: string
    trait_automationQueryParams_group_by:
      description:
        Automations can have multiple steps. Including `step_id` as a `group_by`
        metric allows further granularity of stats.
      explode: false
      in: query
      name: group_by
      schema:
        items:
          enum:
            - step_id
          type: string
        type: array
      style: form
    trait_automationQueryParams_step_ids:
      description:
        Comma-separated list of `step_ids` that you want the link stats for.
      explode: false
      in: query
      name: step_ids
      schema:
        items:
          format: uuid
          type: string
        type: array
        uniqueItems: true
      style: form
    trait_baseParams_aggregated_by:
      description:
        Dictates how the stats are time-sliced. Currently, `"total"` and `"day"`
        are supported.
      in: query
      name: aggregated_by
      schema:
        default: total
        enum:
          - day
          - total
        type: string
    trait_baseParams_end_date:
      description:
        "Format: `YYYY-MM-DD`.If this parameter is included, the stats' end date
        is included in the search."
      in: query
      name: end_date
      schema:
        default: ''
        format: date
        type: string
    trait_baseParams_start_date:
      description:
        "Format: `YYYY-MM-DD`. If this parameter is included, the stats' start
        date is included in the search."
      in: query
      name: start_date
      schema:
        default: ''
        format: date
        type: string
    trait_baseParams_timezone:
      description:
        '[IANA
        Area/Region](https://en.wikipedia.org/wiki/Tz_database#Names_of_time_zones)
        string representing the timezone in which the stats are to be presented,
        e.g., "America/Chicago".'
      in: query
      name: timezone
      schema:
        default: UTC
        type: string
    trait_designsQueryStrings_page_size:
      description: number of results to return
      in: query
      name: page_size
      schema:
        default: 100
        minimum: 0
        type: integer
    trait_designsQueryStrings_page_token:
      description:
        token corresponding to a specific page of results, as provided by
        metadata
      in: query
      name: page_token
      schema:
        type: string
    trait_designsQueryStrings_summary:
      description: set to false to return all fields
      in: query
      name: summary
      schema:
        default: true
        type: boolean
    trait_onBehalfOfSubuser_on-behalf-of:
      in: header
      name: on-behalf-of
      schema:
        default:
          The subuser's username. This header generates the API call as if the
          subuser account was making the call.
        type: string
    trait_pagination_page_size:
      description: The number of elements you want returned on each page.
      in: query
      name: page_size
      schema:
        default: 50
        maximum: 100
        minimum: 1
        type: integer
    trait_pagination_page_token:
      description:
        The stats endpoints are paginated. To get the next page, call the passed
        `_metadata.next` URL. If `_metadata.prev` doesn't exist, you're at the
        first page. Similarly, if `_metadata.next` is not present, you're at the
        last page.
      in: query
      name: page_token
      schema:
        type: string
    trait_singlesendQueryParams2_ab_phase_id:
      in: query
      name: ab_phase_id
      schema:
        enum:
          - test
          - send
        type: string
    trait_singlesendQueryParams2_ab_variation_id:
      in: query
      name: ab_variation_id
      schema:
        format: uuid
        type: string
    trait_singlesendQueryParams2_group_by:
      description:
        A/B Single Sends have multiple variation IDs and phase IDs. Including
        these additional fields allows further granularity of stats by these
        fields.
      explode: false
      in: query
      name: group_by
      schema:
        items:
          enum:
            - ab_variation
            - ab_phase
          type: string
        type: array
      style: form
    trait_singlesendQueryParams_group_by:
      description:
        A/B Single Sends have multiple variation IDs and phase IDs. Including
        these additional fields allows further granularity of stats by these
        fields.
      explode: false
      in: query
      name: group_by
      schema:
        items:
          enum:
            - ab_variation
            - ab_phase
          type: string
        type: array
      style: form
    trait_statsAdvancedQueryStringsLimitOffset_aggregated_by:
      description:
        How to group the statistics. Must be either "day", "week", or "month".
      in: query
      name: aggregated_by
      required: false
      schema:
        enum:
          - day
          - week
          - month
        type: string
    trait_statsAdvancedQueryStringsLimitOffset_end_date:
      description:
        The end date of the statistics to retrieve. Defaults to today. Must
        follow format YYYY-MM-DD.
      in: query
      name: end_date
      required: false
      schema:
        type: string
    trait_statsAdvancedQueryStringsLimitOffset_limit:
      description: The number of results to return.
      in: query
      name: limit
      required: false
      schema:
        type: integer
    trait_statsAdvancedQueryStringsLimitOffset_offset:
      description: The point in the list to begin retrieving results.
      in: query
      name: offset
      required: false
      schema:
        type: integer
    trait_statsAdvancedQueryStringsLimitOffset_start_date:
      description:
        The starting date of the statistics to retrieve. Must follow format
        YYYY-MM-DD.
      in: query
      name: start_date
      required: true
      schema:
        type: string
    trait_statsAdvancedStatsBaseQueryStrings_aggregated_by:
      description:
        How to group the statistics. Must be either "day", "week", or "month".
      in: query
      name: aggregated_by
      required: false
      schema:
        enum:
          - day
          - week
          - month
        type: string
    trait_statsAdvancedStatsBaseQueryStrings_end_date:
      description:
        The end date of the statistics to retrieve. Defaults to today. Must
        follow format YYYY-MM-DD.
      in: query
      name: end_date
      required: false
      schema:
        type: string
    trait_statsAdvancedStatsBaseQueryStrings_start_date:
      description:
        The starting date of the statistics to retrieve. Must follow format
        YYYY-MM-DD.
      in: query
      name: start_date
      required: true
      schema:
        type: string
  requestBodies:
    DELETE_contactdb-lists-list_idBody:
      content:
        application/json:
          schema:
            nullable: true
    create-integration-request:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/create-integration-request'
    design-duplicate-input:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/design-duplicate-input'
    monitor:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/monitor'
    parse-setting:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/parse-setting'
    segment_write_v2:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/segment_write_v2'
    singlesend_request:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/singlesend_request'
    suppressions-request:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/suppressions-request'
    transactional_template_version_create:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/transactional_template_version_create'
    verified-sender-request-schema:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/verified-sender-request-schema'
  responses:
    trait_apiKeysErrors_400:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/global_error_response_schema'
      description: ''
    trait_apiKeysErrors_403:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/global_error_response_schema'
      description: ''
    trait_apiKeysErrors_404:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/global_error_response_schema'
      description: ''
    trait_cancelScheduledSendsErrors_400:
      content:
        application/json:
          schema:
            properties:
              errors:
                items:
                  properties:
                    field:
                      type: string
                    help:
                      type: object
                    message:
                      type: string
                  type: object
                type: array
              id:
                type: string
            type: object
      description: ''
    trait_errorResponse_400:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/global_error_response_schema'
      description: ''
    trait_errors_400:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/errors-seg-v2'
      description: ''
    trait_errors_404:
      description: ''
    trait_errors_500:
      description: ''
    trait_globalErrors_401:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/global_error_response_schema'
      description: ''
    trait_globalErrors_403:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/global_error_response_schema'
      description: ''
    trait_globalErrors_404:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/global_error_response_schema'
      description: ''
    trait_globalErrors_500:
      content:
        application/json:
          schema:
            properties:
              errors:
                items:
                  properties:
                    message:
                      type: string
                  type: object
                type: array
            type: object
      description: ''
    trait_mailSendErrors_400:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/global_error_response_schema'
      description: ''
    trait_mailSendErrors_413:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/global_error_response_schema'
      description: ''
    trait_makoErrorResponse_400:
      content:
        application/json:
          schema:
            properties:
              errors:
                items:
                  properties:
                    error_id:
                      description: The ID associated with the error.
                      type: string
                    field:
                      description: The field that generated the error.
                      nullable: true
                      type: string
                    message:
                      description: The error message.
                      type: string
                    parameter:
                      type: string
                  required:
                    - message
                  type: object
                type: array
            type: object
      description: ''
    trait_makoErrorResponse_401:
      content:
        application/json:
          schema:
            properties:
              errors:
                items:
                  properties:
                    error_id:
                      description: The ID associated with the error.
                      type: string
                    field:
                      description: The field that generated the error.
                      nullable: true
                      type: string
                    message:
                      description: The error message.
                      type: string
                    parameter:
                      type: string
                  required:
                    - message
                  type: object
                type: array
            type: object
      description: ''
    trait_makoErrorResponse_403:
      content:
        application/json:
          schema:
            properties:
              errors:
                items:
                  properties:
                    error_id:
                      description: The ID associated with the error.
                      type: string
                    field:
                      description: The field that generated the error.
                      nullable: true
                      type: string
                    message:
                      description: The error message.
                      type: string
                    parameter:
                      type: string
                  required:
                    - message
                  type: object
                type: array
            type: object
      description: ''
    trait_makoErrorResponse_404:
      content:
        application/json:
          schema:
            properties:
              errors:
                items:
                  properties:
                    error_id:
                      description: The ID associated with the error.
                      type: string
                    field:
                      description: The field that generated the error.
                      nullable: true
                      type: string
                    message:
                      description: The error message.
                      type: string
                    parameter:
                      type: string
                  required:
                    - message
                  type: object
                type: array
            type: object
      description: ''
    trait_makoErrorResponse_500:
      content:
        application/json:
          schema:
            properties:
              errors:
                items:
                  properties:
                    error_id:
                      description: The ID associated with the error.
                      type: string
                    field:
                      description: The field that generated the error.
                      nullable: true
                      type: string
                    message:
                      description: The error message.
                      type: string
                    parameter:
                      type: string
                  required:
                    - message
                  type: object
                type: array
            type: object
      description: ''
    trait_pagination_200:
      content:
        application/json:
          schema:
            properties:
              _metadata:
                $ref: '#/components/schemas/metadata'
            type: object
      description: ''
    trait_singleSignOnErrorsTrait_400:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/sso-error-response'
      description: ''
    trait_singleSignOnErrorsTrait_401:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/sso-error-response'
      description: ''
    trait_singleSignOnErrorsTrait_403:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/sso-error-response'
      description: ''
    trait_singleSignOnErrorsTrait_429:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/sso-error-response'
      description: ''
    trait_singleSignOnErrorsTrait_500:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/sso-error-response'
      description: ''
  schemas:
    TNE-senderID:
      allOf:
        - properties:
            id:
              description: The unique identifier of the sender.
              type: integer
          type: object
        - $ref: '#/components/schemas/senders-id-request-body'
        - properties:
            created_at:
              description: The time the sender identity was created.
              type: integer
            locked:
              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.
              type: boolean
            updated_at:
              description: The time the sender identity was last updated.
              type: integer
            verified:
              description:
                Only verified sender identities can be used to send email.
              properties:
                reason:
                  description:
                    The reason for a verification failure, or null if
                    verification succeeeded or has yet to take place.
                  nullable: true
                  type: string
                status:
                  description:
                    Whether the sender identity has been verified. Only verified
                    sender identities can be used to send email.
                  type: boolean
              type: object
          type: object
      title: Sender ID Response Body
    _metadata:
      properties:
        count:
          minimum: 0
          type: integer
        next:
          format: uri
          type: string
        prev:
          format: uri
          type: string
        self:
          format: uri
          type: string
      title: _metadata
      type: object
    abbv-message:
      example:
        clicks_count: 2
        from_email: from@test.com
        last_event_time: '2017-10-13T18:56:21Z'
        msg_id: abc123
        opens_count: 1
        status: processed
        subject: anim Duis sint veniam
        to_email: test@test.com
      properties:
        clicks_count:
          type: integer
        from_email:
          type: string
        last_event_time:
          description: iso 8601 format
          type: string
        msg_id:
          type: string
        opens_count:
          type: integer
        status:
          enum:
            - processed
            - delivered
            - not_delivered
          type: string
        subject:
          type: string
        to_email:
          type: string
      required:
        - from_email
        - msg_id
        - subject
        - to_email
        - status
        - opens_count
        - clicks_count
        - last_event_time
      title: Abbv. Message
      type: object
    abtest_summary:
      nullable: true
      properties:
        duration:
          description: How long the A/B Testing will last
          type: string
        expiration_date:
          description: Last day to select an A/B Test Winner
          nullable: true
          type: string
        test_percentage:
          description:
            What percentage of your recipient will be included in your A/B
            testing
          type: integer
        type:
          description: What differs between the A/B tests
          enum:
            - subject
            - content
          type: string
        winner_criteria:
          description: How the winner will be decided
          enum:
            - open
            - click
            - manual
          type: string
        winner_selected_at:
          description: When the winner was selected
          nullable: true
          type: string
        winning_template_id:
          description: Winner of the A/B Test
          type: string
      required:
        - type
        - winner_criteria
        - test_percentage
        - duration
        - winning_template_id
        - winner_selected_at
        - expiration_date
      title: abTest_summary
      type: object
    advanced_stats_clicks:
      description: The individual events and their stats.
      properties:
        clicks:
          description: The number of links that were clicked in your emails.
          type: integer
        unique_clicks:
          description:
            The number of unique recipients who clicked links in your emails.
          type: integer
      title: 'Stats: Advanced Stats with Clicks'
      type: object
    advanced_stats_clicks_opens:
      allOf:
        - $ref: '#/components/schemas/advanced_stats_clicks'
        - $ref: '#/components/schemas/advanced_stats_opens'
      description: The individual events and their stats.
      title: 'Stats: Advanced Stats with Clicks and Opens'
    advanced_stats_mailbox_provider:
      allOf:
        - $ref: '#/components/schemas/advanced_stats_clicks_opens'
        - description: The individual events and their stats.
          properties:
            blocks:
              description:
                The number of emails that were not allowed to be delivered by
                ISPs.
              type: integer
            bounces:
              description:
                The number of emails that bounced instead of being delivered.
              type: integer
            deferred:
              description:
                The number of emails that temporarily could not be delivered.
              type: integer
            delivered:
              description:
                The number of emails SendGrid was able to confirm were actually
                delivered to a recipient.
              type: integer
            drops:
              description:
                The number of emails that were not delivered due to the
                recipient email address being on a suppression list.
              type: integer
            processed:
              description:
                Requests from your website, application, or mail client via SMTP
                Relay or the Web API that SendGrid processed.
              type: integer
            requests:
              description:
                The number of emails that were requested to be delivered.
              type: integer
            spam_reports:
              description:
                The number of recipients who marked your email as spam.
              type: integer
          type: object
      description: The individual events and their stats.
      title: 'Stats: Advanced Stats for Mailbox Provider'
    advanced_stats_opens:
      description: The individual events and their stats.
      properties:
        opens:
          description:
            The total number of times your emails were opened by recipients.
          type: integer
        unique_opens:
          description: The number of unique recipients who opened your emails.
          type: integer
      title: 'Stats: Advanced Stats with Opens'
      type: object
    all_segments_response:
      properties:
        _metadata:
          $ref: '#/components/schemas/_metadata'
        contacts_count:
          description: Total number of contacts present in the segment
          type: integer
        created_at:
          description: ISO8601 timestamp of when the object was created
          type: string
        id:
          description: ID assigned to the segment when created.
          format: uuid
          maxLength: 36
          minLength: 36
          type: string
        name:
          description: Name of the segment.
          maxLength: 100
          minLength: 1
          type: string
        next_sample_update:
          description:
            ISO8601 timestamp of when the samples will be next updated
          type: string
        parent_list_ids:
          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
          items:
            type: string
          type: array
          uniqueItems: true
        query_version:
          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.
          type: string
        sample_updated_at:
          description: ISO8601 timestamp of when the samples were last updated
          type: string
        status:
          $ref: '#/components/schemas/segment_status_response'
        updated_at:
          description: ISO8601 timestamp of when the object was last updated
          type: string
      required:
        - id
        - name
        - contacts_count
        - created_at
        - updated_at
        - sample_updated_at
        - next_sample_update
        - parent_list_ids
        - query_version
        - status
      title: all_segments_response
      type: object
    api-error:
      properties:
        error_id:
          type: string
        field:
          type: string
        message:
          type: string
      required:
        - message
        - field
        - error_id
      title: error
      type: object
    api-errors:
      properties:
        errors:
          items:
            $ref: '#/components/schemas/api-error'
          type: array
      title: errors
      type: object
    api_key_name_id:
      example:
        api_key_id: qfTQ6KG0QBiwWdJ0-pCLCA
        name: Mail Send
      properties:
        api_key_id:
          description: 'The ID of your API Key. '
          type: string
        name:
          description: The name of your API Key.
          type: string
      title: API Key Name and ID
      type: object
    api_key_name_id_scopes:
      allOf:
        - properties:
            scopes:
              description: The permissions this API Key has access to.
              items:
                type: string
              type: array
          type: object
        - $ref: '#/components/schemas/api_key_name_id'
      example:
        api_key_id: qfTQ6KG0QBiwWdJ0-pCLCA
        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
      title: API Key Name, ID, and Scopes
    authentication_domain:
      example:
        automatic_security: true
        custom_spf: false
        default: true
        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
        domain: example.com
        id: 45373692
        ips:
          - 127.0.0.1
        legacy: false
        subdomain: sub
        user_id: 66036447
        username: jdoe
        valid: true
      properties:
        automatic_security:
          description:
            Indicates if this authenticated domain uses automated security.
          type: boolean
        custom_spf:
          description:
            Indicates whether this authenticated domain uses custom SPF.
          type: boolean
        default:
          description: Indicates if this is the default authenticated domain.
          type: boolean
        dns:
          description: The DNS records used to authenticate the sending domain.
          properties:
            dkim1:
              description: A DNS record.
              properties:
                data:
                  description: The DNS record.
                  type: string
                host:
                  description: The domain that this DNS record was created for.
                  type: string
                type:
                  description: The type of DNS record.
                  type: string
                valid:
                  description: Indicates if this is a valid DNS record.
                  type: boolean
              required:
                - valid
                - type
                - host
                - data
              type: object
            dkim2:
              description: A DNS record.
              properties:
                data:
                  description: The DNS record.
                  type: string
                host:
                  description: The domain that this DNS record was created for.
                  type: string
                type:
                  description: The type of DNS record.
                  type: string
                valid:
                  description: Indicates if this is a valid DNS record.
                  type: boolean
              required:
                - valid
                - type
                - host
                - data
              type: object
            mail_cname:
              description:
                The CNAME for your sending domain that points to sendgrid.net.
              properties:
                data:
                  description: The CNAME record.
                  type: string
                host:
                  description: The domain that this CNAME is created for.
                  format: hostname
                  type: string
                type:
                  description: The type of DNS record.
                  type: string
                valid:
                  description: Indicates if this is a valid CNAME.
                  type: boolean
              required:
                - valid
                - type
                - host
                - data
              type: object
          required:
            - mail_cname
            - dkim1
            - dkim2
          type: object
        domain:
          description: The domain to be authenticated.
          type: string
        id:
          description: The ID of the authenticated domain.
          type: number
        ips:
          description:
            The IPs to be included in the custom SPF record for this
            authenticated domain.
          items:
            type: string
          type: array
        legacy:
          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.
          type: boolean
        subdomain:
          description: The subdomain to use for this authenticated domain.
          type: string
        user_id:
          description: The ID of the user that this domain is associated with.
          type: number
        username:
          description: The username that this domain will be associated with.
          type: string
        valid:
          description: Indicates if this is a valid authenticated domain.
          type: boolean
      required:
        - id
        - user_id
        - subdomain
        - domain
        - username
        - ips
        - custom_spf
        - default
        - legacy
        - automatic_security
        - valid
        - dns
      title: Domain Authentication - Mandatory Subdomain
      type: object
    automations-link-stats-response:
      properties:
        _metadata:
          $ref: '#/components/schemas/link-tracking-metadata'
        results:
          description: ''
          items:
            properties:
              clicks:
                description: The number of clicks on this particular link.
                minimum: 1
                type: integer
              step_id:
                description:
                  This is the ID of the step if the stats were requested to be
                  grouped by `step_id`.
                format: uuid
                type: string
              url:
                description:
                  This is the URL of the link clicked. If `{{custom_fields}}`
                  are part of the URL, they will be included.
                format: uri
                type: string
              url_location:
                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`.
                minimum: 0
                type: integer
            required:
              - url
              - step_id
              - clicks
            type: object
          type: array
        total_clicks:
          type: integer
      required:
        - results
        - total_clicks
        - _metadata
      title: automations-link-stats-response
      type: object
    automations-response:
      properties:
        _metadata:
          $ref: '#/components/schemas/metadata'
        results:
          items:
            properties:
              aggregation:
                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.
                type: string
              id:
                description:
                  This is the ID of the Automation you are requesting stats for.
                format: uuid
                type: string
              stats:
                $ref: '#/components/schemas/metrics'
              step_id:
                default: all
                description:
                  This is the ID of the step if the stats were requested to be
                  grouped by `step_id`.
                type: string
            required:
              - id
              - aggregation
              - step_id
            type: object
          type: array
      required:
        - results
      title: automations-response
      type: object
    blocks-response:
      example:
        - created: 1443651154
          email: example@example.com
          reason:
            'error dialing remote address: dial tcp 10.57.152.165:25: no route
            to host'
          status: 4.0.0
      items:
        properties:
          created:
            description:
              A Unix timestamp indicating when the email address was added to
              the blocks list.
            type: integer
          email:
            description: The email address that was added to the block list.
            format: email
            type: string
          reason:
            description: An explanation for the reason of the block.
            type: string
          status:
            description: The status of the block.
            type: string
        required:
          - created
          - email
          - reason
          - status
        type: object
      title: Blocks Response
      type: array
    bounce_response:
      example:
        created: 1250337600
        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
      properties:
        created:
          description:
            The unix timestamp for when the bounce record was created at
            SendGrid.
          type: number
        email:
          description: The email address that was added to the bounce list.
          format: email
          type: string
        reason:
          description:
            The reason for the bounce. This typically will be a bounce code, an
            enhanced code, and a description.
          type: string
        status:
          description: Enhanced SMTP bounce response
          type: string
      title: Bounce Response
      type: object
    campaign_request:
      example:
        categories:
          - summer line
        custom_unsubscribe_url: ''
        html_content:
          <html><head><title></title></head><body><p>Check out our summer
          line!</p></body></html>
        id: 986724
        ip_pool: marketing
        list_ids:
          - 110
          - 124
        plain_content: Check out our summer line!
        segment_ids:
          - 110
        sender_id: 124451
        status: Draft
        subject: New Products for Summer!
        suppression_group_id: 42
        title: May Newsletter
      properties:
        categories:
          description:
            The categories you would like associated to this campaign.
          items:
            type: string
          nullable: true
          type: array
        custom_unsubscribe_url:
          description:
            This is the url of the custom unsubscribe page that you provide for
            customers to unsubscribe from your suppression groups.
          nullable: true
          type: string
        editor:
          description: The editor used in the UI.
          enum:
            - code
            - design
          type: string
        html_content:
          description: The HTML of your marketing email.
          nullable: true
          type: string
        ip_pool:
          description:
            The pool of IPs that you would like to send this email from.
          nullable: true
          type: string
        list_ids:
          description:
            The IDs of the lists you are sending this campaign to. You can have
            both segment IDs and list IDs
          items:
            type: integer
          nullable: true
          type: array
        plain_content:
          description: The plain text content of your emails.
          nullable: true
          type: string
        segment_ids:
          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.
          items:
            type: integer
          nullable: true
          type: array
        sender_id:
          description:
            The ID of the "sender" identity that you have created. Your
            recipients will see this as the "from" on your marketing emails.
          nullable: true
          type: integer
        subject:
          description:
            The subject of your campaign that your recipients will see.
          nullable: true
          type: string
        suppression_group_id:
          description:
            The suppression group that this marketing email belongs to, allowing
            recipients to opt-out of emails of this type.
          nullable: true
          type: integer
        title:
          description:
            The display title of your campaign. This will be viewable by you in
            the Marketing Campaigns UI.
          type: string
      required:
        - title
      title: Campaigns Request
      type: object
    campaign_response:
      allOf:
        - $ref: '#/components/schemas/campaign_request'
        - properties:
            id:
              type: integer
            status:
              description: The status of your campaign.
              type: string
          required:
            - status
          type: object
      title: Campaigns Response
    category_stats:
      example:
        date: '2015-01-01'
        stats:
          - metrics:
              blocks: 0
              bounce_drops: 0
              bounces: 0
              clicks: 0
              deferred: 0
              delivered: 0
              invalid_emails: 0
              opens: 0
              processed: 0
              requests: 0
              spam_report_drops: 0
              spam_reports: 0
              unique_clicks: 0
              unique_opens: 0
              unsubscribe_drops: 0
              unsubscribes: 0
            name: cat1
            type: category
          - metrics:
              blocks: 0
              bounce_drops: 0
              bounces: 0
              clicks: 0
              deferred: 0
              delivered: 0
              invalid_emails: 0
              opens: 0
              processed: 0
              requests: 0
              spam_report_drops: 0
              spam_reports: 0
              unique_clicks: 0
              unique_opens: 0
              unsubscribe_drops: 0
              unsubscribes: 0
            name: cat2
            type: category
      properties:
        date:
          description: The date the statistics were gathered.
          type: string
        stats:
          items:
            properties:
              metrics:
                properties:
                  blocks:
                    description:
                      The number of emails that were not allowed to be delivered
                      by ISPs.
                    type: integer
                  bounce_drops:
                    description:
                      The number of emails that were dropped because of a
                      bounce.
                    type: integer
                  bounces:
                    description:
                      The number of emails that bounced instead of being
                      delivered.
                    type: integer
                  clicks:
                    description: The number of links that were clicked.
                    type: integer
                  deferred:
                    description:
                      The number of emails that temporarily could not be
                      delivered.
                    type: integer
                  delivered:
                    description:
                      The number of emails SendGrid was able to confirm were
                      actually delivered to a recipient.
                    type: integer
                  invalid_emails:
                    description:
                      The number of recipients who had malformed email addresses
                      or whose mail provider reported the address as invalid.
                    type: integer
                  opens:
                    description:
                      The total number of times your emails were opened by
                      recipients.
                    type: integer
                  processed:
                    description:
                      Requests from your website, application, or mail client
                      via SMTP Relay or the API that SendGrid processed.
                    type: integer
                  requests:
                    description:
                      The number of emails that were requested to be delivered.
                    type: integer
                  spam_report_drops:
                    description:
                      The number of emails that were dropped due to a recipient
                      previously marking your emails as spam.
                    type: integer
                  spam_reports:
                    description:
                      The number of recipients who marked your email as spam.
                    type: integer
                  unique_clicks:
                    description:
                      The number of unique recipients who clicked links in your
                      emails.
                    type: integer
                  unique_opens:
                    description:
                      The number of unique recipients who opened your emails.
                    type: integer
                  unsubscribe_drops:
                    description:
                      The number of emails dropped due to a recipient
                      unsubscribing from your emails.
                    type: integer
                  unsubscribes:
                    description:
                      The number of recipients who unsubscribed from your
                      emails.
                    type: integer
                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
                type: object
              name:
                description: The name of the category.
                type: string
              type:
                description: How you are segmenting your statistics.
                type: string
            required:
              - type
            type: object
          type: array
      required:
        - date
      title: 'Stats: Category Stats'
      type: object
    cc_bcc_email_object:
      example:
        email: jane_doe@example.com
        name: Jane Doe
      properties:
        email:
          description: The intended recipient's email address.
          format: email
          type: string
        name:
          description: The intended recipient's name.
          type: string
      required:
        - email
      title: CC BCC Email Object
      type: object
    click-tracking:
      example:
        enable_text: false
        enabled: false
      properties:
        enable_text:
          description:
            Indicates if click tracking is enabled for plain text emails.
          type: boolean
        enabled:
          description: Indicates if click tracking is enabled or disabled.
          type: boolean
      required:
        - enable_text
        - enabled
      title: 'Settings: Click Tracking'
      type: object
    contact-details:
      properties:
        _metadata:
          $ref: '#/components/schemas/selfmetadata'
        address_line_1:
          type: string
        address_line_2:
          type: string
        alternate_emails:
          items:
            type: string
          type: array
        city:
          type: string
        country:
          type: string
        created_at:
          description: The ISO8601 timestamp when the contact was created.
          type: string
        custom_fields:
          $ref: '#/components/schemas/custom-fields-by-name'
        email:
          type: string
        first_name:
          type: string
        id:
          type: string
        last_name:
          type: string
        list_ids:
          items:
            type: string
          type: array
        postal_code:
          type: string
        state_province_region:
          type: string
        updated_at:
          description: The ISO8601 timestamp when the contact was updated.
          type: string
      required:
        - id
        - list_ids
        - created_at
        - updated_at
      title: contact-details
      type: object
    contact-details2:
      properties:
        _metadata:
          $ref: '#/components/schemas/selfmetadata'
        address_line_1:
          type: string
        address_line_2:
          type: string
        alternate_emails:
          items:
            format: email
            type: string
          nullable: true
          type: array
        city:
          type: string
        country:
          type: string
        created_at:
          format: date-time
          type: string
        custom_fields:
          type: object
        email:
          format: email
          type: string
        facebook:
          type: string
        first_name:
          type: string
        id:
          format: uuid
          maxLength: 36
          minLength: 36
          type: string
        last_name:
          type: string
        line:
          type: string
        list_ids:
          items:
            format: uuid
            type: string
          type: array
        phone_number:
          type: string
        postal_code:
          type: string
        segment_ids:
          items:
            format: uuid
            type: string
          type: array
        state_province_region:
          type: string
        unique_name:
          type: string
        updated_at:
          format: date-time
          type: string
        whatsapp:
          type: string
      required:
        - id
        - list_ids
        - created_at
        - updated_at
      title: contact-details2
      type: object
    contact-details3:
      properties:
        _metadata:
          $ref: '#/components/schemas/selfmetadata'
        address_line_1:
          type: string
        address_line_2:
          type: string
        alternate_emails:
          items:
            type: string
          type: array
        city:
          type: string
        country:
          type: string
        created_at:
          type: string
        custom_fields:
          type: object
        email:
          type: string
        facebook:
          type: string
        first_name:
          type: string
        id:
          type: string
        last_name:
          type: string
        line:
          type: string
        list_ids:
          items:
            type: string
          type: array
        phone_number:
          type: string
        postal_code:
          type: string
        segment_ids:
          items:
            type: string
          type: array
        state_province_region:
          type: string
        unique_name:
          type: string
        updated_at:
          type: string
        whatsapp:
          type: string
      required:
        - id
        - list_ids
        - segment_ids
        - created_at
        - updated_at
      title: contact-details3
      type: object
    contact-export:
      properties:
        _metadata:
          $ref: '#/components/schemas/metadata'
        completed_at:
          description: The ISO8601 timestamp when the export was completed.
          type: string
        contact_count:
          description: The total number of exported contacts.
          type: integer
        created_at:
          description: The ISO8601 timestamp when the export was begun.
          type: string
        expires_at:
          description:
            The ISO8601 timestamp when the exported file on S3 will expire.
          type: string
        id:
          type: string
        message:
          description: A human readable message if the status is `failure`.
          type: string
        status:
          description:
            "The export job's status. Allowed values: `pending`, `ready`, or
            `failure`."
          enum:
            - pending
            - ready
            - failure
          type: string
        updated_at:
          description: The ISO8601 timestamp when the export was updated.
          type: string
        urls:
          description:
            One or more download URLs for the contact file if the status is
            `ready`.
          items:
            type: string
          type: array
      required:
        - id
        - status
        - created_at
        - updated_at
        - expires_at
      title: contact-export
      type: object
    contact-import:
      properties:
        finished_at:
          description: The ISO8601 timestamp when the job was finished.
          type: string
        id:
          description: The job ID.
          type: string
        job_type:
          description: 'The job type. Allowed values: `upsert`, or `delete`.'
          type: string
        results:
          description: Result map of the import job.
          properties:
            created_count:
              description: Created contact count from the import.
              type: number
            deleted_count:
              description: Count of deleted contacts that resulted in error.
              type: number
            errored_count:
              description: Count of imported contacts that resulted in error.
              type: number
            errors_url:
              description:
                The download URL of the file which provides information about
                any errors.
              type: string
            requested_count:
              description: Requested contact count from the import.
              type: number
            updated_count:
              description: Updated contact count from the import.
              type: number
          type: object
        started_at:
          description: The ISO8601 timestamp when the job was created.
          type: string
        status:
          description:
            'The job state. Allowed values: `pending`, `completed`, `errored`,
            or `failed`.'
          type: string
      title: contact-import
      type: object
    contact-request:
      properties:
        address_line_1:
          description: The first line of the address.
          maxLength: 100
          type: string
        address_line_2:
          description: An optional second line for the address.
          maxLength: 100
          type: string
        alternate_emails:
          description: Additional emails associated with the contact.
          items:
            maxLength: 254
            type: string
          maxItems: 5
          minItems: 0
          type: array
        city:
          description: The contact's city.
          maxLength: 60
          type: string
        country:
          description:
            The contact's country. Can be a full name or an abbreviation.
          maxLength: 50
          type: string
        custom_fields:
          $ref: '#/components/schemas/custom-fields-by-id'
        email:
          description:
            The contact's primary email. This is required to be a valid email.
          maxLength: 254
          type: string
        first_name:
          description: The contact's personal name.
          maxLength: 50
          type: string
        last_name:
          description: The contact's family name.
          maxLength: 50
          type: string
        postal_code:
          description: The contact's ZIP code or other postal code.
          type: string
        state_province_region:
          description: The contact's state, province, or region.
          maxLength: 50
          type: string
      required:
        - email
      title: contact-request
      type: object
    contact-summary:
      properties:
        _metadata:
          $ref: '#/components/schemas/selfmetadata'
        created_at:
          description: Unix Epoch Timestamp.
          type: number
        email:
          description: Primary email address.
          type: string
        first_name:
          type: string
        id:
          description: Contact UUID.
          type: string
        last_name:
          type: string
        list_ids:
          description: List UUID linked with this contact.
          items:
            type: string
          type: array
        updated_at:
          description: Unix Epoch Timestamp.
          type: number
      required:
        - id
        - list_ids
        - created_at
        - updated_at
      title: contact-summary
      type: object
    contact_response:
      example:
        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
        city: Redwood City
        country: USA
        custom_fields:
          custom_field_name1: custom_field_value1
          custom_field_name2: custom_field_value2
        email: abcd@gmail.com
        first_name: Ab
        id: 47d23ab0-d895-4359-a0d1-ffc7a6fc7e70
        last_name: Cd
        postal_code: 94063
        state_province_region: CA
      properties:
        address_line_1:
          description:
            First line of address of the contact. This is a reserved field.
          minLength: 0
          type: string
        address_line_2:
          description:
            Second line of address of the contact. This is a reserved field.
          minLength: 0
          type: string
        alternate_emails:
          description:
            Alternate emails of the contact. This is a reserved field.
          items:
            format: email
            maxLength: 254
            minLength: 3
            type: string
          minItems: 0
          type: array
          uniqueItems: true
        city:
          description:
            City associated with the contact. This is a reserved field.
          minLength: 0
          pattern: ^[a-zA-Z\u0080-\u024F\s\/\-\)\(\`\.\"\']+$
          type: string
        country:
          description:
            Country associated with the address of the contact. This is a
            reserved field.
          minLength: 0
          type: string
        custom_fields:
          description:
            The user may choose to create up to 120 custom fields or none at
            all. This is not a reserved field.
          minProperties: 0
          properties:
            '':
              type: string
            custom_field_name1:
              minLength: 0
              type: string
            custom_field_name2:
              minLength: 0
              type: string
          type: object
        email:
          description: Email of the contact. This is a reserved field.
          format: email
          maxLength: 254
          minLength: 3
          type: string
        first_name:
          description: First name of the contact. This is a reserved field.
          minLength: 1
          type: string
        id:
          description: ID assigned to a contact when added to the system.
          format: uuid
          maxLength: 36
          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}'
          type: string
        last_name:
          description: Last name of the contact. This is a reserved field.
          minLength: 1
          type: string
        list_ids:
          description: IDs of all lists the contact is part of
          items:
            format: uuid
            type: string
          type: array
          uniqueItems: true
        postal_code:
          description:
            Zipcode associated with the address of the contact. This is a
            reserved field.
          type: integer
        segment_ids:
          description: IDs of all segments the contact is part of
          items:
            format: uuid
            type: string
          type: array
          uniqueItems: true
        state_province_region:
          description:
            State associated with the contact. This is a reserved field.
          minLength: 0
          type: string
      required:
        - id
        - email
        - alternate_emails
        - first_name
        - last_name
        - address_line_1
        - address_line_2
        - city
        - state_province_region
        - postal_code
        - country
        - custom_fields
      title: contact_response
      type: object
    contactdb_custom_field:
      example:
        name: first_name
        type: text
      properties:
        name:
          description: The name of the field
          type: string
        type:
          description: The type of the field.
          enum:
            - date
            - text
            - number
          type: string
      title: ContactDB Custom field schema.
      type: object
    contactdb_custom_field_with_id:
      allOf:
        - $ref: '#/components/schemas/contactdb_custom_field'
        - properties:
            id:
              description: The ID of the custom field.
              type: number
          type: object
      title: ContactDB Custom field schema with ID.
    contactdb_custom_field_with_id_value:
      allOf:
        - $ref: '#/components/schemas/contactdb_custom_field_with_id'
        - properties:
            value:
              description: The value of this recipient's custom field
              nullable: true
              type: string
          type: object
      title: ContactDB Custom field schema.
    contactdb_list:
      example:
        id: 1
        name: listname
        recipient_count: 0
      properties:
        id:
          description: The reference ID of your list.
          type: integer
        name:
          description:
            The name of your list. Must be unique against all other list and
            segment names.
          type: string
        recipient_count:
          description: The count of recipients currently in the list.
          type: integer
      required:
        - id
        - name
        - recipient_count
      title: ContactDB lists
      type: object
    contactdb_recipient:
      properties:
        recipients:
          items:
            properties:
              created_at:
                description:
                  The time this record was created in your contactdb, in
                  unixtime.
                type: number
              custom_fields:
                description:
                  The custom fields assigned to this recipient and their values.
                items:
                  $ref: '#/components/schemas/contactdb_custom_field_with_id_value'
                type: array
              email:
                description:
                  The email address of this recipient. This is a default custom
                  field that SendGrid provides.
                format: email
                type: string
              first_name:
                description:
                  The first name of this recipient. This is a default custom
                  field that SendGrid provides.
                nullable: true
                type: string
              id:
                description: The ID of this recipient.
                type: string
              last_clicked:
                description:
                  The last time this recipient clicked a link from one of your
                  campaigns, in unixtime.
                nullable: true
                type: number
              last_emailed:
                description:
                  The last time this user was emailed by one of your campaigns,
                  in unixtime.
                nullable: true
                type: number
              last_name:
                description: The last name of the recipient.
                nullable: true
                type: string
              last_opened:
                description:
                  The last time this recipient opened an email from you, in
                  unixtime.
                nullable: true
                type: number
              updated_at:
                description: The last update date for this recipient's record.
                type: number
            required:
              - email
            type: object
          type: array
      title: 'ContactDB: Recipient'
      type: object
    contactdb_recipient_count:
      example:
        recipient_count: 1234
      properties:
        recipient_count:
          description: The count of recipients.
          type: number
      required:
        - recipient_count
      title: 'ContactDB: Recipient Count'
      type: object
    contactdb_recipient_response:
      example:
        error_count: 1
        error_indices:
          - 2
        errors:
          - error_indices:
              - 2
            message: Invalid email.
        new_count: 2
        persisted_recipients:
          - YUBh
          - bWlsbGVyQG1pbGxlci50ZXN0
        updated_count: 0
      properties:
        error_count:
          default: 0
          description: The number of errors found while adding recipients.
          type: number
        error_indices:
          default: []
          description:
            'The indices of the recipient(s) sent that caused the error. '
          items:
            type: number
          type: array
        errors:
          items:
            properties:
              error_indices:
                items:
                  type: number
                type: array
              message:
                type: string
            type: object
          type: array
        new_count:
          default: 0
          description: The count of new recipients added to the contactdb.
          type: number
        persisted_recipients:
          default: []
          description:
            The recipient IDs of the recipients that already existed from this
            request.
          items:
            type: string
          type: array
        updated_count:
          default: 0
          description: The recipients who were updated from this request.
          type: number
      required:
        - error_count
        - new_count
        - persisted_recipients
        - updated_count
      title: 'ContactDB: Recipient response'
      type: object
    contactdb_segments:
      example:
        conditions:
          - and_or: ''
            field: last_name
            operator: eq
            value: Miller
          - and_or: and
            field: last_clicked
            operator: gt
            value: 01/02/2015
          - and_or: or
            field: clicks.campaign_identifier
            operator: eq
            value: '513'
        list_id: 4
        name: Last Name Miller
        recipient_count: 1234
      properties:
        conditions:
          description:
            The conditions for a recipient to be included in this segment.
          items:
            $ref: '#/components/schemas/contactdb_segments_conditions'
          type: array
        list_id:
          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.
          type: integer
        name:
          description: The name of this segment.
          type: string
        recipient_count:
          description:
            The count of recipients in this list. This is not included on
            creation of segments.
          type: number
      required:
        - name
        - conditions
      title: Create a Segment request
      type: object
    contactdb_segments_conditions:
      properties:
        and_or:
          enum:
            - and
            - or
            - ''
          type: string
        field:
          type: string
        operator:
          enum:
            - eq
            - ne
            - lt
            - gt
            - contains
          type: string
        value:
          type: string
      required:
        - field
        - value
        - operator
      title: 'ContactDB: Segments: Conditions'
      type: object
    contactdb_segments_with_id:
      allOf:
        - properties:
            id:
              description: The ID of the segment.
              type: number
          required:
            - id
          type: object
        - $ref: '#/components/schemas/contactdb_segments'
      title: 'ContactDB:: Segments with ID'
    contacts:
      properties:
        address:
          type: string
        address2:
          type: object
        city:
          type: string
        company:
          type: string
        country:
          type: string
        email:
          type: string
        first_name:
          type: string
        last_name:
          type: string
        phone:
          type: string
        state:
          type: string
        zip:
          type: string
      title: Contacts
      type: object
    create-integration-request:
      properties:
        completed_integration:
          description: Indicates if the integration is complete.
          type: boolean
        enabled:
          description: Indicates if the integration is enabled.
          type: boolean
        entity_id:
          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.
          type: string
        name:
          description:
            The name of your integration. This name can be anything that makes
            sense for your organization (eg. Twilio SendGrid)
          type: string
        signin_url:
          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.
          type: string
        signout_url:
          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.
          type: string
      required:
        - name
        - enabled
        - signin_url
        - signout_url
        - entity_id
      title: Create Integration Request
      type: object
    credentials:
      example:
        address: 1234 example street
        address2: null
        city: Denver
        company: Company name
        country: US
        email: example@example.com
        first_name: Example
        last_name: User
        phone: (555) 555-5555
        state: CO
        zip: '55555'
      properties:
        permissions:
          properties:
            api:
              type: string
            mail:
              type: string
            web:
              type: string
          type: object
        username:
          type: string
      title: Credentials
      type: object
    custom-fields-by-id:
      example:
        e2: Coffee is a beverage that puts one to sleep when not drank.
        w1: '2002-10-02T15:00:00Z'
        w33: 9.5
      title: custom-fields-by-id
      type: object
    custom-fields-by-name:
      example:
        birthday: '2002-10-02T15:00:00Z'
        favoriteQuote:
          Coffee is a beverage that puts one to sleep when not drank.
        shoe_size: 9.5
      title: custom-fields-by-name
      type: object
    custom_field_definitions_response:
      example:
        field_type: Date
        id: a1_D
        name: custom_field_name
      properties:
        field_type:
          enum:
            - Text
            - Number
            - Date
          type: string
        id:
          type: string
        name:
          maxLength: 100
          minLength: 1
          type: string
      required:
        - id
        - name
        - field_type
      title: custom_field_definitions_response
      type: object
    design-common-fields:
      allOf:
        - $ref: '#/components/schemas/design-duplicate-input'
        - properties:
            categories:
              description: The list of categories applied to the design
              items:
                maxLength: 255
                type: string
              maxItems: 10
              type: array
              uniqueItems: true
            generate_plain_content:
              default: true
              description:
                If true, plain_content is always generated from html_content. If
                false, plain_content is not altered.
              type: boolean
            subject:
              description: Subject of the Design.
              maxLength: 5000
              type: string
          type: object
      title: Design Common Fields
    design-duplicate-input:
      example:
        editor: design
        name: Ahoy, Cake or Pie Cafe!
      properties:
        editor:
          description: The editor used in the UI.
          enum:
            - code
            - design
          type: string
        name:
          default: 'Duplicate: <original design name>'
          description: The name of the new design.
          type: string
      title: Design Duplicate Design Input
      type: object
    design-input:
      allOf:
        - $ref: '#/components/schemas/design-duplicate-input'
        - $ref: '#/components/schemas/design-common-fields'
        - properties:
            html_content:
              description: The HTML content of the Design.
              maxLength: 1048576
              type: string
            plain_content:
              default: <generated from html_content if left empty>
              description: Plain text content of the Design.
              maxLength: 1048576
              type: string
          required:
            - html_content
          type: object
      example:
        editor: design
        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>"
        name: Ahoy, World!
        plain_content: 'Ahoy, World!


          {{Sender_Name}}


          {{Sender_Address}} , {{Sender_City}} , {{Sender_State}} {{Sender_Zip}}


          Unsubscribe ( {{{unsubscribe}}} ) - Unsubscribe Preferences (
          {{{unsubscribe_preferences}}} )'
        subject: Getting Started
      title: Design Input
    design-output:
      allOf:
        - $ref: '#/components/schemas/design-output-summary'
        - $ref: '#/components/schemas/design-input'
      title: Design Output
    design-output-summary:
      allOf:
        - properties:
            created_at:
              description: Datetime that Design was created.
              format: ISO 8601 date-time
              type: string
            id:
              description: ID of the Design.
              format: uuid
              type: string
            thumbnail_url:
              description: A Thumbnail preview of the template's html content.
              type: string
            updated_at:
              description: Datetime that Design was last updated.
              format: ISO 8601 date-time
              type: string
          type: object
        - $ref: '#/components/schemas/design-duplicate-input'
        - $ref: '#/components/schemas/design-common-fields'
      example:
        _metadata:
          count: 3
          self: https://api.sendgrid.com/v3/designs?page_token=vHdvHCg0w1F-TmWJcPNpTEnFY2aPEmRBHONwOgZ6TgJbX2_I
        result:
          - categories:
              - welcome
              - new customer
            created_at: '2021-04-09T17:29:46Z'
            editor: code
            generate_plain_content: true
            id: 3247eaea-c912-42a3-b0bc-60bdaf210396
            name: Welcome Email
            subject: Welcom to the Cake or Pie Cafe
            thumbnail_url: //us-east-2-production-thumbnail-bucket.s3.amazonaws.com/llny8o5b3m636z92p7hbjnmq1jvpka39p370jwtin2s1wxv7x1sgm0y5fk518d0s.png
            updated_at: '2021-04-09T17:29:55Z'
          - categories:
              - promo
              - coupon
            created_at: '2021-04-09T17:29:21Z'
            editor: design
            generate_plain_content: true
            id: 02dfd792-f31f-439a-a79e-5c47fbcfdbac
            name: Monthly Promo
            subject: Free Dozen Cupcakes
            thumbnail_url: //us-east-2-production-thumbnail-bucket.s3.amazonaws.com/hfyxahd7ues2ajuoeoqq2xe6ibdasl1q89ox0y9ncya2ftpoicssmtf9ddus4c39.png
            updated_at: '2021-04-09T17:29:42Z'
          - categories: []
            created_at: '2020-10-09T17:33:46Z'
            editor: design
            generate_plain_content: true
            id: e54be823-19ef-4c6f-8b60-efd7514f492d
            name: 'Duplicate: Ingrid & Anders'
            subject: Welcome to Ingrid & Anders!
            thumbnail_url: //us-east-2-production-thumbnail-bucket.s3.amazonaws.com/12kni9gjpyb9uxmwr9vk7unycjr70u95zoyhe9sg2zounul2zg7dih1s20k13q2z.png
            updated_at: '2021-04-07T19:57:52Z'
      title: Design Output - Summary
    domain-authentication-200-response:
      example:
        - automatic_security: true
          custom_spf: true
          default: true
          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
          domain: example.com
          id: 1
          ips:
            - 192.168.1.1
            - 192.168.1.2
          legacy: false
          subdomain: mail
          user_id: 7
          username: jane@example.com
          valid: true
        - automatic_security: true
          custom_spf: false
          default: true
          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
          domain: example2.com
          id: 2
          ips: []
          legacy: false
          subdomain: new
          user_id: 8
          username: john@example2.com
          valid: false
      items:
        allOf:
          - $ref: '#/components/schemas/authentication_domain'
          - properties:
              last_validation_attempt_at:
                description:
                  A Unix epoch timestamp representing the last time of a
                  validation attempt.
                type: integer
              subusers:
                items:
                  properties:
                    user_id:
                      description:
                        The ID of the subuser that this authenticated domain
                        will be associated with.
                      type: integer
                    username:
                      description:
                        The username of the subuser that this authenticated
                        domain is associated with.
                      type: string
                  type: object
                type: array
            type: object
      title: Domain Authentication 200 Response
      type: array
    domain_authentication_domain_spf:
      properties:
        automatic_security:
          description:
            Indicates if this authenticated domain uses automated security.
          type: boolean
        custom_spf:
          description: Indicates if this authenticated domain uses custom SPF.
          type: boolean
        default:
          description: Indicates if this is the default domain.
          type: boolean
        dns:
          description: The DNS records for this authenticated domain.
          properties:
            dkim:
              description:
                The DKIM record for messages sent using this authenticated
                domain.
              properties:
                data:
                  description: The DKIM record.
                  type: string
                host:
                  description: The DNS labels for the DKIM signature.
                  type: string
                type:
                  description: The type of data in the DKIM record.
                  type: string
                valid:
                  description: Indicates if the DKIM record is valid.
                  type: boolean
              required:
                - host
                - type
                - data
                - valid
              type: object
            domain_spf:
              description: The SPF record for the root domain.
              properties:
                data:
                  description: The SPF record.
                  type: string
                host:
                  description:
                    The root domain that this SPF record will be used to
                    authenticate.
                  type: string
                type:
                  description: The type of data in the SPF record.
                  type: string
                valid:
                  description: Indicates if the SPF record is valid.
                  type: boolean
              required:
                - host
                - type
                - data
                - valid
              type: object
            mail_server:
              description:
                Designates which mail server is responsible for accepting
                messages from a domain.
              properties:
                data:
                  description:
                    The mail server responsible for accepting messages from the
                    sending domain.
                  type: string
                host:
                  description: The domain sending the messages.
                  type: string
                type:
                  description: They type of DNS record.
                  type: string
                valid:
                  description: Indicates if this is a valid DNS record.
                  type: boolean
              required:
                - host
                - type
                - data
                - valid
              type: object
            subdomain_spf:
              description:
                The SPF record for the subdomain used to create this
                authenticated domain.
              properties:
                data:
                  description: The SPF record.
                  type: string
                host:
                  description:
                    The domain that this SPF record will be used to
                    authenticate.
                  type: string
                type:
                  description: The type of data in the SPF record.
                  type: string
                valid:
                  description: Indicates if this is a valid SPF record.
                  type: boolean
              required:
                - host
                - type
                - data
                - valid
              type: object
          required:
            - mail_server
            - subdomain_spf
            - domain_spf
            - dkim
          type: object
        domain:
          description: The domain authenticated.
          type: string
        id:
          description: The ID of the authenticated domain.
          type: integer
        ips:
          description:
            The IP addresses that are included in the SPF record for this
            authenticated domain.
          items: {}
          type: array
        legacy:
          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.
          type: boolean
        subdomain:
          description:
            The subdomain that was used to create this authenticated domain.
          type: string
        user_id:
          description:
            The user_id of the account that this authenticated domain is
            associated with.
          type: integer
        username:
          description:
            The username of the account that this authenticated domain is
            associated with.
          type: string
        valid:
          description: Indicates if this is a valid authenticated domain .
          type: boolean
      required:
        - id
        - domain
        - username
        - user_id
        - ips
        - custom_spf
        - default
        - legacy
        - automatic_security
        - valid
        - dns
      title: Domain Authentication
      type: object
    email-activity-response-common-fields:
      properties:
        from_email:
          default: ''
          description:
            The 'From' email address used to deliver the message. This address
            should be a verified sender in your Twilio SendGrid account.
          format: email
          type: string
        msg_id:
          description:
            A unique ID assigned to the message. This ID can be used to retrieve
            activity data for the specific message.
          type: string
        status:
          description: The message's status.
          enum:
            - processed
            - delivered
            - not delivered
          type: string
        subject:
          description: The email's subject line.
          type: string
        to_email:
          description: The intended recipient's email address.
          format: email
          type: string
      title: Email Activity Response Common Fields
      type: object
    enforced-tls-request-response:
      example:
        require_tls: true
        require_valid_cert: true
      properties:
        require_tls:
          description:
            'Indicates if you want to require your recipients to support TLS. '
          type: boolean
        require_valid_cert:
          description:
            Indicates if you want to require your recipients to have a valid
            certificate.
          type: boolean
      title: Enforced TLS Request Response
      type: object
    error:
      properties:
        error_id:
          type: string
        field:
          type: string
        message:
          type: string
        parameter:
          type: string
      required:
        - message
      title: error
      type: object
    errors:
      description:
        If the request is incorrect, an array of errors will be returned.
      properties:
        errors:
          items:
            properties:
              field:
                nullable: true
                type: string
              message:
                description:
                  A description of what is wrong with the field passed in the
                  request.
                nullable: true
                type: string
              parameter:
                description:
                  The parameter in the request body that is incorrect.
                type: string
            required:
              - parameter
              - message
            type: object
          type: array
      required:
        - errors
      title: Errors
      type: object
    errors-seg-v2:
      description:
        If the request is incorrect, an array of errors will be returned.
      properties:
        errors:
          items:
            properties:
              field:
                description: the field in the request body that is incorrect
                type: string
              message:
                description:
                  a description of what is specifically wrong with the field
                  passed in the request
                type: string
            required:
              - field
              - message
            type: object
          type: array
      required:
        - errors
      title: errors-seg
      type: object
    event-webhook-response:
      properties:
        bounce:
          description: Receiving server could not or would not accept message.
          type: boolean
        click:
          description:
            Recipient clicked on a link within the message. You need to enable
            Click Tracking for getting this type of event.
          type: boolean
        deferred:
          description: Recipient's email server temporarily rejected message.
          type: boolean
        delivered:
          description:
            Message has been successfully delivered to the receiving server.
          type: boolean
        dropped:
          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'
          type: boolean
        enabled:
          description: Indicates if the event webhook is enabled.
          type: boolean
        group_resubscribe:
          description:
            Recipient resubscribes to specific group by updating preferences.
            You need to enable Subscription Tracking for getting this type of
            event.
          type: boolean
        group_unsubscribe:
          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.
          type: boolean
        oauth_client_id:
          description:
            The client ID Twilio SendGrid sends to your OAuth server or service
            provider to generate an OAuth access token.
          type: string
        oauth_token_url:
          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.
          type: string
        open:
          description:
            Recipient has opened the HTML message. You need to enable Open
            Tracking for getting this type of event.
          type: boolean
        processed:
          description: Message has been received and is ready to be delivered.
          type: boolean
        spam_report:
          description: Recipient marked a message as spam.
          type: boolean
        unsubscribe:
          description:
            Recipient clicked on message's subscription management link. You
            need to enable Subscription Tracking for getting this type of event.
          type: boolean
        url:
          description: The URL that you want the event webhook to POST to.
          type: string
      required:
        - enabled
        - url
        - group_resubscribe
        - delivered
        - group_unsubscribe
        - spam_report
        - bounce
        - deferred
        - unsubscribe
        - processed
        - open
        - click
        - dropped
      title: 'Webhooks: Event Webhook Response'
      type: object
    event-webhook-update-oauth-request:
      properties:
        bounce:
          description: Receiving server could not or would not accept message.
          type: boolean
        click:
          description:
            Recipient clicked on a link within the message. You need to enable
            Click Tracking for getting this type of event.
          type: boolean
        deferred:
          description: Recipient's email server temporarily rejected message.
          type: boolean
        delivered:
          description:
            Message has been successfully delivered to the receiving server.
          type: boolean
        dropped:
          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'
          type: boolean
        enabled:
          description: Indicates if the event webhook is enabled.
          type: boolean
        group_resubscribe:
          description:
            Recipient resubscribes to specific group by updating preferences.
            You need to enable Subscription Tracking for getting this type of
            event.
          type: boolean
        group_unsubscribe:
          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.
          type: boolean
        oauth_client_id:
          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.
          type: string
        oauth_client_secret:
          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.
          type: string
        oauth_token_url:
          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.
          type: string
        open:
          description:
            Recipient has opened the HTML message. You need to enable Open
            Tracking for getting this type of event.
          type: boolean
        processed:
          description: Message has been received and is ready to be delivered.
          type: boolean
        spam_report:
          description: Recipient marked a message as spam.
          type: boolean
        unsubscribe:
          description:
            Recipient clicked on message's subscription management link. You
            need to enable Subscription Tracking for getting this type of event.
          type: boolean
        url:
          description: The URL that you want the event webhook to POST to.
          type: string
      required:
        - enabled
        - url
        - group_resubscribe
        - delivered
        - group_unsubscribe
        - spam_report
        - bounce
        - deferred
        - unsubscribe
        - processed
        - open
        - click
        - dropped
      title: 'Webhooks: Event Webhook Update with OAuth Request'
      type: object
    from_email_object:
      example:
        email: jane_doe@example.com
        name: Jane Doe
      properties:
        email:
          description:
            The 'From' email address used to deliver the message. This address
            should be a verified sender in your Twilio SendGrid account.
          format: email
          type: string
        name:
          description:
            A name or title associated with the sending email address.
          type: string
      required:
        - email
      title: From Email Object
      type: object
    full-segment:
      allOf:
        - $ref: '#/components/schemas/segment_summary'
        - properties:
            contacts_sample:
              items:
                $ref: '#/components/schemas/contact_response'
              type: array
            query_json:
              description: AST representation of the query DSL
              type: object
          required:
            - contacts_sample
          type: object
        - $ref: '#/components/schemas/segment_write_v2'
      example:
        contacts_count: 9266921
        contacts_sample:
          - 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
            city: "ȎţȸÛ\tč\vCŁ"
            contact_id: c1183ada-b784-49ac-9b1f-50e73578a6dc
            country: do reprehenderit qui
            custom_fields:
              custom_field_name1: esse
              custom_field_name2: in consectetur ut aliqua sint
            first_name: est
            last_name: eiusmod in laboris velit cupidatat
            postal_code: 30296612
            primary_email: ft88@d.izxx
            state_province_region: ut proident
        created_at: '2085-08-08T21:07:05.692Z'
        id: 58567a46-305e-48d1-b4f8-a006c906920e
        name: culpa
        next_sample_update: ''
        parent_list_id: 2357714d-3d82-4c80-826c-b44a4147f81c
        query_dsl: cillum eiusmod
        sample_updated_at: '3407-09-25T04:25:02.140Z'
        updated_at: '4431-05-07T22:23:22.352Z'
      title: full_segment
    global_empty_request:
      nullable: true
      title: 'Global: Request Empty Body'
    global_error_response_schema:
      example:
        errors:
          - field: field_name
            message: error message
      properties:
        errors:
          items:
            properties:
              field:
                description: the field that generated the error
                nullable: true
                type: string
              help:
                description: helper text or docs for troubleshooting
                type: object
              message:
                description: the error message
                type: string
            required:
              - message
            type: object
          type: array
        id:
          type: string
      title: Global Error Response Schema
      type: object
    global_id:
      title: 'Global: ID'
      type: integer
    google_analytics_settings:
      example:
        enabled: true
        utm_campaign: website
        utm_content: ''
        utm_medium: email
        utm_source: sendgrid.com
        utm_term: ''
      properties:
        enabled:
          description: Indicates if Google Analytics is enabled.
          type: boolean
        utm_campaign:
          description: The name of the campaign.
          type: string
        utm_content:
          description: Used to differentiate ads
          type: string
        utm_medium:
          description: Name of the marketing medium (e.g. "Email").
          type: string
        utm_source:
          description: 'Name of the referrer source. '
          type: string
        utm_term:
          description: Any paid keywords.
          type: string
      title: 'Settings: Google Analytics'
      type: object
    invalid-email:
      example:
        created: 1620141015
        email: invalid@example.com
        reason: Mail domain mentioned in email address is unknown
      properties:
        created:
          description:
            A Unix timestamp indicating when the email address was added to the
            invalid emails list.
          type: integer
        email:
          description: The email address that was marked as invalid.
          format: email
          type: string
        reason:
          description: The reason that the email address was marked as invalid.
          type: string
      title: Invalid Email
      type: object
    ip-access-response:
      example:
        result:
          - created_at: 1441824715
            id: 1
            ip: 192.168.1.1/32
            updated_at: 1441824715
          - created_at: 1441824715
            id: 2
            ip: 192.0.0.0/8
            updated_at: 1441824715
          - created_at: 1441824715
            id: 3
            ip: 192.168.1.3/32
            updated_at: 1441824715
      properties:
        result:
          description: An array listing all of your allowed IPs.
          items:
            properties:
              created_at:
                description:
                  A Unix timestamp indicating when the IP was added to the allow
                  list.
                type: integer
              id:
                description: The ID of the allowed IP.
                type: integer
              ip:
                description: The allowed IP.
                type: string
              updated_at:
                description:
                  A Unix timestamp indicating when the IPs allow status was most
                  recently updated.
                type: integer
            type: object
          type: array
      title: IP Access Response
      type: object
    ip_pool:
      properties:
        name:
          description: The name of the IP pool.
          maxLength: 64
          type: string
      required:
        - name
      title: 'IP Pools: Pool'
      type: object
    ip_pool_response:
      example:
        name: sunt sint enim
      properties:
        name:
          description: The name of the IP pool.
          type: string
      title: 'IP Pools: Pool Resp'
      type: object
    ip_warmup_response:
      example:
        - ip: 0.0.0.0
          start_date: 1409616000
      items:
        properties:
          ip:
            description: The IP address.
            type: string
          start_date:
            description:
              A Unix timestamp indicating when the IP address entered warmup
              mode.
            type: integer
        required:
          - ip
          - start_date
        type: object
      title: 'IP Warmup: IP'
      type: array
    link:
      properties:
        href:
          type: string
        rel:
          type: string
      title: Link
      type: object
    link-tracking-metadata:
      properties:
        count:
          description:
            The number of items in the entire list, i.e., across all pages.
          type: number
        next:
          description:
            The URL of the next page of results. If this field isn't present,
            you're at the end of the list.
          format: uri
          type: string
        prev:
          description:
            The URL of the previous page of results. If this field isn't
            present, you're at the start of the list.
          format: uri
          type: string
        self:
          description: The URL of the current page of results.
          format: uri
          type: string
      title: link tracking metadata
      type: object
    link_branding_200_response:
      properties:
        default:
          description: Indicates if this is the default link branding.
          enum:
            - true
            - false
          type: boolean
        dns:
          description: The DNS records generated for this link branding.
          properties:
            domain_cname:
              description:
                The DNS record generated to point to your link branding
                subdomain.
              properties:
                data:
                  description: The domain that the DNS record points to.
                  type: string
                host:
                  description:
                    The domain that this link branding will use for the links in
                    your email.
                  type: string
                type:
                  description: The type of DNS record that was generated.
                  enum:
                    - cname
                    - txt
                    - mx
                  type: string
                valid:
                  description: Indicates if the DNS record is valid.
                  enum:
                    - true
                    - false
                  type: boolean
              required:
                - valid
                - type
                - host
                - data
              type: object
            owner_cname:
              description:
                The DNS record generated to verify who created the link
                branding.
              properties:
                data:
                  description: The domain that the DNS record points to.
                  type: string
                host:
                  description:
                    Used to verify the link branding. The subdomain of this
                    domain is the ID of the user who created the link branding.
                  type: string
                type:
                  description: The type of DNS record generated.
                  enum:
                    - cname
                    - txt
                    - mx
                  type: string
                valid:
                  description: Indicates if the DNS record is valid.
                  enum:
                    - true
                    - false
                  type: boolean
              required:
                - valid
                - host
                - data
              type: object
          required:
            - domain_cname
          type: object
        domain:
          description: The root domain of the branded link.
          type: string
        id:
          description: The ID of the branded link.
          type: integer
        legacy:
          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.
          enum:
            - true
            - false
          type: boolean
        subdomain:
          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.
          type: string
        user_id:
          description:
            The ID of the user that this link branding is associated with.
          type: integer
        username:
          description:
            The username of the account that this link branding is associated
            with.
          type: string
        valid:
          description: Indicates if this link branding is valid.
          enum:
            - true
            - false
          type: boolean
      required:
        - id
        - domain
        - username
        - user_id
        - default
        - valid
        - legacy
        - dns
      title: Link Branding 200 Response
      type: object
    list:
      properties:
        _metadata:
          $ref: '#/components/schemas/selfmetadata'
        contact_count:
          description: The number of contacts currently stored on the list.
          type: integer
        id:
          description: The generated ID for your list.
          maxLength: 36
          minLength: 36
          type: string
        name:
          description: The name you gave your list.
          type: string
      title: list
      type: object
    mail_batch_id:
      example:
        batch_id: HkJ5yLYULb7Rj8GKSx7u025ouWVlMgAi
      properties:
        batch_id:
          pattern: ^[a-zA-Z0-9\-\_]
          type: string
      required:
        - batch_id
      title: Mail Batch ID
      type: object
    mail_settings_address_whitelabel:
      example:
        enabled: true
        list:
          - email1@example.com
          - example.com
      properties:
        enabled:
          description:
            'Indicates if you have an email address whitelist enabled. '
          type: boolean
        list:
          description: All email addresses that are currently on the whitelist.
          items:
            type: string
          type: array
      title: 'Mail Settings: Address Whitelabel'
      type: object
    mail_settings_bounce_purge:
      example:
        enabled: false
        hard_bounces: null
        soft_bounces: 1234
      properties:
        enabled:
          description: Indicates if the bounce purge mail setting is enabled.
          type: boolean
        hard_bounces:
          description:
            The number of days after which SendGrid will purge all contacts from
            your hard bounces suppression lists.
          nullable: true
          type: integer
        soft_bounces:
          description:
            The number of days after which SendGrid will purge all contacts from
            your soft bounces suppression lists.
          nullable: true
          type: integer
      title: 'Mail Settings: Bounce Purge'
      type: object
    mail_settings_footer:
      example:
        enabled: true
        html_content: Example HTML content
        plain_content: Example plain content
      properties:
        enabled:
          description:
            Indicates if the Footer mail setting is currently enabled.
          type: boolean
        html_content:
          description: The custom HTML content of your email footer.
          type: string
        plain_content:
          description: The plain text content of your email footer.
          type: string
      title: 'Mail Settings: Footer'
      type: object
    mail_settings_forward_bounce:
      example:
        email: null
        enabled: false
      properties:
        email:
          description:
            The email address that you would like your bounce reports forwarded
            to.
          nullable: true
          type: string
        enabled:
          description:
            Indicates if the bounce forwarding mail setting is enabled.
          type: boolean
      title: 'Mail Settings: Forward Bounce'
      type: object
    mail_settings_forward_spam:
      example:
        email: ''
        enabled: true
      properties:
        email:
          description:
            The email address where you would like the spam reports to be
            forwarded.
          type: string
        enabled:
          description: Indicates if the Forward Spam setting is enabled.
          type: boolean
      title: 'Mail Settings: Forward Spam'
      type: object
    mail_settings_patch:
      example:
        email: email@example.com
        enabled: true
      properties:
        email:
          description: The email address of the recipient.
          type: string
        enabled:
          description: Indicates if the mail setting is enabled.
          type: boolean
      title: 'Mail Settings: Patch'
      type: object
    mail_settings_template:
      example:
        enabled: false
        html_content: '<p><% body %>Example</p>

          '
      properties:
        enabled:
          description:
            Indicates if the legacy email template setting is enabled.
          type: boolean
        html_content:
          description:
            The HTML content that you want to use for your legacy email
            template.
          type: string
      title: 'Mail Settings: Template'
      type: object
    mako_event:
      example:
        bounce_type: blocked
        event_name: bounced
        http_user_agent: in tempor ex dolore est
        mx_server: quis proident
        processed: '2017-10-13T18:56:21Z'
        reason: some reason
        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
      properties:
        attempt_num:
          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. '
          maximum: 10
          minimum: 1
          type: integer
        bounce_type:
          description: Use to distinguish between types of bounces
          enum:
            - bounced
            - blocked
            - expired
          type: string
        event_name:
          description: Name of event
          enum:
            - bounced
            - opened
            - clicked
            - processed
            - dropped
            - delivered
            - deferred
            - spam_report
            - unsubscribe
            - group_unsubscribe
            - group_resubscribe
          type: string
        http_user_agent:
          description: Client recipient used to click or open message
          type: string
        mx_server:
          description: For example mx.gmail.com
          type: string
        processed:
          description: Date of when event occurred
          type: string
        reason:
          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
          maxLength: 1024
          type: string
        url:
          description:
            Used with "clicked" event to indicate which url the user clicked.
          pattern: ^((http[s]?|ftp):\/)?\/?([^:\/\s]+)((\/\w+)*\/)([\w\-\.]+[^#?\s]+)(.*)?(#[\w\-]+)?$
          type: string
      required:
        - event_name
        - processed
        - url
        - bounce_type
        - http_user_agent
        - mx_server
      title: Event
      type: object
    message:
      example:
        api_key_id: sdfsdfsdf123
        asm_group_id: 11376349
        categories:
          - hi
          - bye
        events:
          - event_name: bounced
            processed: 1492453589
            server_response: some error message
        from_email: test@test.com
        msg_id: in aliquip id aliqua
        originating_ip: 2.3.4.5
        outbound_ip: 1.2.3.4
        outbound_ip_type: dedicated
        status: not delivered
        subject: est incididunt adipisicing pariatur
        teammate: ''
        template_id: 123e4567-e89b-12d3-a456-426655440000
        to_email: send@test.com
        unique_args: "{'key': 'value'}"
      properties:
        api_key_id:
          maxLength: 50
          minLength: 3
          pattern: ^[A-Za-z0-9]+
          type: string
        asm_group_id:
          minimum: 1
          type: integer
        categories:
          description: Categories users associated to the message
          items:
            type: string
          type: array
        events:
          description: List of events related to email message
          items:
            example:
              bounce_type: blocked
              event_name: bounced
              http_user_agent: in tempor ex dolore est
              mx_server: quis proident
              processed: '2017-10-13T18:56:21Z'
              reason: some reason
              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
            properties:
              attempt_num:
                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. '
                maximum: 10
                minimum: 1
                type: integer
              bounce_type:
                description: Use to distinguish between types of bounces
                enum:
                  - bounced
                  - blocked
                  - expired
                type: string
              event_name:
                description: Name of event
                enum:
                  - bounced
                  - opened
                  - clicked
                  - processed
                  - dropped
                  - delivered
                  - deferred
                  - spam_report
                  - unsubscribe
                  - group_unsubscribe
                  - group_resubscribe
                type: string
              http_user_agent:
                description: Client recipient used to click or open message
                type: string
              mx_server:
                description: For example mx.gmail.com
                type: string
              processed:
                description: Date of when event occurred
                type: string
              reason:
                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
                maxLength: 1024
                type: string
              url:
                description:
                  Used with "clicked" event to indicate which url the user
                  clicked.
                pattern: ^((http[s]?|ftp):\/)?\/?([^:\/\s]+)((\/\w+)*\/)([\w\-\.]+[^#?\s]+)(.*)?(#[\w\-]+)?$
                type: string
            required:
              - event_name
              - processed
              - url
              - bounce_type
              - http_user_agent
              - mx_server
            title: Event
            type: object
          type: array
        from_email:
          pattern: \b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}\b
          type: string
        msg_id:
          maxLength: 50
          minLength: 5
          pattern: ^[A-Za-z0-9]+
          type: string
        originating_ip:
          description: This is the IP of the user who sent the message.
          format: ipv4
          type: string
        outbound_ip:
          description:
            IP used to send to the remote MTA. Used by UI to display IP in
            detailed view
          format: ipv4
          type: string
        outbound_ip_type:
          description: Whether or not the outbound IP is dedicated vs shared
          enum:
            - dedicated
            - shared
          type: string
        status:
          description: Quick summary of the status of a message
          enum:
            - processed
            - not delivered
            - delivered
          type: string
        subject:
          maxLength: 255
          minLength: 3
          type: string
        teammate:
          description: Teammate's username
          maxLength: 64
          minLength: 0
          pattern: ^$|^[A-Za-z0-9]+
          type: string
        template_id:
          format: uuid
          type: string
        to_email:
          pattern: \b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}\b
          type: string
        unique_args:
          default: 'Null'
          description: JSON hash of arbitrary key-value pairs
          type: string
      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
      title: Message
      type: object
    metadata:
      properties:
        count:
          description:
            The number of items in the entire list, i.e., across all pages.
          type: number
        next:
          description:
            The URL of the next page of results. If this field isn't present,
            you're at the end of the list.
          format: uri
          type: string
        prev:
          description:
            The URL of the previous page of results. If this field isn't
            present, you're at the start of the list.
          format: uri
          type: string
        self:
          description: The URL of the current page of results.
          format: uri
          type: string
      title: metadata
      type: object
    metrics:
      properties:
        bounce_drops:
          type: integer
        bounces:
          type: integer
        clicks:
          type: integer
        delivered:
          type: integer
        invalid_emails:
          type: integer
        opens:
          type: integer
        requests:
          type: integer
        spam_report_drops:
          type: integer
        spam_reports:
          type: integer
        unique_clicks:
          type: integer
        unique_opens:
          type: integer
        unsubscribes:
          type: integer
      required:
        - bounce_drops
        - bounces
        - clicks
        - delivered
        - invalid_emails
        - opens
        - requests
        - spam_report_drops
        - spam_reports
        - unique_clicks
        - unique_opens
        - unsubscribes
      title: metrics
      type: object
    monitor:
      example:
        email: example@example.com
        frequency: 50000
      properties:
        email:
          description:
            The email address to which Sendgrid should send emails for
            monitoring.
          format: email
          type: string
        frequency:
          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.
          type: number
      required:
        - email
        - frequency
      title: Create monitor settings request
      type: object
    parse-setting:
      example:
        hostname: myhostname.com
        send_raw: true
        spam_check: false
        url: http://email.myhostname.com
      properties:
        hostname:
          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`.
          type: string
        send_raw:
          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.
          type: boolean
        spam_check:
          description:
            Indicates if you would like SendGrid to check the content parsed
            from your emails for spam before POSTing them to your domain.
          type: boolean
        url:
          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.
          type: string
      title: Parse Setting
      type: object
    partner_settings_new_relic:
      properties:
        enable_subuser_statistics:
          description:
            Indicates if your subuser statistics will be sent to your New Relic
            Dashboard.
          type: boolean
        enabled:
          description: 'Indicates if this setting is enabled. '
          type: boolean
        license_key:
          description: The license key provided with your New Relic account.
          type: string
      required:
        - enabled
        - license_key
      title: 'Partner Settings: New Relic'
      type: object
    reply_to_email_object:
      example:
        email: jane_doe@example.com
        name: Jane Doe
      properties:
        email:
          description:
            The email address where any replies or bounces will be returned.
          format: email
          type: string
        name:
          description:
            A name or title associated with the `reply_to` email address.
          type: string
      required:
        - email
      title: Reply_to Email Object
      type: object
    reserved_field_definitions_response:
      example:
        - field_type: Text
          id: _rf20_T
          name: automation_id
          read_only: true
      items:
        properties:
          field_type:
            enum:
              - Text
              - Number
              - Date
            type: string
          name:
            maxLength: 100
            minLength: 1
            type: string
          read_only:
            default: false
            description:
              When `true` this means API consumers are unable to set the value
              of this field on contacts.
            type: boolean
        type: object
      required:
        - name
        - field_type
      title: reserved_field_definitions_response
      type: array
    reverse_dns:
      example:
        a_record:
          data: 192.168.1.1
          host: o1.email.example.com
          type: a
          valid: true
        domain: example.com
        id: 1
        ip: 192.168.1.1
        legacy: false
        rdns: o1.email.example.com
        subdomain: email
        users:
          - user_id: 7
            username: john@example.com
          - user_id: 8
            username: jane@example.com
        valid: true
      properties:
        a_record:
          properties:
            data:
              description: The IP address being set up with Reverse DNS.
              type: string
            host:
              description:
                This is the web address that will be mapped to the IP address.
              type: string
            type:
              description: The type of DNS record.
              type: string
            valid:
              description: Indicates if the a_record is valid.
              type: boolean
          required:
            - valid
            - type
            - host
            - data
          type: object
        domain:
          description: The root, or sending, domain.
          type: string
        id:
          description: The ID of the Reverse DNS.
          type: integer
        ip:
          description: The IP address that this Reverse DNS was created for.
          type: string
        last_validation_attempt_at:
          description:
            A Unix epoch timestamp representing the last time of a validation
            attempt.
          type: integer
        legacy:
          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.
          type: boolean
        rdns:
          description:
            The reverse DNS record for the IP address. This points to the
            Reverse DNS subdomain.
          type: string
        subdomain:
          description:
            The subdomain created for this reverse DNS. This is where the rDNS
            record points.
          type: string
        users:
          description: The users who are able to send mail from the IP address.
          items:
            properties:
              user_id:
                description:
                  The ID of a user who can send mail from the IP address.
                type: integer
              username:
                description:
                  The username of a user who can send mail from the IP address.
                type: string
            required:
              - username
              - user_id
            type: object
          type: array
        valid:
          description: Indicates if this is a valid Reverse DNS.
          type: boolean
      required:
        - id
        - ip
        - rdns
        - users
        - domain
        - valid
        - legacy
        - a_record
      title: Reverse DNS
      type: object
    segment_query_json:
      properties:
        contacts:
          properties:
            l:
              properties:
                l:
                  properties:
                    l:
                      properties:
                        t:
                          type: string
                        v:
                          type: string
                      type: object
                    op:
                      type: string
                    r:
                      properties:
                        t:
                          type: string
                        v:
                          type: string
                      type: object
                  type: object
                op:
                  type: string
                r:
                  properties:
                    l:
                      properties:
                        args:
                          items:
                            properties:
                              t:
                                type: string
                              v:
                                type: string
                            type: object
                          type: array
                        t:
                          type: string
                        v:
                          type: string
                      type: object
                    op:
                      type: string
                    r:
                      properties:
                        t:
                          type: string
                        v:
                          type: string
                      type: object
                  type: object
              type: object
            op:
              type: string
            r:
              properties:
                l:
                  properties:
                    t:
                      type: string
                    v:
                      type: string
                  type: object
                op:
                  type: string
                r:
                  properties:
                    t:
                      type: string
                    v:
                      items:
                        type: string
                      type: array
                  type: object
              type: object
          type: object
      title: segment_query_json
      type: object
    segment_response:
      properties:
        contacts_count:
          description: Total number of contacts present in the segment
          type: integer
        contacts_sample:
          description: A subset of all contacts that are in this segment
          items:
            $ref: '#/components/schemas/contact_response'
          type: array
        created_at:
          description: ISO8601 timestamp of when the object was created
          type: string
        id:
          description: ID assigned to the segment when created.
          format: uuid
          maxLength: 36
          minLength: 36
          type: string
        name:
          description: Name of the segment.
          maxLength: 100
          minLength: 1
          type: string
        next_sample_update:
          description:
            ISO8601 timestamp of when the samples will be next updated
          type: string
        parent_list_ids:
          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
          items:
            type: string
          type: array
          uniqueItems: true
        query_dsl:
          description:
            SQL query which will filter contacts based on the conditions
            provided
          type: string
        query_version:
          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.
          type: string
        sample_updated_at:
          description: ISO8601 timestamp of when the samples were last updated
          type: string
        status:
          $ref: '#/components/schemas/segment_status_response'
        updated_at:
          description: ISO8601 timestamp of when the object was last updated
          type: string
      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
      title: segment_response
      type: object
    segment_status_response:
      description:
        Segment status indicates whether the segment's contacts will be updated
        periodically
      properties:
        error_message:
          description:
            Describes any errors that were encountered during query validation
          type: string
        query_validation:
          description: Status of query validation. PENDING, VALID, or INVALID
          type: string
      required:
        - query_validation
      title: segment_status_response
      type: object
    segment_summary:
      properties:
        contacts_count:
          type: integer
        created_at:
          description: 'ISO8601 of created timestamp

            '
          format: date-time
          type: string
        id:
          format: uuid
          maxLength: 36
          minLength: 36
          type: string
        name:
          maxLength: 100
          minLength: 1
          type: string
        next_sample_update:
          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.
          type: string
        parent_list_id:
          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})`
          format: uuid
          maxLength: 36
          minLength: 36
          type: string
        sample_updated_at:
          description: ISO8601 timestamp the sample was last updated
          format: date-time
          type: string
        updated_at:
          description: ISO8601 timestamp the object was last updated
          format: date-time
          type: string
      required:
        - id
        - contacts_count
        - created_at
        - sample_updated_at
        - updated_at
      title: segment_summary
      type: object
    segment_summary_v2:
      description: ''
      properties:
        results:
          items:
            $ref: '#/components/schemas/segment_summary'
          type: array
      title: segment_summary
      type: object
    segment_update:
      properties:
        name:
          description: Name of the segment.
          maxLength: 100
          minLength: 1
          type: string
        query_dsl:
          description:
            SQL query which will filter contacts based on the conditions
            provided
          type: string
      title: segment_update
      type: object
    segment_write:
      properties:
        name:
          maxLength: 100
          minLength: 1
          type: string
        query_dsl:
          description: Use this field for adding your query string.
          type: string
      required:
        - name
        - query_dsl
      title: segment_write
      type: object
    segment_write_v2:
      properties:
        name:
          description: Name of the segment.
          maxLength: 100
          minLength: 1
          type: string
        parent_list_ids:
          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
          items:
            type: string
          type: array
          uniqueItems: true
        query_dsl:
          description:
            SQL query which will filter contacts based on the conditions
            provided
          type: string
      required:
        - name
        - query_dsl
      title: segment_write
      type: object
    selfmetadata:
      properties:
        self:
          description: A link to this object.
          type: string
      title: selfMetadata
      type: object
    sender-id-request:
      example:
        address: 123 Elm St.
        address_2: Apt. 456
        city: Denver
        country: United States
        from:
          email: from@example.com
          name: Example INC
        nickname: My Sender ID
        reply_to:
          email: replyto@example.com
          name: Example INC
        state: Colorado
        zip: '80202'
      properties:
        address:
          description: The physical address of the sender identity.
          type: string
        address_2:
          description: Additional sender identity address information.
          type: string
        city:
          description: The city of the sender identity.
          type: string
        country:
          description: The country of the sender identity.
          type: string
        from:
          properties:
            email:
              description:
                The email address from which your recipient will receive emails.
              type: string
            name:
              description:
                The name appended to the from email field. Typically your name
                or company name.
              type: string
          type: object
        nickname:
          description: A nickname for the sender identity. Not used for sending.
          type: string
        reply_to:
          properties:
            email:
              description: The email address to which your recipient will reply.
              type: string
            name:
              description:
                The name appended to the reply to email field. Typically your
                name or company name.
              type: string
          type: object
        state:
          description: The state of the sender identity.
          type: string
        zip:
          description: The zipcode of the sender identity.
          type: string
      title: Sender ID Request
      type: object
    senderID:
      allOf:
        - $ref: '#/components/schemas/sender-id-request'
        - properties:
            created_at:
              description: The time the sender identity was created.
              type: integer
            id:
              description: The unique identifier of the sender identity.
              type: integer
            locked:
              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.
              type: boolean
            updated_at:
              description: The time the sender identity was last updated.
              type: integer
            verified:
              description:
                If the sender identity is verified or not. Only verified sender
                identities can be used to send email.
              type: boolean
          type: object
        - required:
            - nickname
            - address
            - city
            - country
          type: object
      example:
        address: 123 Elm St.
        address_2: Apt. 456
        city: Denver
        country: United States
        created_at: 1449872165
        from:
          email: from@example.com
          name: Example INC
        id: 1
        locked: false
        nickname: My Sender ID
        reply_to:
          email: replyto@example.com
          name: Example INC
        state: Colorado
        updated_at: 1449872165
        verified: true
        zip: '80202'
      title: Sender ID
    senders-id-request-body:
      properties:
        address:
          description: The physical address of the sender identity.
          type: string
        address_2:
          description: Additional sender identity address information.
          type: string
        city:
          description: The city of the sender identity.
          type: string
        country:
          description: The country of the sender identity.
          type: string
        from:
          properties:
            email:
              description:
                This is where the email will appear to originate from for your
                recipient
              type: string
            name:
              description:
                This is the name appended to the from email field. IE - Your
                name or company name.
              type: string
          required:
            - email
            - name
          type: object
        nickname:
          description: A nickname for the sender identity. Not used for sending.
          type: string
        reply_to:
          properties:
            email:
              description: This is the email that your recipient will reply to.
              type: string
            name:
              description:
                This is the name appended to the reply to email field. IE - Your
                name or company name.
              type: string
          required:
            - email
          type: object
        state:
          description: The state of the sender identity.
          type: string
        zip:
          description: The zipcode of the sender identity.
          type: string
      required:
        - nickname
        - from
        - address
        - city
        - country
      title: Senders ID Request Body
      type: object
    single-contact-request:
      properties:
        contact:
          properties:
            address_line_1:
              type: string
            address_line_2:
              type: string
            alternate_emails:
              type: string
            city:
              type: string
            country:
              type: string
            custom_fields:
              properties:
                custom_field_name1:
                  type: string
                custom_field_name2:
                  type: string
              type: object
            first_name:
              type: string
            last_name:
              type: string
            postal_code:
              type: string
            primary_email:
              type: string
            state_province_region:
              type: string
          type: object
        list_ids:
          description: The contact's list IDs.
          items:
            format: uuid
            type: string
          maxItems: 100
          minItems: 0
          type: array
      title: single contact request
      type: object
    singlesend_request:
      properties:
        categories:
          description: The categories to associate with this Single Send.
          items:
            type: string
          maxItems: 10
          type: array
          uniqueItems: true
        email_config:
          properties:
            custom_unsubscribe_url:
              description:
                The URL allowing recipients to unsubscribe — you must provide
                this or the `suppression_group_id`.
              format: uri
              nullable: true
              type: string
            design_id:
              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.
              type: string
            editor:
              default: code
              description:
                The editor — `"design"` or `"code"` — used to modify the Single
                Send's design in the Marketing Campaigns App.
              enum:
                - code
                - design
              type: string
            generate_plain_content:
              default: true
              description:
                If set to `true`, `plain_content` is always generated from
                `html_content`. If set to false, `plain_content` is not altered.
              type: boolean
            html_content:
              description:
                The HTML content of the Single Send. Do not include this field
                when using a `design_id`.
              type: string
            ip_pool:
              description:
                The name of the IP Pool from which the Single Send emails are
                sent.
              nullable: true
              type: string
            plain_content:
              description:
                The plain text content of the Single Send. Do not include this
                field when using a `design_id`.
              type: string
            sender_id:
              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.
              nullable: true
              type: integer
            subject:
              description:
                The subject line of the Single Send. Do not include this field
                when using a `design_id`.
              type: string
            suppression_group_id:
              description:
                The ID of the Suppression Group to allow recipients to
                unsubscribe — you must provide this or the
                `custom_unsubscribe_url`.
              nullable: true
              type: integer
          type: object
        name:
          description: The name of the Single Send.
          maxLength: 100
          minLength: 1
          type: string
        send_at:
          description:
            The ISO 8601 time at which to send the Single Send — this must be
            set for a future time.
          format: date-time
          type: string
        send_to:
          properties:
            all:
              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.
              type: boolean
            list_ids:
              description:
                The recipient List IDs that will receive the Single Send.
              items:
                format: uuid
                type: string
              maxItems: 10
              type: array
            segment_ids:
              description:
                The recipient Segment IDs that will receive the Single Send.
              items:
                format: uuid
                type: string
              maxItems: 10
              type: array
          type: object
      required:
        - name
      title: singlesend_request
      type: object
    singlesend_response:
      allOf:
        - $ref: '#/components/schemas/singlesend_request'
        - properties:
            created_at:
              description:
                the ISO 8601 time at which the Single Send was created
              format: date-time
              type: string
            id:
              format: uuid
              type: string
            status:
              description: current status of the Single Send
              enum:
                - draft
                - scheduled
                - triggered
              type: string
            updated_at:
              description:
                the ISO 8601 time at which the Single Send was last updated
              format: date-time
              type: string
            warnings:
              items:
                properties:
                  field:
                    type: string
                  message:
                    type: string
                  warning_id:
                    type: string
                type: object
              type: array
          required:
            - id
            - status
            - created_at
          type: object
      example:
        categories:
          - unique opens
        created_at: '2020-05-18T17:28:27.272Z'
        email_config:
          custom_unsubscribe_url: null
          editor: code
          generate_plain_content: true
          html_content: ''
          ip_pool: null
          plain_content: ''
          sender_id: null
          subject: ''
          suppression_group_id: null
        id: 27c21bbf-a12c-440b-b8bf-c526975328ca
        name: Example API Created Single Send
        send_at: '2020-06-16T00:19:55.106Z'
        send_to:
          list_ids:
            - f2fe66a1-43f3-4e3a-87b1-c6a600d805f0
        status: scheduled
      title: singlesend_response
    singlesend_response_short:
      properties:
        abtest:
          $ref: '#/components/schemas/abtest_summary'
        categories:
          description: categories to associate with this Single Send
          items:
            type: string
          maxItems: 10
          type: array
          uniqueItems: true
        created_at:
          description: the ISO 8601 time at which the Single Send was created
          format: date-time
          type: string
        id:
          format: uuid
          type: string
        is_abtest:
          description:
            true if the Single Send's AB Test functionality has been toggled on
          type: boolean
        name:
          description: name of the Single Send
          maxLength: 100
          minLength: 1
          type: string
        send_at:
          description:
            the ISO 8601 time at which to send the Single Send; must be in
            future
          format: date-time
          type: string
        status:
          description: current status of the Single Send
          enum:
            - draft
            - scheduled
            - triggered
          type: string
        updated_at:
          description:
            the ISO 8601 time at which the Single Send was last updated
          format: date-time
          type: string
      required:
        - id
        - name
        - abtest
        - status
        - categories
        - is_abtest
        - updated_at
        - created_at
      title: singlesend_response_short
      type: object
    singlesend_schedule:
      properties:
        send_at:
          description:
            This is the ISO 8601 time at which to send the Single Send; must be
            in future, or the string "now"
          format: date-time
          type: string
        status:
          enum:
            - draft
            - scheduled
            - triggered
          type: string
      required:
        - send_at
      title: singlesend-schedule
      type: object
    singlesend_search:
      properties:
        categories:
          description:
            categories to associate with this Single Send, match any single send
            that has at least one of the categories
          items:
            type: string
          type: array
          uniqueItems: true
        name:
          description:
            leading and trailing wildcard search on name of the Single Send
          maxLength: 100
          minLength: 1
          type: string
        status:
          description: current status of the Single Send
          items:
            enum:
              - draft
              - scheduled
              - triggered
            type: string
          type: array
          uniqueItems: true
      title: singlesend_search
      type: object
    singlesend_warning:
      properties:
        warnings:
          items:
            properties:
              field:
                type: string
              message:
                type: string
              warning_id:
                type: string
            type: object
          type: array
      title: singlesend_warning
      type: object
    singlesends-link-stats-response:
      properties:
        _metadata:
          $ref: '#/components/schemas/link-tracking-metadata'
        results:
          description:
            This is the index of the link's location in the email contents.
          items:
            properties:
              ab_phase:
                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"`.
                enum:
                  - send
                  - test
                  - all
                type: string
              ab_variation:
                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`.
                format: uuid
                type: string
              clicks:
                description: the number of clicks on this particular link
                minimum: 1
                type: integer
              url:
                description:
                  This is the URL of the link clicked. If `{{custom_fields}}`
                  are part of the URL, they will be included.
                format: uri
                type: string
              url_location:
                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`.
                minimum: 0
                type: integer
            required:
              - url
              - ab_variation
              - ab_phase
              - clicks
            type: object
          type: array
        total_clicks:
          type: integer
      required:
        - results
        - _metadata
      title: singlesends-link-stats-response
      type: object
    singlesends-response:
      properties:
        _metadata:
          $ref: '#/components/schemas/metadata'
        results:
          items:
            properties:
              ab_phase:
                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".
                enum:
                  - send
                  - test
                  - all
                type: string
              ab_variation:
                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".
                format: uuid
                type: string
              aggregation:
                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.
                type: string
              id:
                description:
                  This is the ID of the Single Dend you require stats for.
                format: uuid
                type: string
              stats:
                $ref: '#/components/schemas/metrics'
            required:
              - id
              - ab_variation
              - ab_phase
            type: object
          type: array
      required:
        - results
        - _metadata
      title: singlesends-response
      type: object
    spam-reports-response:
      example:
        - created: 1443651141
          email: user1@example.com
          ip: 10.63.202.100
        - created: 1443651154
          email: user2@example.com
          ip: 10.63.202.100
      items:
        properties:
          created:
            description:
              A Unix timestamp that indicates when the recipient marked your
              message as spam.
            type: integer
          email:
            description:
              The email address of the recipient that marked your message as
              spam.
            format: email
            type: string
          ip:
            description: The IP address that the message was sent from.
            type: string
        required:
          - created
          - email
          - ip
        type: object
      title: Spam Reports Response
      type: array
    sso-certificate-body:
      example:
        id: 66138975
        intergration_id: b0b98502-9408-4b24-9e3d-31ed7cb15312
        not_after: 1621289880
        not_before: 1621289880
        public_certificate: <your x509 certificate>
      properties:
        id:
          description: A unique ID assigned to the certificate by SendGrid.
          type: number
        intergration_id:
          description:
            An ID that matches a certificate to a specific IdP integration.
          type: string
        not_after:
          description:
            A unix timestamp (e.g., 1603915954) that indicates the time after
            which the certificate is no longer valid.
          type: number
        not_before:
          description:
            A unix timestamp (e.g., 1603915954) that indicates the time before
            which the certificate is not valid.
          type: number
        public_certificate:
          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.
          type: string
      title: Single Sign-On Certificate Body
      type: object
    sso-error-response:
      items:
        properties:
          error_id:
            type: string
          field:
            nullable: true
            type: string
          message:
            type: string
        type: object
      title: SSO Error Response
      type: array
    sso-integration:
      allOf:
        - $ref: '#/components/schemas/create-integration-request'
        - properties:
            audience_url:
              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.
              type: string
            id:
              description:
                A unique ID assigned to the configuration by SendGrid.
              type: string
            last_updated:
              description:
                A timestamp representing the last time the configuration was
                modified.
              type: number
            single_signon_url:
              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.
              type: string
          required:
            - last_updated
          type: object
      title: Single Sign-On Integration
    sso-teammate-common-fields:
      properties:
        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.
          format: email
          type: string
        first_name:
          description: The Teammate’s first name.
          type: string
        is_admin:
          description: Indicates if the Teammate has admin permissions.
          type: boolean
        is_read_only:
          description: Indicates if the Teammate has read_only permissions.
          type: boolean
        last_name:
          description: The Teammate’s last name.
          type: string
      required:
        - first_name
        - last_name
        - email
      title: Single Sing-On Teammate Common Fields
      type: object
    sso-teammate-request:
      allOf:
        - $ref: '#/components/schemas/sso-teammate-common-fields'
        - properties:
            scopes:
              description: The permission scopes assigned to the Teammate.
              items:
                type: string
              type: array
          required:
            - scopes
          type: object
      title: Single Sign-On Teammate Request
    sso-teammate-response:
      allOf:
        - $ref: '#/components/schemas/sso-teammate-common-fields'
        - properties:
            is_sso:
              description:
                Indicates if the Teammate authenticates with SendGrid using SSO
                or with a username and password.
              type: boolean
            username:
              description: This should be set to the Teammate's email address.
              type: string
          type: object
      title: Single Sign-On Teammate Response
    sso-teammates-patch-response:
      allOf:
        - $ref: '#/components/schemas/sso-teammate-response'
        - properties:
            address:
              description: The Teammate’s street address.
              type: string
            address2:
              description:
                The Teammate’s apartment number, suite number, or other
                secondary address information that is not part of the physical
                street address.
              type: string
            city:
              description: The Teammate's city.
              type: string
            company:
              description: The Teammate’s company name.
              type: string
            country:
              description: The Teammate’s country of residence.
              type: string
            email:
              format: email
              type: string
            phone:
              description: The Teammate’s stored phone number.
              type: string
            scopes:
              description: The permission scopes assigned to the Teammate.
              items:
                type: string
              type: array
            state:
              description: The Teammate’s state or province.
              type: string
            user_type:
              description:
                A Teammate can be an “admin,” “owner,” or “teammate.” Each role
                is associated with the scope of the Teammate’s permissions.
              enum:
                - admin
                - owner
                - teammate
              type: string
            website:
              description: A website associated with the Teammate
              type: string
            zip:
              description: The Teammate’s zip code.
              type: string
          type: object
      title: Single Sign-On Teammates PATCH Response
    stats-advanced-global-stats:
      allOf:
        - $ref: '#/components/schemas/advanced_stats_clicks_opens'
        - properties:
            blocks:
              description:
                The number of emails that were not allowed to be delivered by
                ISPs.
              type: integer
            bounce_drops:
              description:
                The number of emails that were dropped because of a bounce.
              type: integer
            bounces:
              description:
                The number of emails that bounced instead of being delivered.
              type: integer
            deferred:
              description:
                'The number of emails that temporarily could not be delivered. '
              type: integer
            delivered:
              description:
                The number of emails SendGrid was able to confirm were actually
                delivered to a recipient.
              type: integer
            invalid_emails:
              description:
                The number of recipients who had malformed email addresses or
                whose mail provider reported the address as invalid.
              type: integer
            processed:
              description:
                Requests from your website, application, or mail client via SMTP
                Relay or the API that SendGrid processed.
              type: integer
            requests:
              description:
                The number of emails that were requested to be delivered.
              type: integer
            spam_report_drops:
              description:
                The number of emails that were dropped due to a recipient
                previously marking your emails as spam.
              type: integer
            spam_reports:
              description:
                The number of recipients who marked your email as spam.
              type: integer
            unsubscribe_drops:
              description:
                The number of emails dropped due to a recipient unsubscribing
                from your emails.
              type: integer
            unsubscribes:
              description:
                The number of recipients who unsubscribed from your emails.
              type: integer
          type: object
      title: 'Stats: Advanced Global Stats'
    stats-advanced-stats-base-schema:
      items:
        properties:
          date:
            description: The date the stats were gathered.
            type: string
          stats:
            description: The individual email activity stats.
            items:
              properties:
                metrics:
                  type: object
              type: object
            type: array
        type: object
      title: 'Stats: Advanced Stats Base Schema'
      type: array
    subscription_tracking_settings:
      properties:
        enabled:
          description: Indicates if subscription tracking is enabled.
          type: boolean
        html_content:
          description: 'The information and HTML for your unsubscribe link. '
          type: string
        landing:
          description:
            The HTML that will be displayed on the page that your customers will
            see after clicking unsubscribe, hosted on SendGrid’s server.
          type: string
        plain_content:
          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.
          type: string
        replace:
          description:
            Your custom defined replacement tag for your templates. Use this tag
            to place your unsubscribe content anywhere in your emailtemplate.
          type: string
        url:
          description:
            The URL where you would like your users sent to unsubscribe.
          format: uri
          type: string
      title: 'Settings: Subscription Tracking'
      type: object
    subuser:
      example:
        disabled: false
        email: example@example.com
        id: 1234
        username: example_subuser
      properties:
        disabled:
          description: Whether or not the user is enabled or disabled.
          type: boolean
        email:
          description: The email address to contact this subuser.
          format: email
          type: string
        id:
          description: The ID of this subuser.
          type: number
        username:
          description: The name by which this subuser will be referred.
          type: string
      required:
        - disabled
        - id
        - username
        - email
      title: List all Subusers for a parent response
      type: object
    subuser_post:
      example:
        authorization_token: ''
        credit_allocation:
          type: unlimited
        email: example@example.com
        signup_session_token: ''
        user_id: 1234
        username: example_subuser
      properties:
        authorization_token:
          type: string
        credit_allocation:
          properties:
            type:
              type: string
          type: object
        email:
          description: The email address for this subuser.
          format: email
          type: string
        signup_session_token:
          type: string
        user_id:
          description: The user ID for this subuser.
          type: number
        username:
          description: The username of the subuser.
          type: string
      required:
        - username
        - user_id
        - email
      title: Subuser::POST
      type: object
    subuser_stats:
      example:
        date: '2016-02-01'
        stats:
          - first_name: John
            last_name: Doe
            metrics:
              blocks: 0
              bounce_drops: 0
              bounces: 0
              clicks: 5
              deferred: 0
              delivered: 0
              invalid_emails: 0
              opens: 10
              processed: 10
              requests: 10
              spam_report_drops: 0
              spam_reports: 0
              unique_clicks: 0
              unique_opens: 0
              unsubscribe_drops: 0
              unsubscribes: 0
            name: user1
            type: subuser
      properties:
        date:
          description: The date the statistics were gathered.
          type: string
        stats:
          description: The list of statistics.
          items:
            properties:
              first_name:
                description: The first name of the subuser.
                type: string
              last_name:
                description: The last name of the subuser.
                type: string
              metrics:
                properties:
                  blocks:
                    description:
                      The number of emails that were not allowed to be delivered
                      by ISPs.
                    type: integer
                  bounce_drops:
                    description:
                      The number of emails that were dropped because of a
                      bounce.
                    type: integer
                  bounces:
                    description:
                      The number of emails that bounced instead of being
                      delivered.
                    type: integer
                  clicks:
                    description:
                      The number of links that were clicked in your emails.
                    type: integer
                  deferred:
                    description:
                      The number of emails that temporarily could not be
                      delivered.
                    type: integer
                  delivered:
                    description:
                      The number of emails SendGrid was able to confirm were
                      actually delivered to a recipient.
                    type: integer
                  invalid_emails:
                    description:
                      The number of recipients who had malformed email addresses
                      or whose mail provider reported the address as invalid.
                    type: integer
                  opens:
                    description:
                      The total number of times your emails were opened by
                      recipients.
                    type: integer
                  processed:
                    description:
                      Requests from your website, application, or mail client
                      via SMTP Relay or the API that SendGrid processed.
                    type: integer
                  requests:
                    description:
                      The number of emails that were requested to be delivered.
                    type: integer
                  spam_report_drops:
                    description:
                      The number of emails that were dropped due to a recipient
                      previously marking your emails as spam.
                    type: integer
                  spam_reports:
                    description:
                      The number of recipients who marked your email as spam.
                    type: integer
                  unique_clicks:
                    description:
                      The number of unique recipients who clicked links in your
                      emails.
                    type: integer
                  unique_opens:
                    description:
                      The number of unique recipients who opened your emails.
                    type: integer
                  unsubscribe_drops:
                    description:
                      The number of emails dropped due to a recipient
                      unsubscribing from your emails.
                    type: integer
                  unsubscribes:
                    description:
                      The number of recipients who unsubscribed from your
                      emails.
                    type: integer
                type: object
              name:
                description: The username of the subuser.
                type: string
              type:
                description: The type of account.
                type: string
            type: object
          type: array
      title: subuser_stats
      type: object
    suppression-group-request-base:
      properties:
        description:
          description:
            A brief description of your suppression group. Required when
            creating a group.
          maxLength: 100
          type: string
        is_default:
          description:
            Indicates if you would like this to be your default suppression
            group.
          type: boolean
        name:
          description:
            The name of your suppression group. Required when creating a group.
          maxLength: 30
          type: string
      title: Suppression Group Request Base
      type: object
    suppression_group:
      properties:
        description:
          description: A description of the suppression group.
          maxLength: 100
          type: string
        id:
          description: The id of the suppression group.
          type: number
        is_default:
          default: false
          description: Indicates if this is the default suppression group.
          type: boolean
        last_email_sent_at:
          nullable: true
        name:
          description:
            The name of the suppression group. Each group created by a user must
            have a unique name.
          maxLength: 30
          type: string
        unsubscribes:
          description: The unsubscribes associated with this group.
          type: integer
      required:
        - id
        - name
        - description
      title: 'Suppressions: Suppression Group'
      type: object
    suppressions-request:
      example:
        recipient_emails:
          - test1@example.com
          - test2@example.com
      properties:
        recipient_emails:
          description: The array of email addresses to add or find.
          items:
            format: email
            type: string
          type: array
      required:
        - recipient_emails
      title: Suppressions Request Body
      type: object
    to_email_array:
      example:
        - email: john_doe@example.com
          name: John Doe
      items:
        properties:
          email:
            description: The intended recipient's email address.
            format: email
            type: string
          name:
            description: The intended recipient's name.
            type: string
        required:
          - email
        type: object
      title: To Email Array
      type: array
    transactional-template-warning:
      example:
        message: A sample warning message.
      properties:
        message:
          description: Warning message for the user
          type: string
      title: Warning
      type: object
    transactional-templates-template-lean:
      example:
        generation: legacy
        id: 0c314114-a2b7-4523-8cbc-a293d7d19007
        name: example_name
        'updated_at ': '2021-04-28 13:12:46'
        versions: []
      properties:
        generation:
          description: Defines the generation of the template.
          enum:
            - legacy
            - dynamic
          type: string
        id:
          description: The ID of the transactional template.
          format: uuid
          maxLength: 36
          minLength: 36
          type: string
        name:
          description: The name for the transactional template.
          maxLength: 100
          type: string
        'updated_at ':
          description:
            The date and time that this transactional template version was
            updated.
          pattern: ^(\d{4}-\d{2}-\d{2}) ((\d{2}):(\d{2}):(\d{2}))$
          type: string
        versions:
          description: The different versions of this transactional template.
          items:
            $ref: '#/components/schemas/transactional-templates-version-output-lean'
          type: array
      required:
        - id
        - name
        - generation
        - 'updated_at '
      title: 'Transactional Templates: Template Lean'
      type: object
    transactional-templates-version-output-lean:
      properties:
        active:
          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.
          enum:
            - 0
            - 1
          type: integer
        editor:
          description: The editor used in the UI.
          enum:
            - code
            - design
          type: string
        generate_plain_content:
          default: true
          description:
            If true, plain_content is always generated from html_content. If
            false, plain_content is not altered.
          type: boolean
        id:
          description: ID of the transactional template version.
          format: uuid
          type: string
        name:
          description: Name of the transactional template version.
          maxLength: 100
          type: string
        subject:
          description: Subject of the new transactional template version.
          maxLength: 255
          type: string
        template_id:
          description: ID of the transactional template.
          type: string
        thumbnail_url:
          description: A Thumbnail preview of the template's html content.
          type: string
        updated_at:
          description:
            The date and time that this transactional template version was
            updated.
          type: string
      title: 'Transactional Templates: Version Output Lean'
      type: object
    transactional_template:
      allOf:
        - $ref: '#/components/schemas/transactional-templates-template-lean'
        - properties:
            warning:
              $ref: '#/components/schemas/transactional-template-warning'
          type: object
      example:
        generation: legacy
        id: 33feeff2-5069-43fe-8853-428651e5be79
        name: example_name
        'updated_at ': '2021-04-28 13:12:46'
        warning:
          message: Sample warning message
      title: 'Transactional Templates: Template'
    transactional_template_version_create:
      example:
        active: 1
        editor: design
        generate_plain_content: false
        html_content: dolor
        name: pariatur non incididunt commodo
        plain_content: labore dolore
        subject: aliquip nulla Ut
        template_id: Excepteur Ut qui
      properties:
        active:
          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.
          enum:
            - 0
            - 1
          type: integer
        editor:
          description: The editor used in the UI.
          enum:
            - code
            - design
          type: string
        generate_plain_content:
          default: true
          description:
            If true, plain_content is always generated from html_content. If
            false, plain_content is not altered.
          type: boolean
        html_content:
          description:
            The HTML content of the version. Maximum of 1048576 bytes allowed.
          maxLength: 1048576
          type: string
        name:
          description: Name of the transactional template version.
          maxLength: 100
          type: string
        plain_content:
          default: <generated from html_content if left empty>
          description:
            Text/plain content of the transactional template version. Maximum of
            1048576 bytes allowed.
          maxLength: 1048576
          type: string
        subject:
          description: Subject of the new transactional template version.
          maxLength: 255
          type: string
        test_data:
          description:
            For dynamic templates only, the mock json data that will be used for
            template preview and test sends.
          type: string
      required:
        - name
        - subject
      title: 'Transactional Templates: Version Create'
      type: object
    transactional_template_version_output:
      allOf:
        - properties:
            warnings:
              items:
                $ref: '#/components/schemas/transactional-template-warning'
              type: array
          type: object
        - $ref: '#/components/schemas/transactional_template_version_create'
        - $ref: '#/components/schemas/transactional-templates-version-output-lean'
      title: 'Transactional Templates: Version Output'
    user_profile:
      example:
        address: 1451 Larimer Street, 3rd floor
        address2: ''
        city: Denver, CO
        company: SendGrid
        country: US
        first_name: Matthew
        last_name: Bernier
        phone: '7208788003'
        state: CO
        website: http://sendgrid.com
        zip: '80202'
      properties:
        address:
          description: The street address for this user profile.
          type: string
        address2:
          description:
            An optional second line for the street address of this user profile.
          type: string
        city:
          description: The city for the user profile.
          type: string
        company:
          description: That company that this user profile is associated with.
          type: string
        country:
          description: Th country of this user profile.
          type: string
        first_name:
          description: The first name of the user.
          type: string
        last_name:
          description: The last name of the user.
          type: string
        phone:
          description: The phone number for the user.
          type: string
        state:
          description: The state for this user.
          type: string
        website:
          description: The website associated with this user.
          type: string
        zip:
          description: The zip code for this user.
          type: string
      title: 'User: Profile'
      type: object
    user_scheduled_send_status:
      allOf:
        - $ref: '#/components/schemas/mail_batch_id'
        - description: The status of the scheduled send.
          properties:
            status:
              description: The status of the scheduled send.
              enum:
                - cancel
                - pause
              type: string
          required:
            - status
          type: object
      example:
        batch_id: HkJ5yLYULb7Rj8GKSx7u025ouWVlMgAi
        status: pause
      title: User Scheduled Send status
    verified-sender-request-schema:
      example:
        address: 1234 Fake St
        address2: PO Box 1234
        city: San Francisco
        country: USA
        from_email: orders@example.com
        from_name: Example Orders
        nickname: Orders
        reply_to: orders@example.com
        reply_to_name: Example Orders
        state: CA
        zip: '94105'
      properties:
        address:
          maxLength: 100
          type: string
        address2:
          maxLength: 100
          type: string
        city:
          maxLength: 150
          type: string
        country:
          maxLength: 100
          type: string
        from_email:
          format: email
          maxLength: 256
          type: string
        from_name:
          maxLength: 256
          type: string
        nickname:
          maxLength: 100
          type: string
        reply_to:
          format: email
          maxLength: 256
          type: string
        reply_to_name:
          maxLength: 256
          type: string
        state:
          maxLength: 2
          type: string
        zip:
          maxLength: 10
          type: string
      required:
        - nickname
        - from_email
        - reply_to
      title: Verified Sender Request Schema
      type: object
    verified-sender-response-schema:
      example:
        address: 1234 Fake St.
        address2: PO Box 1234
        city: San Francisco
        country: USA
        from_email: orders@example.com
        from_name: Example Orders
        id: 1234
        locked: false
        nickname: Example Orders
        reply_to: orders@example.com
        reply_to_name: Example Orders
        state: CA
        verified: true
        zip: '94105'
      properties:
        address:
          type: string
        address2:
          type: string
        city:
          type: string
        country:
          type: string
        from_email:
          type: string
        from_name:
          type: string
        id:
          type: integer
        locked:
          type: boolean
        nickname:
          type: string
        reply_to:
          type: string
        reply_to_name:
          type: string
        state:
          type: string
        verified:
          type: boolean
        zip:
          type: string
      title: Verified Sender Response Schema
      type: object
    webhook:
      properties:
        nonce:
          description: The one time nonce to use when "signature" is "hmac-sha1"
          maxLength: 32
          minLength: 8
          type: string
        url:
          description: The URL to invoke in the webhook
          type: string
      required:
        - url
        - nonce
      title: webhook
      type: object
    webhooks-event-webhook-request:
      properties:
        bounce:
          description: Receiving server could not or would not accept message.
          type: boolean
        click:
          description:
            Recipient clicked on a link within the message. You need to enable
            Click Tracking for getting this type of event.
          type: boolean
        deferred:
          description: Recipient's email server temporarily rejected message.
          type: boolean
        delivered:
          description:
            Message has been successfully delivered to the receiving server.
          type: boolean
        dropped:
          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'
          type: boolean
        enabled:
          description: Indicates if the event webhook is enabled.
          type: boolean
        group_resubscribe:
          description:
            Recipient resubscribes to specific group by updating preferences.
            You need to enable Subscription Tracking for getting this type of
            event.
          type: boolean
        group_unsubscribe:
          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.
          type: boolean
        oauth_client_id:
          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.
          type: string
        oauth_token_url:
          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.
          type: string
        open:
          description:
            Recipient has opened the HTML message. You need to enable Open
            Tracking for getting this type of event.
          type: boolean
        processed:
          description: Message has been received and is ready to be delivered.
          type: boolean
        spam_report:
          description: Recipient marked a message as spam.
          type: boolean
        unsubscribe:
          description:
            Recipient clicked on message's subscription management link. You
            need to enable Subscription Tracking for getting this type of event.
          type: boolean
        url:
          description: The URL that you want the event webhook to POST to.
          type: string
      required:
        - enabled
        - url
        - group_resubscribe
        - delivered
        - group_unsubscribe
        - spam_report
        - bounce
        - deferred
        - unsubscribe
        - processed
        - open
        - click
        - dropped
      title: 'Webhooks: Event Webhook Request'
      type: object
  securitySchemes:
    Authorization:
      in: header
      name: Authorization
      type: apiKey
