{
  "openapi": "3.0.3",
  "info": {
    "title": "sondahub SendGrid sandbox",
    "version": "0.7.0",
    "description": "An independent imitation of SendGrid’s v3 API for testing, run by sondahub — not affiliated with or endorsed by Twilio SendGrid. No email leaves it and no SendGrid account is involved.\n\nAuth: Bearer with any key that starts with SG. — SG.sondahub-sandbox works. Bodies are JSON.\n\nThe seed account has the authenticated domain example.com (send from any address there), two verified senders, three dynamic templates, two unsubscribe groups, suppression lists, 60 contacts on three lists and a month of sent mail. A +tag in a recipient address picks its fate: +bounce, +blocked, +deferred, +open, +click, +spamreport, +unsubscribe.\n\nWrites live in the X-Sondahub-Session token each answer carries: send the newest one back as a header and the next request sees what you made; without it every request starts from the seed account. More at https://sondahub.com/sandboxes/sendgrid/",
    "contact": {
      "name": "sondahub",
      "url": "https://sondahub.com/sandboxes/sendgrid/"
    }
  },
  "externalDocs": {
    "description": "The sandbox, in full",
    "url": "https://sondahub.com/sandboxes/sendgrid/"
  },
  "servers": [
    {
      "url": "https://api.sondahub.com"
    }
  ],
  "security": [
    {
      "sendgridKey": []
    }
  ],
  "tags": [
    {
      "name": "Mail Send",
      "description": "POST /v3/mail/send: validated the way SendGrid validates it, then each recipient’s events on a clock. The answer’s X-Sondahub-Preview header links to a page showing the email as sent."
    },
    {
      "name": "Email Activity",
      "description": "What happened to each recipient: processed, delivered or not_delivered, opens and clicks."
    },
    {
      "name": "Event Webhook",
      "description": "Up to five webhooks; events arrive as a JSON array, signed with ECDSA when signing is on."
    },
    {
      "name": "Inbound Parse",
      "description": "Where mail to your hostname is posted. /sandbox/sendgrid/simulate/inbound sends it."
    },
    {
      "name": "Suppressions",
      "description": "Bounces, blocks, spam reports, invalid emails and global unsubscribes; sends to a listed address are dropped."
    },
    {
      "name": "Unsubscribe Groups",
      "description": "Groups (asm.group_id on a send) and who left each."
    },
    {
      "name": "Templates",
      "description": "Transactional templates; dynamic ones render Handlebars with dynamic_template_data."
    },
    {
      "name": "Sender Identity",
      "description": "Who may send: an authenticated domain (example.com is) or a verified single sender."
    },
    {
      "name": "Contacts",
      "description": "Marketing contacts: upserts and deletes are jobs; contacts show up about two seconds later."
    },
    {
      "name": "Account",
      "description": "Scopes and the user."
    },
    {
      "name": "Sandbox tools",
      "description": "sondahub’s own: not part of SendGrid’s API."
    }
  ],
  "paths": {
    "/v3/mail/send": {
      "post": {
        "tags": [
          "Mail Send"
        ],
        "summary": "Send an email",
        "operationId": "SendMail",
        "description": "Answers 202 with X-Message-Id. A +tag in a recipient address picks what happens to it: +bounce, +blocked, +deferred, +open, +click, +spamreport, +unsubscribe; an address on a suppression list is dropped. With mail_settings.sandbox_mode.enable it validates and renders only (200).",
        "responses": {
          "200": {
            "description": "With mail_settings.sandbox_mode.enable: validated and rendered, nothing sent. No body; X-Sondahub-Preview still comes back.",
            "headers": {
              "X-Sondahub-Preview": {
                "description": "The preview link.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "202": {
            "description": "Accepted, no body.",
            "headers": {
              "X-Message-Id": {
                "description": "The message’s id: the start of every recipient’s sg_message_id.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Sondahub-Preview": {
                "description": "sondahub’s own: a link to a page showing the email as each of the first five personalizations would get it.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "personalizations": {
                    "type": "array",
                    "description": "Up to 1000: to, cc, bcc, subject, dynamic_template_data, substitutions, custom_args, send_at for each.",
                    "items": {}
                  },
                  "from": {
                    "type": "object",
                    "description": "An address on an authenticated domain (example.com is) or a verified sender."
                  },
                  "reply_to": {
                    "type": "object",
                    "description": "Where replies go."
                  },
                  "subject": {
                    "type": "string",
                    "description": "Required unless every personalization or the template has one."
                  },
                  "content": {
                    "type": "array",
                    "description": "text/plain first, then text/html; required unless template_id is given.",
                    "items": {}
                  },
                  "template_id": {
                    "type": "string",
                    "description": "A template: d-… for a dynamic one."
                  },
                  "attachments": {
                    "type": "array",
                    "description": "content (base64), filename, type, disposition, content_id.",
                    "items": {}
                  },
                  "categories": {
                    "type": "array",
                    "description": "Up to 10, each up to 255 characters.",
                    "items": {}
                  },
                  "custom_args": {
                    "type": "object",
                    "description": "String values, carried into every event."
                  },
                  "send_at": {
                    "type": "integer",
                    "description": "Unix time, up to 72 hours ahead."
                  },
                  "batch_id": {
                    "type": "string",
                    "description": "From POST /v3/mail/batch, to pause or cancel the scheduled send."
                  },
                  "asm": {
                    "type": "object",
                    "description": "group_id: an unsubscribe group (16401 or 16402 in the seed)."
                  },
                  "mail_settings": {
                    "type": "object",
                    "description": "sandbox_mode.enable: validate and render only; bypass_*_management; footer."
                  },
                  "tracking_settings": {
                    "type": "object",
                    "description": "open_tracking, click_tracking (both on unless turned off)."
                  }
                },
                "required": [
                  "personalizations",
                  "from"
                ],
                "example": {
                  "personalizations": [
                    {
                      "to": [
                        {
                          "email": "ada@example.com",
                          "name": "Ada"
                        }
                      ]
                    }
                  ],
                  "from": {
                    "email": "hello@example.com",
                    "name": "Example Labs"
                  },
                  "subject": "Hello from the sandbox",
                  "content": [
                    {
                      "type": "text/plain",
                      "value": "It works."
                    },
                    {
                      "type": "text/html",
                      "value": "<p>It works. <a href=\"https://example.com/next\">Next step</a></p>"
                    }
                  ]
                }
              },
              "examples": {
                "simple": {
                  "summary": "Text and HTML",
                  "value": {
                    "personalizations": [
                      {
                        "to": [
                          {
                            "email": "ada@example.com",
                            "name": "Ada"
                          }
                        ]
                      }
                    ],
                    "from": {
                      "email": "hello@example.com",
                      "name": "Example Labs"
                    },
                    "subject": "Hello from the sandbox",
                    "content": [
                      {
                        "type": "text/plain",
                        "value": "It works."
                      },
                      {
                        "type": "text/html",
                        "value": "<p>It works. <a href=\"https://example.com/next\">Next step</a></p>"
                      }
                    ]
                  }
                },
                "template": {
                  "summary": "A dynamic template with data",
                  "value": {
                    "personalizations": [
                      {
                        "to": [
                          {
                            "email": "ada+open@example.com"
                          }
                        ],
                        "dynamic_template_data": {
                          "first_name": "Ada",
                          "company": "Example Labs",
                          "trial_days": 14,
                          "login_url": "https://app.example.com/login",
                          "tips": [
                            "Invite your team",
                            "Connect a data source"
                          ]
                        }
                      }
                    ],
                    "from": {
                      "email": "hello@example.com"
                    },
                    "template_id": "d-9e3779b1d4ee281dbf79a0e837f20e1e"
                  }
                },
                "receipt": {
                  "summary": "The receipt template, with a loop",
                  "value": {
                    "personalizations": [
                      {
                        "to": [
                          {
                            "email": "ada+click@example.com"
                          }
                        ],
                        "dynamic_template_data": {
                          "customer": {
                            "first_name": "Ada"
                          },
                          "order": {
                            "number": "SH-10421",
                            "date": "2026-09-01T12:00:00Z",
                            "total": "$86.00",
                            "url": "https://shop.example.com/orders/SH-10421",
                            "items": [
                              {
                                "name": "Sandbox socks",
                                "quantity": 2,
                                "price": "$24.00"
                              },
                              {
                                "name": "Field notebook",
                                "quantity": 1,
                                "price": "$38.00"
                              }
                            ]
                          }
                        }
                      }
                    ],
                    "from": {
                      "email": "receipts@example.com"
                    },
                    "template_id": "d-daa66d1378aa2fd9ef3b759b352f12ac",
                    "categories": [
                      "receipts"
                    ],
                    "custom_args": {
                      "order_id": "SH-10421"
                    }
                  }
                },
                "bounce": {
                  "summary": "A recipient that bounces",
                  "value": {
                    "personalizations": [
                      {
                        "to": [
                          {
                            "email": "grace+bounce@example.com"
                          }
                        ]
                      }
                    ],
                    "from": {
                      "email": "hello@example.com"
                    },
                    "subject": "This one bounces",
                    "content": [
                      {
                        "type": "text/plain",
                        "value": "Bye."
                      }
                    ]
                  }
                },
                "invalid": {
                  "summary": "Every validation error at once",
                  "value": {
                    "personalizations": [
                      {
                        "to": [
                          {
                            "email": "not-an-address"
                          }
                        ]
                      }
                    ],
                    "from": {
                      "email": "hello@example.com"
                    },
                    "content": [
                      {
                        "type": "text/html",
                        "value": "<p>Hi</p>"
                      },
                      {
                        "type": "text/plain",
                        "value": "Hi"
                      }
                    ]
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v3/mail/batch": {
      "post": {
        "tags": [
          "Mail Send"
        ],
        "summary": "Create a batch ID",
        "operationId": "CreateBatchId",
        "responses": {
          "201": {
            "description": "{batch_id}.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          }
        }
      }
    },
    "/v3/mail/batch/{batch_id}": {
      "get": {
        "tags": [
          "Mail Send"
        ],
        "summary": "Validate a batch ID",
        "operationId": "GetBatchId",
        "parameters": [
          {
            "name": "batch_id",
            "in": "path",
            "required": true,
            "description": "A batch ID: the seed has one.",
            "schema": {
              "type": "string"
            },
            "example": "MjAyNi0wOC0zMFQxMjowMDowMFpzZWVk"
          }
        ],
        "responses": {
          "200": {
            "description": "The object.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/v3/user/scheduled_sends": {
      "get": {
        "tags": [
          "Mail Send"
        ],
        "summary": "List paused and cancelled batches",
        "operationId": "ListScheduledSends",
        "responses": {
          "200": {
            "description": "The object.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          }
        }
      },
      "post": {
        "tags": [
          "Mail Send"
        ],
        "summary": "Pause or cancel a batch",
        "operationId": "CreateScheduledSend",
        "description": "For a batch with no status yet — the seed’s is already paused, so make one with POST /v3/mail/batch first (or PATCH the seed’s).",
        "responses": {
          "201": {
            "description": "The status.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "batch_id": {
                    "type": "string",
                    "description": "The batch.",
                    "example": "MjAyNi0wOC0zMFQxMjowMDowMFpzZWVk"
                  },
                  "status": {
                    "type": "string",
                    "description": "pause or cancel.",
                    "example": "cancel"
                  }
                },
                "required": [
                  "batch_id",
                  "status"
                ],
                "example": {
                  "batch_id": "MjAyNi0wOC0zMFQxMjowMDowMFpzZWVk",
                  "status": "cancel"
                }
              },
              "example": {
                "batch_id": "MjAyNi0wOC0zMFQxMjowMDowMFpzZWVk",
                "status": "cancel"
              }
            }
          }
        }
      }
    },
    "/v3/user/scheduled_sends/{batch_id}": {
      "get": {
        "tags": [
          "Mail Send"
        ],
        "summary": "A batch’s status",
        "operationId": "GetScheduledSend",
        "parameters": [
          {
            "name": "batch_id",
            "in": "path",
            "required": true,
            "description": "A batch with a status: the seed’s is paused.",
            "schema": {
              "type": "string"
            },
            "example": "MjAyNi0wOC0zMFQxMjowMDowMFpzZWVk"
          }
        ],
        "responses": {
          "200": {
            "description": "The object.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      },
      "patch": {
        "tags": [
          "Mail Send"
        ],
        "summary": "Change a batch’s status",
        "operationId": "UpdateScheduledSend",
        "parameters": [
          {
            "name": "batch_id",
            "in": "path",
            "required": true,
            "description": "A batch with a status: the seed’s is paused.",
            "schema": {
              "type": "string"
            },
            "example": "MjAyNi0wOC0zMFQxMjowMDowMFpzZWVk"
          }
        ],
        "responses": {
          "204": {
            "description": "Changed."
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "status": {
                    "type": "string",
                    "description": "pause or cancel.",
                    "example": "pause"
                  }
                },
                "required": [
                  "status"
                ],
                "example": {
                  "status": "pause"
                }
              },
              "example": {
                "status": "pause"
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Mail Send"
        ],
        "summary": "Resume a batch",
        "operationId": "DeleteScheduledSend",
        "parameters": [
          {
            "name": "batch_id",
            "in": "path",
            "required": true,
            "description": "A batch with a status: the seed’s is paused.",
            "schema": {
              "type": "string"
            },
            "example": "MjAyNi0wOC0zMFQxMjowMDowMFpzZWVk"
          }
        ],
        "responses": {
          "204": {
            "description": "Removed."
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/v3/messages": {
      "get": {
        "tags": [
          "Email Activity"
        ],
        "summary": "Filter messages",
        "operationId": "ListMessages",
        "parameters": [
          {
            "name": "query",
            "in": "query",
            "required": false,
            "description": "Filter: to_email=\"…\", status=\"delivered\", subject LIKE \"%order%\", Contains(categories,\"receipts\"), AND, OR, NOT, ( ).",
            "schema": {
              "type": "string"
            },
            "example": "status=\"delivered\""
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Up to 1000 (default 10).",
            "schema": {
              "type": "integer"
            },
            "example": 10
          }
        ],
        "responses": {
          "200": {
            "description": "The object.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/v3/messages/{msg_id}": {
      "get": {
        "tags": [
          "Email Activity"
        ],
        "summary": "One recipient’s events",
        "operationId": "GetMessage",
        "parameters": [
          {
            "name": "msg_id",
            "in": "path",
            "required": true,
            "description": "A msg_id from the list (or an X-Message-Id).",
            "schema": {
              "type": "string"
            },
            "example": "njd5sYRkP6kRgbPw89oRZA.recvd-sondahub-1.0"
          }
        ],
        "responses": {
          "200": {
            "description": "The object.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/v3/stats": {
      "get": {
        "tags": [
          "Email Activity"
        ],
        "summary": "Global stats",
        "operationId": "GetStats",
        "parameters": [
          {
            "name": "start_date",
            "in": "query",
            "required": false,
            "description": "YYYY-MM-DD (required).",
            "schema": {
              "type": "string"
            },
            "example": "2026-08-01"
          },
          {
            "name": "end_date",
            "in": "query",
            "required": false,
            "description": "YYYY-MM-DD (default today).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "aggregated_by",
            "in": "query",
            "required": false,
            "description": "day, week or month.",
            "schema": {
              "type": "string"
            },
            "example": "week"
          }
        ],
        "responses": {
          "200": {
            "description": "The object.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/v3/user/webhooks/event/settings": {
      "post": {
        "tags": [
          "Event Webhook"
        ],
        "summary": "Create an Event Webhook",
        "operationId": "CreateEventWebhook",
        "responses": {
          "201": {
            "description": "The webhook.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string",
                    "description": "Your receiver.",
                    "example": "https://your-app.example/sendgrid/events"
                  },
                  "enabled": {
                    "type": "boolean",
                    "description": "On.",
                    "example": true
                  },
                  "friendly_name": {
                    "type": "string",
                    "description": "A label."
                  },
                  "processed": {
                    "type": "boolean",
                    "description": "Send processed events.",
                    "example": true
                  },
                  "dropped": {
                    "type": "boolean",
                    "description": "Send dropped events.",
                    "example": true
                  },
                  "delivered": {
                    "type": "boolean",
                    "description": "Send delivered events.",
                    "example": true
                  },
                  "deferred": {
                    "type": "boolean",
                    "description": "Send deferred events.",
                    "example": true
                  },
                  "bounce": {
                    "type": "boolean",
                    "description": "Send bounce events.",
                    "example": true
                  },
                  "open": {
                    "type": "boolean",
                    "description": "Send open events.",
                    "example": true
                  },
                  "click": {
                    "type": "boolean",
                    "description": "Send click events.",
                    "example": true
                  },
                  "spam_report": {
                    "type": "boolean",
                    "description": "Send spam_report events.",
                    "example": true
                  },
                  "unsubscribe": {
                    "type": "boolean",
                    "description": "Send unsubscribe events.",
                    "example": true
                  },
                  "group_unsubscribe": {
                    "type": "boolean",
                    "description": "Send group_unsubscribe events.",
                    "example": true
                  },
                  "group_resubscribe": {
                    "type": "boolean",
                    "description": "Send group_resubscribe events.",
                    "example": true
                  }
                },
                "required": [
                  "url"
                ],
                "example": {
                  "url": "https://your-app.example/sendgrid/events",
                  "enabled": true,
                  "friendly_name": "Delivery events",
                  "processed": true,
                  "delivered": true,
                  "bounce": true,
                  "dropped": true,
                  "deferred": true,
                  "open": true,
                  "click": true,
                  "spam_report": true,
                  "unsubscribe": true,
                  "group_unsubscribe": true
                }
              },
              "example": {
                "url": "https://your-app.example/sendgrid/events",
                "enabled": true,
                "friendly_name": "Delivery events",
                "processed": true,
                "delivered": true,
                "bounce": true,
                "dropped": true,
                "deferred": true,
                "open": true,
                "click": true,
                "spam_report": true,
                "unsubscribe": true,
                "group_unsubscribe": true
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Event Webhook"
        ],
        "summary": "The legacy single webhook",
        "operationId": "GetLegacyEventWebhook",
        "description": "The oldest webhook, as the single-webhook API showed it.",
        "responses": {
          "200": {
            "description": "The object.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          }
        }
      },
      "patch": {
        "tags": [
          "Event Webhook"
        ],
        "summary": "Update the legacy single webhook",
        "operationId": "UpdateLegacyEventWebhook",
        "responses": {
          "200": {
            "description": "The object.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string",
                    "description": "Your receiver.",
                    "example": "https://your-app.example/sendgrid/events"
                  },
                  "enabled": {
                    "type": "boolean",
                    "description": "On.",
                    "example": true
                  },
                  "processed": {
                    "type": "boolean",
                    "description": "Send processed events.",
                    "example": true
                  },
                  "dropped": {
                    "type": "boolean",
                    "description": "Send dropped events.",
                    "example": true
                  },
                  "delivered": {
                    "type": "boolean",
                    "description": "Send delivered events.",
                    "example": true
                  },
                  "deferred": {
                    "type": "boolean",
                    "description": "Send deferred events.",
                    "example": true
                  },
                  "bounce": {
                    "type": "boolean",
                    "description": "Send bounce events.",
                    "example": true
                  },
                  "open": {
                    "type": "boolean",
                    "description": "Send open events.",
                    "example": true
                  },
                  "click": {
                    "type": "boolean",
                    "description": "Send click events.",
                    "example": true
                  },
                  "spam_report": {
                    "type": "boolean",
                    "description": "Send spam_report events.",
                    "example": true
                  },
                  "unsubscribe": {
                    "type": "boolean",
                    "description": "Send unsubscribe events.",
                    "example": true
                  },
                  "group_unsubscribe": {
                    "type": "boolean",
                    "description": "Send group_unsubscribe events.",
                    "example": true
                  },
                  "group_resubscribe": {
                    "type": "boolean",
                    "description": "Send group_resubscribe events.",
                    "example": true
                  }
                },
                "example": {
                  "url": "https://your-app.example/sendgrid/events",
                  "enabled": true,
                  "delivered": true,
                  "bounce": true
                }
              },
              "example": {
                "url": "https://your-app.example/sendgrid/events",
                "enabled": true,
                "delivered": true,
                "bounce": true
              }
            }
          }
        }
      }
    },
    "/v3/user/webhooks/event/settings/all": {
      "get": {
        "tags": [
          "Event Webhook"
        ],
        "summary": "List Event Webhooks",
        "operationId": "ListEventWebhooks",
        "responses": {
          "200": {
            "description": "The object.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          }
        }
      }
    },
    "/v3/user/webhooks/event/settings/{id}": {
      "get": {
        "tags": [
          "Event Webhook"
        ],
        "summary": "Get an Event Webhook",
        "operationId": "GetEventWebhook",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "A webhook id: the seed has one, disabled.",
            "schema": {
              "type": "string"
            },
            "example": "9e3779b1-87c1-7a00-478c-d040d864e2f2"
          }
        ],
        "responses": {
          "200": {
            "description": "The object.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      },
      "patch": {
        "tags": [
          "Event Webhook"
        ],
        "summary": "Update an Event Webhook",
        "operationId": "UpdateEventWebhook",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "A webhook id: the seed has one, disabled.",
            "schema": {
              "type": "string"
            },
            "example": "9e3779b1-87c1-7a00-478c-d040d864e2f2"
          }
        ],
        "responses": {
          "200": {
            "description": "The object.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string",
                    "description": "Your receiver."
                  },
                  "enabled": {
                    "type": "boolean",
                    "description": "On or off.",
                    "example": false
                  },
                  "processed": {
                    "type": "boolean",
                    "description": "Send processed events.",
                    "example": true
                  },
                  "dropped": {
                    "type": "boolean",
                    "description": "Send dropped events.",
                    "example": true
                  },
                  "delivered": {
                    "type": "boolean",
                    "description": "Send delivered events.",
                    "example": true
                  },
                  "deferred": {
                    "type": "boolean",
                    "description": "Send deferred events.",
                    "example": true
                  },
                  "bounce": {
                    "type": "boolean",
                    "description": "Send bounce events.",
                    "example": true
                  },
                  "open": {
                    "type": "boolean",
                    "description": "Send open events.",
                    "example": true
                  },
                  "click": {
                    "type": "boolean",
                    "description": "Send click events.",
                    "example": true
                  },
                  "spam_report": {
                    "type": "boolean",
                    "description": "Send spam_report events.",
                    "example": true
                  },
                  "unsubscribe": {
                    "type": "boolean",
                    "description": "Send unsubscribe events.",
                    "example": true
                  },
                  "group_unsubscribe": {
                    "type": "boolean",
                    "description": "Send group_unsubscribe events.",
                    "example": true
                  },
                  "group_resubscribe": {
                    "type": "boolean",
                    "description": "Send group_resubscribe events.",
                    "example": true
                  }
                },
                "example": {
                  "enabled": false
                }
              },
              "example": {
                "enabled": false
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Event Webhook"
        ],
        "summary": "Delete an Event Webhook",
        "operationId": "DeleteEventWebhook",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "A webhook id: the seed has one, disabled.",
            "schema": {
              "type": "string"
            },
            "example": "9e3779b1-87c1-7a00-478c-d040d864e2f2"
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted."
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/v3/user/webhooks/event/settings/signed/{id}": {
      "get": {
        "tags": [
          "Event Webhook"
        ],
        "summary": "Its public key",
        "operationId": "GetSignedEventWebhook",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "A webhook id: the seed has one, disabled.",
            "schema": {
              "type": "string"
            },
            "example": "9e3779b1-87c1-7a00-478c-d040d864e2f2"
          }
        ],
        "responses": {
          "200": {
            "description": "The object.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      },
      "patch": {
        "tags": [
          "Event Webhook"
        ],
        "summary": "Turn signing on or off",
        "operationId": "ToggleSignedEventWebhook",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "A webhook id: the seed has one, disabled.",
            "schema": {
              "type": "string"
            },
            "example": "9e3779b1-87c1-7a00-478c-d040d864e2f2"
          }
        ],
        "responses": {
          "200": {
            "description": "The object.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "enabled": {
                    "type": "boolean",
                    "description": "Sign the events.",
                    "example": true
                  }
                },
                "required": [
                  "enabled"
                ],
                "example": {
                  "enabled": true
                }
              },
              "example": {
                "enabled": true
              }
            }
          }
        }
      }
    },
    "/v3/user/webhooks/event/test": {
      "post": {
        "tags": [
          "Event Webhook"
        ],
        "summary": "Send test events",
        "operationId": "TestEventWebhook",
        "responses": {
          "204": {
            "description": "Sent."
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string",
                    "description": "Where to send them.",
                    "example": "https://your-app.example/sendgrid/events"
                  },
                  "id": {
                    "type": "string",
                    "description": "A webhook: signed like it if signing is on."
                  }
                },
                "required": [
                  "url"
                ],
                "example": {
                  "url": "https://your-app.example/sendgrid/events"
                }
              },
              "example": {
                "url": "https://your-app.example/sendgrid/events"
              }
            }
          }
        }
      }
    },
    "/v3/user/webhooks/parse/settings": {
      "get": {
        "tags": [
          "Inbound Parse"
        ],
        "summary": "List parse settings",
        "operationId": "ListParseSettings",
        "responses": {
          "200": {
            "description": "The object.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          }
        }
      },
      "post": {
        "tags": [
          "Inbound Parse"
        ],
        "summary": "Create a parse setting",
        "operationId": "CreateParseSetting",
        "responses": {
          "201": {
            "description": "The setting.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "hostname": {
                    "type": "string",
                    "description": "The domain mail is sent to.",
                    "example": "parse.example.com"
                  },
                  "url": {
                    "type": "string",
                    "description": "Your receiver.",
                    "example": "https://your-app.example/sendgrid/inbound"
                  },
                  "spam_check": {
                    "type": "boolean",
                    "description": "Add spam_score and spam_report.",
                    "example": false
                  },
                  "send_raw": {
                    "type": "boolean",
                    "description": "Post the whole MIME message as email.",
                    "example": false
                  }
                },
                "required": [
                  "hostname",
                  "url"
                ],
                "example": {
                  "hostname": "parse.example.com",
                  "url": "https://your-app.example/sendgrid/inbound",
                  "spam_check": false,
                  "send_raw": false
                }
              },
              "example": {
                "hostname": "parse.example.com",
                "url": "https://your-app.example/sendgrid/inbound",
                "spam_check": false,
                "send_raw": false
              }
            }
          }
        }
      }
    },
    "/v3/user/webhooks/parse/settings/{hostname}": {
      "get": {
        "tags": [
          "Inbound Parse"
        ],
        "summary": "Get a parse setting",
        "operationId": "GetParseSetting",
        "parameters": [
          {
            "name": "hostname",
            "in": "path",
            "required": true,
            "description": "A parse hostname: the seed has inbound.example.com.",
            "schema": {
              "type": "string"
            },
            "example": "inbound.example.com"
          }
        ],
        "responses": {
          "200": {
            "description": "The object.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      },
      "patch": {
        "tags": [
          "Inbound Parse"
        ],
        "summary": "Update a parse setting",
        "operationId": "UpdateParseSetting",
        "parameters": [
          {
            "name": "hostname",
            "in": "path",
            "required": true,
            "description": "A parse hostname: the seed has inbound.example.com.",
            "schema": {
              "type": "string"
            },
            "example": "inbound.example.com"
          }
        ],
        "responses": {
          "200": {
            "description": "The object.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string",
                    "description": "Your receiver."
                  },
                  "spam_check": {
                    "type": "boolean",
                    "description": "Spam check.",
                    "example": true
                  },
                  "send_raw": {
                    "type": "boolean",
                    "description": "Raw MIME."
                  }
                },
                "example": {
                  "spam_check": true
                }
              },
              "example": {
                "spam_check": true
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Inbound Parse"
        ],
        "summary": "Delete a parse setting",
        "operationId": "DeleteParseSetting",
        "parameters": [
          {
            "name": "hostname",
            "in": "path",
            "required": true,
            "description": "A parse hostname: the seed has inbound.example.com.",
            "schema": {
              "type": "string"
            },
            "example": "inbound.example.com"
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted."
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/v3/suppression/bounces": {
      "get": {
        "tags": [
          "Suppressions"
        ],
        "summary": "List bounces",
        "operationId": "ListBounces",
        "parameters": [
          {
            "name": "start_time",
            "in": "query",
            "required": false,
            "description": "Unix time.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "end_time",
            "in": "query",
            "required": false,
            "description": "Unix time.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "email",
            "in": "query",
            "required": false,
            "description": "Only this address.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Up to 500.",
            "schema": {
              "type": "integer"
            },
            "example": 50
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "description": "Skip this many.",
            "schema": {
              "type": "integer"
            },
            "example": 0
          }
        ],
        "responses": {
          "200": {
            "description": "The object.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          }
        }
      },
      "delete": {
        "tags": [
          "Suppressions"
        ],
        "summary": "Delete bounces",
        "operationId": "DeleteBounces",
        "responses": {
          "204": {
            "description": "Deleted."
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "delete_all": {
                    "type": "boolean",
                    "description": "Every one."
                  },
                  "emails": {
                    "type": "array",
                    "description": "Or these.",
                    "items": {},
                    "example": [
                      "someone@example.com"
                    ]
                  }
                },
                "example": {
                  "emails": [
                    "someone@example.com"
                  ]
                }
              },
              "example": {
                "emails": [
                  "someone@example.com"
                ]
              }
            }
          }
        }
      }
    },
    "/v3/suppression/bounces/{email}": {
      "get": {
        "tags": [
          "Suppressions"
        ],
        "summary": "Get one of the bounces",
        "operationId": "GetBounce",
        "parameters": [
          {
            "name": "email",
            "in": "path",
            "required": true,
            "description": "The address.",
            "schema": {
              "type": "string"
            },
            "example": "someone@example.com"
          }
        ],
        "responses": {
          "200": {
            "description": "The object.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      },
      "delete": {
        "tags": [
          "Suppressions"
        ],
        "summary": "Delete one of the bounces",
        "operationId": "DeleteOneBounce",
        "parameters": [
          {
            "name": "email",
            "in": "path",
            "required": true,
            "description": "The address.",
            "schema": {
              "type": "string"
            },
            "example": "someone@example.com"
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted."
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/v3/suppression/blocks": {
      "get": {
        "tags": [
          "Suppressions"
        ],
        "summary": "List blocks",
        "operationId": "ListBlocks",
        "parameters": [
          {
            "name": "start_time",
            "in": "query",
            "required": false,
            "description": "Unix time.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "end_time",
            "in": "query",
            "required": false,
            "description": "Unix time.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "email",
            "in": "query",
            "required": false,
            "description": "Only this address.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Up to 500.",
            "schema": {
              "type": "integer"
            },
            "example": 50
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "description": "Skip this many.",
            "schema": {
              "type": "integer"
            },
            "example": 0
          }
        ],
        "responses": {
          "200": {
            "description": "The object.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          }
        }
      },
      "delete": {
        "tags": [
          "Suppressions"
        ],
        "summary": "Delete blocks",
        "operationId": "DeleteBlocks",
        "responses": {
          "204": {
            "description": "Deleted."
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "delete_all": {
                    "type": "boolean",
                    "description": "Every one."
                  },
                  "emails": {
                    "type": "array",
                    "description": "Or these.",
                    "items": {},
                    "example": [
                      "someone@example.com"
                    ]
                  }
                },
                "example": {
                  "emails": [
                    "someone@example.com"
                  ]
                }
              },
              "example": {
                "emails": [
                  "someone@example.com"
                ]
              }
            }
          }
        }
      }
    },
    "/v3/suppression/blocks/{email}": {
      "get": {
        "tags": [
          "Suppressions"
        ],
        "summary": "Get one of the blocks",
        "operationId": "GetBlock",
        "parameters": [
          {
            "name": "email",
            "in": "path",
            "required": true,
            "description": "The address.",
            "schema": {
              "type": "string"
            },
            "example": "someone@example.com"
          }
        ],
        "responses": {
          "200": {
            "description": "The object.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      },
      "delete": {
        "tags": [
          "Suppressions"
        ],
        "summary": "Delete one of the blocks",
        "operationId": "DeleteOneBlock",
        "parameters": [
          {
            "name": "email",
            "in": "path",
            "required": true,
            "description": "The address.",
            "schema": {
              "type": "string"
            },
            "example": "someone@example.com"
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted."
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/v3/suppression/spam_reports": {
      "get": {
        "tags": [
          "Suppressions"
        ],
        "summary": "List spam reports",
        "operationId": "ListSpamReports",
        "parameters": [
          {
            "name": "start_time",
            "in": "query",
            "required": false,
            "description": "Unix time.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "end_time",
            "in": "query",
            "required": false,
            "description": "Unix time.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "email",
            "in": "query",
            "required": false,
            "description": "Only this address.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Up to 500.",
            "schema": {
              "type": "integer"
            },
            "example": 50
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "description": "Skip this many.",
            "schema": {
              "type": "integer"
            },
            "example": 0
          }
        ],
        "responses": {
          "200": {
            "description": "The object.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          }
        }
      },
      "delete": {
        "tags": [
          "Suppressions"
        ],
        "summary": "Delete spam reports",
        "operationId": "DeleteSpamReports",
        "responses": {
          "204": {
            "description": "Deleted."
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "delete_all": {
                    "type": "boolean",
                    "description": "Every one."
                  },
                  "emails": {
                    "type": "array",
                    "description": "Or these.",
                    "items": {},
                    "example": [
                      "someone@example.com"
                    ]
                  }
                },
                "example": {
                  "emails": [
                    "someone@example.com"
                  ]
                }
              },
              "example": {
                "emails": [
                  "someone@example.com"
                ]
              }
            }
          }
        }
      }
    },
    "/v3/suppression/spam_reports/{email}": {
      "get": {
        "tags": [
          "Suppressions"
        ],
        "summary": "Get one of the spam reports",
        "operationId": "GetSpamReport",
        "parameters": [
          {
            "name": "email",
            "in": "path",
            "required": true,
            "description": "The address.",
            "schema": {
              "type": "string"
            },
            "example": "someone@example.com"
          }
        ],
        "responses": {
          "200": {
            "description": "The object.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      },
      "delete": {
        "tags": [
          "Suppressions"
        ],
        "summary": "Delete one of the spam reports",
        "operationId": "DeleteOneSpamReport",
        "parameters": [
          {
            "name": "email",
            "in": "path",
            "required": true,
            "description": "The address.",
            "schema": {
              "type": "string"
            },
            "example": "someone@example.com"
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted."
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/v3/suppression/invalid_emails": {
      "get": {
        "tags": [
          "Suppressions"
        ],
        "summary": "List invalid emails",
        "operationId": "ListInvalidEmails",
        "parameters": [
          {
            "name": "start_time",
            "in": "query",
            "required": false,
            "description": "Unix time.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "end_time",
            "in": "query",
            "required": false,
            "description": "Unix time.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "email",
            "in": "query",
            "required": false,
            "description": "Only this address.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Up to 500.",
            "schema": {
              "type": "integer"
            },
            "example": 50
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "description": "Skip this many.",
            "schema": {
              "type": "integer"
            },
            "example": 0
          }
        ],
        "responses": {
          "200": {
            "description": "The object.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          }
        }
      },
      "delete": {
        "tags": [
          "Suppressions"
        ],
        "summary": "Delete invalid emails",
        "operationId": "DeleteInvalidEmails",
        "responses": {
          "204": {
            "description": "Deleted."
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "delete_all": {
                    "type": "boolean",
                    "description": "Every one."
                  },
                  "emails": {
                    "type": "array",
                    "description": "Or these.",
                    "items": {},
                    "example": [
                      "someone@example.com"
                    ]
                  }
                },
                "example": {
                  "emails": [
                    "someone@example.com"
                  ]
                }
              },
              "example": {
                "emails": [
                  "someone@example.com"
                ]
              }
            }
          }
        }
      }
    },
    "/v3/suppression/invalid_emails/{email}": {
      "get": {
        "tags": [
          "Suppressions"
        ],
        "summary": "Get one of the invalid emails",
        "operationId": "GetInvalidEmail",
        "parameters": [
          {
            "name": "email",
            "in": "path",
            "required": true,
            "description": "The address.",
            "schema": {
              "type": "string"
            },
            "example": "someone@example.com"
          }
        ],
        "responses": {
          "200": {
            "description": "The object.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      },
      "delete": {
        "tags": [
          "Suppressions"
        ],
        "summary": "Delete one of the invalid emails",
        "operationId": "DeleteOneInvalidEmail",
        "parameters": [
          {
            "name": "email",
            "in": "path",
            "required": true,
            "description": "The address.",
            "schema": {
              "type": "string"
            },
            "example": "someone@example.com"
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted."
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/v3/suppression/unsubscribes": {
      "get": {
        "tags": [
          "Suppressions"
        ],
        "summary": "List global unsubscribes",
        "operationId": "ListGlobalUnsubscribes",
        "parameters": [
          {
            "name": "email",
            "in": "query",
            "required": false,
            "description": "Only this address.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Up to 500.",
            "schema": {
              "type": "integer"
            },
            "example": 50
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "description": "Skip this many.",
            "schema": {
              "type": "integer"
            },
            "example": 0
          }
        ],
        "responses": {
          "200": {
            "description": "The object.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          }
        }
      }
    },
    "/v3/asm/suppressions/global": {
      "post": {
        "tags": [
          "Suppressions"
        ],
        "summary": "Unsubscribe addresses globally",
        "operationId": "AddGlobalSuppressions",
        "responses": {
          "201": {
            "description": "Added.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "recipient_emails": {
                    "type": "array",
                    "description": "The addresses.",
                    "items": {},
                    "example": [
                      "someone@example.com"
                    ]
                  }
                },
                "required": [
                  "recipient_emails"
                ],
                "example": {
                  "recipient_emails": [
                    "someone@example.com"
                  ]
                }
              },
              "example": {
                "recipient_emails": [
                  "someone@example.com"
                ]
              }
            }
          }
        }
      }
    },
    "/v3/asm/suppressions/global/{email}": {
      "get": {
        "tags": [
          "Suppressions"
        ],
        "summary": "Is an address globally unsubscribed?",
        "operationId": "GetGlobalSuppression",
        "parameters": [
          {
            "name": "email",
            "in": "path",
            "required": true,
            "description": "The address.",
            "schema": {
              "type": "string"
            },
            "example": "someone@example.com"
          }
        ],
        "responses": {
          "200": {
            "description": "The object.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      },
      "delete": {
        "tags": [
          "Suppressions"
        ],
        "summary": "Resubscribe an address",
        "operationId": "DeleteGlobalSuppression",
        "parameters": [
          {
            "name": "email",
            "in": "path",
            "required": true,
            "description": "The address.",
            "schema": {
              "type": "string"
            },
            "example": "someone@example.com"
          }
        ],
        "responses": {
          "204": {
            "description": "Removed."
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/v3/asm/groups": {
      "get": {
        "tags": [
          "Unsubscribe Groups"
        ],
        "summary": "List groups",
        "operationId": "ListGroups",
        "responses": {
          "200": {
            "description": "The object.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          }
        }
      },
      "post": {
        "tags": [
          "Unsubscribe Groups"
        ],
        "summary": "Create a group",
        "operationId": "CreateGroup",
        "responses": {
          "201": {
            "description": "The group.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Up to 30 characters.",
                    "example": "Weekly digest"
                  },
                  "description": {
                    "type": "string",
                    "description": "Up to 100 characters.",
                    "example": "A summary of the week, every Monday."
                  },
                  "is_default": {
                    "type": "boolean",
                    "description": "The default group.",
                    "example": false
                  }
                },
                "required": [
                  "name",
                  "description"
                ],
                "example": {
                  "name": "Weekly digest",
                  "description": "A summary of the week, every Monday.",
                  "is_default": false
                }
              },
              "example": {
                "name": "Weekly digest",
                "description": "A summary of the week, every Monday.",
                "is_default": false
              }
            }
          }
        }
      }
    },
    "/v3/asm/groups/{group_id}": {
      "get": {
        "tags": [
          "Unsubscribe Groups"
        ],
        "summary": "Get a group",
        "operationId": "GetGroup",
        "parameters": [
          {
            "name": "group_id",
            "in": "path",
            "required": true,
            "description": "A group id: 16401 or 16402 in the seed.",
            "schema": {
              "type": "string"
            },
            "example": "16401"
          }
        ],
        "responses": {
          "200": {
            "description": "The object.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      },
      "patch": {
        "tags": [
          "Unsubscribe Groups"
        ],
        "summary": "Update a group",
        "operationId": "UpdateGroup",
        "parameters": [
          {
            "name": "group_id",
            "in": "path",
            "required": true,
            "description": "A group id: 16401 or 16402 in the seed.",
            "schema": {
              "type": "string"
            },
            "example": "16401"
          }
        ],
        "responses": {
          "201": {
            "description": "The group.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Up to 30 characters."
                  },
                  "description": {
                    "type": "string",
                    "description": "Up to 100 characters.",
                    "example": "Features and releases, monthly."
                  },
                  "is_default": {
                    "type": "boolean",
                    "description": "The default group."
                  }
                },
                "example": {
                  "description": "Features and releases, monthly."
                }
              },
              "example": {
                "description": "Features and releases, monthly."
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Unsubscribe Groups"
        ],
        "summary": "Delete a group",
        "operationId": "DeleteGroup",
        "parameters": [
          {
            "name": "group_id",
            "in": "path",
            "required": true,
            "description": "A group id: 16401 or 16402 in the seed.",
            "schema": {
              "type": "string"
            },
            "example": "16401"
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted."
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/v3/asm/groups/{group_id}/suppressions": {
      "get": {
        "tags": [
          "Unsubscribe Groups"
        ],
        "summary": "Who left the group",
        "operationId": "ListGroupSuppressions",
        "parameters": [
          {
            "name": "group_id",
            "in": "path",
            "required": true,
            "description": "A group id: 16401 or 16402 in the seed.",
            "schema": {
              "type": "string"
            },
            "example": "16401"
          }
        ],
        "responses": {
          "200": {
            "description": "The object.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      },
      "post": {
        "tags": [
          "Unsubscribe Groups"
        ],
        "summary": "Unsubscribe addresses from the group",
        "operationId": "AddGroupSuppressions",
        "parameters": [
          {
            "name": "group_id",
            "in": "path",
            "required": true,
            "description": "A group id: 16401 or 16402 in the seed.",
            "schema": {
              "type": "string"
            },
            "example": "16401"
          }
        ],
        "responses": {
          "201": {
            "description": "Added.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "recipient_emails": {
                    "type": "array",
                    "description": "The addresses.",
                    "items": {},
                    "example": [
                      "someone@example.com"
                    ]
                  }
                },
                "required": [
                  "recipient_emails"
                ],
                "example": {
                  "recipient_emails": [
                    "someone@example.com"
                  ]
                }
              },
              "example": {
                "recipient_emails": [
                  "someone@example.com"
                ]
              }
            }
          }
        }
      }
    },
    "/v3/asm/groups/{group_id}/suppressions/search": {
      "post": {
        "tags": [
          "Unsubscribe Groups"
        ],
        "summary": "Which of these left the group",
        "operationId": "SearchGroupSuppressions",
        "parameters": [
          {
            "name": "group_id",
            "in": "path",
            "required": true,
            "description": "A group id: 16401 or 16402 in the seed.",
            "schema": {
              "type": "string"
            },
            "example": "16401"
          }
        ],
        "responses": {
          "200": {
            "description": "The object.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "recipient_emails": {
                    "type": "array",
                    "description": "The addresses.",
                    "items": {},
                    "example": [
                      "someone@example.com"
                    ]
                  }
                },
                "required": [
                  "recipient_emails"
                ],
                "example": {
                  "recipient_emails": [
                    "someone@example.com"
                  ]
                }
              },
              "example": {
                "recipient_emails": [
                  "someone@example.com"
                ]
              }
            }
          }
        }
      }
    },
    "/v3/asm/groups/{group_id}/suppressions/{email}": {
      "delete": {
        "tags": [
          "Unsubscribe Groups"
        ],
        "summary": "Resubscribe an address to the group",
        "operationId": "DeleteGroupSuppression",
        "parameters": [
          {
            "name": "group_id",
            "in": "path",
            "required": true,
            "description": "A group id: 16401 or 16402 in the seed.",
            "schema": {
              "type": "string"
            },
            "example": "16401"
          },
          {
            "name": "email",
            "in": "path",
            "required": true,
            "description": "The address.",
            "schema": {
              "type": "string"
            },
            "example": "someone@example.com"
          }
        ],
        "responses": {
          "204": {
            "description": "Removed."
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/v3/asm/suppressions": {
      "get": {
        "tags": [
          "Unsubscribe Groups"
        ],
        "summary": "Every group suppression",
        "operationId": "ListAllGroupSuppressions",
        "responses": {
          "200": {
            "description": "The object.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          }
        }
      }
    },
    "/v3/asm/suppressions/{email}": {
      "get": {
        "tags": [
          "Unsubscribe Groups"
        ],
        "summary": "An address’s groups",
        "operationId": "GetSuppressionGroupsForEmail",
        "parameters": [
          {
            "name": "email",
            "in": "path",
            "required": true,
            "description": "The address.",
            "schema": {
              "type": "string"
            },
            "example": "someone@example.com"
          }
        ],
        "responses": {
          "200": {
            "description": "The object.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          }
        }
      }
    },
    "/v3/templates": {
      "get": {
        "tags": [
          "Templates"
        ],
        "summary": "List templates",
        "operationId": "ListTemplates",
        "parameters": [
          {
            "name": "generations",
            "in": "query",
            "required": false,
            "description": "legacy, dynamic or legacy,dynamic (default legacy).",
            "schema": {
              "type": "string"
            },
            "example": "dynamic"
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "description": "Required: 1 to 200.",
            "schema": {
              "type": "integer"
            },
            "example": 18
          },
          {
            "name": "page_token",
            "in": "query",
            "required": false,
            "description": "From _metadata.next.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The object.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      },
      "post": {
        "tags": [
          "Templates"
        ],
        "summary": "Create a template",
        "operationId": "CreateTemplate",
        "responses": {
          "201": {
            "description": "The template.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Up to 100 characters.",
                    "example": "Shipping notice"
                  },
                  "generation": {
                    "type": "string",
                    "description": "legacy or dynamic.",
                    "example": "dynamic"
                  }
                },
                "required": [
                  "name"
                ],
                "example": {
                  "name": "Shipping notice",
                  "generation": "dynamic"
                }
              },
              "example": {
                "name": "Shipping notice",
                "generation": "dynamic"
              }
            }
          }
        }
      }
    },
    "/v3/templates/{template_id}": {
      "get": {
        "tags": [
          "Templates"
        ],
        "summary": "Get a template",
        "operationId": "GetTemplate",
        "parameters": [
          {
            "name": "template_id",
            "in": "path",
            "required": true,
            "description": "A template id: the seed has three dynamic ones.",
            "schema": {
              "type": "string"
            },
            "example": "d-9e3779b1d4ee281dbf79a0e837f20e1e"
          }
        ],
        "responses": {
          "200": {
            "description": "The object.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      },
      "patch": {
        "tags": [
          "Templates"
        ],
        "summary": "Rename a template",
        "operationId": "UpdateTemplate",
        "parameters": [
          {
            "name": "template_id",
            "in": "path",
            "required": true,
            "description": "A template id: the seed has three dynamic ones.",
            "schema": {
              "type": "string"
            },
            "example": "d-9e3779b1d4ee281dbf79a0e837f20e1e"
          }
        ],
        "responses": {
          "200": {
            "description": "The object.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Up to 100 characters.",
                    "example": "Welcome (2026)"
                  }
                },
                "required": [
                  "name"
                ],
                "example": {
                  "name": "Welcome (2026)"
                }
              },
              "example": {
                "name": "Welcome (2026)"
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Templates"
        ],
        "summary": "Duplicate a template",
        "operationId": "DuplicateTemplate",
        "parameters": [
          {
            "name": "template_id",
            "in": "path",
            "required": true,
            "description": "A template id: the seed has three dynamic ones.",
            "schema": {
              "type": "string"
            },
            "example": "d-9e3779b1d4ee281dbf79a0e837f20e1e"
          }
        ],
        "responses": {
          "201": {
            "description": "The copy.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "The copy’s name.",
                    "example": "Welcome copy"
                  }
                },
                "example": {
                  "name": "Welcome copy"
                }
              },
              "example": {
                "name": "Welcome copy"
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Templates"
        ],
        "summary": "Delete a template",
        "operationId": "DeleteTemplate",
        "parameters": [
          {
            "name": "template_id",
            "in": "path",
            "required": true,
            "description": "A template id: the seed has three dynamic ones.",
            "schema": {
              "type": "string"
            },
            "example": "d-9e3779b1d4ee281dbf79a0e837f20e1e"
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted."
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/v3/templates/{template_id}/versions": {
      "post": {
        "tags": [
          "Templates"
        ],
        "summary": "Create a version",
        "operationId": "CreateTemplateVersion",
        "parameters": [
          {
            "name": "template_id",
            "in": "path",
            "required": true,
            "description": "A template id: the seed has three dynamic ones.",
            "schema": {
              "type": "string"
            },
            "example": "d-9e3779b1d4ee281dbf79a0e837f20e1e"
          }
        ],
        "responses": {
          "201": {
            "description": "The version.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Up to 100 characters.",
                    "example": "Welcome v2"
                  },
                  "subject": {
                    "type": "string",
                    "description": "Up to 255 characters; Handlebars in a dynamic template.",
                    "example": "Welcome, {{first_name}}!"
                  },
                  "html_content": {
                    "type": "string",
                    "description": "The HTML.",
                    "example": "<h1>Hi {{first_name}}</h1>"
                  },
                  "plain_content": {
                    "type": "string",
                    "description": "The text; made from the HTML when generate_plain_content is on."
                  },
                  "generate_plain_content": {
                    "type": "boolean",
                    "description": "Make the text from the HTML.",
                    "example": true
                  },
                  "active": {
                    "type": "integer",
                    "description": "1 makes it the version sends use.",
                    "example": 1
                  },
                  "editor": {
                    "type": "string",
                    "description": "code or design."
                  },
                  "test_data": {
                    "type": "string",
                    "description": "Sample data, as a JSON string."
                  }
                },
                "required": [
                  "name",
                  "subject"
                ],
                "example": {
                  "name": "Welcome v2",
                  "subject": "Welcome, {{first_name}}!",
                  "html_content": "<h1>Hi {{first_name}}</h1><p>Glad you’re here.</p>",
                  "active": 1
                }
              },
              "example": {
                "name": "Welcome v2",
                "subject": "Welcome, {{first_name}}!",
                "html_content": "<h1>Hi {{first_name}}</h1><p>Glad you’re here.</p>",
                "active": 1
              }
            }
          }
        }
      }
    },
    "/v3/templates/{template_id}/versions/{version_id}": {
      "get": {
        "tags": [
          "Templates"
        ],
        "summary": "Get a version",
        "operationId": "GetTemplateVersion",
        "parameters": [
          {
            "name": "template_id",
            "in": "path",
            "required": true,
            "description": "A template id: the seed has three dynamic ones.",
            "schema": {
              "type": "string"
            },
            "example": "d-9e3779b1d4ee281dbf79a0e837f20e1e"
          },
          {
            "name": "version_id",
            "in": "path",
            "required": true,
            "description": "A version id.",
            "schema": {
              "type": "string"
            },
            "example": "9e3779b1-e68d-1a16-6e39-e3851aa3ba7f"
          }
        ],
        "responses": {
          "200": {
            "description": "The object.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      },
      "patch": {
        "tags": [
          "Templates"
        ],
        "summary": "Edit a version",
        "operationId": "UpdateTemplateVersion",
        "parameters": [
          {
            "name": "template_id",
            "in": "path",
            "required": true,
            "description": "A template id: the seed has three dynamic ones.",
            "schema": {
              "type": "string"
            },
            "example": "d-9e3779b1d4ee281dbf79a0e837f20e1e"
          },
          {
            "name": "version_id",
            "in": "path",
            "required": true,
            "description": "A version id.",
            "schema": {
              "type": "string"
            },
            "example": "9e3779b1-e68d-1a16-6e39-e3851aa3ba7f"
          }
        ],
        "responses": {
          "200": {
            "description": "The object.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Up to 100 characters.",
                    "example": "Welcome v2"
                  },
                  "subject": {
                    "type": "string",
                    "description": "Up to 255 characters; Handlebars in a dynamic template.",
                    "example": "Welcome, {{first_name}}!"
                  },
                  "html_content": {
                    "type": "string",
                    "description": "The HTML.",
                    "example": "<h1>Hi {{first_name}}</h1>"
                  },
                  "plain_content": {
                    "type": "string",
                    "description": "The text; made from the HTML when generate_plain_content is on."
                  },
                  "generate_plain_content": {
                    "type": "boolean",
                    "description": "Make the text from the HTML.",
                    "example": true
                  },
                  "active": {
                    "type": "integer",
                    "description": "1 makes it the version sends use.",
                    "example": 1
                  },
                  "editor": {
                    "type": "string",
                    "description": "code or design."
                  },
                  "test_data": {
                    "type": "string",
                    "description": "Sample data, as a JSON string."
                  }
                },
                "example": {
                  "subject": "Welcome aboard, {{first_name}}!"
                }
              },
              "example": {
                "subject": "Welcome aboard, {{first_name}}!"
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Templates"
        ],
        "summary": "Delete a version",
        "operationId": "DeleteTemplateVersion",
        "parameters": [
          {
            "name": "template_id",
            "in": "path",
            "required": true,
            "description": "A template id: the seed has three dynamic ones.",
            "schema": {
              "type": "string"
            },
            "example": "d-9e3779b1d4ee281dbf79a0e837f20e1e"
          },
          {
            "name": "version_id",
            "in": "path",
            "required": true,
            "description": "A version id.",
            "schema": {
              "type": "string"
            },
            "example": "9e3779b1-e68d-1a16-6e39-e3851aa3ba7f"
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted."
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/v3/templates/{template_id}/versions/{version_id}/activate": {
      "post": {
        "tags": [
          "Templates"
        ],
        "summary": "Activate a version",
        "operationId": "ActivateTemplateVersion",
        "parameters": [
          {
            "name": "template_id",
            "in": "path",
            "required": true,
            "description": "A template id: the seed has three dynamic ones.",
            "schema": {
              "type": "string"
            },
            "example": "d-9e3779b1d4ee281dbf79a0e837f20e1e"
          },
          {
            "name": "version_id",
            "in": "path",
            "required": true,
            "description": "A version id.",
            "schema": {
              "type": "string"
            },
            "example": "9e3779b1-e68d-1a16-6e39-e3851aa3ba7f"
          }
        ],
        "responses": {
          "200": {
            "description": "The object.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/v3/verified_senders": {
      "get": {
        "tags": [
          "Sender Identity"
        ],
        "summary": "List verified senders",
        "operationId": "ListVerifiedSenders",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "How many.",
            "schema": {
              "type": "integer"
            },
            "example": 100
          },
          {
            "name": "lastSeenID",
            "in": "query",
            "required": false,
            "description": "Senders after this id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "id",
            "in": "query",
            "required": false,
            "description": "Only this one.",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The object.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          }
        }
      },
      "post": {
        "tags": [
          "Sender Identity"
        ],
        "summary": "Add a single sender",
        "operationId": "CreateVerifiedSender",
        "description": "It verifies itself five seconds later: there is no inbox here to click the link in.",
        "responses": {
          "201": {
            "description": "The sender, not yet verified.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "nickname": {
                    "type": "string",
                    "description": "nickname",
                    "example": "Orders"
                  },
                  "from_email": {
                    "type": "string",
                    "description": "from email",
                    "example": "orders@example.org"
                  },
                  "from_name": {
                    "type": "string",
                    "description": "from name",
                    "example": "Example Orders"
                  },
                  "reply_to": {
                    "type": "string",
                    "description": "reply to",
                    "example": "orders@example.org"
                  },
                  "reply_to_name": {
                    "type": "string",
                    "description": "reply to name",
                    "example": "Example Orders"
                  },
                  "address": {
                    "type": "string",
                    "description": "address",
                    "example": "500 Market St"
                  },
                  "city": {
                    "type": "string",
                    "description": "city",
                    "example": "San Francisco"
                  },
                  "state": {
                    "type": "string",
                    "description": "state",
                    "example": "CA"
                  },
                  "zip": {
                    "type": "string",
                    "description": "zip",
                    "example": "94105"
                  },
                  "country": {
                    "type": "string",
                    "description": "country",
                    "example": "USA"
                  }
                },
                "required": [
                  "nickname",
                  "from_email",
                  "reply_to"
                ],
                "example": {
                  "nickname": "Orders",
                  "from_email": "orders@example.org",
                  "from_name": "Example Orders",
                  "reply_to": "orders@example.org",
                  "reply_to_name": "Example Orders",
                  "address": "500 Market St",
                  "city": "San Francisco",
                  "state": "CA",
                  "zip": "94105",
                  "country": "USA"
                }
              },
              "example": {
                "nickname": "Orders",
                "from_email": "orders@example.org",
                "from_name": "Example Orders",
                "reply_to": "orders@example.org",
                "reply_to_name": "Example Orders",
                "address": "500 Market St",
                "city": "San Francisco",
                "state": "CA",
                "zip": "94105",
                "country": "USA"
              }
            }
          }
        }
      }
    },
    "/v3/verified_senders/{id}": {
      "patch": {
        "tags": [
          "Sender Identity"
        ],
        "summary": "Edit a sender",
        "operationId": "UpdateVerifiedSender",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "A sender id.",
            "schema": {
              "type": "string"
            },
            "example": "1"
          }
        ],
        "responses": {
          "200": {
            "description": "The object.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "nickname": {
                    "type": "string",
                    "description": "nickname",
                    "example": "Orders"
                  },
                  "from_email": {
                    "type": "string",
                    "description": "from email",
                    "example": "orders@example.org"
                  },
                  "from_name": {
                    "type": "string",
                    "description": "from name",
                    "example": "Example Orders"
                  },
                  "reply_to": {
                    "type": "string",
                    "description": "reply to",
                    "example": "orders@example.org"
                  },
                  "reply_to_name": {
                    "type": "string",
                    "description": "reply to name",
                    "example": "Example Orders"
                  },
                  "address": {
                    "type": "string",
                    "description": "address",
                    "example": "500 Market St"
                  },
                  "city": {
                    "type": "string",
                    "description": "city",
                    "example": "San Francisco"
                  },
                  "state": {
                    "type": "string",
                    "description": "state",
                    "example": "CA"
                  },
                  "zip": {
                    "type": "string",
                    "description": "zip",
                    "example": "94105"
                  },
                  "country": {
                    "type": "string",
                    "description": "country",
                    "example": "USA"
                  }
                },
                "example": {
                  "from_name": "Example Support Team"
                }
              },
              "example": {
                "from_name": "Example Support Team"
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Sender Identity"
        ],
        "summary": "Delete a sender",
        "operationId": "DeleteVerifiedSender",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "A sender id.",
            "schema": {
              "type": "string"
            },
            "example": "2"
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted."
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/v3/verified_senders/resend/{id}": {
      "post": {
        "tags": [
          "Sender Identity"
        ],
        "summary": "Resend the verification",
        "operationId": "ResendVerifiedSender",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "A sender id.",
            "schema": {
              "type": "string"
            },
            "example": "1"
          }
        ],
        "responses": {
          "204": {
            "description": "Sent."
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/v3/verified_senders/steps_completed": {
      "get": {
        "tags": [
          "Sender Identity"
        ],
        "summary": "Whether a domain or sender is verified",
        "operationId": "GetVerifiedSenderSteps",
        "responses": {
          "200": {
            "description": "The object.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          }
        }
      }
    },
    "/v3/whitelabel/domains": {
      "get": {
        "tags": [
          "Sender Identity"
        ],
        "summary": "List authenticated domains",
        "operationId": "ListDomains",
        "parameters": [
          {
            "name": "domain",
            "in": "query",
            "required": false,
            "description": "Only this domain.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "How many.",
            "schema": {
              "type": "integer"
            },
            "example": 50
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "description": "Skip this many.",
            "schema": {
              "type": "integer"
            },
            "example": 0
          }
        ],
        "responses": {
          "200": {
            "description": "The object.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          }
        }
      },
      "post": {
        "tags": [
          "Sender Identity"
        ],
        "summary": "Authenticate a domain",
        "operationId": "CreateDomain",
        "description": "Answers the DNS records to add, valid: false; validate it to send from it.",
        "responses": {
          "201": {
            "description": "The domain and its DNS records.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "domain": {
                    "type": "string",
                    "description": "Your domain.",
                    "example": "yourcompany.example"
                  },
                  "subdomain": {
                    "type": "string",
                    "description": "Default em####."
                  },
                  "automatic_security": {
                    "type": "boolean",
                    "description": "CNAME records (default) or MX/TXT.",
                    "example": true
                  },
                  "custom_spf": {
                    "type": "boolean",
                    "description": "Custom SPF."
                  },
                  "default": {
                    "type": "boolean",
                    "description": "The default domain."
                  }
                },
                "required": [
                  "domain"
                ],
                "example": {
                  "domain": "yourcompany.example",
                  "automatic_security": true
                }
              },
              "example": {
                "domain": "yourcompany.example",
                "automatic_security": true
              }
            }
          }
        }
      }
    },
    "/v3/whitelabel/domains/default": {
      "get": {
        "tags": [
          "Sender Identity"
        ],
        "summary": "The default domain",
        "operationId": "GetDefaultDomain",
        "responses": {
          "200": {
            "description": "The object.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          }
        }
      }
    },
    "/v3/whitelabel/domains/{domain_id}": {
      "get": {
        "tags": [
          "Sender Identity"
        ],
        "summary": "Get a domain",
        "operationId": "GetDomain",
        "parameters": [
          {
            "name": "domain_id",
            "in": "path",
            "required": true,
            "description": "A domain id: 1 is example.com.",
            "schema": {
              "type": "string"
            },
            "example": "1"
          }
        ],
        "responses": {
          "200": {
            "description": "The object.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      },
      "patch": {
        "tags": [
          "Sender Identity"
        ],
        "summary": "Update a domain",
        "operationId": "UpdateDomain",
        "parameters": [
          {
            "name": "domain_id",
            "in": "path",
            "required": true,
            "description": "A domain id: 1 is example.com.",
            "schema": {
              "type": "string"
            },
            "example": "1"
          }
        ],
        "responses": {
          "200": {
            "description": "The object.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "default": {
                    "type": "boolean",
                    "description": "The default domain.",
                    "example": true
                  },
                  "custom_spf": {
                    "type": "boolean",
                    "description": "Custom SPF."
                  }
                },
                "example": {
                  "default": true
                }
              },
              "example": {
                "default": true
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Sender Identity"
        ],
        "summary": "Delete a domain",
        "operationId": "DeleteDomain",
        "parameters": [
          {
            "name": "domain_id",
            "in": "path",
            "required": true,
            "description": "A domain id (add one first).",
            "schema": {
              "type": "string"
            },
            "example": "2"
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted."
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/v3/whitelabel/domains/{domain_id}/validate": {
      "post": {
        "tags": [
          "Sender Identity"
        ],
        "summary": "Validate a domain",
        "operationId": "ValidateDomain",
        "description": "The sandbox cannot see your DNS: validating marks the domain valid.",
        "parameters": [
          {
            "name": "domain_id",
            "in": "path",
            "required": true,
            "description": "A domain id: 1 is example.com.",
            "schema": {
              "type": "string"
            },
            "example": "1"
          }
        ],
        "responses": {
          "200": {
            "description": "The object.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/v3/marketing/contacts": {
      "put": {
        "tags": [
          "Contacts"
        ],
        "summary": "Add or update contacts",
        "operationId": "UpsertContacts",
        "responses": {
          "202": {
            "description": "{job_id}.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "list_ids": {
                    "type": "array",
                    "description": "Lists to add them to.",
                    "items": {},
                    "example": [
                      "9e3779b1-5e5c-d17d-9fcb-076c6f5865c0"
                    ]
                  },
                  "contacts": {
                    "type": "array",
                    "description": "Up to 30000: email plus first_name, last_name, city… and custom_fields by id (e1_T is plan, e2_N is seats).",
                    "items": {}
                  }
                },
                "required": [
                  "contacts"
                ],
                "example": {
                  "list_ids": [
                    "9e3779b1-5e5c-d17d-9fcb-076c6f5865c0"
                  ],
                  "contacts": [
                    {
                      "email": "grace@example.com",
                      "first_name": "Grace",
                      "last_name": "Hopper",
                      "city": "Arlington",
                      "custom_fields": {
                        "e1_T": "pro",
                        "e2_N": 5
                      }
                    }
                  ]
                }
              },
              "example": {
                "list_ids": [
                  "9e3779b1-5e5c-d17d-9fcb-076c6f5865c0"
                ],
                "contacts": [
                  {
                    "email": "grace@example.com",
                    "first_name": "Grace",
                    "last_name": "Hopper",
                    "city": "Arlington",
                    "custom_fields": {
                      "e1_T": "pro",
                      "e2_N": 5
                    }
                  }
                ]
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Contacts"
        ],
        "summary": "A sample of contacts",
        "operationId": "ListContacts",
        "responses": {
          "200": {
            "description": "The object.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          }
        }
      },
      "delete": {
        "tags": [
          "Contacts"
        ],
        "summary": "Delete contacts",
        "operationId": "DeleteContacts",
        "parameters": [
          {
            "name": "ids",
            "in": "query",
            "required": false,
            "description": "Comma-separated contact ids.",
            "schema": {
              "type": "string"
            },
            "example": "9e3779b1-c826-9d87-045b-43d10c5b20b6"
          },
          {
            "name": "delete_all_contacts",
            "in": "query",
            "required": false,
            "description": "true for every one.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "{job_id}.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/v3/marketing/contacts/count": {
      "get": {
        "tags": [
          "Contacts"
        ],
        "summary": "How many contacts",
        "operationId": "CountContacts",
        "responses": {
          "200": {
            "description": "The object.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          }
        }
      }
    },
    "/v3/marketing/contacts/search": {
      "post": {
        "tags": [
          "Contacts"
        ],
        "summary": "Search contacts (SGQL)",
        "operationId": "SearchContacts",
        "responses": {
          "200": {
            "description": "The object.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "query": {
                    "type": "string",
                    "description": "SGQL: email LIKE 'ada%' AND CONTAINS(list_ids, '…'), first_name = 'Ada', plan = 'pro'…",
                    "example": "CONTAINS(list_ids, '9e3779b1-5e5c-d17d-9fcb-076c6f5865c0') AND email LIKE '%example.com'"
                  }
                },
                "required": [
                  "query"
                ],
                "example": {
                  "query": "CONTAINS(list_ids, '9e3779b1-5e5c-d17d-9fcb-076c6f5865c0') AND email LIKE '%example.com'"
                }
              },
              "example": {
                "query": "CONTAINS(list_ids, '9e3779b1-5e5c-d17d-9fcb-076c6f5865c0') AND email LIKE '%example.com'"
              }
            }
          }
        }
      }
    },
    "/v3/marketing/contacts/search/emails": {
      "post": {
        "tags": [
          "Contacts"
        ],
        "summary": "Contacts by email",
        "operationId": "SearchContactsByEmail",
        "responses": {
          "200": {
            "description": "The object.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "emails": {
                    "type": "array",
                    "description": "Up to 100 addresses.",
                    "items": {},
                    "example": [
                      "jack.wilson@mail.example"
                    ]
                  }
                },
                "required": [
                  "emails"
                ],
                "example": {
                  "emails": [
                    "jack.wilson@mail.example",
                    "nobody@example.com"
                  ]
                }
              },
              "example": {
                "emails": [
                  "jack.wilson@mail.example",
                  "nobody@example.com"
                ]
              }
            }
          }
        }
      }
    },
    "/v3/marketing/contacts/batch": {
      "post": {
        "tags": [
          "Contacts"
        ],
        "summary": "Contacts by id",
        "operationId": "GetContactsBatch",
        "responses": {
          "200": {
            "description": "The object.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "ids": {
                    "type": "array",
                    "description": "Up to 100 contact ids.",
                    "items": {},
                    "example": [
                      "9e3779b1-c826-9d87-045b-43d10c5b20b6"
                    ]
                  }
                },
                "required": [
                  "ids"
                ],
                "example": {
                  "ids": [
                    "9e3779b1-c826-9d87-045b-43d10c5b20b6"
                  ]
                }
              },
              "example": {
                "ids": [
                  "9e3779b1-c826-9d87-045b-43d10c5b20b6"
                ]
              }
            }
          }
        }
      }
    },
    "/v3/marketing/contacts/imports/{id}": {
      "get": {
        "tags": [
          "Contacts"
        ],
        "summary": "A job’s status",
        "operationId": "GetImportStatus",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "A job_id from an upsert or delete (the seed’s import job works too).",
            "schema": {
              "type": "string"
            },
            "example": "9e3779b1-3802-1e8c-43af-b6e044653959"
          }
        ],
        "responses": {
          "200": {
            "description": "The object.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/v3/marketing/contacts/{id}": {
      "get": {
        "tags": [
          "Contacts"
        ],
        "summary": "Get a contact",
        "operationId": "GetContact",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "A contact id.",
            "schema": {
              "type": "string"
            },
            "example": "9e3779b1-c826-9d87-045b-43d10c5b20b6"
          }
        ],
        "responses": {
          "200": {
            "description": "The object.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/v3/marketing/lists": {
      "get": {
        "tags": [
          "Contacts"
        ],
        "summary": "List lists",
        "operationId": "ListLists",
        "parameters": [
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "description": "Up to 1000 (default 100).",
            "schema": {
              "type": "integer"
            },
            "example": 100
          },
          {
            "name": "page_token",
            "in": "query",
            "required": false,
            "description": "From _metadata.next.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The object.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          }
        }
      },
      "post": {
        "tags": [
          "Contacts"
        ],
        "summary": "Create a list",
        "operationId": "CreateList",
        "responses": {
          "201": {
            "description": "The list.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Up to 100 characters.",
                    "example": "VIP customers"
                  }
                },
                "required": [
                  "name"
                ],
                "example": {
                  "name": "VIP customers"
                }
              },
              "example": {
                "name": "VIP customers"
              }
            }
          }
        }
      }
    },
    "/v3/marketing/lists/{id}": {
      "get": {
        "tags": [
          "Contacts"
        ],
        "summary": "Get a list",
        "operationId": "GetList",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "A list id: the seed has Newsletter, Beta testers and Customers.",
            "schema": {
              "type": "string"
            },
            "example": "9e3779b1-5e5c-d17d-9fcb-076c6f5865c0"
          },
          {
            "name": "contact_sample",
            "in": "query",
            "required": false,
            "description": "true to include one contact.",
            "schema": {
              "type": "boolean"
            },
            "example": true
          }
        ],
        "responses": {
          "200": {
            "description": "The object.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      },
      "patch": {
        "tags": [
          "Contacts"
        ],
        "summary": "Rename a list",
        "operationId": "UpdateList",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "A list id: the seed has Newsletter, Beta testers and Customers.",
            "schema": {
              "type": "string"
            },
            "example": "9e3779b1-5e5c-d17d-9fcb-076c6f5865c0"
          }
        ],
        "responses": {
          "200": {
            "description": "The object.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Up to 100 characters.",
                    "example": "Monthly newsletter"
                  }
                },
                "required": [
                  "name"
                ],
                "example": {
                  "name": "Monthly newsletter"
                }
              },
              "example": {
                "name": "Monthly newsletter"
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Contacts"
        ],
        "summary": "Delete a list",
        "operationId": "DeleteList",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "A list id: the seed has Newsletter, Beta testers and Customers.",
            "schema": {
              "type": "string"
            },
            "example": "9e3779b1-5e5c-d17d-9fcb-076c6f5865c0"
          },
          {
            "name": "delete_contacts",
            "in": "query",
            "required": false,
            "description": "true to delete its contacts too.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted (202 with a job_id when its contacts go too)."
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/v3/marketing/lists/{id}/contacts/count": {
      "get": {
        "tags": [
          "Contacts"
        ],
        "summary": "How many on a list",
        "operationId": "CountListContacts",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "A list id: the seed has Newsletter, Beta testers and Customers.",
            "schema": {
              "type": "string"
            },
            "example": "9e3779b1-5e5c-d17d-9fcb-076c6f5865c0"
          }
        ],
        "responses": {
          "200": {
            "description": "The object.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/v3/marketing/lists/{id}/contacts": {
      "delete": {
        "tags": [
          "Contacts"
        ],
        "summary": "Take contacts off a list",
        "operationId": "RemoveListContacts",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "A list id: the seed has Newsletter, Beta testers and Customers.",
            "schema": {
              "type": "string"
            },
            "example": "9e3779b1-5e5c-d17d-9fcb-076c6f5865c0"
          },
          {
            "name": "contact_ids",
            "in": "query",
            "required": false,
            "description": "Comma-separated contact ids.",
            "schema": {
              "type": "string"
            },
            "example": "9e3779b1-c826-9d87-045b-43d10c5b20b6"
          }
        ],
        "responses": {
          "202": {
            "description": "{job_id}.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/v3/marketing/field_definitions": {
      "get": {
        "tags": [
          "Contacts"
        ],
        "summary": "Field definitions",
        "operationId": "ListFieldDefinitions",
        "responses": {
          "200": {
            "description": "The object.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          }
        }
      },
      "post": {
        "tags": [
          "Contacts"
        ],
        "summary": "Create a custom field",
        "operationId": "CreateFieldDefinition",
        "responses": {
          "200": {
            "description": "The object.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Letters, digits and underscores.",
                    "example": "favorite_color"
                  },
                  "field_type": {
                    "type": "string",
                    "description": "Text, Number or Date.",
                    "example": "Text"
                  }
                },
                "required": [
                  "name",
                  "field_type"
                ],
                "example": {
                  "name": "favorite_color",
                  "field_type": "Text"
                }
              },
              "example": {
                "name": "favorite_color",
                "field_type": "Text"
              }
            }
          }
        }
      }
    },
    "/v3/marketing/field_definitions/{custom_field_id}": {
      "patch": {
        "tags": [
          "Contacts"
        ],
        "summary": "Rename a custom field",
        "operationId": "UpdateFieldDefinition",
        "parameters": [
          {
            "name": "custom_field_id",
            "in": "path",
            "required": true,
            "description": "A custom field id.",
            "schema": {
              "type": "string"
            },
            "example": "e1_T"
          }
        ],
        "responses": {
          "200": {
            "description": "The object.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "The new name.",
                    "example": "plan_name"
                  }
                },
                "required": [
                  "name"
                ],
                "example": {
                  "name": "plan_name"
                }
              },
              "example": {
                "name": "plan_name"
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Contacts"
        ],
        "summary": "Delete a custom field",
        "operationId": "DeleteFieldDefinition",
        "parameters": [
          {
            "name": "custom_field_id",
            "in": "path",
            "required": true,
            "description": "A custom field id.",
            "schema": {
              "type": "string"
            },
            "example": "e2_N"
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted."
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/v3/scopes": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "The key’s scopes",
        "operationId": "ListScopes",
        "responses": {
          "200": {
            "description": "The object.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          }
        }
      }
    },
    "/v3/user/account": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "The account",
        "operationId": "GetAccount",
        "responses": {
          "200": {
            "description": "The object.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          }
        }
      }
    },
    "/v3/user/profile": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "The profile",
        "operationId": "GetProfile",
        "responses": {
          "200": {
            "description": "The object.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          }
        }
      },
      "patch": {
        "tags": [
          "Account"
        ],
        "summary": "Update the profile",
        "operationId": "UpdateProfile",
        "responses": {
          "200": {
            "description": "The object.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "first_name": {
                    "type": "string",
                    "description": "First name.",
                    "example": "Ada"
                  },
                  "company": {
                    "type": "string",
                    "description": "Company."
                  }
                },
                "example": {
                  "first_name": "Ada"
                }
              },
              "example": {
                "first_name": "Ada"
              }
            }
          }
        }
      }
    },
    "/sandbox/sendgrid/simulate/inbound": {
      "post": {
        "tags": [
          "Sandbox tools"
        ],
        "summary": "Simulate incoming mail (Inbound Parse)",
        "operationId": "SimulateInboundParse",
        "description": "Posts your app the multipart form SendGrid’s Inbound Parse posts and shows what it answered. Without url, the session’s parse setting for the To domain decides.",
        "responses": {
          "200": {
            "description": "The object.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "No url and no parse setting for the To domain, or not JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "security": [],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string",
                    "description": "Your Inbound Parse receiver.",
                    "example": "https://your-app.example/sendgrid/inbound"
                  },
                  "to": {
                    "type": "string",
                    "description": "The address the mail was sent to.",
                    "example": "support@parse.example.com"
                  },
                  "from": {
                    "type": "string",
                    "description": "The sender.",
                    "example": "Ada Lovelace <ada@example.com>"
                  },
                  "subject": {
                    "type": "string",
                    "description": "The subject.",
                    "example": "Where is my order?"
                  },
                  "text": {
                    "type": "string",
                    "description": "The text part.",
                    "example": "Hi, order SH-10421 has not arrived yet."
                  },
                  "html": {
                    "type": "string",
                    "description": "The HTML part (made from the text when left out)."
                  },
                  "send_raw": {
                    "type": "boolean",
                    "description": "Post the whole MIME message as email."
                  },
                  "spam_check": {
                    "type": "boolean",
                    "description": "Add spam_score and spam_report."
                  }
                },
                "example": {
                  "url": "https://your-app.example/sendgrid/inbound",
                  "to": "support@parse.example.com",
                  "from": "Ada Lovelace <ada@example.com>",
                  "subject": "Where is my order?",
                  "text": "Hi, order SH-10421 has not arrived yet."
                }
              },
              "example": {
                "url": "https://your-app.example/sendgrid/inbound",
                "to": "support@parse.example.com",
                "from": "Ada Lovelace <ada@example.com>",
                "subject": "Where is my order?",
                "text": "Hi, order SH-10421 has not arrived yet."
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "sendgridKey": {
        "type": "http",
        "scheme": "bearer",
        "description": "Any key that starts with SG. — SG.sondahub-sandbox works."
      }
    },
    "responses": {
      "E400": {
        "description": "{\"errors\":[{\"field\",\"message\"}]}: what is wrong, field by field (Mail Send adds help, a link).",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "errors": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "field": {
                        "type": "string",
                        "nullable": true
                      },
                      "message": {
                        "type": "string"
                      },
                      "help": {
                        "type": "string",
                        "nullable": true
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "E401": {
        "description": "No key, or one that does not start with SG.",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "errors": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "field": {
                        "type": "string",
                        "nullable": true
                      },
                      "message": {
                        "type": "string"
                      },
                      "help": {
                        "type": "string",
                        "nullable": true
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "E403": {
        "description": "The from address is not on an authenticated domain or a verified sender.",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "errors": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "field": {
                        "type": "string",
                        "nullable": true
                      },
                      "message": {
                        "type": "string"
                      },
                      "help": {
                        "type": "string",
                        "nullable": true
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "E404": {
        "description": "No such resource, or a part of SendGrid the sandbox does not model.",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "errors": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "field": {
                        "type": "string",
                        "nullable": true
                      },
                      "message": {
                        "type": "string"
                      },
                      "help": {
                        "type": "string",
                        "nullable": true
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "E413": {
        "description": "More than 30 MB.",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "errors": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "field": {
                        "type": "string",
                        "nullable": true
                      },
                      "message": {
                        "type": "string"
                      },
                      "help": {
                        "type": "string",
                        "nullable": true
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}