{
  "openapi" : "3.1.0",
  "info" : {
    "title" : "Email Channel",
    "description" : "Email Channel APIs. Provides email sending, account management, sender management, template management, blacklist management, and MFA email verification.",
    "version" : "1.0"
  },
  "servers" : [ {
    "url" : "http://sns-service/"
  } ],
  "tags" : [ {
    "name" : "email",
    "description" : "Core email sending operations. Send transactional or marketing emails through configured email accounts with template support and attachment capabilities."
  }, {
    "name" : "mfa-email",
    "description" : "Multi-Factor Authentication via email. Send one-time verification codes to email addresses and verify them for identity confirmation workflows."
  }, {
    "name" : "email-account",
    "description" : "Email account lifecycle management. Configure SMTP, AWS SES, SendGrid, or Microsoft Graph accounts for sending emails, including sharing across tenants."
  }, {
    "name" : "email-template",
    "description" : "Email template management. Create and maintain reusable email templates with variable substitution support using simple, Go template, or Handlebars engines."
  }, {
    "name" : "email-sender",
    "description" : "Email sender management. Register the from-addresses an account may send as, set the tenant default, and grant individual senders to other tenants so they can send with credentials that stay here."
  }, {
    "name" : "email-blacklist",
    "description" : "Email blacklist management. Maintain a list of blocked email addresses or patterns to prevent delivery to invalid or unwanted recipients."
  } ],
  "paths" : {
    "/sns/email/account/account-types" : {
      "get" : {
        "tags" : [ "email-account" ],
        "summary" : "Get available email account types",
        "description" : "Retrieve the list of supported email service providers and their configuration options. Returns available account types (SMTP, AWS SES, SendGrid, Microsoft Graph, etc.) with their required configuration fields.",
        "operationId" : "GetEmailAccountTypes",
        "responses" : {
          "200" : {
            "description" : "The API execution results.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ArrayResponseModel-WebType"
                }
              }
            }
          },
          "499" : {
            "description" : "client error response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          },
          "599" : {
            "description" : "server error response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          }
        }
      }
    },
    "/sns/email/account/add-one" : {
      "post" : {
        "tags" : [ "email-account" ],
        "summary" : "Create a new email account",
        "description" : "Register a new email sending account with the specified provider configuration. Supports SMTP, AWS SES, SendGrid, AWS Pinpoint, and Microsoft Graph account types with optional proxy settings.",
        "operationId" : "AddEmailAccount",
        "requestBody" : {
          "description" : "add account request",
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/AddEmailAccountRequest"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "The API execution results.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/CommonModel"
                }
              }
            }
          },
          "499" : {
            "description" : "client error response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          },
          "599" : {
            "description" : "server error response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          }
        },
        "x-codegen-request-body-name" : "body"
      }
    },
    "/sns/email/account/delete-one" : {
      "post" : {
        "tags" : [ "email-account" ],
        "summary" : "Delete an email account",
        "description" : "Permanently remove an email account configuration from the current tenant. This action cannot be undone and will prevent further email delivery through this account.",
        "operationId" : "DeleteEmailAccount",
        "requestBody" : {
          "description" : "delete account request",
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/DeleteEmailAccountRequest"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "The API execution results.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/CommonModel"
                }
              }
            }
          },
          "499" : {
            "description" : "client error response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          },
          "599" : {
            "description" : "server error response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          }
        },
        "x-mo-cli" : {
          "confirm" : true
        },
        "x-codegen-request-body-name" : "body"
      }
    },
    "/sns/email/account/query-many" : {
      "get" : {
        "tags" : [ "email-account" ],
        "summary" : "List email accounts with pagination",
        "description" : "Retrieve a paginated list of the email accounts the current tenant may configure. Supports filtering by account name and account type. What the accounts granted in from another tenant count as depends on legacy_mode: a caller that speaks the pre-sender model gets them, since they were accounts in that model, and one that does not is left with what it configured itself — from a granted account what it may send with is a sender. Admin tenants can view all accounts across tenants.",
        "operationId" : "PagedListEmailAccounts",
        "parameters" : [ {
          "name" : "account_name_filter",
          "in" : "query",
          "description" : "account name filter condition",
          "required" : false,
          "style" : "form",
          "explode" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "account_type",
          "in" : "query",
          "description" : "account type condition",
          "required" : false,
          "style" : "form",
          "explode" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "legacy_mode",
          "in" : "query",
          "description" : "whether the caller speaks the pre-sender model; omitted means true, which includes the accounts granted in from another tenant",
          "required" : false,
          "style" : "form",
          "explode" : true,
          "schema" : {
            "type" : "boolean"
          }
        }, {
          "name" : "page_size",
          "in" : "query",
          "description" : "page size, max 200, default 10",
          "required" : false,
          "style" : "form",
          "explode" : true,
          "schema" : {
            "type" : "integer"
          }
        }, {
          "name" : "current_page",
          "in" : "query",
          "description" : "current page, start at 1, default 1",
          "required" : false,
          "style" : "form",
          "explode" : true,
          "schema" : {
            "type" : "integer"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "The API execution results.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/PagedResponseModel-EmailAccount"
                }
              }
            }
          },
          "499" : {
            "description" : "client error response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          },
          "599" : {
            "description" : "server error response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          }
        }
      }
    },
    "/sns/email/account/query-one" : {
      "get" : {
        "tags" : [ "email-account" ],
        "summary" : "Get email account details",
        "description" : "Retrieve the configuration details of a specific email account by name. Returns account type, SMTP settings, credentials, and proxy configuration.",
        "operationId" : "GetEmailAccount",
        "parameters" : [ {
          "name" : "account",
          "in" : "query",
          "description" : "account name",
          "required" : true,
          "style" : "form",
          "explode" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "The API execution results.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/DataResponseModel-EmailAccount"
                }
              }
            }
          },
          "499" : {
            "description" : "client error response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          },
          "599" : {
            "description" : "server error response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          }
        }
      }
    },
    "/sns/email/account/set-default" : {
      "post" : {
        "tags" : [ "email-account" ],
        "summary" : "Set default email account",
        "description" : "Deprecated: use /sns/email/sender/set-default instead. Designate an email account as the default sender for the current tenant. When no account is explicitly specified in send requests, the default account will be used.",
        "operationId" : "SetDefaultEmailAccount",
        "requestBody" : {
          "description" : "set default account request",
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/SetDefaultEmailAccountRequest"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "The API execution results.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/CommonModel"
                }
              }
            }
          },
          "499" : {
            "description" : "client error response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          },
          "599" : {
            "description" : "server error response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          }
        },
        "deprecated" : true,
        "x-codegen-request-body-name" : "body"
      }
    },
    "/sns/email/account/share" : {
      "post" : {
        "tags" : [ "email-account" ],
        "summary" : "Share email account to another tenant",
        "description" : "Deprecated: use /sns/email/sender/grant instead. Let a target tenant send through this account. Requires admin privileges. The credentials stay in this tenant: the target is granted the senders the account implies — its address, or the wildcards of a domain account — and can be stopped again with /account/shared/delete-one.",
        "operationId" : "ShareEmailAccount",
        "requestBody" : {
          "description" : "share account request",
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/ShareEmailAccountRequest"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "The API execution results.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/CommonModel"
                }
              }
            }
          },
          "499" : {
            "description" : "client error response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          },
          "599" : {
            "description" : "server error response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          }
        },
        "deprecated" : true,
        "x-codegen-request-body-name" : "body"
      }
    },
    "/sns/email/account/shared/delete-one" : {
      "post" : {
        "tags" : [ "email-account" ],
        "summary" : "Remove a shared email account from target tenant",
        "description" : "Deprecated: use /sns/email/sender/granted/delete-one instead. Stop a target tenant from sending through this account, by withdrawing the senders it was granted. Requires admin privileges. The original account remains unaffected.",
        "operationId" : "DeleteSharedEmailAccount",
        "requestBody" : {
          "description" : "delete share account request",
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/DeleteSharedEmailAccountRequest"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "The API execution results.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/CommonModel"
                }
              }
            }
          },
          "499" : {
            "description" : "client error response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          },
          "599" : {
            "description" : "server error response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          }
        },
        "deprecated" : true,
        "x-mo-cli" : {
          "confirm" : true,
          "confirmMessage" : "Remove this shared email account from the target tenant? That tenant loses access to it."
        },
        "x-codegen-request-body-name" : "body"
      }
    },
    "/sns/email/account/shared/query-many" : {
      "get" : {
        "tags" : [ "email-account" ],
        "summary" : "List shared email accounts",
        "description" : "Deprecated: use /sns/email/sender/granted/query-many instead. Retrieve the tenants this email account has been shared with, one entry each. Requires admin privileges to view cross-tenant sharing relationships.",
        "operationId" : "ListSharedEmailAccounts",
        "parameters" : [ {
          "name" : "account_name",
          "in" : "query",
          "description" : "account name",
          "required" : false,
          "style" : "form",
          "explode" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "The API execution results.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ArrayResponseModel-EmailAccount"
                }
              }
            }
          },
          "499" : {
            "description" : "client error response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          },
          "599" : {
            "description" : "server error response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          }
        },
        "deprecated" : true
      }
    },
    "/sns/email/account/update-one" : {
      "post" : {
        "tags" : [ "email-account" ],
        "summary" : "Update an existing email account",
        "description" : "Update an existing email account. Only the fields the request body carries a value for are written; anything left out keeps its stored value. A field sent as null counts as left out, so a whole account read back from the API can be posted here unchanged, masked credentials and all. To clear a field list it in update_options.unset_fields; to replace the whole account, clearing anything not sent, set update_options.full_update. The default account is changed through /sns/email/account/set-default, not here.",
        "operationId" : "UpdateEmailAccount",
        "requestBody" : {
          "description" : "update account request",
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/UpdateEmailAccountRequest"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "The updated account.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/DataResponseModel-EmailAccount"
                }
              }
            }
          },
          "499" : {
            "description" : "client error response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          },
          "599" : {
            "description" : "server error response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          }
        },
        "x-codegen-request-body-name" : "body"
      }
    },
    "/sns/email/blacklist/add-one" : {
      "post" : {
        "tags" : [ "email-blacklist" ],
        "summary" : "Add an email address to the blacklist",
        "description" : "Block an email address or pattern from receiving emails. Supports whole word matching, path-based matching, and regex patterns for flexible blocking rules.",
        "operationId" : "AddEmailBlacklist",
        "requestBody" : {
          "description" : "add blacklist request",
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/AddEmailBlacklistRequest"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "The API execution results.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/CommonModel"
                }
              }
            }
          },
          "499" : {
            "description" : "client error response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          },
          "599" : {
            "description" : "server error response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          }
        },
        "x-codegen-request-body-name" : "body"
      }
    },
    "/sns/email/blacklist/delete-one" : {
      "post" : {
        "tags" : [ "email-blacklist" ],
        "summary" : "Remove an email address from the blacklist",
        "description" : "Remove a previously blacklisted email address or pattern, allowing future email delivery to that recipient.",
        "operationId" : "DeleteEmailBlacklist",
        "requestBody" : {
          "description" : "delete blacklist request",
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/DeleteEmailBlacklistRequest"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "The API execution results.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/CommonModel"
                }
              }
            }
          },
          "499" : {
            "description" : "client error response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          },
          "599" : {
            "description" : "server error response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          }
        },
        "x-mo-cli" : {
          "confirm" : true
        },
        "x-codegen-request-body-name" : "body"
      }
    },
    "/sns/email/blacklist/query-many" : {
      "get" : {
        "tags" : [ "email-blacklist" ],
        "summary" : "List email blacklist entries with pagination",
        "description" : "Retrieve a paginated list of blacklisted email addresses or patterns. Supports filtering by email address and match type (whole word, path match, or regex).",
        "operationId" : "PagedListEmailBlacklists",
        "parameters" : [ {
          "name" : "email_filter",
          "in" : "query",
          "description" : "email filter condition",
          "required" : false,
          "style" : "form",
          "explode" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "match_type",
          "in" : "query",
          "description" : "match type condition",
          "required" : false,
          "style" : "form",
          "explode" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "page_size",
          "in" : "query",
          "description" : "page size, max 200, default 10",
          "required" : false,
          "style" : "form",
          "explode" : true,
          "schema" : {
            "type" : "integer"
          }
        }, {
          "name" : "current_page",
          "in" : "query",
          "description" : "current page, start at 1, default 1",
          "required" : false,
          "style" : "form",
          "explode" : true,
          "schema" : {
            "type" : "integer"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "The API execution results.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/PagedResponseModel-EmailBlacklist"
                }
              }
            }
          },
          "499" : {
            "description" : "client error response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          },
          "599" : {
            "description" : "server error response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          }
        }
      }
    },
    "/sns/email/send" : {
      "post" : {
        "tags" : [ "email" ],
        "summary" : "Send an email message",
        "description" : "Send a transactional or marketing email through the configured email account. Supports HTML/plain text content, template-based rendering, file attachments, CC/BCC recipients, and scheduled delivery via SendGrid batches.",
        "operationId" : "SendEmail",
        "requestBody" : {
          "description" : "Email Info",
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/SendEmailRequest"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "The API execution results.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/DataResponseModel-SendEmailResult"
                }
              }
            }
          },
          "499" : {
            "description" : "error response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          }
        },
        "x-mo-gateway-usage-plan" : "email_send_per_day",
        "x-codegen-request-body-name" : "SendEmailRequest"
      }
    },
    "/sns/email/sender/add-one" : {
      "post" : {
        "tags" : [ "email-sender" ],
        "summary" : "Register an email sender",
        "description" : "Register a from-address on one of the tenant's accounts. A mailbox account owns only the address it is named after; a domain account owns every address at that domain, and subdomains too when it allows them.",
        "operationId" : "AddEmailSender",
        "requestBody" : {
          "description" : "add sender request",
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/AddEmailSenderRequest"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "201" : {
            "description" : "The API execution results.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/DataResponseModel-EmailSender"
                }
              }
            }
          },
          "499" : {
            "description" : "client error response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          },
          "599" : {
            "description" : "server error response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          }
        },
        "x-codegen-request-body-name" : "body"
      }
    },
    "/sns/email/sender/delete-one" : {
      "post" : {
        "tags" : [ "email-sender" ],
        "summary" : "Delete an email sender",
        "description" : "Remove a sender of the current tenant. Senders created alongside an account cannot be removed on their own — deleting the account removes them.",
        "operationId" : "DeleteEmailSender",
        "requestBody" : {
          "description" : "delete sender request",
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/DeleteEmailSenderRequest"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "The API execution results.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/DataResponseModel-EmailSender"
                }
              }
            }
          },
          "499" : {
            "description" : "client error response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          },
          "599" : {
            "description" : "server error response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          }
        },
        "x-mo-cli" : {
          "confirm" : true
        },
        "x-codegen-request-body-name" : "body"
      }
    },
    "/sns/email/sender/grant" : {
      "post" : {
        "tags" : [ "email-sender" ],
        "summary" : "Grant a sender to another tenant",
        "description" : "Let another tenant send as an address of one of this tenant's accounts. Requires admin privileges. The credentials stay here; the grantee gets a sender pointing back at them and can be stopped from renaming it.",
        "operationId" : "GrantEmailSender",
        "requestBody" : {
          "description" : "grant sender request",
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/GrantEmailSenderRequest"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "201" : {
            "description" : "The API execution results.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/DataResponseModel-EmailSender"
                }
              }
            }
          },
          "499" : {
            "description" : "client error response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          },
          "599" : {
            "description" : "server error response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          }
        },
        "x-codegen-request-body-name" : "body"
      }
    },
    "/sns/email/sender/granted/delete-one" : {
      "post" : {
        "tags" : [ "email-sender" ],
        "summary" : "Revoke a sender granted to another tenant",
        "description" : "Withdraw a sender this tenant granted out. Requires admin privileges. The grantee stops being able to send as that address.",
        "operationId" : "RevokeEmailSender",
        "requestBody" : {
          "description" : "revoke sender request",
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/RevokeEmailSenderRequest"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "The API execution results.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/DataResponseModel-EmailSender"
                }
              }
            }
          },
          "499" : {
            "description" : "client error response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          },
          "599" : {
            "description" : "server error response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          }
        },
        "x-mo-cli" : {
          "confirm" : true,
          "confirmMessage" : "Revoke this sender from the target tenant? That tenant can no longer send email through it."
        },
        "x-codegen-request-body-name" : "body"
      }
    },
    "/sns/email/sender/granted/query-many" : {
      "get" : {
        "tags" : [ "email-sender" ],
        "summary" : "List the senders this tenant granted to others",
        "description" : "Retrieve a paginated list of the senders the current tenant handed to other tenants, which is what has to be revoked before its account can be deleted.",
        "operationId" : "PagedListGrantedEmailSenders",
        "parameters" : [ {
          "name" : "account_name",
          "in" : "query",
          "required" : false,
          "style" : "form",
          "explode" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "address_filter",
          "in" : "query",
          "required" : false,
          "style" : "form",
          "explode" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "current_page",
          "in" : "query",
          "description" : "Current page number (default 1)",
          "required" : false,
          "style" : "form",
          "explode" : true,
          "schema" : {
            "type" : "integer",
            "default" : 1
          }
        }, {
          "name" : "page_size",
          "in" : "query",
          "description" : "Number of records per page (default 10, max 200)",
          "required" : false,
          "style" : "form",
          "explode" : true,
          "schema" : {
            "type" : "integer",
            "default" : 10,
            "maximum" : 200
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "The API execution results.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/PagedResponseModel-EmailSender"
                }
              }
            }
          },
          "499" : {
            "description" : "client error response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          },
          "599" : {
            "description" : "server error response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          }
        }
      }
    },
    "/sns/email/sender/granted/update-one" : {
      "post" : {
        "tags" : [ "email-sender" ],
        "summary" : "Update a sender granted to another tenant",
        "description" : "Change a sender this tenant granted out, including whether the grantee may rename it. Requires admin privileges.",
        "operationId" : "UpdateGrantedEmailSender",
        "requestBody" : {
          "description" : "update granted sender request",
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/UpdateGrantedEmailSenderRequest"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "The API execution results.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/DataResponseModel-EmailSender"
                }
              }
            }
          },
          "499" : {
            "description" : "client error response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          },
          "599" : {
            "description" : "server error response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          }
        },
        "x-codegen-request-body-name" : "body"
      }
    },
    "/sns/email/sender/query-many" : {
      "get" : {
        "tags" : [ "email-sender" ],
        "summary" : "List email senders with pagination",
        "description" : "Retrieve a paginated list of the senders the current tenant may send with, both its own and those granted to it by other tenants.",
        "operationId" : "PagedListEmailSenders",
        "parameters" : [ {
          "name" : "account_name",
          "in" : "query",
          "required" : false,
          "style" : "form",
          "explode" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "address_filter",
          "in" : "query",
          "required" : false,
          "style" : "form",
          "explode" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "current_page",
          "in" : "query",
          "description" : "Current page number (default 1)",
          "required" : false,
          "style" : "form",
          "explode" : true,
          "schema" : {
            "type" : "integer",
            "default" : 1
          }
        }, {
          "name" : "page_size",
          "in" : "query",
          "description" : "Number of records per page (default 10, max 200)",
          "required" : false,
          "style" : "form",
          "explode" : true,
          "schema" : {
            "type" : "integer",
            "default" : 10,
            "maximum" : 200
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "The API execution results.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/PagedResponseModel-EmailSender"
                }
              }
            }
          },
          "499" : {
            "description" : "client error response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          },
          "599" : {
            "description" : "server error response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          }
        }
      }
    },
    "/sns/email/sender/query-one" : {
      "get" : {
        "tags" : [ "email-sender" ],
        "summary" : "Get an email sender by address",
        "description" : "Retrieve one sender of the current tenant, including the account it draws its credentials from and, when it was granted by another tenant, which one.",
        "operationId" : "GetEmailSender",
        "parameters" : [ {
          "name" : "address",
          "in" : "query",
          "description" : "sender address",
          "required" : true,
          "style" : "form",
          "explode" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "The API execution results.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/DataResponseModel-EmailSender"
                }
              }
            }
          },
          "499" : {
            "description" : "client error response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          },
          "599" : {
            "description" : "server error response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          }
        }
      }
    },
    "/sns/email/sender/set-default" : {
      "post" : {
        "tags" : [ "email-sender" ],
        "summary" : "Set or clear the tenant default sender",
        "description" : "Make one sender the tenant default, clearing any previous one. A wildcard sender cannot be a default, since a default has to name an address a message can go out as.",
        "operationId" : "SetDefaultEmailSender",
        "requestBody" : {
          "description" : "set default sender request",
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/SetDefaultEmailSenderRequest"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "The API execution results.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/DataResponseModel-EmailSender"
                }
              }
            }
          },
          "499" : {
            "description" : "client error response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          },
          "599" : {
            "description" : "server error response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          }
        },
        "x-codegen-request-body-name" : "body"
      }
    },
    "/sns/email/sender/update-one" : {
      "post" : {
        "tags" : [ "email-sender" ],
        "summary" : "Update an email sender",
        "description" : "Change the display name or description of a sender. On a sender granted by another tenant the display name may be locked, in which case only the description can change.",
        "operationId" : "UpdateEmailSender",
        "requestBody" : {
          "description" : "update sender request",
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/UpdateEmailSenderRequest"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "The API execution results.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/DataResponseModel-EmailSender"
                }
              }
            }
          },
          "499" : {
            "description" : "client error response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          },
          "599" : {
            "description" : "server error response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          }
        },
        "x-codegen-request-body-name" : "body"
      }
    },
    "/sns/email/senders" : {
      "get" : {
        "tags" : [ "email" ],
        "summary" : "Get available email senders",
        "description" : "Deprecated: use /sns/email/account/account-types instead. Retrieve the list of supported email service providers and their configuration options. Returns available sender types (SMTP, AWS SES, SendGrid, Microsoft Graph, etc.) with their required configuration fields.",
        "operationId" : "GetEmailSenders",
        "responses" : {
          "200" : {
            "description" : "The API execution results.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ArrayResponseModel-WebType"
                }
              }
            }
          },
          "499" : {
            "description" : "client error response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          },
          "599" : {
            "description" : "server error response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          }
        },
        "deprecated" : true
      }
    },
    "/sns/email/template/add-one" : {
      "post" : {
        "tags" : [ "email-template" ],
        "summary" : "Create a new email template",
        "description" : "Create a reusable email template with subject, content, and optional alternative content. Supports simple variable substitution, Go template, and Handlebars template engines.",
        "operationId" : "AddEmailTemplate",
        "requestBody" : {
          "description" : "add template request",
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/AddEmailTemplateRequest"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "The API execution results.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/DataResponseModel-EmailTemplate"
                }
              }
            }
          },
          "499" : {
            "description" : "client error response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          },
          "599" : {
            "description" : "server error response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          }
        },
        "x-codegen-request-body-name" : "body"
      }
    },
    "/sns/email/template/delete-one" : {
      "post" : {
        "tags" : [ "email-template" ],
        "summary" : "Delete an email template",
        "description" : "Permanently remove an email template by its template code. This action cannot be undone and will affect any workflows referencing this template.",
        "operationId" : "DeleteEmailTemplate",
        "requestBody" : {
          "description" : "delete template request",
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/DeleteEmailTemplateRequest"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "The API execution results.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/DataResponseModel-EmailTemplate"
                }
              }
            }
          },
          "499" : {
            "description" : "client error response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          },
          "599" : {
            "description" : "server error response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          }
        },
        "x-mo-cli" : {
          "confirm" : true
        },
        "x-codegen-request-body-name" : "body"
      }
    },
    "/sns/email/template/execute" : {
      "post" : {
        "tags" : [ "email-template" ],
        "summary" : "Render an email template with parameters",
        "description" : "Execute a template engine to render the email content with the provided parameters. Returns the rendered subject, content, and alternative content without sending the email. Useful for previewing template output.",
        "operationId" : "ExecuteEmailTemplate",
        "requestBody" : {
          "description" : "execute template request",
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/ExecuteEmailTemplateRequest"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "The API execution results.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/DataResponseModel-ExecuteEmailTemplateResult"
                }
              }
            }
          },
          "499" : {
            "description" : "client error response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          },
          "599" : {
            "description" : "server error response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          }
        },
        "x-mo-since-at" : {
          "serviceVersion" : "20250601milestone"
        },
        "x-codegen-request-body-name" : "body"
      }
    },
    "/sns/email/template/query-many" : {
      "get" : {
        "tags" : [ "email-template" ],
        "summary" : "List email templates with pagination",
        "description" : "Retrieve a paginated list of email templates for the current tenant. Supports filtering by template code. Admin tenants can view all templates across tenants.",
        "operationId" : "PagedListEmailTemplates",
        "parameters" : [ {
          "name" : "template_code_filter",
          "in" : "query",
          "description" : "template code filter condition",
          "required" : false,
          "style" : "form",
          "explode" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "page_size",
          "in" : "query",
          "description" : "page size, max 200, default 10",
          "required" : false,
          "style" : "form",
          "explode" : true,
          "schema" : {
            "type" : "integer"
          }
        }, {
          "name" : "current_page",
          "in" : "query",
          "description" : "current page, start at 1, default 1",
          "required" : false,
          "style" : "form",
          "explode" : true,
          "schema" : {
            "type" : "integer"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "The API execution results.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/PagedResponseModel-EmailTemplate"
                }
              }
            }
          },
          "499" : {
            "description" : "client error response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          },
          "599" : {
            "description" : "",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          }
        }
      }
    },
    "/sns/email/template/query-one" : {
      "get" : {
        "tags" : [ "email-template" ],
        "summary" : "Get email template by code",
        "description" : "Retrieve a specific email template of the current tenant by its exact template code. Returns the template subject, content, and metadata.",
        "operationId" : "GetEmailTemplate",
        "parameters" : [ {
          "name" : "template_code",
          "in" : "query",
          "description" : "template code",
          "required" : true,
          "style" : "form",
          "explode" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "The API execution results.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/DataResponseModel-EmailTemplate"
                }
              }
            }
          },
          "499" : {
            "description" : "client error response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          },
          "599" : {
            "description" : "server error response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          }
        }
      }
    },
    "/sns/email/template/update-one" : {
      "post" : {
        "tags" : [ "email-template" ],
        "summary" : "Update an existing email template",
        "description" : "Modify the content, subject, content type, or template engine of an existing email template identified by its template code.",
        "operationId" : "UpdateEmailTemplate",
        "requestBody" : {
          "description" : "update template request",
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/UpdateEmailTemplateRequest"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "The API execution results.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/DataResponseModel-EmailTemplate"
                }
              }
            }
          },
          "499" : {
            "description" : "client error response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          },
          "599" : {
            "description" : "server error response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          }
        },
        "x-codegen-request-body-name" : "body"
      }
    },
    "/sns/mfa/email/send" : {
      "post" : {
        "tags" : [ "mfa-email" ],
        "summary" : "Send MFA verification code via email",
        "description" : "Generate and send a one-time verification code to the specified email address. Supports configurable code length, expiration, retry limits, and resend blocking intervals.",
        "operationId" : "SendMFAEmail",
        "requestBody" : {
          "description" : "send mfa email request",
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/SendMFAEmailRequest"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "The API execution results.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/DataResponseModel-SendMFACodeResult"
                }
              }
            }
          },
          "499" : {
            "description" : "client error response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          },
          "599" : {
            "description" : "server error response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          }
        },
        "x-mo-gateway-usage-plan" : "email_send_per_day",
        "x-codegen-request-body-name" : "body"
      }
    },
    "/sns/mfa/email/verify" : {
      "post" : {
        "tags" : [ "mfa-email" ],
        "summary" : "Verify MFA email code",
        "description" : "Validate the one-time verification code sent to an email address. Checks code correctness, expiration, attempt limits, and optional context matching.",
        "operationId" : "VerifyMFAEmail",
        "requestBody" : {
          "description" : "verify mfa email request",
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/VerifyMFAEmailRequest"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "The API execution results.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/DataResponseModel-VerifyMFAResult"
                }
              }
            }
          },
          "499" : {
            "description" : "client error response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          },
          "599" : {
            "description" : "server error response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          }
        },
        "x-codegen-request-body-name" : "body"
      }
    }
  },
  "components" : {
    "schemas" : {
      "AddEmailAccountRequest" : {
        "type" : "object",
        "properties" : {
          "access_key" : {
            "type" : "string",
            "description" : "Access key for cloud-based email providers (AWS SES, SendGrid)"
          },
          "account_name" : {
            "type" : "string",
            "description" : "Email account name: a mailbox address, or a domain name when\nis_domain_account is true. The exact rule is checked by the service, since\nwhich of the two applies depends on the flag below."
          },
          "account_type" : {
            "type" : "string",
            "description" : "Email service provider type (e.g., smtp, aws_ses, sendgrid, aws_pinpoint, msgraph)"
          },
          "alias" : {
            "type" : "string",
            "description" : "Display name shown to email recipients, max 40 characters",
            "maxLength" : 40
          },
          "allow_subdomain" : {
            "type" : "string",
            "description" : "AllowSubdomain, \"true\" on a domain account, lets senders be registered at\nsubdomains of it as well as at the domain itself. It lives here rather\nthan in a column of its own because it is a property of one account type\nand adding it costs no migration. An update may change it on a domain\naccount; turning it off is refused while senders at subdomains remain."
          },
          "aws_config_set" : {
            "type" : "string"
          },
          "aws_tags" : {
            "type" : "string"
          },
          "default_config" : {
            "type" : "boolean",
            "description" : "Whether this account is the default sender for the tenant"
          },
          "is_domain_account" : {
            "type" : "boolean",
            "description" : "IsDomainAccount makes account_name a domain rather than a mailbox address,\nso that one set of credentials serves every sender under it. Fixed at\ncreation; a domain account carries no alias and cannot be the tenant default."
          },
          "legacy_mode" : {
            "type" : "boolean",
            "description" : "LegacyMode says the account has to stay readable by the send service\nthat predates senders. It is left out by callers written before the field\nexisted, which is exactly who it is for, so absent means true today. In\nlegacy mode the credentials this call writes are stored as sent rather\nthan encrypted."
          },
          "password" : {
            "type" : "string",
            "description" : "Authentication password for the email provider",
            "x-deprecated" : true
          },
          "proxy_host" : {
            "type" : "string",
            "description" : "HTTP proxy hostname for outbound connections"
          },
          "proxy_password" : {
            "type" : "string",
            "description" : "Proxy authentication password"
          },
          "proxy_port" : {
            "type" : "string",
            "description" : "HTTP proxy port number"
          },
          "proxy_username" : {
            "type" : "string",
            "description" : "Proxy authentication username"
          },
          "require_sender_registration" : {
            "type" : "string",
            "description" : "RequireSenderRegistration, \"true\" on a domain account, withholds the\nwildcard sender so that every address has to be registered before it can\nsend. Changeable like AllowSubdomain: the wildcard senders carrying the\naccount's reach are rederived from both when either changes, and turning\nthis on is refused while a wildcard other than the system ones remains."
          },
          "secret_key" : {
            "type" : "string",
            "description" : "Secret key for cloud-based email providers"
          },
          "smtp_auth_mechanism" : {
            "type" : "string"
          },
          "smtp_auth_protocol" : {
            "type" : "string"
          },
          "smtp_host" : {
            "type" : "string",
            "description" : "SMTP server hostname"
          },
          "smtp_port" : {
            "type" : "string",
            "description" : "SMTP server port number"
          },
          "smtp_tls_check_cert" : {
            "type" : "string"
          },
          "username" : {
            "type" : "string",
            "description" : "Authentication username for the email provider"
          }
        },
        "required" : [ "account_name", "account_type" ]
      },
      "AddEmailBlacklistRequest" : {
        "type" : "object",
        "properties" : {
          "email" : {
            "type" : "string",
            "description" : "Email address or pattern to block"
          },
          "match_type" : {
            "$ref" : "#/components/schemas/EmailBlacklistMatchType"
          }
        },
        "required" : [ "email", "match_type" ]
      },
      "AddEmailSenderRequest" : {
        "type" : "object",
        "properties" : {
          "account_name" : {
            "type" : "string",
            "description" : "Account supplying the credentials, a mailbox address or a domain"
          },
          "address" : {
            "type" : "string",
            "description" : "From address to register, e.g. no-reply@mail.example.com"
          },
          "alias" : {
            "type" : "string",
            "description" : "Display name recipients see in the From header"
          },
          "description" : {
            "type" : "string"
          },
          "set_default" : {
            "type" : "boolean",
            "description" : "Make this the tenant default sender"
          }
        },
        "required" : [ "account_name", "address" ]
      },
      "AddEmailTemplateRequest" : {
        "type" : "object",
        "properties" : {
          "content" : {
            "type" : "string",
            "description" : "Template body content, supports variable placeholders"
          },
          "content_alternative" : {
            "type" : "string",
            "description" : "Alternative content body, required when content_type is multipart/alternative"
          },
          "content_type" : {
            "type" : "string",
            "description" : "MIME content type: text/html, text/plain, or multipart/alternative",
            "enum" : [ "text/html", "text/plain", "multipart/alternative" ]
          },
          "subject" : {
            "type" : "string",
            "description" : "Email subject line template"
          },
          "template_code" : {
            "type" : "string",
            "description" : "Unique template identifier within the tenant"
          },
          "template_engine" : {
            "type" : "string",
            "description" : "Template rendering engine: simple, go-template, or handlebars",
            "enum" : [ "simple", "go-template", "handlebars" ]
          }
        }
      },
      "ArrayResponseModel-EmailAccount" : {
        "type" : "object",
        "properties" : {
          "code" : {
            "type" : "string"
          },
          "data" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/EmailAccount"
            }
          },
          "date" : {
            "type" : "string"
          },
          "env_name" : {
            "type" : "string"
          },
          "message" : {
            "type" : "string"
          },
          "message_params" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          },
          "total" : {
            "type" : "integer"
          },
          "trace_id" : {
            "type" : "string"
          }
        }
      },
      "ArrayResponseModel-WebType" : {
        "type" : "object",
        "properties" : {
          "code" : {
            "type" : "string"
          },
          "data" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/WebType"
            }
          },
          "date" : {
            "type" : "string"
          },
          "env_name" : {
            "type" : "string"
          },
          "message" : {
            "type" : "string"
          },
          "message_params" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          },
          "total" : {
            "type" : "integer"
          },
          "trace_id" : {
            "type" : "string"
          }
        }
      },
      "CodeWithParams" : {
        "type" : "object",
        "properties" : {
          "code" : {
            "type" : "string"
          },
          "message" : {
            "type" : "string"
          },
          "message_params" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          }
        }
      },
      "CommonModel" : {
        "type" : "object",
        "properties" : {
          "code" : {
            "type" : "string"
          },
          "date" : {
            "type" : "string"
          },
          "env_name" : {
            "type" : "string"
          },
          "message" : {
            "type" : "string"
          },
          "message_params" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          },
          "trace_id" : {
            "type" : "string"
          }
        }
      },
      "DataResponseModel-EmailAccount" : {
        "type" : "object",
        "properties" : {
          "code" : {
            "type" : "string"
          },
          "data" : {
            "$ref" : "#/components/schemas/EmailAccount"
          },
          "date" : {
            "type" : "string"
          },
          "env_name" : {
            "type" : "string"
          },
          "message" : {
            "type" : "string"
          },
          "message_params" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          },
          "trace_id" : {
            "type" : "string"
          }
        }
      },
      "DataResponseModel-EmailSender" : {
        "type" : "object",
        "properties" : {
          "code" : {
            "type" : "string"
          },
          "data" : {
            "$ref" : "#/components/schemas/EmailSender"
          },
          "date" : {
            "type" : "string"
          },
          "env_name" : {
            "type" : "string"
          },
          "message" : {
            "type" : "string"
          },
          "message_params" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          },
          "trace_id" : {
            "type" : "string"
          }
        }
      },
      "DataResponseModel-EmailTemplate" : {
        "type" : "object",
        "properties" : {
          "code" : {
            "type" : "string"
          },
          "data" : {
            "$ref" : "#/components/schemas/EmailTemplate"
          },
          "date" : {
            "type" : "string"
          },
          "env_name" : {
            "type" : "string"
          },
          "message" : {
            "type" : "string"
          },
          "message_params" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          },
          "trace_id" : {
            "type" : "string"
          }
        }
      },
      "DataResponseModel-ExecuteEmailTemplateResult" : {
        "type" : "object",
        "properties" : {
          "code" : {
            "type" : "string"
          },
          "data" : {
            "$ref" : "#/components/schemas/ExecuteEmailTemplateResult"
          },
          "date" : {
            "type" : "string"
          },
          "env_name" : {
            "type" : "string"
          },
          "message" : {
            "type" : "string"
          },
          "message_params" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          },
          "trace_id" : {
            "type" : "string"
          }
        }
      },
      "DataResponseModel-SendEmailResult" : {
        "type" : "object",
        "properties" : {
          "code" : {
            "type" : "string"
          },
          "data" : {
            "$ref" : "#/components/schemas/SendEmailResult"
          },
          "date" : {
            "type" : "string"
          },
          "env_name" : {
            "type" : "string"
          },
          "message" : {
            "type" : "string"
          },
          "message_params" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          },
          "trace_id" : {
            "type" : "string"
          }
        }
      },
      "DataResponseModel-SendMFACodeResult" : {
        "type" : "object",
        "properties" : {
          "code" : {
            "type" : "string"
          },
          "data" : {
            "$ref" : "#/components/schemas/SendMFACodeResult"
          },
          "date" : {
            "type" : "string"
          },
          "env_name" : {
            "type" : "string"
          },
          "message" : {
            "type" : "string"
          },
          "message_params" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          },
          "trace_id" : {
            "type" : "string"
          }
        }
      },
      "DataResponseModel-VerifyMFAResult" : {
        "type" : "object",
        "properties" : {
          "code" : {
            "type" : "string"
          },
          "data" : {
            "$ref" : "#/components/schemas/VerifyMFAResult"
          },
          "date" : {
            "type" : "string"
          },
          "env_name" : {
            "type" : "string"
          },
          "message" : {
            "type" : "string"
          },
          "message_params" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          },
          "trace_id" : {
            "type" : "string"
          }
        }
      },
      "DeleteEmailAccountRequest" : {
        "type" : "object",
        "properties" : {
          "account_name" : {
            "type" : "string",
            "description" : "Name of the email account to delete"
          }
        },
        "required" : [ "account_name" ]
      },
      "DeleteEmailBlacklistRequest" : {
        "type" : "object",
        "properties" : {
          "email" : {
            "type" : "string",
            "description" : "Email address or pattern to remove from blacklist"
          }
        },
        "required" : [ "email" ]
      },
      "DeleteEmailSenderRequest" : {
        "type" : "object",
        "properties" : {
          "address" : {
            "type" : "string"
          }
        },
        "required" : [ "address" ]
      },
      "DeleteEmailTemplateRequest" : {
        "type" : "object",
        "properties" : {
          "template_code" : {
            "type" : "string",
            "description" : "Template code to delete"
          }
        }
      },
      "DeleteSharedEmailAccountRequest" : {
        "type" : "object",
        "properties" : {
          "account_name" : {
            "type" : "string",
            "description" : "Name of the shared email account to remove"
          },
          "target_tenant" : {
            "type" : "string",
            "description" : "Target tenant code to revoke sharing from"
          }
        },
        "required" : [ "account_name", "target_tenant" ]
      },
      "EmailAccount" : {
        "type" : "object",
        "properties" : {
          "access_key" : {
            "type" : "string"
          },
          "account_name" : {
            "type" : "string"
          },
          "account_type" : {
            "type" : "string"
          },
          "alias" : {
            "type" : "string",
            "x-deprecated" : true
          },
          "allow_subdomain" : {
            "type" : "string",
            "description" : "AllowSubdomain, \"true\" on a domain account, lets senders be registered at\nsubdomains of it as well as at the domain itself. It lives here rather\nthan in a column of its own because it is a property of one account type\nand adding it costs no migration. An update may change it on a domain\naccount; turning it off is refused while senders at subdomains remain."
          },
          "aws_config_set" : {
            "type" : "string"
          },
          "aws_tags" : {
            "type" : "string"
          },
          "create_time" : {
            "type" : "string",
            "format" : "date-time"
          },
          "creator" : {
            "type" : "string"
          },
          "default_config" : {
            "type" : "boolean",
            "description" : "Deprecated: use Sender.DefaultConfig",
            "x-deprecated" : true
          },
          "guid" : {
            "type" : "string"
          },
          "is_domain_account" : {
            "type" : "boolean",
            "description" : "IsDomainAccount makes AccountName a domain rather than a mailbox address,\nso one set of credentials serves every sender under it. It is fixed at\ncreation."
          },
          "password" : {
            "type" : "string",
            "description" : "Deprecated: use SecretKey",
            "x-deprecated" : true
          },
          "proxy_host" : {
            "type" : "string"
          },
          "proxy_password" : {
            "type" : "string"
          },
          "proxy_port" : {
            "type" : "string"
          },
          "proxy_username" : {
            "type" : "string"
          },
          "require_sender_registration" : {
            "type" : "string",
            "description" : "RequireSenderRegistration, \"true\" on a domain account, withholds the\nwildcard sender so that every address has to be registered before it can\nsend. Changeable like AllowSubdomain: the wildcard senders carrying the\naccount's reach are rederived from both when either changes, and turning\nthis on is refused while a wildcard other than the system ones remains."
          },
          "secret_key" : {
            "type" : "string"
          },
          "smtp_auth_mechanism" : {
            "type" : "string"
          },
          "smtp_auth_protocol" : {
            "type" : "string"
          },
          "smtp_host" : {
            "type" : "string"
          },
          "smtp_port" : {
            "type" : "string"
          },
          "smtp_tls_check_cert" : {
            "type" : "string"
          },
          "source_tenant" : {
            "type" : "string",
            "x-deprecated" : true
          },
          "tenant" : {
            "type" : "string"
          },
          "update_time" : {
            "type" : "string",
            "format" : "date-time"
          },
          "username" : {
            "type" : "string"
          }
        }
      },
      "EmailAttachment" : {
        "type" : "object",
        "properties" : {
          "content" : {
            "type" : "string",
            "format" : "byte",
            "pattern" : "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$"
          },
          "content_id" : {
            "type" : "string"
          },
          "headers" : {
            "type" : "object",
            "additionalProperties" : {
              "type" : "string"
            }
          },
          "mime_type" : {
            "type" : "string"
          },
          "url" : {
            "type" : "string"
          }
        }
      },
      "EmailBlacklist" : {
        "type" : "object",
        "properties" : {
          "create_time" : {
            "type" : "string",
            "format" : "date-time"
          },
          "creator" : {
            "type" : "string"
          },
          "email" : {
            "type" : "string"
          },
          "guid" : {
            "type" : "string"
          },
          "match_type" : {
            "$ref" : "#/components/schemas/EmailBlacklistMatchType"
          },
          "tenant" : {
            "type" : "string"
          }
        }
      },
      "EmailBlacklistMatchType" : {
        "type" : "string",
        "enum" : [ "whole_word", "path_match", "regex" ],
        "x-enum-varnames" : [ "MatchTypeWholeWord", "MatchTypePathMatch", "MatchTypeRegex" ]
      },
      "EmailSender" : {
        "type" : "object",
        "properties" : {
          "account_name" : {
            "type" : "string"
          },
          "account_tenant" : {
            "type" : "string",
            "description" : "AccountTenant is where the credentials live, and so is also the granting\ntenant of a sender whose SenderSource is SourceGranted. There is no column\nnaming the grantor separately: a grant cannot be passed on, so the tenant\nholding the account is always the one that handed the sender over."
          },
          "address" : {
            "type" : "string"
          },
          "alias" : {
            "type" : "string",
            "description" : "Alias is the display name recipients see in the From header. It is not an\nidentifier: it is not unique and nothing is looked up by it."
          },
          "alias_locked" : {
            "type" : "boolean",
            "description" : "AliasLocked stops the grantee from changing the display name, so that a\nborrowed address cannot send under a name its owner never approved."
          },
          "create_time" : {
            "type" : "string",
            "format" : "date-time",
            "description" : "Create time, UTC Time with RFC3339 formated: 2024-01-01T00:00:00Z"
          },
          "creator" : {
            "type" : "string",
            "description" : "Creator"
          },
          "description" : {
            "type" : "string"
          },
          "is_default" : {
            "type" : "boolean"
          },
          "is_wildcard" : {
            "type" : "boolean",
            "description" : "IsWildcard marks Address as a pattern such as *@mail.example.com rather\nthan a single address."
          },
          "modifier" : {
            "type" : "string",
            "description" : "Modifier"
          },
          "modify_time" : {
            "type" : "string",
            "format" : "date-time",
            "description" : "Modify time, UTC Time with RFC3339 formated: 2024-01-01T00:00:00Z"
          },
          "sender_id" : {
            "type" : "string"
          },
          "sender_source" : {
            "type" : "string",
            "description" : "SenderSource says where the row came from, and each of its three values\ngoverns a different rule: SourceSystem decides who may delete the row,\nSourceGranted decides whether it may be passed on and whose display-name\nlock applies. See the constants below."
          },
          "tenant" : {
            "type" : "string"
          }
        }
      },
      "EmailTemplate" : {
        "type" : "object",
        "properties" : {
          "content" : {
            "type" : "string"
          },
          "content_alternative" : {
            "type" : "string"
          },
          "content_alternative_hash" : {
            "type" : "string"
          },
          "content_hash" : {
            "type" : "string"
          },
          "content_type" : {
            "type" : "string"
          },
          "create_time" : {
            "type" : "string",
            "format" : "date-time"
          },
          "creator" : {
            "type" : "string"
          },
          "guid" : {
            "type" : "string"
          },
          "subject" : {
            "type" : "string"
          },
          "subject_hash" : {
            "type" : "string"
          },
          "template_code" : {
            "type" : "string"
          },
          "template_engine" : {
            "type" : "string"
          },
          "tenant" : {
            "type" : "string"
          },
          "update_time" : {
            "type" : "string",
            "format" : "date-time"
          }
        }
      },
      "ErrorResponseModel" : {
        "type" : "object",
        "properties" : {
          "code" : {
            "type" : "string"
          },
          "date" : {
            "type" : "string"
          },
          "env_name" : {
            "type" : "string"
          },
          "errors" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/CodeWithParams"
            }
          },
          "message" : {
            "type" : "string"
          },
          "message_params" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          },
          "trace_id" : {
            "type" : "string"
          }
        }
      },
      "ExecuteEmailTemplateRequest" : {
        "type" : "object",
        "properties" : {
          "template_code" : {
            "type" : "string",
            "description" : "Template code to render"
          },
          "template_params" : {
            "type" : "object",
            "additionalProperties" : {
              "type" : "object"
            },
            "description" : "Key-value parameters for template variable substitution"
          }
        }
      },
      "ExecuteEmailTemplateResult" : {
        "type" : "object",
        "properties" : {
          "content" : {
            "type" : "string",
            "description" : "Rendered email body content"
          },
          "content_alternative" : {
            "type" : "string",
            "description" : "Rendered alternative content body"
          },
          "content_type" : {
            "type" : "string",
            "description" : "MIME content type of the rendered content"
          },
          "subject" : {
            "type" : "string",
            "description" : "Rendered email subject line"
          }
        }
      },
      "GrantEmailSenderRequest" : {
        "type" : "object",
        "properties" : {
          "account_name" : {
            "type" : "string",
            "description" : "Account here whose credentials the grantee will send with"
          },
          "address" : {
            "type" : "string",
            "description" : "Address to hand over, or a wildcard pattern of the account's domain"
          },
          "alias" : {
            "type" : "string"
          },
          "alias_locked" : {
            "type" : "boolean",
            "description" : "AliasLocked stops the grantee from changing the display name, so that a\nborrowed address cannot send under a name its owner never approved."
          },
          "description" : {
            "type" : "string"
          },
          "is_wildcard" : {
            "type" : "boolean",
            "description" : "IsWildcard grants every address at the account's domain rather than one.\nA wildcard sender cannot be made a default, so a grantee that needs one\nhas to be granted a specific address as well."
          },
          "target_tenant" : {
            "type" : "string"
          }
        },
        "required" : [ "account_name", "address", "target_tenant" ]
      },
      "PagedResponseModel-EmailAccount" : {
        "type" : "object",
        "properties" : {
          "code" : {
            "type" : "string"
          },
          "current_page" : {
            "type" : "integer"
          },
          "data" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/EmailAccount"
            }
          },
          "date" : {
            "type" : "string"
          },
          "env_name" : {
            "type" : "string"
          },
          "message" : {
            "type" : "string"
          },
          "message_params" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          },
          "page_size" : {
            "type" : "integer"
          },
          "total" : {
            "type" : "integer"
          },
          "trace_id" : {
            "type" : "string"
          }
        }
      },
      "PagedResponseModel-EmailBlacklist" : {
        "type" : "object",
        "properties" : {
          "code" : {
            "type" : "string"
          },
          "current_page" : {
            "type" : "integer"
          },
          "data" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/EmailBlacklist"
            }
          },
          "date" : {
            "type" : "string"
          },
          "env_name" : {
            "type" : "string"
          },
          "message" : {
            "type" : "string"
          },
          "message_params" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          },
          "page_size" : {
            "type" : "integer"
          },
          "total" : {
            "type" : "integer"
          },
          "trace_id" : {
            "type" : "string"
          }
        }
      },
      "PagedResponseModel-EmailSender" : {
        "type" : "object",
        "properties" : {
          "code" : {
            "type" : "string"
          },
          "current_page" : {
            "type" : "integer"
          },
          "data" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/EmailSender"
            }
          },
          "date" : {
            "type" : "string"
          },
          "env_name" : {
            "type" : "string"
          },
          "message" : {
            "type" : "string"
          },
          "message_params" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          },
          "page_size" : {
            "type" : "integer"
          },
          "total" : {
            "type" : "integer"
          },
          "trace_id" : {
            "type" : "string"
          }
        }
      },
      "PagedResponseModel-EmailTemplate" : {
        "type" : "object",
        "properties" : {
          "code" : {
            "type" : "string"
          },
          "current_page" : {
            "type" : "integer"
          },
          "data" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/EmailTemplate"
            }
          },
          "date" : {
            "type" : "string"
          },
          "env_name" : {
            "type" : "string"
          },
          "message" : {
            "type" : "string"
          },
          "message_params" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          },
          "page_size" : {
            "type" : "integer"
          },
          "total" : {
            "type" : "integer"
          },
          "trace_id" : {
            "type" : "string"
          }
        }
      },
      "RevokeEmailSenderRequest" : {
        "type" : "object",
        "properties" : {
          "address" : {
            "type" : "string"
          },
          "target_tenant" : {
            "type" : "string"
          }
        },
        "required" : [ "address", "target_tenant" ]
      },
      "SendEmailRequest" : {
        "type" : "object",
        "properties" : {
          "account_name" : {
            "type" : "string",
            "description" : "Deprecated: use sender. Kept for callers that still name the account; sender wins when both are given",
            "example" : "insuremo@insuremo.com"
          },
          "alias" : {
            "type" : "string",
            "description" : "The account alias, which users can see in the mail client",
            "example" : "InsureMO"
          },
          "attachments" : {
            "type" : "array",
            "description" : "The attachment list",
            "items" : {
              "$ref" : "#/components/schemas/EmailAttachment"
            }
          },
          "bcc" : {
            "type" : "array",
            "description" : "BCC list",
            "example" : [ "sample@insuremo.com" ],
            "items" : {
              "type" : "string"
            }
          },
          "cc" : {
            "type" : "array",
            "description" : "CC list",
            "example" : [ "sample@insuremo.com" ],
            "items" : {
              "type" : "string"
            }
          },
          "content" : {
            "type" : "string",
            "description" : "The content of the message, which can be in HTML format, but does not allow any external script to be nested"
          },
          "content_alternative" : {
            "type" : "string",
            "description" : "The alternative content, required if content type is multipart/alternative"
          },
          "content_type" : {
            "type" : "string",
            "description" : "The content type, enums: text/html, text/plain, multipart/alternative",
            "enum" : [ "text/html", "text/plain", "multipart/alternative" ]
          },
          "custom_headers" : {
            "type" : "object",
            "additionalProperties" : {
              "type" : "string"
            }
          },
          "reply_to" : {
            "type" : "string",
            "description" : "Replyto's email address"
          },
          "sender" : {
            "type" : "string",
            "description" : "From address to send as. Falls back to account_name, and to the tenant default sender when both are empty",
            "example" : "no-reply@mail.insuremo.com"
          },
          "sender_params" : {
            "type" : "object",
            "additionalProperties" : {
              "type" : "string"
            }
          },
          "subject" : {
            "type" : "string",
            "description" : "email subject",
            "example" : "Email Service Testing Email"
          },
          "template_code" : {
            "type" : "string",
            "description" : "template code"
          },
          "template_params" : {
            "type" : "object",
            "additionalProperties" : {
              "type" : "object"
            },
            "description" : "parameter in the content;sample :{'code':\"1234\"}"
          },
          "to" : {
            "type" : "array",
            "description" : "Recipient list, using an invalid inbox will affect your reputation, it may affect your future use of the email service",
            "example" : [ "sample@insuremo.com" ],
            "items" : {
              "type" : "string"
            }
          }
        }
      },
      "SendEmailResult" : {
        "type" : "object",
        "properties" : {
          "content_length" : {
            "type" : "integer"
          },
          "data" : {
            "type" : "object"
          },
          "message_id" : {
            "type" : "string"
          }
        }
      },
      "SendMFACodeResult" : {
        "type" : "object",
        "properties" : {
          "content_length" : {
            "type" : "integer",
            "description" : "Length of the sent content"
          },
          "data" : {
            "type" : "object"
          },
          "message_id" : {
            "type" : "string",
            "description" : "Message ID from the delivery channel"
          },
          "sequence" : {
            "type" : "string",
            "description" : "Sequence code, present when generate_sequence is true"
          }
        }
      },
      "SendMFAEmailRequest" : {
        "type" : "object",
        "properties" : {
          "account_name" : {
            "type" : "string",
            "description" : "Specify the email account, please manually configure in the console"
          },
          "alias" : {
            "type" : "string",
            "description" : "email sender alias"
          },
          "attachments" : {
            "type" : "array",
            "description" : "email attachment list",
            "items" : {
              "$ref" : "#/components/schemas/EmailAttachment"
            }
          },
          "block_resend_in_seconds" : {
            "type" : "integer",
            "description" : "Minimum interval in seconds before allowing resend for same business_code + to, default 0 (no limit)"
          },
          "business_code" : {
            "type" : "string",
            "description" : "Business code to identify this MFA session, used to match send and verify"
          },
          "case_sensitive" : {
            "type" : "boolean",
            "description" : "If true, verification code comparison is case-sensitive"
          },
          "code_length" : {
            "type" : "integer",
            "description" : "Verification code length, default 6, range 4-20",
            "example" : 6
          },
          "code_strategy" : {
            "type" : "integer",
            "description" : "Code strategy: 0-digits only (default), 1-digits and uppercase letters, 2-digits and mixed case letters"
          },
          "content" : {
            "type" : "string",
            "description" : "email content, ${code} and ${timeout} are required"
          },
          "destroy_on_fail" : {
            "type" : "boolean",
            "description" : "Deprecated: use max_attempts=1 instead. If true, invalidate code immediately on first verify failure",
            "x-deprecated" : true
          },
          "expires_in_minutes" : {
            "type" : "integer",
            "description" : "Code expiration time in minutes, default 15, range 1-120",
            "example" : 15
          },
          "generate_sequence" : {
            "type" : "boolean",
            "description" : "If true, generate a 2-character sequence that must be provided during verify"
          },
          "max_attempts" : {
            "type" : "integer",
            "description" : "Max failed verify attempts before code is invalidated, 0 means unlimited (default)"
          },
          "mfa_context" : {
            "type" : "string",
            "description" : "Optional context string, must match during verify, max 500 characters",
            "maxLength" : 500
          },
          "multiple_verify" : {
            "type" : "boolean",
            "description" : "If true, code remains valid for multiple successful verifications until expired"
          },
          "sender_params" : {
            "type" : "object",
            "additionalProperties" : {
              "type" : "string"
            },
            "description" : "parameter for senders"
          },
          "subject" : {
            "type" : "string",
            "description" : "email subject"
          },
          "template_code" : {
            "type" : "string",
            "description" : "template code, please manually configure in the console"
          },
          "template_params" : {
            "type" : "object",
            "additionalProperties" : {
              "type" : "object"
            },
            "description" : "parameter in content and template"
          },
          "to" : {
            "type" : "string",
            "description" : "Recipient email address",
            "example" : "abc@test.com"
          }
        },
        "required" : [ "to" ]
      },
      "SetDefaultEmailAccountRequest" : {
        "type" : "object",
        "properties" : {
          "account_name" : {
            "type" : "string",
            "description" : "Name of the email account to set as default"
          },
          "default_config" : {
            "type" : "boolean",
            "description" : "Whether to set this account as the default sender"
          }
        },
        "required" : [ "account_name" ]
      },
      "SetDefaultEmailSenderRequest" : {
        "type" : "object",
        "properties" : {
          "address" : {
            "type" : "string"
          },
          "set_default" : {
            "type" : "boolean"
          }
        },
        "required" : [ "address" ]
      },
      "ShareEmailAccountRequest" : {
        "type" : "object",
        "properties" : {
          "account_name" : {
            "type" : "string",
            "description" : "Name of the email account to share"
          },
          "duplicate" : {
            "type" : "boolean",
            "description" : "Duplicate asked for the credentials to be copied into the target tenant.\nDeprecated: it is ignored. The copy was never the one sent with — the row\ncarrying it pointed back at the owning tenant, and the send path followed\nthat — so a share hands over senders and leaves the credentials in one\nplace."
          },
          "target_tenant" : {
            "type" : "string",
            "description" : "Target tenant code to share the account with"
          }
        },
        "required" : [ "account_name", "target_tenant" ]
      },
      "TemplateMode" : {
        "type" : "string",
        "enum" : [ "content", "registered_content", "vendor_template" ],
        "x-enum-varnames" : [ "TemplateModeContent", "TemplateModeRegisteredContent", "TemplateModeVendorTemplate" ]
      },
      "UpdateEmailAccountRequest" : {
        "type" : "object",
        "properties" : {
          "access_key" : {
            "type" : "string",
            "description" : "Access key for cloud-based email providers (AWS SES, SendGrid)"
          },
          "account_name" : {
            "type" : "string",
            "description" : "Name of the account to update; it is the business key and cannot be changed here"
          },
          "account_type" : {
            "type" : "string",
            "description" : "Email service provider type (e.g., smtp, aws_ses, sendgrid, aws_pinpoint, msgraph)"
          },
          "alias" : {
            "type" : "string",
            "description" : "Display name shown to email recipients, max 40 characters",
            "maxLength" : 40
          },
          "allow_subdomain" : {
            "type" : "string",
            "description" : "AllowSubdomain, \"true\" on a domain account, lets senders be registered at\nsubdomains of it as well as at the domain itself. It lives here rather\nthan in a column of its own because it is a property of one account type\nand adding it costs no migration. An update may change it on a domain\naccount; turning it off is refused while senders at subdomains remain."
          },
          "aws_config_set" : {
            "type" : "string"
          },
          "aws_tags" : {
            "type" : "string"
          },
          "default_config" : {
            "type" : "boolean",
            "description" : "DefaultConfig is read-only here. It is accepted so that an account read\nfrom the API can be posted back unchanged, and refused when it differs\nfrom the stored value: use /sns/email/account/set-default to change it."
          },
          "legacy_mode" : {
            "type" : "boolean",
            "description" : "LegacyMode says the account has to stay readable by the send service\nthat predates senders. It is left out by callers written before the field\nexisted, which is exactly who it is for, so absent means true today. In\nlegacy mode the credentials this call writes are stored as sent rather\nthan encrypted."
          },
          "password" : {
            "type" : "string",
            "description" : "Authentication password; send back the masked value a read returned to keep the stored one"
          },
          "proxy_host" : {
            "type" : "string",
            "description" : "HTTP proxy hostname for outbound connections"
          },
          "proxy_password" : {
            "type" : "string",
            "description" : "Proxy authentication password; send back the masked value a read returned to keep the stored one"
          },
          "proxy_port" : {
            "type" : "string",
            "description" : "HTTP proxy port number"
          },
          "proxy_username" : {
            "type" : "string",
            "description" : "Proxy authentication username"
          },
          "require_sender_registration" : {
            "type" : "string",
            "description" : "RequireSenderRegistration, \"true\" on a domain account, withholds the\nwildcard sender so that every address has to be registered before it can\nsend. Changeable like AllowSubdomain: the wildcard senders carrying the\naccount's reach are rederived from both when either changes, and turning\nthis on is refused while a wildcard other than the system ones remains."
          },
          "secret_key" : {
            "type" : "string",
            "description" : "Secret key; send back the masked value a read returned to keep the stored one"
          },
          "smtp_auth_mechanism" : {
            "type" : "string"
          },
          "smtp_auth_protocol" : {
            "type" : "string"
          },
          "smtp_host" : {
            "type" : "string",
            "description" : "SMTP server hostname"
          },
          "smtp_port" : {
            "type" : "string",
            "description" : "SMTP server port number"
          },
          "smtp_tls_check_cert" : {
            "type" : "string"
          },
          "update_options" : {
            "allOf" : [ {
              "$ref" : "#/components/schemas/UpdateOptions"
            } ],
            "description" : "Optional: clear fields, or ask for the whole account to be replaced"
          },
          "username" : {
            "type" : "string",
            "description" : "Authentication username; send back the masked value a read returned to keep the stored one"
          }
        },
        "required" : [ "account_name" ]
      },
      "UpdateEmailSenderRequest" : {
        "type" : "object",
        "properties" : {
          "address" : {
            "type" : "string"
          },
          "alias" : {
            "type" : "string"
          },
          "description" : {
            "type" : "string"
          },
          "update_options" : {
            "allOf" : [ {
              "$ref" : "#/components/schemas/UpdateOptions"
            } ],
            "description" : "Optional: clear fields, or ask for the whole sender to be replaced"
          }
        },
        "required" : [ "address" ]
      },
      "UpdateEmailTemplateRequest" : {
        "type" : "object",
        "properties" : {
          "content" : {
            "type" : "string",
            "description" : "Template body content, supports variable placeholders"
          },
          "content_alternative" : {
            "type" : "string",
            "description" : "Alternative content body, required when content_type is multipart/alternative"
          },
          "content_type" : {
            "type" : "string",
            "description" : "MIME content type: text/html, text/plain, or multipart/alternative",
            "enum" : [ "text/html", "text/plain", "multipart/alternative" ]
          },
          "subject" : {
            "type" : "string",
            "description" : "Email subject line template"
          },
          "template_code" : {
            "type" : "string",
            "description" : "Unique template identifier within the tenant"
          },
          "template_engine" : {
            "type" : "string",
            "description" : "Template rendering engine: simple, go-template, or handlebars",
            "enum" : [ "simple", "go-template", "handlebars" ]
          },
          "update_options" : {
            "allOf" : [ {
              "$ref" : "#/components/schemas/UpdateOptions"
            } ],
            "description" : "UpdateOptions is optional: clear fields, or ask for the whole template\nto be replaced."
          }
        }
      },
      "UpdateGrantedEmailSenderRequest" : {
        "type" : "object",
        "properties" : {
          "address" : {
            "type" : "string"
          },
          "alias" : {
            "type" : "string"
          },
          "alias_locked" : {
            "type" : "boolean",
            "description" : "AliasLocked stops the grantee from changing the display name, so that a\nborrowed address cannot send under a name its owner never approved."
          },
          "description" : {
            "type" : "string"
          },
          "target_tenant" : {
            "type" : "string"
          },
          "update_options" : {
            "allOf" : [ {
              "$ref" : "#/components/schemas/UpdateOptions"
            } ],
            "description" : "Optional: clear fields, or ask for the whole grant to be replaced"
          }
        },
        "required" : [ "address", "target_tenant" ]
      },
      "UpdateOptions" : {
        "type" : "object",
        "properties" : {
          "full_update" : {
            "type" : "boolean",
            "description" : "FullUpdate restores the original replace-everything behavior: every\nwritable field is written, and anything the body left out is emptied."
          },
          "unset_fields" : {
            "type" : "array",
            "description" : "UnsetFields lists the fields to clear. This is the only way to clear\none: a null in the body reads as \"not sent\" so that posting back a read\nresponse is safe, which leaves clearing with no other spelling.",
            "items" : {
              "type" : "string"
            }
          }
        }
      },
      "VerifyMFAEmailRequest" : {
        "type" : "object",
        "properties" : {
          "business_code" : {
            "type" : "string",
            "description" : "Business code, must match the one used in send request"
          },
          "code" : {
            "type" : "string",
            "description" : "Verification code received from send request",
            "example" : "123456"
          },
          "mfa_context" : {
            "type" : "string",
            "description" : "Must match the mfa_context used in send request, max 500 characters",
            "maxLength" : 500
          },
          "output_result" : {
            "type" : "boolean",
            "description" : "If true, return result with verified=false instead of error response"
          },
          "sequence" : {
            "type" : "string",
            "description" : "Sequence from send response, required if generate_sequence was true"
          },
          "to" : {
            "type" : "string",
            "description" : "Recipient phone number or email address"
          }
        },
        "required" : [ "code", "to" ]
      },
      "VerifyMFAResult" : {
        "type" : "object",
        "properties" : {
          "failed_attempts" : {
            "type" : "integer",
            "description" : "Failed attempts on the code so far, counting this one if it failed. Only present when output_result is true and the code was found"
          },
          "max_attempts" : {
            "type" : "integer",
            "description" : "Max failed attempts the code was sent with, 0 means unlimited. Only present when output_result is true and the code was found"
          },
          "reason" : {
            "type" : "string",
            "description" : "Failure reason, only present when output_result is true and verified is false"
          },
          "to" : {
            "type" : "string",
            "description" : "Recipient phone number or email address"
          },
          "verified" : {
            "type" : "boolean",
            "description" : "Verify result"
          }
        }
      },
      "WebOption" : {
        "type" : "object",
        "properties" : {
          "enums" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          },
          "extend_model" : {
            "type" : "boolean"
          },
          "extend_model_name" : {
            "type" : "string"
          },
          "label" : {
            "type" : "string"
          },
          "model" : {
            "type" : "string"
          },
          "placeholder" : {
            "type" : "string"
          },
          "required" : {
            "type" : "boolean"
          },
          "type" : {
            "$ref" : "#/components/schemas/WebOptionType"
          }
        }
      },
      "WebOptionType" : {
        "type" : "string",
        "enum" : [ "text", "number", "selector", "secret" ],
        "x-enum-varnames" : [ "WebOptionTypeText", "WebOptionTypeNumber", "WebOptionTypeSelector", "WebOptionTypeSecret" ]
      },
      "WebType" : {
        "type" : "object",
        "properties" : {
          "aliases" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          },
          "description" : {
            "type" : "string"
          },
          "disabled" : {
            "type" : "boolean"
          },
          "index" : {
            "type" : "integer"
          },
          "label" : {
            "type" : "string"
          },
          "options" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/WebOption"
            }
          },
          "tags" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          },
          "template_code_field" : {
            "type" : "string",
            "description" : "TemplateCodeField is the entry of a template's sender_properties that\nholds this vendor's template code, for a form to ask for that one. Empty\nfor a vendor that takes no code."
          },
          "template_mode" : {
            "allOf" : [ {
              "$ref" : "#/components/schemas/TemplateMode"
            } ],
            "description" : "TemplateMode is what an SMS or voice vendor takes from a template. Empty\nfor the other channels."
          },
          "value" : {
            "type" : "string"
          }
        }
      }
    }
  },
  "jsonSchemaDialect" : "https://spec.openapis.org/oas/3.1/dialect/base",
  "x-mo-gateway-auth-enabled" : true,
  "x-mo-gateway-cors-enabled" : true,
  "x-original-swagger-version" : "2.0"
}