{ "openapi": "3.1.0", "info": { "title": "Mailchimp Transactional API", "version": "1.4.0" }, "servers": [ { "url": "https://mandrillapp.com/api/1.4", "description": "Mailchimp Transactional API v1.4" } ], "paths": { "/allowlists/add": { "post": { "tags": [ "Allowlist" ], "summary": "Add email to allowlist", "description": "Adds an email to your email rejection allowlist. If the address is currently on your denylist, that denylist entry will be removed automatically.", "operationId": "allowlists/add", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AllowlistsAddRequest" } } } }, "responses": { "401": { "$ref": "#/components/responses/Unauthorized" }, "500": { "$ref": "#/components/responses/ServerError" }, "422": { "$ref": "#/components/responses/ValidationError" }, "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AllowlistsAddResponse" } } } } } } }, "/allowlists/list": { "post": { "tags": [ "Allowlist" ], "summary": "List allowlist entries", "description": "Retrieves your email rejection allowlist. You can provide an email address or search prefix to limit the results. Returns up to 1000 results.", "operationId": "allowlists/list", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AllowlistsListRequest" } } } }, "responses": { "401": { "$ref": "#/components/responses/Unauthorized" }, "500": { "$ref": "#/components/responses/ServerError" }, "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AllowlistsListResponse" } } } } }, "x-readonly": true } }, "/allowlists/delete": { "post": { "tags": [ "Allowlist" ], "summary": "Remove email from allowlist", "description": "Removes an email address from the allowlist.", "operationId": "allowlists/delete", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AllowlistsDeleteRequest" } } } }, "responses": { "401": { "$ref": "#/components/responses/Unauthorized" }, "500": { "$ref": "#/components/responses/ServerError" }, "422": { "$ref": "#/components/responses/ValidationError" }, "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AllowlistsDeleteResponse" } } } } } } }, "/exports/info": { "post": { "tags": [ "Exports" ], "summary": "Get export job information", "description": "Returns information about an export job including status and download URL when complete.", "operationId": "exports/info", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExportsInfoRequest" } } } }, "responses": { "401": { "$ref": "#/components/responses/Unauthorized" }, "500": { "$ref": "#/components/responses/ServerError" }, "404": { "$ref": "#/components/responses/ExportNotFound" }, "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExportsInfoResponse" } } } } }, "x-readonly": true } }, "/exports/list": { "post": { "tags": [ "Exports" ], "summary": "List export jobs", "description": "Returns a list of all export jobs for the account.", "operationId": "exports/list", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExportsListRequest" } } } }, "responses": { "401": { "$ref": "#/components/responses/Unauthorized" }, "500": { "$ref": "#/components/responses/ServerError" }, "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExportsListResponse" } } } } }, "x-readonly": true } }, "/exports/rejects": { "post": { "tags": [ "Exports" ], "summary": "Export rejection blacklist", "description": "Begins an export of your rejection blacklist. The blacklist will be exported to a zip archive containing a single file named rejects.csv.", "operationId": "exports/rejects", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExportsRejectsRequest" } } } }, "responses": { "401": { "$ref": "#/components/responses/Unauthorized" }, "500": { "$ref": "#/components/responses/ServerError" }, "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExportsRejectsResponse" } } } } } } }, "/exports/whitelist": { "post": { "tags": [ "Exports" ], "summary": "Export rejection allowlist (legacy)", "description": "Begins an export of your rejection allowlist. The allowlist will be exported to a zip archive containing a single file named allowlist.csv.", "operationId": "exports/whitelist", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExportsWhitelistRequest" } } } }, "responses": { "401": { "$ref": "#/components/responses/Unauthorized" }, "500": { "$ref": "#/components/responses/ServerError" }, "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExportsWhitelistResponse" } } } } } } }, "/exports/allowlist": { "post": { "tags": [ "Exports" ], "summary": "Export rejection allowlist", "description": "Begins an export of your rejection allowlist. The allowlist will be exported to a zip archive containing a single file named allowlist.csv.", "operationId": "exports/allowlist", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExportsAllowlistRequest" } } } }, "responses": { "401": { "$ref": "#/components/responses/Unauthorized" }, "500": { "$ref": "#/components/responses/ServerError" }, "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExportsAllowlistResponse" } } } } } } }, "/exports/activity": { "post": { "tags": [ "Exports" ], "summary": "Export activity history", "description": "Begins an export of your activity history. The activity will be exported to a zip archive containing a single file named activity.csv with message details and custom metadata fields.", "operationId": "exports/activity", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExportsActivityRequest" } } } }, "responses": { "401": { "$ref": "#/components/responses/Unauthorized" }, "500": { "$ref": "#/components/responses/ServerError" }, "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExportsActivityResponse" } } } } } } }, "/ips/list": { "post": { "tags": [ "IPs" ], "summary": "List dedicated IPs", "description": "Lists your dedicated IPs.", "operationId": "ips/list", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/IPsListRequest" } } } }, "responses": { "401": { "$ref": "#/components/responses/Unauthorized" }, "500": { "$ref": "#/components/responses/ServerError" }, "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/IPsListResponse" } } } } }, "x-readonly": true } }, "/ips/info": { "post": { "tags": [ "IPs" ], "summary": "Get dedicated IP information", "description": "Retrieves information about a single dedicated IP.", "operationId": "ips/info", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/IPsInfoRequest" } } } }, "responses": { "401": { "$ref": "#/components/responses/Unauthorized" }, "500": { "$ref": "#/components/responses/ServerError" }, "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/IPsInfoResponse" } } } } }, "x-readonly": true } }, "/ips/provision": { "post": { "tags": [ "IPs" ], "summary": "Request dedicated IP provisioning", "description": "Requests an additional dedicated IP for your account. Accounts may have one outstanding request at any time, and provisioning requests are processed within 24 hours.", "operationId": "ips/provision", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/IPsProvisionRequest" } } } }, "responses": { "401": { "$ref": "#/components/responses/Unauthorized" }, "500": { "$ref": "#/components/responses/ServerError" }, "402": { "$ref": "#/components/responses/PaymentRequired" }, "404": { "$ref": "#/components/responses/IPPoolNotFound" }, "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/IPsProvisionResponse" } } } } } } }, "/ips/start-warmup": { "post": { "tags": [ "IPs" ], "summary": "Start IP warmup process", "description": "Begins the warmup process for a dedicated IP. During the warmup process, Mandrill will gradually increase the percentage of your mail that is sent over the warming-up IP, over a period of roughly 30 days. The rest of your mail will be sent over shared IPs or other dedicated IPs in the same pool.", "operationId": "ips/start-warmup", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/IPsStartWarmupRequest" } } } }, "responses": { "401": { "$ref": "#/components/responses/Unauthorized" }, "500": { "$ref": "#/components/responses/ServerError" }, "404": { "$ref": "#/components/responses/IPNotFound" }, "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/IPsStartWarmupResponse" } } } } } } }, "/ips/cancel-warmup": { "post": { "tags": [ "IPs" ], "summary": "Cancel IP warmup process", "description": "Cancels the warmup process for a dedicated IP.", "operationId": "ips/cancel-warmup", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/IPsCancelWarmupRequest" } } } }, "responses": { "401": { "$ref": "#/components/responses/Unauthorized" }, "500": { "$ref": "#/components/responses/ServerError" }, "404": { "$ref": "#/components/responses/IPNotFound" }, "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/IPsCancelWarmupResponse" } } } } } } }, "/ips/set-pool": { "post": { "tags": [ "IPs" ], "summary": "Move IP to different pool", "description": "Moves a dedicated IP to a different pool.", "operationId": "ips/set-pool", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/IPsSetPoolRequest" } } } }, "responses": { "401": { "$ref": "#/components/responses/Unauthorized" }, "500": { "$ref": "#/components/responses/ServerError" }, "400": { "$ref": "#/components/responses/IPInvalidEmptyDefaultPool" }, "404": { "$ref": "#/components/responses/IPOrPoolNotFound" }, "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/IPsSetPoolResponse" } } } } } } }, "/ips/delete": { "post": { "tags": [ "IPs" ], "summary": "Delete dedicated IP", "description": "Deletes a dedicated IP. This is permanent and cannot be undone.", "operationId": "ips/delete", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/IPsDeleteRequest" } } } }, "responses": { "401": { "$ref": "#/components/responses/Unauthorized" }, "500": { "$ref": "#/components/responses/ServerError" }, "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/IPsDeleteResponse" } } } } } } }, "/ips/list-pools": { "post": { "tags": [ "IPs" ], "summary": "List dedicated IP pools", "description": "Lists your dedicated IP pools.", "operationId": "ips/list-pools", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/IPsListPoolsRequest" } } } }, "responses": { "401": { "$ref": "#/components/responses/Unauthorized" }, "500": { "$ref": "#/components/responses/ServerError" }, "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/IPsListPoolsResponse" } } } } }, "x-readonly": true } }, "/ips/pool-info": { "post": { "tags": [ "IPs" ], "summary": "Get pool information", "description": "Describes a single dedicated IP pool.", "operationId": "ips/pool-info", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/IPsPoolInfoRequest" } } } }, "responses": { "401": { "$ref": "#/components/responses/Unauthorized" }, "500": { "$ref": "#/components/responses/ServerError" }, "404": { "$ref": "#/components/responses/IPPoolNotFound" }, "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/IPsPoolInfoResponse" } } } } }, "x-readonly": true } }, "/ips/create-pool": { "post": { "tags": [ "IPs" ], "summary": "Create dedicated IP pool", "description": "Creates a pool and returns it. If a pool already exists with this name, no action will be performed.", "operationId": "ips/create-pool", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/IPsCreatePoolRequest" } } } }, "responses": { "401": { "$ref": "#/components/responses/Unauthorized" }, "500": { "$ref": "#/components/responses/ServerError" }, "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/IPsCreatePoolResponse" } } } } } } }, "/ips/delete-pool": { "post": { "tags": [ "IPs" ], "summary": "Delete dedicated IP pool", "description": "Deletes a pool. A pool must be empty before you can delete it, and you cannot delete your default pool.", "operationId": "ips/delete-pool", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/IPsDeletePoolRequest" } } } }, "responses": { "401": { "$ref": "#/components/responses/Unauthorized" }, "500": { "$ref": "#/components/responses/ServerError" }, "400": { "$ref": "#/components/responses/IPInvalidDeletePool" }, "404": { "$ref": "#/components/responses/IPPoolNotFound" }, "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/IPsDeletePoolResponse" } } } } } } }, "/ips/check-custom-dns": { "post": { "tags": [ "IPs" ], "summary": "Test custom DNS configuration", "description": "Tests whether a domain name is valid for use as the custom reverse DNS for a dedicated IP.", "operationId": "ips/check-custom-dns", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/IPsCheckCustomDnsRequest" } } } }, "responses": { "401": { "$ref": "#/components/responses/Unauthorized" }, "500": { "$ref": "#/components/responses/ServerError" }, "404": { "$ref": "#/components/responses/IPNotFound" }, "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/IPsCheckCustomDnsResponse" } } } } } } }, "/ips/set-custom-dns": { "post": { "tags": [ "IPs" ], "summary": "Configure custom DNS for IP", "description": "Configures the custom DNS name for a dedicated IP.", "operationId": "ips/set-custom-dns", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/IPsSetCustomDnsRequest" } } } }, "responses": { "401": { "$ref": "#/components/responses/Unauthorized" }, "500": { "$ref": "#/components/responses/ServerError" }, "400": { "$ref": "#/components/responses/IPInvalidCustomDns" }, "404": { "$ref": "#/components/responses/IPNotFound" }, "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/IPsSetCustomDnsResponse" } } } } } } }, "/inbound/domains": { "post": { "tags": [ "Inbound" ], "summary": "List inbound domains", "description": "List the domains that have been configured for inbound delivery.", "operationId": "inbound/domains", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InboundDomainsRequest" } } } }, "responses": { "401": { "$ref": "#/components/responses/Unauthorized" }, "500": { "$ref": "#/components/responses/ServerError" }, "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InboundDomainsResponse" } } } } } } }, "/inbound/add-domain": { "post": { "tags": [ "Inbound" ], "summary": "Add inbound domain", "description": "Add an inbound domain to your account.", "operationId": "inbound/add-domain", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InboundAddDomainRequest" } } } }, "responses": { "401": { "$ref": "#/components/responses/Unauthorized" }, "500": { "$ref": "#/components/responses/ServerError" }, "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InboundAddDomainResponse" } } } } } } }, "/inbound/check-domain": { "post": { "tags": [ "Inbound" ], "summary": "Check domain settings", "description": "Check the MX settings for an inbound domain. The domain must have already been added with the add-domain call.", "operationId": "inbound/check-domain", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InboundCheckDomainRequest" } } } }, "responses": { "401": { "$ref": "#/components/responses/Unauthorized" }, "500": { "$ref": "#/components/responses/ServerError" }, "404": { "$ref": "#/components/responses/InboundDomainNotFound" }, "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InboundCheckDomainResponse" } } } } } } }, "/inbound/delete-domain": { "post": { "tags": [ "Inbound" ], "summary": "Delete inbound domain", "description": "Delete an inbound domain from the account. All mail will stop routing for this domain immediately.", "operationId": "inbound/delete-domain", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InboundDeleteDomainRequest" } } } }, "responses": { "401": { "$ref": "#/components/responses/Unauthorized" }, "500": { "$ref": "#/components/responses/ServerError" }, "404": { "$ref": "#/components/responses/InboundDomainNotFound" }, "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InboundDeleteDomainResponse" } } } } } } }, "/inbound/routes": { "post": { "tags": [ "Inbound" ], "summary": "List mailbox routes", "description": "List the mailbox routes defined for an inbound domain.", "operationId": "inbound/routes", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InboundRoutesRequest" } } } }, "responses": { "401": { "$ref": "#/components/responses/Unauthorized" }, "500": { "$ref": "#/components/responses/ServerError" }, "404": { "$ref": "#/components/responses/InboundDomainNotFound" }, "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InboundRoutesResponse" } } } } } } }, "/inbound/add-route": { "post": { "tags": [ "Inbound" ], "summary": "Add mailbox route", "description": "Add a new mailbox route to an inbound domain.", "operationId": "inbound/add-route", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InboundAddRouteRequest" } } } }, "responses": { "401": { "$ref": "#/components/responses/Unauthorized" }, "500": { "$ref": "#/components/responses/ServerError" }, "404": { "$ref": "#/components/responses/InboundDomainNotFound" }, "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InboundAddRouteResponse" } } } } } } }, "/inbound/update-route": { "post": { "tags": [ "Inbound" ], "summary": "Update mailbox route", "description": "Update the pattern or webhook of an existing inbound mailbox route. If null is provided for any fields, the values will remain unchanged.", "operationId": "inbound/update-route", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InboundUpdateRouteRequest" } } } }, "responses": { "401": { "$ref": "#/components/responses/Unauthorized" }, "500": { "$ref": "#/components/responses/ServerError" }, "404": { "$ref": "#/components/responses/InboundRouteNotFound" }, "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InboundUpdateRouteResponse" } } } } } } }, "/inbound/delete-route": { "post": { "tags": [ "Inbound" ], "summary": "Delete mailbox route", "description": "Delete an existing inbound mailbox route.", "operationId": "inbound/delete-route", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InboundDeleteRouteRequest" } } } }, "responses": { "401": { "$ref": "#/components/responses/Unauthorized" }, "500": { "$ref": "#/components/responses/ServerError" }, "404": { "$ref": "#/components/responses/InboundRouteNotFound" }, "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InboundDeleteRouteResponse" } } } } } } }, "/inbound/send-raw": { "post": { "tags": [ "Inbound" ], "summary": "Send mime document", "description": "Take a raw MIME document destined for a domain with inbound domains set up, and send it to the inbound hook exactly as if it had been sent over SMTP.", "operationId": "inbound/send-raw", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InboundSendRawRequest" } } } }, "responses": { "401": { "$ref": "#/components/responses/Unauthorized" }, "500": { "$ref": "#/components/responses/ServerError" }, "404": { "$ref": "#/components/responses/InboundDomainNotFound" }, "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InboundSendRawResponse" } } } } } } }, "/mctemplates/info": { "post": { "tags": [ "MC Templates" ], "summary": "Get Mailchimp Transactional template information", "description": "Returns complete information about a Mailchimp Transactional template including draft and published versions", "operationId": "mctemplates/info", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MctemplatesInfoRequest" } } } }, "responses": { "401": { "$ref": "#/components/responses/Unauthorized" }, "500": { "$ref": "#/components/responses/ServerError" }, "404": { "$ref": "#/components/responses/MctemplateNotFound" }, "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MctemplatesInfoResponse" } } } } }, "x-readonly": true } }, "/mctemplates/list": { "post": { "tags": [ "MC Templates" ], "summary": "List Mailchimp Transactional templates", "description": "Returns a list of all Mailchimp Transactional templates for the authenticated user", "operationId": "mctemplates/list", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MctemplatesListRequest" } } } }, "responses": { "401": { "$ref": "#/components/responses/Unauthorized" }, "500": { "$ref": "#/components/responses/ServerError" }, "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MctemplatesListResponse" } } } } }, "x-readonly": true } }, "/mctemplates/render": { "post": { "tags": [ "MC Templates" ], "summary": "Render a Mailchimp Transactional template", "description": "Renders a Mailchimp Transactional template with optional merge variables", "operationId": "mctemplates/render", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MctemplatesRenderRequest" } } } }, "responses": { "401": { "$ref": "#/components/responses/Unauthorized" }, "500": { "$ref": "#/components/responses/ServerError" }, "422": { "$ref": "#/components/responses/MctemplateInvalidVersion" }, "404": { "$ref": "#/components/responses/MctemplateNotFound" }, "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MctemplatesRenderResponse" } } } } }, "x-readonly": true } }, "/mctemplates/time-series": { "post": { "tags": [ "MC Templates" ], "summary": "Get Mailchimp Transactional template time series", "description": "Returns hourly stats for the last 30 days for a Mailchimp Transactional template. Returns an empty array if the template exists but has never been used to send messages.", "operationId": "mctemplates/time-series", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MctemplatesTimeSeriesRequest" } } } }, "responses": { "401": { "$ref": "#/components/responses/Unauthorized" }, "500": { "$ref": "#/components/responses/ServerError" }, "404": { "$ref": "#/components/responses/MctemplateNotFound" }, "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MctemplatesTimeSeriesResponse" } } } } }, "x-readonly": true } }, "/messages/send": { "post": { "tags": [ "Messages" ], "summary": "Send a new transactional message through the Transactional API.", "description": "Send a new transactional message through Mandrill\n\n\n \n \n \n \n \n \n
Note
\n If you signed up for a Mandrill account on or after December 1st, 2015, you must add SPF and DKIM records and verify ownership of your sending domains before you can send email through your account. Mandrill will not send any email from unverified domains or domains without valid SPF and DKIM records, including public domains like gmail.com, yahoo.com, and more.

Custom signing domains are only available to Mandrill accounts created before December 1st, 2015. If you signed up for a new Mandrill account on or after December 1st, 2015, the signing_domain parameter will be ignored.

Mail sent from unverified domains or domains without valid SPF and DKIM records will be rejected with the reject_reason, unsigned.

Learn more about SPF and DKIM, and domain verification\n
", "operationId": "messages/send", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MessagesSendRequest" } } } }, "responses": { "401": { "$ref": "#/components/responses/Unauthorized" }, "500": { "$ref": "#/components/responses/ServerError" }, "402": { "$ref": "#/components/responses/PaymentRequired" }, "404": { "$ref": "#/components/responses/MessageSubaccountNotFound" }, "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MessagesSendResponse" } } } } } } }, "/messages/send-template": { "post": { "tags": [ "Messages" ], "summary": "Send a new transactional message using a template", "description": "Send a new transactional message using a template. If you signed up for a Mandrill account on or after December 1st, 2015, you must add SPF and DKIM records and verify ownership of your sending domains before you can send email through your account. Mandrill will not send any email from unverified domains or domains without valid SPF and DKIM records, including public domains like gmail.com, yahoo.com, and more. Custom signing domains are only available to Mandrill accounts created before December 1st, 2015. If you signed up for a new Mandrill account on or after December 1st, 2015, the signing_domain parameter will be ignored. Mail sent from unverified domains or domains without valid SPF and DKIM records will be rejected with the reject_reason, unsigned.", "operationId": "messages/send-template", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MessagesSendTemplateRequest" } } } }, "responses": { "401": { "$ref": "#/components/responses/Unauthorized" }, "500": { "$ref": "#/components/responses/ServerError" }, "402": { "$ref": "#/components/responses/PaymentRequired" }, "404": { "$ref": "#/components/responses/MessageTemplateOrSubaccountNotFound" }, "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MessagesSendTemplateResponse" } } } } }, "x-readonly": true } }, "/messages/send-mc-template": { "post": { "tags": [ "Messages" ], "summary": "Send using Mailchimp template", "description": "Send a new transactional message through Mandrill using a Mailchimp Transactional template.", "operationId": "messages/send-mc-template", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MessagesSendMcTemplateRequest" } } } }, "responses": { "401": { "$ref": "#/components/responses/Unauthorized" }, "500": { "$ref": "#/components/responses/ServerError" }, "402": { "$ref": "#/components/responses/PaymentRequired" }, "404": { "$ref": "#/components/responses/MessageTemplateOrSubaccountNotFound" }, "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MessagesSendMcTemplateResponse" } } } } }, "x-readonly": true } }, "/messages/search": { "post": { "tags": [ "Messages" ], "summary": "Search recently sent messages", "description": "Search recently sent messages and optionally narrow by date range, tags, senders, and API keys. Results can include both email and SMS messages. If no date range is specified, results within the last 7 days are returned.", "operationId": "messages/search", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MessagesSearchRequest" } } } }, "responses": { "401": { "$ref": "#/components/responses/Unauthorized" }, "500": { "$ref": "#/components/responses/ServerError" }, "503": { "$ref": "#/components/responses/MessageServiceUnavailable" }, "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MessagesSearchResponse" } } } } } } }, "/messages/search-time-series": { "post": { "tags": [ "Messages" ], "summary": "Get time series data for message search", "description": "Search the content of recently sent messages and return the aggregated hourly stats for matching messages.", "operationId": "messages/search-time-series", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MessagesSearchTimeSeriesRequest" } } } }, "responses": { "401": { "$ref": "#/components/responses/Unauthorized" }, "500": { "$ref": "#/components/responses/ServerError" }, "503": { "$ref": "#/components/responses/MessageServiceUnavailable" }, "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MessagesSearchTimeSeriesResponse" } } } } }, "x-readonly": true } }, "/messages/info": { "post": { "tags": [ "Messages" ], "summary": "Get information about a single sent message", "description": "Returns detailed information about a single sent message. Can return either email or SMS message information depending on the message type.", "operationId": "messages/info", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MessagesInfoRequest" } } } }, "responses": { "401": { "$ref": "#/components/responses/Unauthorized" }, "500": { "$ref": "#/components/responses/ServerError" }, "404": { "$ref": "#/components/responses/MessageNotFound" }, "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MessagesInfoResponse" } } } } }, "x-readonly": true } }, "/messages/content": { "post": { "tags": [ "Messages" ], "summary": "Get the full content of a sent message", "description": "Returns the full content of a recently sent message. For email messages, includes HTML, text, and attachments. For SMS messages, includes text content and SMS-specific fields.", "operationId": "messages/content", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MessagesContentRequest" } } } }, "responses": { "401": { "$ref": "#/components/responses/Unauthorized" }, "500": { "$ref": "#/components/responses/ServerError" }, "404": { "$ref": "#/components/responses/MessageNotFound" }, "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MessagesContentResponse" } } } } }, "x-readonly": true } }, "/messages/parse": { "post": { "tags": [ "Messages" ], "summary": "Parse a MIME message", "description": "Parse the full MIME document for an email message, returning the content of the message broken into its constituent pieces.", "operationId": "messages/parse", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MessagesParseRequest" } } } }, "responses": { "401": { "$ref": "#/components/responses/Unauthorized" }, "500": { "$ref": "#/components/responses/ServerError" }, "422": { "$ref": "#/components/responses/ValidationError" }, "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MessagesParseResponse" } } } } }, "x-readonly": true } }, "/messages/send-raw": { "post": { "tags": [ "Messages" ], "summary": "Send a raw MIME message through Mandrill", "description": "Send a raw MIME document for a message, and send it exactly as if it were sent through Mandrill's SMTP servers.", "operationId": "messages/send-raw", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MessagesSendRawRequest" } } } }, "responses": { "401": { "$ref": "#/components/responses/Unauthorized" }, "500": { "$ref": "#/components/responses/ServerError" }, "402": { "$ref": "#/components/responses/PaymentRequired" }, "404": { "$ref": "#/components/responses/MessageSubaccountNotFound" }, "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MessagesSendRawResponse" } } } } }, "x-readonly": true } }, "/messages/list-scheduled": { "post": { "tags": [ "Messages" ], "summary": "Get scheduled emails", "description": "Queries your scheduled emails.", "operationId": "messages/list-scheduled", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MessagesListScheduledRequest" } } } }, "responses": { "401": { "$ref": "#/components/responses/Unauthorized" }, "500": { "$ref": "#/components/responses/ServerError" }, "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MessagesListScheduledResponse" } } } } }, "x-readonly": true } }, "/messages/cancel-scheduled": { "post": { "tags": [ "Messages" ], "summary": "Cancel a scheduled email", "description": "Cancels a scheduled email.", "operationId": "messages/cancel-scheduled", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MessagesCancelScheduledRequest" } } } }, "responses": { "401": { "$ref": "#/components/responses/Unauthorized" }, "500": { "$ref": "#/components/responses/ServerError" }, "404": { "$ref": "#/components/responses/MessageNotFound" }, "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MessagesCancelScheduledResponse" } } } } } } }, "/messages/reschedule": { "post": { "tags": [ "Messages" ], "summary": "Reschedule a scheduled email", "description": "Reschedules a scheduled email.", "operationId": "messages/reschedule", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MessagesRescheduleRequest" } } } }, "responses": { "401": { "$ref": "#/components/responses/Unauthorized" }, "500": { "$ref": "#/components/responses/ServerError" }, "404": { "$ref": "#/components/responses/MessageNotFound" }, "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MessagesRescheduleResponse" } } } } } } }, "/messages/send-sms": { "post": { "tags": [ "Messages" ], "summary": "Send SMS message", "description": "Send a new SMS message through Mandrill", "operationId": "messages/send-sms", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MessagesSendSmsRequest" } } } }, "responses": { "401": { "$ref": "#/components/responses/Unauthorized" }, "500": { "$ref": "#/components/responses/ServerError" }, "404": { "$ref": "#/components/responses/MessageSmsSubaccountNotFound" }, "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MessagesSendSmsResponse" } } } } } } }, "/metadata/list": { "post": { "tags": [ "Metadata" ], "summary": "List custom metadata fields", "description": "Get the list of custom metadata fields indexed for the account", "operationId": "metadata/list", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MetadataListRequest" } } } }, "responses": { "401": { "$ref": "#/components/responses/Unauthorized" }, "500": { "$ref": "#/components/responses/ServerError" }, "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MetadataListResponse" } } } } }, "x-readonly": true } }, "/metadata/add": { "post": { "tags": [ "Metadata" ], "summary": "Add custom metadata field", "description": "Add a new custom metadata field to be indexed for the account", "operationId": "metadata/add", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MetadataAddRequest" } } } }, "responses": { "401": { "$ref": "#/components/responses/Unauthorized" }, "500": { "$ref": "#/components/responses/ServerError" }, "422": { "$ref": "#/components/responses/ValidationError" }, "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MetadataAddResponse" } } } } } } }, "/metadata/update": { "post": { "tags": [ "Metadata" ], "summary": "Update custom metadata field", "description": "Update an existing custom metadata field", "operationId": "metadata/update", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MetadataUpdateRequest" } } } }, "responses": { "401": { "$ref": "#/components/responses/Unauthorized" }, "500": { "$ref": "#/components/responses/ServerError" }, "404": { "$ref": "#/components/responses/MetadataNotFound" }, "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MetadataUpdateResponse" } } } } } } }, "/metadata/delete": { "post": { "tags": [ "Metadata" ], "summary": "Delete custom metadata field", "description": "Delete an existing custom metadata field. Deletion is not instantaneous, and /metadata/list will continue to return the field until the asynchronous deletion process is complete.", "operationId": "metadata/delete", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MetadataDeleteRequest" } } } }, "responses": { "401": { "$ref": "#/components/responses/Unauthorized" }, "500": { "$ref": "#/components/responses/ServerError" }, "404": { "$ref": "#/components/responses/MetadataNotFound" }, "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MetadataDeleteResponse" } } } } } } }, "/rejects/add": { "post": { "tags": [ "Rejects" ], "summary": "Add email to rejection blacklist", "description": "Adds an email to your email rejection denylist. Addresses that you add manually will never expire and there is no reputation penalty for removing them from your denylist. Attempting to denylist an address that has been whitelisted will have no effect.", "operationId": "rejects/add", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RejectsAddRequest" } } } }, "responses": { "401": { "$ref": "#/components/responses/Unauthorized" }, "500": { "$ref": "#/components/responses/ServerError" }, "404": { "$ref": "#/components/responses/RejectSubaccountNotFound" }, "422": { "$ref": "#/components/responses/ValidationError" }, "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RejectsAddResponse" } } } } } } }, "/rejects/add-sms": { "post": { "tags": [ "Rejects" ], "summary": "Add phone number to SMS rejection denylist", "description": "Adds a phone number to your SMS rejection denylist. Phone numbers that you add manually will never expire and there is no reputation penalty for removing them from your denylist.", "operationId": "rejects/add-sms", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RejectsAddSmsRequest" } } } }, "responses": { "401": { "$ref": "#/components/responses/Unauthorized" }, "500": { "$ref": "#/components/responses/ServerError" }, "404": { "$ref": "#/components/responses/RejectSubaccountNotFound" }, "422": { "$ref": "#/components/responses/ValidationError" }, "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RejectsAddSmsResponse" } } } } } } }, "/rejects/list": { "post": { "tags": [ "Rejects" ], "summary": "List rejection blacklist entries", "description": "Retrieves your email rejection denylist. You can provide an email address to limit the results. Returns up to 1000 results. By default, entries that have expired are excluded from the results; set include_expired to true to include them.", "operationId": "rejects/list", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RejectsListRequest" } } } }, "responses": { "401": { "$ref": "#/components/responses/Unauthorized" }, "500": { "$ref": "#/components/responses/ServerError" }, "404": { "$ref": "#/components/responses/RejectSubaccountNotFound" }, "429": { "$ref": "#/components/responses/RateLimited" }, "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RejectsListResponse" } } } } }, "x-readonly": true } }, "/rejects/list-sms": { "post": { "tags": [ "Rejects" ], "summary": "List SMS rejection denylist entries", "description": "Retrieves your SMS rejection denylist. You can provide a phone number to limit the results. Returns up to 1000 results. By default, entries that have expired are excluded from the results; set include_expired to true to include them.", "operationId": "rejects/list-sms", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RejectsListSmsRequest" } } } }, "responses": { "401": { "$ref": "#/components/responses/Unauthorized" }, "500": { "$ref": "#/components/responses/ServerError" }, "422": { "$ref": "#/components/responses/ValidationError" }, "429": { "$ref": "#/components/responses/RateLimited" }, "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RejectsListSmsResponse" } } } } }, "x-readonly": true } }, "/rejects/delete": { "post": { "tags": [ "Rejects" ], "summary": "Delete email from rejection blacklist", "description": "Deletes an email rejection. There is no limit to how many rejections you can remove from your denylist, but keep in mind that each deletion has an affect on your reputation.", "operationId": "rejects/delete", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RejectsDeleteRequest" } } } }, "responses": { "401": { "$ref": "#/components/responses/Unauthorized" }, "500": { "$ref": "#/components/responses/ServerError" }, "404": { "$ref": "#/components/responses/RejectEmailNotFound" }, "422": { "$ref": "#/components/responses/ValidationError" }, "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RejectsDeleteResponse" } } } } } } }, "/rejects/delete-sms": { "post": { "tags": [ "Rejects" ], "summary": "Delete phone number from SMS rejection denylist", "description": "Deletes an SMS rejection. There is no limit to how many rejections you can remove from your denylist, but keep in mind that each deletion has an affect on your reputation.", "operationId": "rejects/delete-sms", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RejectsDeleteSmsRequest" } } } }, "responses": { "401": { "$ref": "#/components/responses/Unauthorized" }, "500": { "$ref": "#/components/responses/ServerError" }, "404": { "$ref": "#/components/responses/RejectPhoneNotFound" }, "422": { "$ref": "#/components/responses/ValidationError" }, "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RejectsDeleteSmsResponse" } } } } } } }, "/senders/list": { "post": { "tags": [ "Senders" ], "summary": "List senders used by this account", "description": "Return the senders that have tried to use this account.", "operationId": "senders/list", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SendersListRequest" } } } }, "responses": { "401": { "$ref": "#/components/responses/Unauthorized" }, "500": { "$ref": "#/components/responses/ServerError" }, "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SendersListResponse" } } } } }, "x-readonly": true } }, "/senders/domains": { "post": { "tags": [ "Senders" ], "summary": "List sender domains", "description": "Returns the sender domains that have been added to this account.", "operationId": "senders/domains", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SendersDomainsRequest" } } } }, "responses": { "401": { "$ref": "#/components/responses/Unauthorized" }, "500": { "$ref": "#/components/responses/ServerError" }, "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SendersDomainsResponse" } } } } }, "x-readonly": true } }, "/senders/add-domain": { "post": { "tags": [ "Senders" ], "summary": "Add a sender domain", "description": "Adds a sender domain to your account. Sender domains are added automatically as you send, but you can add them ahead of time.", "operationId": "senders/add-domain", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SendersAddDomainRequest" } } } }, "responses": { "401": { "$ref": "#/components/responses/Unauthorized" }, "500": { "$ref": "#/components/responses/ServerError" }, "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SendersAddDomainResponse" } } } } } } }, "/senders/check-domain": { "post": { "tags": [ "Senders" ], "summary": "Check domain SPF and DKIM", "description": "Checks the SPF and DKIM settings for a domain. If it isn't already added to your account, it will be added automatically.", "operationId": "senders/check-domain", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SendersCheckDomainRequest" } } } }, "responses": { "401": { "$ref": "#/components/responses/Unauthorized" }, "500": { "$ref": "#/components/responses/ServerError" }, "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SendersCheckDomainResponse" } } } } } } }, "/senders/verify-domain": { "post": { "tags": [ "Senders" ], "summary": "Verify a sender domain by email", "description": "Sends a verification email in order to verify ownership of a domain.", "operationId": "senders/verify-domain", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SendersVerifyDomainRequest" } } } }, "responses": { "401": { "$ref": "#/components/responses/Unauthorized" }, "500": { "$ref": "#/components/responses/ServerError" }, "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SendersVerifyDomainResponse" } } } } } } }, "/senders/info": { "post": { "tags": [ "Senders" ], "summary": "Get detailed information for a sender", "description": "Return more detailed information about a single sender, including aggregates of recent stats.", "operationId": "senders/info", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SendersInfoRequest" } } } }, "responses": { "401": { "$ref": "#/components/responses/Unauthorized" }, "500": { "$ref": "#/components/responses/ServerError" }, "404": { "$ref": "#/components/responses/SenderNotFound" }, "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SendersInfoResponse" } } } } }, "x-readonly": true } }, "/senders/time-series": { "post": { "tags": [ "Senders" ], "summary": "Get hourly stats for a sender", "description": "Return the recent history (hourly stats for the last 30 days) for a sender.", "operationId": "senders/time-series", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SendersTimeSeriesRequest" } } } }, "responses": { "401": { "$ref": "#/components/responses/Unauthorized" }, "500": { "$ref": "#/components/responses/ServerError" }, "404": { "$ref": "#/components/responses/SenderNotFound" }, "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SendersTimeSeriesResponse" } } } } }, "x-readonly": true } }, "/senders/delete-domain": { "post": { "tags": [ "Senders" ], "summary": "Delete a sender domain", "description": "Deletes an unverified sender domain from your account. Verified domains cannot be deleted via API and require login confirmation.", "operationId": "senders/delete-domain", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SendersDeleteDomainRequest" } } } }, "responses": { "401": { "$ref": "#/components/responses/Unauthorized" }, "500": { "$ref": "#/components/responses/ServerError" }, "404": { "$ref": "#/components/responses/SenderDomainNotFound" }, "403": { "$ref": "#/components/responses/SenderCannotDeleteVerified" }, "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SendersDeleteDomainResponse" } } } } } } }, "/subaccounts/list": { "post": { "tags": [ "Subaccounts" ], "summary": "List subaccounts", "description": "Get the list of subaccounts defined for the account, optionally filtered by a prefix. Returns up to a maximum of 1,000 subaccounts.", "operationId": "subaccounts/list", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SubaccountsListRequest" } } } }, "responses": { "401": { "$ref": "#/components/responses/Unauthorized" }, "500": { "$ref": "#/components/responses/ServerError" }, "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SubaccountsListResponse" } } } } }, "x-readonly": true } }, "/subaccounts/add": { "post": { "tags": [ "Subaccounts" ], "summary": "Add a new subaccount", "description": "Create a new subaccount with the specified configuration. The subaccount can be used to organize and track sending for different customers or purposes.", "operationId": "subaccounts/add", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SubaccountsAddRequest" } } } }, "responses": { "401": { "$ref": "#/components/responses/Unauthorized" }, "500": { "$ref": "#/components/responses/ServerError" }, "422": { "$ref": "#/components/responses/ValidationError" }, "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SubaccountsAddResponse" } } } } } } }, "/subaccounts/info": { "post": { "tags": [ "Subaccounts" ], "summary": "Get subaccount information", "description": "Retrieve detailed information about a specific subaccount including sending statistics and configuration.", "operationId": "subaccounts/info", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SubaccountsInfoRequest" } } } }, "responses": { "401": { "$ref": "#/components/responses/Unauthorized" }, "500": { "$ref": "#/components/responses/ServerError" }, "404": { "$ref": "#/components/responses/SubaccountNotFound" }, "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SubaccountsInfoResponse" } } } } }, "x-readonly": true } }, "/subaccounts/update": { "post": { "tags": [ "Subaccounts" ], "summary": "Update an existing subaccount", "description": "Update the configuration of an existing subaccount including name, notes, and custom quota settings.", "operationId": "subaccounts/update", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SubaccountsUpdateRequest" } } } }, "responses": { "401": { "$ref": "#/components/responses/Unauthorized" }, "500": { "$ref": "#/components/responses/ServerError" }, "404": { "$ref": "#/components/responses/SubaccountNotFound" }, "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SubaccountsUpdateResponse" } } } } } } }, "/subaccounts/delete": { "post": { "tags": [ "Subaccounts" ], "summary": "Delete a subaccount", "description": "Delete an existing subaccount. Any email related to the subaccount will be saved, but stats will be removed and any future sending calls to this subaccount will fail.", "operationId": "subaccounts/delete", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SubaccountsDeleteRequest" } } } }, "responses": { "401": { "$ref": "#/components/responses/Unauthorized" }, "500": { "$ref": "#/components/responses/ServerError" }, "404": { "$ref": "#/components/responses/SubaccountNotFound" }, "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SubaccountsDeleteResponse" } } } } } } }, "/subaccounts/pause": { "post": { "tags": [ "Subaccounts" ], "summary": "Pause a subaccount", "description": "Pause a subaccount's sending. Any future emails delivered to this subaccount will be queued for a maximum of 3 days until the subaccount is resumed.", "operationId": "subaccounts/pause", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SubaccountsPauseRequest" } } } }, "responses": { "401": { "$ref": "#/components/responses/Unauthorized" }, "500": { "$ref": "#/components/responses/ServerError" }, "404": { "$ref": "#/components/responses/SubaccountNotFound" }, "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SubaccountsPauseResponse" } } } } } } }, "/subaccounts/resume": { "post": { "tags": [ "Subaccounts" ], "summary": "Resume a paused subaccount", "description": "Resume a paused subaccount's sending. The subaccount will return to active status and queued emails will be processed.", "operationId": "subaccounts/resume", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SubaccountsResumeRequest" } } } }, "responses": { "401": { "$ref": "#/components/responses/Unauthorized" }, "500": { "$ref": "#/components/responses/ServerError" }, "404": { "$ref": "#/components/responses/SubaccountNotFound" }, "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SubaccountsResumeResponse" } } } } } } }, "/tags/list": { "post": { "tags": [ "Tags" ], "summary": "List all user-defined tags", "description": "Return all of the user-defined tag information", "operationId": "tags/list", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TagsListRequest" } } } }, "responses": { "401": { "$ref": "#/components/responses/Unauthorized" }, "500": { "$ref": "#/components/responses/ServerError" }, "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TagsListResponse" } } } } }, "x-readonly": true } }, "/tags/delete": { "post": { "tags": [ "Tags" ], "summary": "Delete a tag permanently", "description": "Deletes a tag permanently. Deleting a tag removes the tag from any messages that have been sent, and also deletes the tag's stats. There is no way to undo this operation, so use it carefully.", "operationId": "tags/delete", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TagsDeleteRequest" } } } }, "responses": { "401": { "$ref": "#/components/responses/Unauthorized" }, "500": { "$ref": "#/components/responses/ServerError" }, "400": { "$ref": "#/components/responses/TagInvalidName" }, "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TagsDeleteResponse" } } } } } } }, "/tags/info": { "post": { "tags": [ "Tags" ], "summary": "Get detailed information about a tag", "description": "Return more detailed information about a single tag, including aggregates of recent stats", "operationId": "tags/info", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TagsInfoRequest" } } } }, "responses": { "401": { "$ref": "#/components/responses/Unauthorized" }, "500": { "$ref": "#/components/responses/ServerError" }, "400": { "$ref": "#/components/responses/TagInvalidName" }, "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TagsInfoResponse" } } } } }, "x-readonly": true } }, "/tags/time-series": { "post": { "tags": [ "Tags" ], "summary": "Get time series data for a specific tag", "description": "Return the recent history (hourly stats for the last 30 days) for a tag", "operationId": "tags/time-series", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TagsTimeSeriesRequest" } } } }, "responses": { "401": { "$ref": "#/components/responses/Unauthorized" }, "500": { "$ref": "#/components/responses/ServerError" }, "400": { "$ref": "#/components/responses/TagInvalidName" }, "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TagsTimeSeriesResponse" } } } } }, "x-readonly": true } }, "/tags/all-time-series": { "post": { "tags": [ "Tags" ], "summary": "Get time series data for all tags", "description": "Return the recent history (hourly stats for the last 30 days) for all tags", "operationId": "tags/all-time-series", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TagsAllTimeSeriesRequest" } } } }, "responses": { "401": { "$ref": "#/components/responses/Unauthorized" }, "500": { "$ref": "#/components/responses/ServerError" }, "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TagsAllTimeSeriesResponse" } } } } }, "x-readonly": true } }, "/templates/add": { "post": { "tags": [ "Templates" ], "summary": "Add a new template", "description": "Creates a new email template with the specified content and settings.", "operationId": "templates/add", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TemplatesAddRequest" } } } }, "responses": { "401": { "$ref": "#/components/responses/Unauthorized" }, "500": { "$ref": "#/components/responses/ServerError" }, "422": { "$ref": "#/components/responses/TemplateInvalidData" }, "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TemplatesAddResponse" } } } } } } }, "/templates/info": { "post": { "tags": [ "Templates" ], "summary": "Get template information", "description": "Retrieves information for an existing template.", "operationId": "templates/info", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TemplatesInfoRequest" } } } }, "responses": { "401": { "$ref": "#/components/responses/Unauthorized" }, "500": { "$ref": "#/components/responses/ServerError" }, "404": { "$ref": "#/components/responses/TemplateNotFound" }, "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TemplatesInfoResponse" } } } } }, "x-readonly": true } }, "/templates/update": { "post": { "tags": [ "Templates" ], "summary": "Update an existing template", "description": "Updates the code for an existing template. If null is provided for any fields, the values will remain unchanged.", "operationId": "templates/update", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TemplatesUpdateRequest" } } } }, "responses": { "401": { "$ref": "#/components/responses/Unauthorized" }, "500": { "$ref": "#/components/responses/ServerError" }, "404": { "$ref": "#/components/responses/TemplateNotFound" }, "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TemplatesUpdateResponse" } } } } } } }, "/templates/publish": { "post": { "tags": [ "Templates" ], "summary": "Publish a template", "description": "Publishes the content for the template. Any new messages sent using this template will start using the content that was previously in draft.", "operationId": "templates/publish", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TemplatesPublishRequest" } } } }, "responses": { "401": { "$ref": "#/components/responses/Unauthorized" }, "500": { "$ref": "#/components/responses/ServerError" }, "404": { "$ref": "#/components/responses/TemplateNotFound" }, "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TemplatesPublishResponse" } } } } } } }, "/templates/delete": { "post": { "tags": [ "Templates" ], "summary": "Delete a template", "description": "Deletes an existing template.", "operationId": "templates/delete", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TemplatesDeleteRequest" } } } }, "responses": { "401": { "$ref": "#/components/responses/Unauthorized" }, "500": { "$ref": "#/components/responses/ServerError" }, "404": { "$ref": "#/components/responses/TemplateNotFound" }, "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TemplatesDeleteResponse" } } } } } } }, "/templates/list": { "post": { "tags": [ "Templates" ], "summary": "List all templates", "description": "Returns a list of all templates available to this user.", "operationId": "templates/list", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TemplatesListRequest" } } } }, "responses": { "401": { "$ref": "#/components/responses/Unauthorized" }, "500": { "$ref": "#/components/responses/ServerError" }, "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TemplatesListResponse" } } } } }, "x-readonly": true } }, "/templates/time-series": { "post": { "tags": [ "Templates" ], "summary": "Get template time series data", "description": "Returns the recent history (hourly stats for the last 30 days) for a template.", "operationId": "templates/time-series", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TemplatesTimeSeriesRequest" } } } }, "responses": { "401": { "$ref": "#/components/responses/Unauthorized" }, "500": { "$ref": "#/components/responses/ServerError" }, "404": { "$ref": "#/components/responses/TemplateNotFound" }, "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TemplatesTimeSeriesResponse" } } } } }, "x-readonly": true } }, "/templates/render": { "post": { "tags": [ "Templates" ], "summary": "Render a template", "description": "Injects content and merge variables into a template, returning the HTML that results.", "operationId": "templates/render", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TemplatesRenderRequest" } } } }, "responses": { "401": { "$ref": "#/components/responses/Unauthorized" }, "500": { "$ref": "#/components/responses/ServerError" }, "404": { "$ref": "#/components/responses/TemplateNotFound" }, "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TemplatesRenderResponse" } } } } }, "x-readonly": true } }, "/urls/tracking-domains": { "post": { "tags": [ "URLs" ], "summary": "Get tracking domains", "description": "Get the list of tracking domains set up for your account", "operationId": "urls/tracking-domains", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UrlsTrackingDomainsRequest" } } } }, "responses": { "401": { "$ref": "#/components/responses/Unauthorized" }, "500": { "$ref": "#/components/responses/ServerError" }, "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UrlsTrackingDomainsResponse" } } } } }, "x-readonly": true } }, "/urls/add-tracking-domain": { "post": { "tags": [ "URLs" ], "summary": "Add tracking domain", "description": "Add a tracking domain to your account", "operationId": "urls/add-tracking-domain", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UrlsAddTrackingDomainRequest" } } } }, "responses": { "401": { "$ref": "#/components/responses/Unauthorized" }, "500": { "$ref": "#/components/responses/ServerError" }, "400": { "$ref": "#/components/responses/UrlInvalidDomain" }, "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UrlsAddTrackingDomainResponse" } } } } } } }, "/urls/check-tracking-domain": { "post": { "tags": [ "URLs" ], "summary": "Check tracking domain", "description": "Checks the CNAME settings for a tracking domain. The domain must have been added already with the add-tracking-domain call", "operationId": "urls/check-tracking-domain", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UrlsCheckTrackingDomainRequest" } } } }, "responses": { "401": { "$ref": "#/components/responses/Unauthorized" }, "500": { "$ref": "#/components/responses/ServerError" }, "404": { "$ref": "#/components/responses/UrlNotFound" }, "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UrlsCheckTrackingDomainResponse" } } } } } } }, "/urls/delete-tracking-domain": { "post": { "tags": [ "URLs" ], "summary": "Delete a tracking domain", "description": "Deletes an unverified tracking domain from your account. Valid tracking domains cannot be deleted via API and require login confirmation.", "operationId": "urls/delete-tracking-domain", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UrlsDeleteTrackingDomainRequest" } } } }, "responses": { "401": { "$ref": "#/components/responses/Unauthorized" }, "500": { "$ref": "#/components/responses/ServerError" }, "403": { "$ref": "#/components/responses/UrlCannotDeleteVerified" }, "404": { "$ref": "#/components/responses/UrlNotFound" }, "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UrlsDeleteTrackingDomainResponse" } } } } } } }, "/users/info": { "post": { "tags": [ "Users" ], "summary": "Return the information about the API-connected user", "description": "Returns user account information including username, reputation, quota, and historical sending stats", "operationId": "users/info", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UsersInfoRequest" } } } }, "responses": { "401": { "$ref": "#/components/responses/Unauthorized" }, "500": { "$ref": "#/components/responses/ServerError" }, "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UsersInfoResponse" } } } } }, "x-readonly": true } }, "/users/ping": { "post": { "tags": [ "Users" ], "summary": "Validate an API key and respond to a ping", "description": "Returns 'PONG!'.", "operationId": "users/ping", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UsersPingRequest" } } } }, "responses": { "401": { "$ref": "#/components/responses/Unauthorized" }, "500": { "$ref": "#/components/responses/ServerError" }, "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UsersPingResponse" } } } } }, "x-readonly": true } }, "/users/ping2": { "post": { "tags": [ "Users" ], "summary": "Validate an API key and respond to a ping (strict JSON parser version)", "description": "Validate an API key and respond to a ping (strict JSON parser version)", "operationId": "users/ping2", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UsersPing2Request" } } } }, "responses": { "401": { "$ref": "#/components/responses/Unauthorized" }, "500": { "$ref": "#/components/responses/ServerError" }, "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UsersPing2Response" } } } } }, "x-readonly": true } }, "/users/senders": { "post": { "tags": [ "Users" ], "summary": "Return the senders that have tried to use this account", "description": "Returns an array of sender data for each sending address used by the account, both verified and unverified", "operationId": "users/senders", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UsersSendersRequest" } } } }, "responses": { "401": { "$ref": "#/components/responses/Unauthorized" }, "500": { "$ref": "#/components/responses/ServerError" }, "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UsersSendersResponse" } } } } }, "x-readonly": true } }, "/webhooks/list": { "post": { "tags": [ "Webhooks" ], "summary": "Get the list of all webhooks", "description": "Get the list of all webhooks defined for this account", "operationId": "webhooks/list", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebhooksListRequest" } } } }, "responses": { "401": { "$ref": "#/components/responses/Unauthorized" }, "500": { "$ref": "#/components/responses/ServerError" }, "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebhooksListResponse" } } } } }, "x-readonly": true } }, "/webhooks/add": { "post": { "tags": [ "Webhooks" ], "summary": "Add a new webhook", "description": "Create a new webhook to receive event notifications", "operationId": "webhooks/add", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebhooksAddRequest" } } } }, "responses": { "401": { "$ref": "#/components/responses/Unauthorized" }, "500": { "$ref": "#/components/responses/ServerError" }, "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebhooksAddResponse" } } } } } } }, "/webhooks/info": { "post": { "tags": [ "Webhooks" ], "summary": "Get webhook information", "description": "Get the data about an existing webhook", "operationId": "webhooks/info", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebhooksInfoRequest" } } } }, "responses": { "401": { "$ref": "#/components/responses/Unauthorized" }, "500": { "$ref": "#/components/responses/ServerError" }, "404": { "$ref": "#/components/responses/WebhookNotFound" }, "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebhooksInfoResponse" } } } } }, "x-readonly": true } }, "/webhooks/update": { "post": { "tags": [ "Webhooks" ], "summary": "Update an existing webhook", "description": "Update the configuration of an existing webhook", "operationId": "webhooks/update", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebhooksUpdateRequest" } } } }, "responses": { "401": { "$ref": "#/components/responses/Unauthorized" }, "500": { "$ref": "#/components/responses/ServerError" }, "404": { "$ref": "#/components/responses/WebhookNotFound" }, "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebhooksUpdateResponse" } } } } } } }, "/webhooks/delete": { "post": { "tags": [ "Webhooks" ], "summary": "Delete an existing webhook", "description": "Remove a webhook from the account", "operationId": "webhooks/delete", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebhooksDeleteRequest" } } } }, "responses": { "401": { "$ref": "#/components/responses/Unauthorized" }, "500": { "$ref": "#/components/responses/ServerError" }, "404": { "$ref": "#/components/responses/WebhookNotFound" }, "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebhooksDeleteResponse" } } } } } } } }, "components": { "schemas": { "ApiKey": { "description": "API key field included in request bodies.", "required": [ "key" ], "properties": { "key": { "description": "A valid Mandrill API key", "type": "string", "example": "ONzNrsmbtNXoIKyfPmjnig" } }, "type": "object", "example": { "key": "ONzNrsmbtNXoIKyfPmjnig" }, "additionalProperties": false }, "Error": { "description": "Standard error payload returned on API errors.", "required": [ "status", "code", "name", "message" ], "properties": { "status": { "description": "Status of the response, typically \"error\"", "type": "string" }, "code": { "description": "Numeric error code", "type": "integer" }, "name": { "description": "Machine-friendly error name", "type": "string" }, "message": { "description": "Human-readable error message", "type": "string" } }, "type": "object", "example": { "status": "error", "code": -100, "name": "GeneralError", "message": "An unknown error occurred processing your request. Please try again later." }, "additionalProperties": false }, "ExportNotFoundError": { "description": "Unknown export job", "example": { "status": "error", "code": 9, "name": "Unknown_Export", "message": "Unknown Export: abc123" }, "allOf": [ { "$ref": "#/components/schemas/Error" } ] }, "IPInvalidCustomDnsError": { "description": "Invalid custom DNS configuration", "example": { "status": "error", "code": 19, "name": "Invalid_CustomDNS", "message": "The domain name is not configured for use as the dedicated IP's custom reverse DNS." }, "allOf": [ { "$ref": "#/components/schemas/Error" } ] }, "IPInvalidDeletePoolError": { "description": "Cannot delete default pool or non-empty pool", "example": { "status": "error", "code": 17, "name": "Invalid_DeleteDefaultPool", "message": "You cannot delete your default pool" }, "allOf": [ { "$ref": "#/components/schemas/Error" } ] }, "IPInvalidEmptyDefaultPoolError": { "description": "Cannot leave default pool empty", "example": { "status": "error", "code": 16, "name": "Invalid_EmptyDefaultPool", "message": "You cannot remove the last IP from your default pool" }, "allOf": [ { "$ref": "#/components/schemas/Error" } ] }, "IPNotFoundError": { "description": "Unknown dedicated IP", "example": { "status": "error", "code": 13, "name": "Unknown_IP", "message": "No dedicated IP with address 127.0.0.1" }, "allOf": [ { "$ref": "#/components/schemas/Error" } ] }, "IPOrPoolNotFoundError": { "description": "Unknown IP or pool", "example": { "status": "error", "code": 13, "name": "Unknown_IP", "message": "No dedicated IP or pool found" }, "allOf": [ { "$ref": "#/components/schemas/Error" } ] }, "IPPoolNotFoundError": { "description": "Unknown IP pool", "example": { "status": "error", "code": 15, "name": "Unknown_Pool", "message": "No pool named main-pool" }, "allOf": [ { "$ref": "#/components/schemas/Error" } ] }, "InboundDomainNotFoundError": { "description": "Unknown inbound domain", "example": { "status": "error", "code": 8, "name": "Unknown_InboundDomain", "message": "Unknown Inbound Domain: mandrill.com" }, "allOf": [ { "$ref": "#/components/schemas/Error" } ] }, "InboundRouteNotFoundError": { "description": "Unknown inbound route", "example": { "status": "error", "code": 22, "name": "Unknown_InboundRoute", "message": "No route exists with the id 1234" }, "allOf": [ { "$ref": "#/components/schemas/Error" } ] }, "InvalidKeyError": { "description": "The provided API key is not valid or is missing.", "type": "object", "example": { "status": "error", "code": 401, "name": "Invalid_Key", "message": "Invalid API key" }, "allOf": [ { "$ref": "#/components/schemas/Error" }, { "properties": { "name": { "type": "string", "enum": [ "Invalid_Key" ] }, "code": { "type": "integer", "enum": [ 401 ] } }, "type": "object" } ] }, "MctemplateInvalidVersionError": { "description": "Invalid mc_template_version parameter", "example": { "status": "error", "code": 400, "name": "Invalid_Version", "message": "mc_template_version must be either \"draft\" or \"published\"" }, "allOf": [ { "$ref": "#/components/schemas/Error" } ] }, "MctemplateNotFoundError": { "description": "Mailchimp template not found", "example": { "status": "error", "code": 11, "name": "Unknown_Message", "message": "No Mailchimp template found with id 12345" }, "allOf": [ { "$ref": "#/components/schemas/Error" } ] }, "MessageNotFoundError": { "description": "Message not found", "example": { "status": "error", "code": 11, "name": "Unknown_Message", "message": "No message exists with the id McyuzyCS5M3bubeGPP-XVA" }, "allOf": [ { "$ref": "#/components/schemas/Error" } ] }, "MessageServiceUnavailableError": { "description": "Service unavailable", "example": { "status": "error", "code": -2, "name": "ServiceUnavailable", "message": "Service Temporarily Unavailable" }, "allOf": [ { "$ref": "#/components/schemas/Error" } ] }, "MessageSmsSubaccountNotFoundError": { "description": "Unknown subaccount for SMS message", "example": { "status": "error", "code": 12, "name": "Unknown_Subaccount", "message": "No subaccount exists with the id customer-123" }, "allOf": [ { "$ref": "#/components/schemas/Error" } ] }, "MessageSubaccountNotFoundError": { "description": "Unknown subaccount", "example": { "status": "error", "code": 12, "name": "Unknown_Subaccount", "message": "No subaccount exists with the id customer-123" }, "allOf": [ { "$ref": "#/components/schemas/Error" } ] }, "MessageTemplateOrSubaccountNotFoundError": { "description": "Template or subaccount not found", "example": { "status": "error", "code": 5, "name": "Unknown_Template", "message": "No such template \"MyTemplate\"" }, "allOf": [ { "$ref": "#/components/schemas/Error" } ] }, "MetadataNotFoundError": { "description": "Unknown metadata field", "example": { "status": "error", "code": 24, "name": "Unknown_MetadataField", "message": "Invalid metadata field name: group_id" }, "allOf": [ { "$ref": "#/components/schemas/Error" } ] }, "PaymentRequiredError": { "description": "The account does not have the required paid plan or billing status to perform this action.", "type": "object", "example": { "status": "error", "code": 10, "name": "PaymentRequired", "message": "Email scheduling is only available for accounts with a positive balance." }, "allOf": [ { "$ref": "#/components/schemas/Error" }, { "properties": { "name": { "type": "string", "enum": [ "PaymentRequired" ] }, "code": { "type": "integer", "enum": [ 10 ] } }, "type": "object" } ] }, "RejectEmailNotFoundError": { "description": "Email not found in rejection list or unknown subaccount", "example": { "status": "error", "code": 4, "name": "Invalid_Reject", "message": "Email address is not in the rejection list and is not invalid" }, "allOf": [ { "$ref": "#/components/schemas/Error" } ] }, "RejectPhoneNotFoundError": { "description": "Phone number not found in rejection list or unknown subaccount", "example": { "status": "error", "code": 4, "name": "Invalid_Reject", "message": "Phone number is not in the rejection list" }, "allOf": [ { "$ref": "#/components/schemas/Error" } ] }, "RejectSubaccountNotFoundError": { "description": "Unknown subaccount", "example": { "status": "error", "code": 12, "name": "Unknown_Subaccount", "message": "No subaccount exists with the id customer-123" }, "allOf": [ { "$ref": "#/components/schemas/Error" } ] }, "RequestLimitExceededError": { "description": "The request has been rate-limited. Slow down and retry after a brief delay.", "type": "object", "example": { "status": "error", "code": 429, "name": "RequestLimitExceeded", "message": "Too Many Requests attempted recently" }, "allOf": [ { "$ref": "#/components/schemas/Error" }, { "properties": { "name": { "type": "string", "enum": [ "RequestLimitExceeded" ] }, "code": { "type": "integer", "enum": [ 429 ] } }, "type": "object" } ] }, "SenderCannotDeleteVerifiedError": { "description": "Cannot delete verified sender domain", "example": { "status": "error", "code": 28, "name": "Invalid_Verified_Domain", "message": "Cannot delete verified domain \"example.com\" via API - please login to confirm deletion" }, "allOf": [ { "$ref": "#/components/schemas/Error" } ] }, "SenderDomainNotFoundError": { "description": "Unknown sender domain", "example": { "status": "error", "code": 8, "name": "Unknown_Domain", "message": "No such domain \"example.com\"" }, "allOf": [ { "$ref": "#/components/schemas/Error" } ] }, "SenderNotFoundError": { "description": "Unknown sender", "example": { "status": "error", "code": 2, "name": "Unknown_Sender", "message": "No such sender \"example@mandrill.com\"" }, "allOf": [ { "$ref": "#/components/schemas/Error" } ] }, "ServerError": { "description": "An unexpected internal server error occurred.", "example": { "status": "error", "code": -1, "name": "GeneralError", "message": "An unknown error occurred processing your request. Please try again later." }, "allOf": [ { "$ref": "#/components/schemas/Error" } ] }, "SubaccountNotFoundError": { "description": "Unknown subaccount", "example": { "status": "error", "code": 12, "name": "Unknown_Subaccount", "message": "No subaccount exists with the id customer-123" }, "allOf": [ { "$ref": "#/components/schemas/Error" } ] }, "TagInvalidNameError": { "description": "Invalid tag name", "example": { "status": "error", "code": 1, "name": "Invalid_Tag_Name", "message": "no such tag \"mytag\"" }, "allOf": [ { "$ref": "#/components/schemas/Error" } ] }, "TemplateInvalidDataError": { "description": "Invalid template data", "example": { "status": "error", "code": 6, "name": "Invalid_Template", "message": "A template with name \"MyTemplate\" already exists" }, "allOf": [ { "$ref": "#/components/schemas/Error" } ] }, "TemplateNotFoundError": { "description": "Template not found", "example": { "status": "error", "code": 5, "name": "Unknown_Template", "message": "No such template \"MyTemplate\"" }, "allOf": [ { "$ref": "#/components/schemas/Error" } ] }, "UrlCannotDeleteVerifiedError": { "description": "Cannot delete verified tracking domain", "example": { "status": "error", "code": 29, "name": "Invalid_Verified_TrackingDomain", "message": "Cannot delete verified tracking domain \"track.example.com\" via API - please login to confirm deletion" }, "allOf": [ { "$ref": "#/components/schemas/Error" } ] }, "UrlInvalidDomainError": { "description": "Invalid tracking domain", "example": { "status": "error", "code": 400, "name": "MC_Exception_InvalidTrackingDomain", "message": "'invalid.example.com' contains characters that violate RFC-5321" }, "allOf": [ { "$ref": "#/components/schemas/Error" } ] }, "UrlNotFoundError": { "description": "Unknown tracking domain", "example": { "status": "error", "code": 21, "name": "Unknown_TrackingDomain", "message": "No tracking domain exists with the name 'track.example.com'" }, "allOf": [ { "$ref": "#/components/schemas/Error" } ] }, "ValidationError": { "description": "One or more request parameters failed validation.", "type": "object", "example": { "status": "error", "code": -2, "name": "ValidationError", "message": "Validation error: {\\\"email\\\":\\\"Not a valid email address\\\"}" }, "allOf": [ { "$ref": "#/components/schemas/Error" }, { "properties": { "name": { "type": "string", "enum": [ "ValidationError" ] } }, "type": "object" } ] }, "WebhookNotFoundError": { "description": "Unknown webhook", "example": { "status": "error", "code": 3, "name": "Unknown_Webhook", "message": "Unknown hook ID 15" }, "allOf": [ { "$ref": "#/components/schemas/Error" } ] }, "MergeVar": { "title": "MergeVar", "description": "Merge variable for template content injection", "properties": { "name": { "description": "Merge variable name (case-insensitive, may not start with _)", "type": "string", "example": "merge1" }, "content": { "description": "Content value for the merge variable", "type": "string", "example": "merge1 content" } }, "type": "object" }, "Sender": { "description": "Information about a sending address used by the account.", "properties": { "address": { "description": "The sender's email address", "type": "string", "format": "email", "example": "sender.example@mandrillapp.com" }, "created_at": { "description": "UTC timestamp when first seen", "type": "string", "format": "date-time", "example": "2013-01-01 15:30:27" }, "sent": { "description": "Total messages sent by this sender", "type": "integer" }, "hard_bounces": { "description": "Total number of hard bounces by this sender", "type": "integer" }, "soft_bounces": { "description": "Total number of soft bounces by this sender", "type": "integer" }, "rejects": { "description": "Total number of rejected messages by this sender", "type": "integer" }, "complaints": { "description": "Total number of spam complaints for this sender", "type": "integer" }, "unsubs": { "description": "Total number of unsubscribe requests for this sender", "type": "integer" }, "opens": { "description": "Total number of times messages by this sender have been opened", "type": "integer" }, "clicks": { "description": "Total number of tracked URL clicks by this sender", "type": "integer" }, "unique_clicks": { "description": "Number of unique clicks for emails sent by this sender", "type": "integer" }, "unique_opens": { "description": "Number of unique opens for emails sent by this sender", "type": "integer" } }, "type": "object" }, "StatsWindow": { "description": "Aggregate sending statistics for a time window", "properties": { "sent": { "description": "Number of emails sent", "type": "integer" }, "hard_bounces": { "description": "Number of emails that hard bounced", "type": "integer" }, "soft_bounces": { "description": "Number of emails that soft bounced", "type": "integer" }, "rejects": { "description": "Number of emails rejected", "type": "integer" }, "complaints": { "description": "Number of spam complaints", "type": "integer" }, "unsubs": { "description": "Number of unsubscribe requests", "type": "integer" }, "opens": { "description": "Number of times emails were opened", "type": "integer" }, "unique_opens": { "description": "Number of unique opens", "type": "integer" }, "clicks": { "description": "Number of tracked URL clicks", "type": "integer" }, "unique_clicks": { "description": "Number of unique clicks", "type": "integer" } }, "type": "object", "additionalProperties": false }, "AllowlistsAddRequest": { "description": "Request payload for adding an email to the allowlist", "example": { "key": "ONzNrsmbtNXoIKyfPmjnig", "email": "user@example.com", "comment": "Internal support address" }, "allOf": [ { "$ref": "#/components/schemas/ApiKey" }, { "required": [ "email" ], "properties": { "email": { "description": "An email address to add to the allowlist", "type": "string", "format": "email", "example": "user@example.com" }, "comment": { "description": "An optional description of why the email was added to the allowlist", "type": "string", "maxLength": 255, "example": "Internal support address" } }, "type": "object", "additionalProperties": false } ] }, "AllowlistsAddResponse": { "description": "Response for adding an email to the allowlist", "required": [ "email", "added" ], "properties": { "email": { "description": "The email address you provided", "type": "string", "format": "email", "example": "user@example.com" }, "added": { "description": "Whether the operation succeeded", "type": "boolean", "example": true } }, "type": "object", "example": { "email": "user@example.com", "added": true }, "additionalProperties": false }, "AllowlistsDeleteRequest": { "description": "Request payload for removing an email from the allowlist", "example": { "key": "ONzNrsmbtNXoIKyfPmjnig", "email": "user@example.com" }, "allOf": [ { "$ref": "#/components/schemas/ApiKey" }, { "required": [ "email" ], "properties": { "email": { "description": "The email address to remove from the allowlist", "type": "string", "format": "email", "example": "user@example.com" } }, "type": "object", "additionalProperties": false } ] }, "AllowlistsDeleteResponse": { "description": "Response for removing an email from the allowlist", "required": [ "email", "deleted" ], "properties": { "email": { "description": "The email address that was removed from the allowlist", "type": "string", "format": "email", "example": "user@example.com" }, "deleted": { "description": "Whether the address was deleted successfully", "type": "boolean", "example": true } }, "type": "object", "example": { "email": "user@example.com", "deleted": true }, "additionalProperties": false }, "AllowlistsListRequest": { "description": "Request payload for retrieving the allowlist", "example": { "key": "ONzNrsmbtNXoIKyfPmjnig", "email": "user" }, "allOf": [ { "$ref": "#/components/schemas/ApiKey" }, { "properties": { "email": { "description": "An optional email address or prefix to search by", "type": "string", "example": "user" } }, "type": "object", "additionalProperties": false } ] }, "AllowlistsListResponse": { "description": "Response containing up to 1000 allowlist entries", "type": "array", "items": { "required": [ "email", "detail", "created_at" ], "properties": { "email": { "description": "The email address that is allowlisted", "type": "string", "format": "email", "example": "user@example.com" }, "detail": { "description": "A description of why the email was allowlisted", "type": "string", "example": "Internal support address" }, "created_at": { "description": "When the email was added to the allowlist", "type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$", "example": "2013-01-01 15:30:32" } }, "type": "object", "additionalProperties": false }, "example": [ { "email": "user@example.com", "detail": "Internal support address", "created_at": "2013-01-01 15:30:32" }, { "email": "support@example.com", "detail": "Customer support address", "created_at": "2013-01-02 10:15:45" } ] }, "ExportsActivityRequest": { "description": "Request parameters for exporting activity history with optional filters", "required": [ "key" ], "properties": { "key": { "$ref": "#/components/schemas/ApiKey" }, "notify_email": { "description": "Optional email address to notify when the export job has finished", "type": "string", "format": "email", "example": "admin@example.com" }, "date_from": { "description": "Start date as a UTC string in YYYY-MM-DD HH:MM:SS format", "type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$", "example": "2013-01-01 12:53:01" }, "date_to": { "description": "End date as a UTC string in YYYY-MM-DD HH:MM:SS format", "type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$", "example": "2013-01-06 13:42:18" }, "tags": { "description": "Array of tag names to narrow the export to; will match messages that contain ANY of the tags", "type": "array", "items": { "description": "A tag name", "type": "string", "example": "example-tag" }, "example": [ "example-tag" ] }, "senders": { "description": "Array of sender email addresses to narrow the export to", "type": "array", "items": { "description": "A sender email address", "type": "string", "format": "email", "example": "test@example.com" }, "example": [ "test@example.com" ] }, "states": { "description": "Array of message states to narrow the export to; messages with ANY of the states will be included", "type": "array", "items": { "description": "A message state", "type": "string", "enum": [ "sent", "rejected", "bounced", "soft-bounced", "spam", "unsub" ] }, "example": [ "sent" ] }, "api_keys": { "description": "Array of API keys to narrow the export to; messages sent with ANY of the keys will be included", "type": "array", "items": { "description": "An API key associated with your account", "type": "string", "example": "ONzNrsmbtNXoIKyfPmjnig" }, "example": [ "ONzNrsmbtNXoIKyfPmjnig" ] } }, "type": "object" }, "ExportsActivityResponse": { "$ref": "#/components/schemas/Export" }, "ExportsAllowlistRequest": { "description": "Request payload for exporting the rejection allowlist", "example": { "key": "ONzNrsmbtNXoIKyfPmjnig", "notify_email": "admin@example.com" }, "allOf": [ { "$ref": "#/components/schemas/ApiKey" }, { "properties": { "notify_email": { "description": "Optional email address to notify when the export job has finished", "type": "string", "format": "email", "example": "admin@example.com" } }, "type": "object", "additionalProperties": false } ] }, "ExportsAllowlistResponse": { "$ref": "#/components/schemas/Export" }, "Export": { "description": "Export job information including status and download URL when complete", "required": [ "id", "created_at", "type", "state" ], "properties": { "id": { "description": "Unique identifier for this export job", "type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}\\.\\d+$", "example": "2013-01-01 12:20:28.13842" }, "created_at": { "description": "Date and time the export job was created in UTC YYYY-MM-DD HH:MM:SS format", "type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$", "example": "2013-01-01 12:30:28" }, "type": { "description": "Type of export job", "type": "string", "enum": [ "reject", "whitelist", "allowlist", "activity" ], "example": "reject" }, "finished_at": { "description": "Date and time the export job finished in UTC YYYY-MM-DD HH:MM:SS format, or null if not finished", "type": [ "string", "null" ], "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$", "example": "2013-01-01 12:35:28" }, "state": { "description": "Current state of the export job", "type": "string", "enum": [ "waiting", "working", "complete", "error" ], "example": "waiting" }, "result_url": { "description": "URL to download the export results when job is complete, or null if not ready", "type": [ "string", "null" ], "format": "uri", "example": "https://example.com/export-results.zip" } }, "type": "object" }, "ExportsInfoRequest": { "description": "Request payload for retrieving export job information", "example": { "key": "ONzNrsmbtNXoIKyfPmjnig", "id": "2013-01-01 12:20:28.13842" }, "allOf": [ { "$ref": "#/components/schemas/ApiKey" }, { "required": [ "id" ], "properties": { "id": { "description": "Export job identifier", "type": "string", "example": "2013-01-01 12:20:28.13842" } }, "type": "object", "additionalProperties": false } ] }, "ExportsInfoResponse": { "$ref": "#/components/schemas/Export" }, "ExportsListRequest": { "description": "Request payload for listing export jobs", "example": { "key": "ONzNrsmbtNXoIKyfPmjnig" }, "allOf": [ { "$ref": "#/components/schemas/ApiKey" } ] }, "ExportsListResponse": { "description": "List of export jobs for the account", "type": "array", "items": { "$ref": "#/components/schemas/Export" } }, "ExportsRejectsRequest": { "description": "Request payload for exporting the rejection blacklist", "example": { "key": "ONzNrsmbtNXoIKyfPmjnig", "notify_email": "admin@example.com" }, "allOf": [ { "$ref": "#/components/schemas/ApiKey" }, { "properties": { "notify_email": { "description": "Optional email address to notify when the export job has finished", "type": "string", "format": "email", "example": "admin@example.com" } }, "type": "object", "additionalProperties": false } ] }, "ExportsRejectsResponse": { "$ref": "#/components/schemas/Export" }, "ExportsWhitelistRequest": { "description": "Request payload for exporting the rejection allowlist (legacy endpoint)", "example": { "key": "ONzNrsmbtNXoIKyfPmjnig", "notify_email": "admin@example.com" }, "allOf": [ { "$ref": "#/components/schemas/ApiKey" }, { "properties": { "notify_email": { "description": "Optional email address to notify when the export job has finished", "type": "string", "format": "email", "example": "admin@example.com" } }, "type": "object", "additionalProperties": false } ] }, "ExportsWhitelistResponse": { "$ref": "#/components/schemas/Export" }, "IPsCancelWarmupRequest": { "description": "Request payload for cancelling the warmup process for a dedicated IP", "example": { "key": "ONzNrsmbtNXoIKyfPmjnig", "ip": "127.0.0.1" }, "allOf": [ { "$ref": "#/components/schemas/ApiKey" }, { "required": [ "ip" ], "properties": { "ip": { "description": "A dedicated IP address", "type": "string", "example": "127.0.0.1" } }, "type": "object", "additionalProperties": false } ] }, "IPsCancelWarmupResponse": { "$ref": "#/components/schemas/IP" }, "IPsCheckCustomDnsRequest": { "description": "Request payload for testing whether a domain name is valid for use as the custom reverse DNS for a dedicated IP", "example": { "key": "ONzNrsmbtNXoIKyfPmjnig", "ip": "127.0.0.1", "domain": "example.com" }, "allOf": [ { "$ref": "#/components/schemas/ApiKey" }, { "required": [ "ip", "domain" ], "properties": { "ip": { "description": "A dedicated IP address", "type": "string", "example": "127.0.0.1" }, "domain": { "description": "The domain name to test", "type": "string", "format": "hostname", "example": "example.com" } }, "type": "object", "additionalProperties": false } ] }, "IPsCheckCustomDnsResponse": { "description": "Validation results for custom DNS domain configuration", "required": [ "valid" ], "properties": { "valid": { "description": "Whether the domain name has a correctly-configured A record pointing to the IP address", "type": "boolean", "example": true }, "error": { "description": "If valid is false, this will contain details about why the domain's A record is incorrect", "type": [ "string", "null" ], "example": null } }, "type": "object", "example": { "valid": true, "error": null } }, "IPsCreatePoolRequest": { "description": "Request payload for creating a dedicated IP pool", "example": { "key": "ONzNrsmbtNXoIKyfPmjnig", "pool": "New Pool" }, "allOf": [ { "$ref": "#/components/schemas/ApiKey" }, { "required": [ "pool" ], "properties": { "pool": { "description": "The name of a pool to create", "type": "string", "example": "New Pool" } }, "type": "object", "additionalProperties": false } ] }, "IPsCreatePoolResponse": { "$ref": "#/components/schemas/IPsPool" }, "IPsDeletePoolRequest": { "description": "Request payload for deleting a dedicated IP pool", "example": { "key": "ONzNrsmbtNXoIKyfPmjnig", "pool": "Main Pool" }, "allOf": [ { "$ref": "#/components/schemas/ApiKey" }, { "required": [ "pool" ], "properties": { "pool": { "description": "The name of a pool to delete", "type": "string", "example": "Main Pool" } }, "type": "object", "additionalProperties": false } ] }, "IPsDeletePoolResponse": { "description": "Response for dedicated IP pool deletion operation", "required": [ "pool", "deleted" ], "properties": { "pool": { "description": "The name of the pool that was deleted", "type": "string", "example": "Test Pool" }, "deleted": { "description": "Whether the pool was successfully deleted", "type": "boolean", "example": true } }, "type": "object", "example": { "pool": "Test Pool", "deleted": true } }, "IPsDeleteRequest": { "description": "Request payload for deleting a dedicated IP", "example": { "key": "ONzNrsmbtNXoIKyfPmjnig", "ip": "127.0.0.1" }, "allOf": [ { "$ref": "#/components/schemas/ApiKey" }, { "required": [ "ip" ], "properties": { "ip": { "description": "The dedicated IP to remove from your account", "type": "string", "example": "127.0.0.1" } }, "type": "object", "additionalProperties": false } ] }, "IPsDeleteResponse": { "description": "Response for dedicated IP deletion operation", "required": [ "ip", "deleted" ], "properties": { "ip": { "description": "The IP address that was deleted", "type": "string", "example": "127.0.0.1" }, "deleted": { "description": "Whether the IP was successfully deleted", "type": "boolean", "example": true } }, "type": "object", "example": { "ip": "127.0.0.1", "deleted": true } }, "IP": { "description": "Information about a dedicated IP address including warmup status and custom DNS configuration", "required": [ "ip", "created_at", "pool", "domain", "custom_dns", "warmup" ], "properties": { "ip": { "description": "The IP address (IPv4)", "type": "string", "format": "ipv4", "example": "127.0.0.1" }, "created_at": { "description": "The date and time that the dedicated IP was created as a UTC string in YYYY-MM-DD HH:MM:SS format", "type": "string", "example": "2013-01-01 15:50:21" }, "pool": { "description": "The name of the pool that this dedicated IP belongs to", "type": "string", "example": "Main Pool" }, "domain": { "description": "The domain name (reverse DNS) of this dedicated IP", "type": "string", "example": "mail1.example.mandrillapp.com" }, "custom_dns": { "description": "Information about the IP's custom DNS configuration", "required": [ "enabled", "valid" ], "properties": { "enabled": { "description": "Whether custom DNS has been configured for this IP", "type": "boolean", "example": true }, "valid": { "description": "Whether the IP's custom DNS is currently valid", "type": "boolean", "example": true }, "error": { "description": "If the IP's custom DNS is invalid, this will include details about the error", "type": [ "string", "null" ], "example": null } }, "type": "object" }, "warmup": { "$ref": "#/components/schemas/IPsWarmupStatus", "description": "Information about the IP's warmup status" } }, "type": "object", "example": { "ip": "127.0.0.1", "created_at": "2013-01-01 15:50:21", "pool": "Main Pool", "domain": "mail1.example.mandrillapp.com", "custom_dns": { "enabled": true, "valid": true, "error": null }, "warmup": { "warming_up": true, "start_at": "2013-03-01 12:00:01", "end_at": "2013-03-31 12:00:01" } } }, "IPsInfoRequest": { "description": "Request payload for retrieving information about a single dedicated IP", "example": { "key": "ONzNrsmbtNXoIKyfPmjnig", "ip": "127.0.0.1" }, "allOf": [ { "$ref": "#/components/schemas/ApiKey" }, { "required": [ "ip" ], "properties": { "ip": { "description": "A dedicated IP address", "type": "string", "example": "127.0.0.1" } }, "type": "object", "additionalProperties": false } ] }, "IPsInfoResponse": { "$ref": "#/components/schemas/IP" }, "IPsListPoolsRequest": { "description": "Request payload for listing dedicated IP pools", "example": { "key": "ONzNrsmbtNXoIKyfPmjnig" }, "allOf": [ { "$ref": "#/components/schemas/ApiKey" } ] }, "IPsListPoolsResponse": { "description": "Array of dedicated IP pool information", "type": "array", "items": { "$ref": "#/components/schemas/IPsPool" } }, "IPsListRequest": { "description": "Request payload for listing dedicated IPs", "example": { "key": "ONzNrsmbtNXoIKyfPmjnig" }, "allOf": [ { "$ref": "#/components/schemas/ApiKey" } ] }, "IPsListResponse": { "description": "Array of dedicated IP information", "type": "array", "items": { "$ref": "#/components/schemas/IP" } }, "IPsPool": { "description": "Information about a dedicated IP pool including all IPs in the pool", "required": [ "name", "created_at", "ips" ], "properties": { "name": { "description": "This pool's name", "type": "string", "example": "Main Pool" }, "created_at": { "description": "The date and time that this pool was created as a UTC timestamp in YYYY-MM-DD HH:MM:SS format", "type": "string", "example": "2013-01-01 12:15:12" }, "ips": { "description": "The dedicated IPs in this pool", "type": "array", "items": { "$ref": "#/components/schemas/IP" } } }, "type": "object", "example": { "name": "Main Pool", "created_at": "2013-01-01 12:15:12", "ips": [ { "ip": "127.0.0.1", "created_at": "2013-01-01 15:50:21", "pool": "Main Pool", "domain": "mail1.example.mandrillapp.com", "custom_dns": { "enabled": true, "valid": true, "error": null }, "warmup": { "warming_up": false, "start_at": null, "end_at": null } } ] } }, "IPsPoolInfoRequest": { "description": "Request payload for describing a single dedicated IP pool", "example": { "key": "ONzNrsmbtNXoIKyfPmjnig", "pool": "Main Pool" }, "allOf": [ { "$ref": "#/components/schemas/ApiKey" }, { "required": [ "pool" ], "properties": { "pool": { "description": "A pool name", "type": "string", "example": "Main Pool" } }, "type": "object", "additionalProperties": false } ] }, "IPsPoolInfoResponse": { "$ref": "#/components/schemas/IPsPool" }, "IPsProvisionRequest": { "description": "Request payload for provisioning an additional dedicated IP", "example": { "key": "ONzNrsmbtNXoIKyfPmjnig", "warmup": false, "pool": "Main Pool" }, "allOf": [ { "$ref": "#/components/schemas/ApiKey" }, { "properties": { "warmup": { "description": "Whether to enable warmup mode for the IP", "type": "boolean", "example": false }, "pool": { "description": "The ID of the pool to add the dedicated IP to, or null to use your account's default pool", "type": [ "string", "null" ], "example": "Main Pool" } }, "type": "object", "additionalProperties": false } ] }, "IPsProvisionResponse": { "description": "Response for dedicated IP provisioning request", "required": [ "requested_at" ], "properties": { "requested_at": { "description": "The date and time that the request was created as a UTC timestamp in YYYY-MM-DD HH:MM:SS[.fraction] format", "type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?$", "example": "2013-01-01 01:52:21.123456" } }, "type": "object", "example": { "requested_at": "2013-01-01 01:52:21.123456" } }, "IPsSetCustomDnsRequest": { "description": "Request payload for configuring the custom DNS name for a dedicated IP", "example": { "key": "ONzNrsmbtNXoIKyfPmjnig", "ip": "127.0.0.1", "domain": "example.com" }, "allOf": [ { "$ref": "#/components/schemas/ApiKey" }, { "required": [ "ip", "domain" ], "properties": { "ip": { "description": "A dedicated IP address", "type": "string", "example": "127.0.0.1" }, "domain": { "description": "A domain name to set as the dedicated IP's custom DNS name", "type": "string", "format": "hostname", "example": "example.com" } }, "type": "object", "additionalProperties": false } ] }, "IPsSetCustomDnsResponse": { "$ref": "#/components/schemas/IP" }, "IPsSetPoolRequest": { "description": "Request payload for moving a dedicated IP to a different pool", "example": { "key": "ONzNrsmbtNXoIKyfPmjnig", "ip": "127.0.0.1", "pool": "Main Pool", "create_pool": false }, "allOf": [ { "$ref": "#/components/schemas/ApiKey" }, { "required": [ "ip", "pool" ], "properties": { "ip": { "description": "A dedicated IP address", "type": "string", "example": "127.0.0.1" }, "pool": { "description": "The name of the new pool to add the dedicated IP to", "type": "string", "example": "Main Pool" }, "create_pool": { "description": "Whether to create the pool if it does not exist; if false and the pool does not exist, an Unknown_Pool will be thrown", "type": "boolean", "example": false } }, "type": "object", "additionalProperties": false } ] }, "IPsSetPoolResponse": { "$ref": "#/components/schemas/IP" }, "IPsStartWarmupRequest": { "description": "Request payload for beginning the warmup process for a dedicated IP", "example": { "key": "ONzNrsmbtNXoIKyfPmjnig", "ip": "127.0.0.1" }, "allOf": [ { "$ref": "#/components/schemas/ApiKey" }, { "required": [ "ip" ], "properties": { "ip": { "description": "A dedicated IP address", "type": "string", "example": "127.0.0.1" } }, "type": "object", "additionalProperties": false } ] }, "IPsStartWarmupResponse": { "$ref": "#/components/schemas/IP" }, "IPsWarmupStatus": { "description": "Information about an IP's warmup status and schedule", "required": [ "warming_up" ], "properties": { "warming_up": { "description": "Whether the IP is currently in warmup mode", "type": "boolean", "example": true }, "start_at": { "description": "The start time for the warmup process as a UTC string in YYYY-MM-DD HH:MM:SS format", "type": [ "string", "null" ], "example": "2013-03-01 12:00:01" }, "end_at": { "description": "The end date and time for the warmup process as a UTC string in YYYY-MM-DD HH:MM:SS format", "type": [ "string", "null" ], "example": "2013-03-31 12:00:01" } }, "type": "object", "example": { "warming_up": true, "start_at": "2013-03-01 12:00:01", "end_at": "2013-03-31 12:00:01" } }, "InboundAddDomainRequest": { "description": "Request payload for adding an inbound domain", "example": { "key": "ONzNrsmbtNXoIKyfPmjnig", "domain": "inbound.example.com" }, "allOf": [ { "$ref": "#/components/schemas/ApiKey" }, { "required": [ "domain" ], "properties": { "domain": { "description": "A domain name for inbound email delivery", "type": "string", "format": "hostname", "example": "inbound.example.com" } }, "type": "object", "additionalProperties": false } ] }, "InboundAddDomainResponse": { "$ref": "#/components/schemas/InboundDomain" }, "InboundAddRouteRequest": { "description": "Request payload for adding a new mailbox route to an inbound domain", "example": { "key": "ONzNrsmbtNXoIKyfPmjnig", "domain": "inbound.example.com", "pattern": "mailbox-*", "url": "https://example.com/webhook-url" }, "allOf": [ { "$ref": "#/components/schemas/ApiKey" }, { "required": [ "domain", "pattern", "url" ], "properties": { "domain": { "description": "An existing inbound domain", "type": "string", "format": "hostname", "example": "inbound.example.com" }, "pattern": { "description": "The search pattern that the mailbox name should match", "type": "string", "example": "mailbox-*" }, "url": { "description": "The webhook URL where the inbound messages will be published", "type": "string", "format": "active-uri", "example": "https://example.com/webhook-url" } }, "type": "object", "additionalProperties": false } ] }, "InboundAddRouteResponse": { "$ref": "#/components/schemas/InboundRoute" }, "InboundCheckDomainRequest": { "description": "Request payload for checking an inbound domain", "example": { "key": "ONzNrsmbtNXoIKyfPmjnig", "domain": "inbound.example.com" }, "allOf": [ { "$ref": "#/components/schemas/ApiKey" }, { "required": [ "domain" ], "properties": { "domain": { "description": "A domain name for inbound email delivery", "type": "string", "format": "hostname", "example": "inbound.example.com" } }, "type": "object", "additionalProperties": false } ] }, "InboundCheckDomainResponse": { "$ref": "#/components/schemas/InboundDomain" }, "InboundDeleteDomainRequest": { "description": "Request payload for deleting an inbound domain", "example": { "key": "ONzNrsmbtNXoIKyfPmjnig", "domain": "inbound.example.com" }, "allOf": [ { "$ref": "#/components/schemas/ApiKey" }, { "required": [ "domain" ], "properties": { "domain": { "description": "A domain name for inbound email delivery", "type": "string", "format": "hostname", "example": "inbound.example.com" } }, "type": "object", "additionalProperties": false } ] }, "InboundDeleteDomainResponse": { "$ref": "#/components/schemas/InboundDomain" }, "InboundDeleteRouteRequest": { "description": "Request payload for deleting an existing inbound mailbox route", "example": { "key": "ONzNrsmbtNXoIKyfPmjnig", "id": "88.214614" }, "allOf": [ { "$ref": "#/components/schemas/ApiKey" }, { "required": [ "id" ], "properties": { "id": { "description": "The unique identifier of an existing route", "type": "string", "example": "88.214614" } }, "type": "object", "additionalProperties": false } ] }, "InboundDeleteRouteResponse": { "$ref": "#/components/schemas/InboundRoute" }, "InboundDomainsRequest": { "description": "Request payload for listing inbound domains", "example": { "key": "ONzNrsmbtNXoIKyfPmjnig" }, "allOf": [ { "$ref": "#/components/schemas/ApiKey" } ] }, "InboundDomainsResponse": { "description": "List of inbound domains associated with the account", "type": "array", "items": { "$ref": "#/components/schemas/InboundDomain" } }, "InboundDomain": { "description": "Inbound email domain configuration and status", "required": [ "domain", "created_at", "valid_mx" ], "properties": { "domain": { "description": "The inbound domain name", "type": "string", "example": "inbound.example.com" }, "created_at": { "description": "When the domain was added to the account (UTC YYYY-MM-DD HH:MM:SS.microseconds)", "type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}\\.\\d+$", "example": "2025-08-29 18:47:58.03116" }, "valid_mx": { "description": "Whether the MX records are properly configured for inbound delivery", "type": "boolean", "example": true } }, "type": "object", "example": { "domain": "inbound.example.com", "created_at": "2025-08-29 18:47:58.03116", "valid_mx": true }, "additionalProperties": false }, "InboundRoute": { "description": "Mailbox routing rule for inbound emails", "required": [ "id", "pattern", "url" ], "properties": { "id": { "description": "The unique identifier of the route", "type": "string", "example": "88.214614" }, "pattern": { "description": "The search pattern that the mailbox name should match", "type": "string", "example": "mailbox-*" }, "url": { "description": "The webhook URL where inbound messages will be published", "type": "string", "format": "uri", "example": "https://example.com/webhook-url" } }, "type": "object", "example": { "id": "88.214614", "pattern": "mailbox-*", "url": "https://example.com/webhook-url" }, "additionalProperties": false }, "InboundRoutesRequest": { "description": "Request payload for listing mailbox routes for an inbound domain", "example": { "key": "ONzNrsmbtNXoIKyfPmjnig", "domain": "inbound.example.com" }, "allOf": [ { "$ref": "#/components/schemas/ApiKey" }, { "required": [ "domain" ], "properties": { "domain": { "description": "The domain to check", "type": "string", "format": "hostname", "example": "inbound.example.com" } }, "type": "object", "additionalProperties": false } ] }, "InboundRoutesResponse": { "description": "List of mailbox routes for an inbound domain", "type": "array", "items": { "$ref": "#/components/schemas/InboundRoute" } }, "InboundSendRawRequest": { "description": "Request payload for sending a raw MIME document to the inbound hook", "example": { "key": "ONzNrsmbtNXoIKyfPmjnig", "raw_message": "From: sender@example.com\\nTo: mailbox-123@inbound.example.com\\nSubject: Some Subject\\n\\nSome content.", "to": [ "mailbox-123@inbound.example.com" ], "mail_from": "sender@example.com" }, "allOf": [ { "$ref": "#/components/schemas/ApiKey" }, { "required": [ "raw_message" ], "properties": { "raw_message": { "description": "The full MIME document of an email message", "type": "string", "example": "From: sender@example.com\\nTo: mailbox-123@inbound.example.com\\nSubject: Some Subject\\n\\nSome content." }, "to": { "description": "Optionally define the recipients to receive the message - otherwise we'll use the To, Cc, and Bcc headers provided in the document", "type": [ "array", "null" ], "items": { "type": "string", "format": "email" }, "example": [ "mailbox-123@inbound.example.com" ] }, "mail_from": { "description": "The address specified in the MAIL FROM stage of the SMTP conversation", "type": [ "string", "null" ], "format": "email", "example": "sender@example.com" }, "helo": { "description": "The hostname provided during HELO", "type": [ "string", "null" ], "example": "sender.example.com" }, "client_address": { "description": "The remote host's IP address", "type": [ "string", "null" ], "example": "192.168.1.100" } }, "type": "object", "additionalProperties": false } ] }, "InboundSendRawResponse": { "description": "Response from processing raw MIME message", "oneOf": [ { "description": "Array of processing results showing matched routes", "type": "array", "items": { "required": [ "email", "pattern", "url" ], "properties": { "email": { "description": "The email address that was processed", "type": "string", "format": "email", "example": "mailbox-123@inbound.example.com" }, "pattern": { "description": "The route pattern that matched this email", "type": "string", "example": "mailbox-*" }, "url": { "description": "The webhook URL where this message was sent", "type": "string", "format": "uri", "example": "https://example.com/webhook-url" } }, "type": "object" }, "example": [ { "email": "mailbox-123@inbound.example.com", "pattern": "mailbox-*", "url": "https://example.com/webhook-url" } ] }, { "description": "Null when no recipients are processed or message is invalid" } ] }, "InboundUpdateRouteRequest": { "description": "Request payload for updating an existing inbound mailbox route", "example": { "key": "ONzNrsmbtNXoIKyfPmjnig", "id": "88.2144614", "pattern": "*.*", "url": "https://example.com/webhook-url" }, "allOf": [ { "$ref": "#/components/schemas/ApiKey" }, { "required": [ "id" ], "properties": { "id": { "description": "The unique identifier of an existing mailbox route", "type": "string", "example": "88.2144614" }, "pattern": { "description": "The search pattern that the mailbox name should match (null to leave unchanged)", "type": [ "string", "null" ], "example": "*.*" }, "url": { "description": "The webhook URL where the inbound messages will be published (null to leave unchanged)", "type": [ "string", "null" ], "format": "uri", "example": "https://example.com/webhook-url" } }, "type": "object", "additionalProperties": false } ] }, "InboundUpdateRouteResponse": { "$ref": "#/components/schemas/InboundRoute" }, "MctemplatesInfoRequest": { "description": "Request payload for getting Mailchimp Transactional template information", "example": { "key": "ONzNrsmbtNXoIKyfPmjnig", "mc_template_id": 12345 }, "allOf": [ { "$ref": "#/components/schemas/ApiKey" }, { "required": [ "mc_template_id" ], "properties": { "mc_template_id": { "description": "The Mailchimp template ID", "type": "integer", "example": 12345 } }, "type": "object", "additionalProperties": false } ] }, "MctemplatesInfoResponse": { "description": "Mailchimp Transactional template information", "allOf": [ { "$ref": "#/components/schemas/MctemplatesMcTemplate" } ] }, "MctemplatesListRequest": { "description": "Request payload for listing Mailchimp Transactional templates", "example": { "key": "ONzNrsmbtNXoIKyfPmjnig", "search_query": "welcome" }, "allOf": [ { "$ref": "#/components/schemas/ApiKey" }, { "properties": { "search_query": { "description": "Optional search query to filter templates", "type": [ "string", "null" ] } }, "type": "object", "additionalProperties": false } ] }, "MctemplatesListResponse": { "description": "Array of Mailchimp Transactional templates", "type": "array", "items": { "$ref": "#/components/schemas/MctemplatesMcTemplate" } }, "MctemplatesMcTemplate": { "description": "Mailchimp Transactional template information including content, metadata, and settings", "required": [ "mc_template_id", "mc_template_name", "labels", "code", "subject", "from_email", "from_name", "text", "publish_code", "publish_text", "published_at", "created_at", "updated_at", "draft_updated_at", "is_broken_template" ], "properties": { "mc_template_id": { "description": "Mailchimp template ID", "type": "integer", "example": 12345 }, "mc_template_name": { "description": "Template name", "type": "string", "example": "Welcome Email" }, "labels": { "description": "Array of labels (always empty for transactional templates)", "type": "array", "items": { "type": "string" }, "example": [] }, "code": { "description": "Template HTML (draft version)", "type": "string", "example": "
Welcome!
" }, "subject": { "description": "Default subject line", "type": "string", "example": "Welcome to our service" }, "from_email": { "description": "Default sending address", "type": "string", "example": "support@example.com" }, "from_name": { "description": "Default from name", "type": "string", "example": "Support Team" }, "text": { "description": "Template text (draft version)", "type": "string", "example": "Welcome to our service!" }, "publish_code": { "description": "Template HTML (published version)", "type": "string", "example": "
Welcome!
" }, "publish_text": { "description": "Template text (published version)", "type": "string", "example": "Welcome to our service!" }, "published_at": { "description": "Date and time when template was published in UTC YYYY-MM-DD HH:MM:SS format", "type": "string", "format": "date-time", "example": "2025-08-29 18:47:40" }, "created_at": { "description": "Date and time when template was created in UTC YYYY-MM-DD HH:MM:SS format", "type": "string", "format": "date-time", "example": "2025-08-29 18:47:40.26276" }, "updated_at": { "description": "Date and time when template was last updated in UTC YYYY-MM-DD HH:MM:SS format", "type": "string", "format": "date-time", "example": "2025-08-29 18:47:40.26277" }, "draft_updated_at": { "description": "Date and time when template draft was last updated in UTC YYYY-MM-DD HH:MM:SS format", "type": "string", "format": "date-time", "example": "2025-08-29 18:47:40" }, "is_broken_template": { "description": "Whether template has rendering errors", "type": "boolean", "example": false } }, "type": "object" }, "MctemplatesRenderRequest": { "description": "Request payload for rendering a Mailchimp Transactional template", "example": { "key": "ONzNrsmbtNXoIKyfPmjnig", "mc_template_id": 12345, "mc_template_version": "published", "merge_vars": [ { "name": "FIRSTNAME", "content": "John" } ] }, "allOf": [ { "$ref": "#/components/schemas/ApiKey" }, { "required": [ "mc_template_id" ], "properties": { "mc_template_id": { "description": "The Mailchimp template ID", "type": "integer", "example": 12345 }, "mc_template_version": { "description": "The template version to render - \"published\" or \"draft\"", "type": "string", "default": "published", "enum": [ "published", "draft" ], "example": "published" }, "merge_vars": { "description": "Optional merge variables to inject into the template", "type": [ "array", "null" ], "items": { "properties": { "name": { "description": "Variable name", "type": "string", "example": "FIRSTNAME" }, "content": { "description": "Variable value", "type": "string", "example": "John" } }, "type": "object" } } }, "type": "object", "additionalProperties": false } ] }, "MctemplatesRenderResponse": { "description": "Rendered Mailchimp Transactional template with merge variables applied", "required": [ "html" ], "properties": { "html": { "description": "Rendered HTML with merge variables applied", "type": "string", "example": "
Welcome, John!
" } }, "type": "object" }, "MctemplatesTimeSeries": { "description": "Hourly statistics for a Mailchimp Transactional template in a specific time period", "required": [ "sent", "hard_bounces", "soft_bounces", "rejects", "complaints", "unsubs", "opens", "clicks", "unique_opens", "unique_clicks", "time" ], "properties": { "sent": { "description": "Number of emails sent during the hour", "type": "integer" }, "hard_bounces": { "description": "Number of emails that hard bounced during the hour", "type": "integer" }, "soft_bounces": { "description": "Number of emails that soft bounced during the hour", "type": "integer" }, "rejects": { "description": "Number of emails rejected during the hour", "type": "integer" }, "complaints": { "description": "Number of spam complaints received during the hour", "type": "integer" }, "unsubs": { "description": "Number of unsubscribe requests received during the hour", "type": "integer" }, "opens": { "description": "Number of emails opened during the hour", "type": "integer" }, "unique_opens": { "description": "Number of unique opens generated by messages sent during the hour", "type": "integer" }, "clicks": { "description": "Number of tracked URLs clicked during the hour", "type": "integer" }, "unique_clicks": { "description": "Number of unique clicks generated by messages sent during the hour", "type": "integer" }, "time": { "description": "The hour as a UTC date string in YYYY-MM-DD HH:MM:SS format", "type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$", "example": "2025-08-29 15:00:00" } }, "type": "object", "additionalProperties": false }, "MctemplatesTimeSeriesRequest": { "description": "Request payload for getting Mailchimp Transactional template time series data", "example": { "key": "ONzNrsmbtNXoIKyfPmjnig", "mc_template_id": 12345 }, "allOf": [ { "$ref": "#/components/schemas/ApiKey" }, { "required": [ "mc_template_id" ], "properties": { "mc_template_id": { "description": "The Mailchimp template ID", "type": "integer", "example": 12345 } }, "type": "object", "additionalProperties": false } ] }, "MctemplatesTimeSeriesResponse": { "description": "Array of hourly stats for the last 30 days for a Mailchimp Transactional template", "type": "array", "items": { "$ref": "#/components/schemas/MctemplatesTimeSeries" } }, "MessagesCancelScheduledRequest": { "description": "Request body for messages/cancel-scheduled", "type": "object", "allOf": [ { "$ref": "#/components/schemas/ApiKey" }, { "required": [ "id" ], "properties": { "id": { "description": "a scheduled email id, as returned by any of the messages/send calls or messages/list-scheduled", "type": "string", "example": "I_dtFt2ZNPW5QD9-FaDU1A" } }, "type": "object" } ] }, "MessagesCancelScheduledResponse": { "$ref": "#/components/schemas/MessagesScheduled" }, "MessagesClickDetail": { "description": "Details about a message click event", "required": [ "ts", "url", "ip", "location", "ua" ], "properties": { "ts": { "description": "Unix timestamp when the click occurred", "type": "integer" }, "url": { "description": "The URL that was clicked", "type": "string" }, "ip": { "description": "IP address of the clicker", "type": "string" }, "location": { "description": "Geographic location of the clicker", "type": "string" }, "ua": { "description": "User agent of the clicker", "type": "string" } }, "type": "object" }, "MessagesContentRequest": { "description": "Request body for messages/content", "type": "object", "allOf": [ { "$ref": "#/components/schemas/ApiKey" }, { "required": [ "id" ], "properties": { "id": { "description": "the unique id of the message to get - passed as the \"_id\" field in webhooks, send calls, or search calls", "type": "string", "example": "abc123abc123abc123abc123abc123" } }, "type": "object" } ] }, "MessagesContentResponse": { "description": "The content of the message (email or SMS)", "oneOf": [ { "$ref": "#/components/schemas/MessagesEmailContent", "description": "Email message content" }, { "$ref": "#/components/schemas/MessagesSmsContent", "description": "SMS message content" } ] }, "MessagesEmailContent": { "description": "The parsed content of a message", "allOf": [ { "$ref": "#/components/schemas/MessagesMessageBase" }, { "required": [ "from_email", "subject", "to", "headers", "text", "html", "attachments" ], "properties": { "from_email": { "description": "The sender email address", "type": "string", "format": "email" }, "from_name": { "description": "The sender name", "type": [ "string", "null" ] }, "subject": { "description": "The message subject", "type": "string" }, "to": { "description": "The recipient information", "required": [ "email" ], "properties": { "email": { "description": "The recipient email address", "type": "string", "format": "email" }, "name": { "description": "The recipient name", "type": "string" } }, "type": "object" }, "headers": { "description": "The message headers", "type": "object", "additionalProperties": { "type": "string" } }, "text": { "description": "The text content of the message", "type": "string" }, "html": { "description": "The full HTML content of the message", "type": "string" }, "attachments": { "description": "List of attachments", "type": "array", "items": { "required": [ "name", "type", "content" ], "properties": { "name": { "description": "The attachment filename", "type": "string" }, "type": { "description": "The MIME type of the attachment", "type": "string" }, "content": { "description": "The attachment content", "type": "string" } }, "type": "object" } } }, "type": "object" } ] }, "MessagesEmailDetails": { "description": "Details for an email", "required": [ "sender", "subject", "email" ], "properties": { "sender": { "description": "The sender email address", "type": "string", "format": "email", "example": "user@example.com" }, "template": { "description": "Template used if applicable", "type": [ "string", "null" ] }, "mc_template": { "description": "Mailchimp template used if applicable", "type": [ "string", "null" ] }, "subject": { "description": "The message subject", "type": "string" }, "email": { "description": "The recipient email address", "type": "string", "format": "email", "example": "user@example.com" } }, "type": "object" }, "MessagesEmailInfo": { "description": "Detailed information about a sent email message", "allOf": [ { "$ref": "#/components/schemas/MessagesMessageBase" }, { "$ref": "#/components/schemas/MessagesEmailDetails" }, { "$ref": "#/components/schemas/MessagesTrackingFields" }, { "required": [ "smtp_events", "diag", "subaccount", "resends", "reject" ], "properties": { "smtp_events": { "description": "SMTP events related to the message", "type": "array", "items": { "$ref": "#/components/schemas/MessagesSmtpEvent" } }, "diag": { "description": "Diagnostic information about why the message was rejected", "type": [ "string", "null" ] }, "subaccount": { "description": "The subaccount used to send the message", "type": [ "string", "null" ] }, "resends": { "description": "Array of resend attempts", "type": "array", "items": { "type": "object" } }, "reject": { "description": "Rejection details if message was rejected", "properties": { "reason": { "description": "The reason for rejection", "type": "string" }, "last_event_at": { "description": "When the rejection occurred", "type": "string" } }, "type": [ "object", "null" ] }, "bounce_description": { "description": "Description of bounce/rejection reason (only present for rejected messages)", "type": "string" } }, "type": "object" } ] }, "MessagesInfoRequest": { "description": "Request body for messages/info", "type": "object", "allOf": [ { "$ref": "#/components/schemas/ApiKey" }, { "required": [ "id" ], "properties": { "id": { "description": "the unique id of the message to get - passed as the \"_id\" field in webhooks, send calls, or search calls", "type": "string", "example": "abc123abc123abc123abc123abc123" } }, "type": "object" } ] }, "MessagesInfoResponse": { "description": "Information about the message (email or SMS)", "oneOf": [ { "$ref": "#/components/schemas/MessagesEmailInfo", "description": "Email message information" }, { "$ref": "#/components/schemas/MessagesSmsInfo", "description": "SMS message information" } ] }, "MessagesListScheduledRequest": { "description": "Request body for messages/list-scheduled", "type": "object", "allOf": [ { "$ref": "#/components/schemas/ApiKey" }, { "properties": { "to": { "description": "an optional recipient address to restrict results to", "type": [ "string", "null" ], "format": "email", "example": "test.recipient@example.com" } }, "type": "object" } ] }, "MessagesListScheduledResponse": { "description": "Array of scheduled messages", "type": "array", "items": { "$ref": "#/components/schemas/MessagesScheduled" } }, "MessagesMessageBase": { "description": "Core message information returned by Mandrill API", "required": [ "ts", "_id", "tags" ], "properties": { "ts": { "description": "Unix timestamp when the message was sent", "type": "integer" }, "_id": { "description": "The message's unique id", "type": "string" }, "tags": { "description": "List of tags associated with the message", "type": "array", "items": { "type": "string" } } }, "type": "object" }, "MessagesOpenDetail": { "description": "Details about a message open event", "required": [ "ts", "ip", "location", "ua" ], "properties": { "ts": { "description": "Unix timestamp when the open occurred", "type": "integer" }, "ip": { "description": "IP address of the opener", "type": "string" }, "location": { "description": "Geographic location of the opener", "type": "string" }, "ua": { "description": "User agent of the opener", "type": "string" } }, "type": "object" }, "MessagesParseRequest": { "description": "Request body for messages/parse", "type": "object", "allOf": [ { "$ref": "#/components/schemas/ApiKey" }, { "required": [ "raw_message" ], "properties": { "raw_message": { "description": "the full MIME document of an email message", "type": "string", "example": "From: sender@example.com\\nTo: recipient.email@example.com\\nSubject: Some Subject\\n\\nSome content." } }, "type": "object" } ] }, "MessagesParseResponse": { "description": "The parsed components of a raw MIME message", "required": [ "headers", "text", "text_flowed", "attachments", "from_email", "from_name" ], "properties": { "headers": { "description": "The parsed message headers", "type": "object", "additionalProperties": { "type": "string" } }, "text": { "description": "The text content of the message", "type": "string" }, "text_flowed": { "description": "Whether the text content uses format=flowed", "type": "boolean" }, "attachments": { "description": "List of parsed attachments", "type": "array", "items": { "properties": { "name": { "description": "The attachment filename", "type": "string" }, "type": { "description": "The MIME type of the attachment", "type": "string" }, "content": { "description": "The attachment content", "type": "string" }, "binary": { "description": "Whether the attachment is binary", "type": "boolean" } }, "type": "object" } }, "from_email": { "description": "The sender email address", "type": "string", "format": "email" }, "from_name": { "description": "The sender name", "type": "string" }, "html": { "description": "The HTML content if present", "type": [ "string", "null" ] }, "to": { "description": "List of recipients", "type": "array", "items": { "properties": { "email": { "description": "The recipient email address", "type": "string", "format": "email" }, "name": { "description": "The recipient name", "type": [ "string", "null" ] } }, "type": "object" } }, "subject": { "description": "The message subject", "type": [ "string", "null" ] } }, "type": "object" }, "MessagesRequestComponent": { "description": "Mandrill message payload for transactional email", "properties": { "html": { "description": "the full HTML content to be sent", "type": [ "string", "null" ] }, "text": { "description": "optional full text content to be sent", "type": [ "string", "null" ] }, "subject": { "description": "the message subject", "type": [ "string", "null" ], "maxLength": 998 }, "from_email": { "description": "the sender email address", "type": [ "string", "null" ], "format": "email", "example": "message.from@example.com" }, "from_name": { "description": "optional from name to be used", "type": [ "string", "null" ], "example": "Example Name" }, "to": { "description": "an array of recipient information.", "type": "array", "items": { "properties": { "email": { "description": "The email address of the recipient", "type": "string", "format": "email", "example": "to.email@example.com" }, "name": { "description": "The optional display name to use for the recipient", "type": [ "string", "null" ], "example": "Recipient Name" }, "type": { "description": "the header type to use for the recipient, defaults to \"to\" if not provided Possible values: \"to\", \"cc\", or \"bcc\".", "type": [ "string", "null" ], "default": "to", "enum": [ "to", "cc", "bcc" ] } }, "type": "object" } }, "headers": { "description": "optional extra headers to add to the message (most headers are allowed)", "type": "object" }, "important": { "description": "whether or not this message is important, and should be delivered ahead of non-important messages", "type": [ "boolean", "null" ] }, "track_opens": { "description": "whether or not to turn on open tracking for the message", "type": [ "boolean", "null" ] }, "track_clicks": { "description": "whether or not to turn on click tracking for the message", "type": [ "boolean", "null" ] }, "auto_text": { "description": "whether or not to automatically generate a text part for messages that are not given text", "type": [ "boolean", "null" ] }, "auto_html": { "description": "whether or not to automatically generate an HTML part for messages that are not given HTML", "type": [ "boolean", "null" ] }, "inline_css": { "description": "whether or not to automatically inline all CSS styles provided in the message HTML - only for HTML documents less than 256KB in size", "type": [ "boolean", "null" ] }, "url_strip_qs": { "description": "whether or not to strip the query string from URLs when aggregating tracked URL data", "type": [ "boolean", "null" ] }, "preserve_recipients": { "description": "whether or not to expose all recipients in to \"To\" header for each email", "type": [ "boolean", "null" ] }, "view_content_link": { "description": "set to false to remove content logging for sensitive emails", "type": [ "boolean", "null" ] }, "bcc_address": { "description": "an optional address to receive an exact copy of each recipient's email", "type": [ "string", "null" ], "format": "email" }, "tracking_domain": { "description": "a custom domain to use for tracking opens and clicks instead of mandrillapp.com", "type": [ "string", "null" ] }, "signing_domain": { "description": "a custom domain to use for SPF/DKIM signing instead of mandrill (for \"via\" or \"on behalf of\" in email clients)", "type": [ "string", "null" ] }, "return_path_domain": { "description": "a custom domain to use for the messages's return-path", "type": [ "string", "null" ] }, "merge": { "description": "whether to evaluate merge tags in the message. Will automatically be set to true if either merge_vars or global_merge_vars are provided.", "type": [ "boolean", "null" ] }, "merge_language": { "description": "the merge tag language to use when evaluating merge tags, either mailchimp or handlebars Possible values: \"mailchimp\" or \"handlebars\".", "type": [ "string", "null" ], "default": "mailchimp", "enum": [ "mailchimp", "handlebars" ] }, "global_merge_vars": { "description": "global merge variables to use for all recipients. You can override these per recipient.", "type": "array", "items": { "$ref": "#/components/schemas/MergeVar" } }, "merge_vars": { "description": "per-recipient merge variables, which override global merge variables with the same name.", "type": "array", "items": { "properties": { "rcpt": { "description": "Email address of the recipient", "type": "string", "format": "email", "example": "recipient.email@example.com" }, "vars": { "description": "Recipient-specific merge variables", "type": "array", "items": { "$ref": "#/components/schemas/MergeVar" } } }, "type": "object" } }, "tags": { "description": "an array of string to tag the message with. Stats are accumulated using tags, though we only store the first 100 we see, so this should not be unique or change frequently. Tags should be 50 characters or less. Any tags starting with an underscore are reserved for internal use and will cause errors.", "type": "array", "items": { "type": "string" } }, "subaccount": { "description": "the unique id of a subaccount for this message - must already exist or will fail with an error", "type": [ "string", "null" ] }, "google_analytics_domains": { "description": "an array of strings indicating for which any matching URLs will automatically have Google Analytics parameters appended to their query string automatically.", "type": "array", "items": { "type": "string" } }, "google_analytics_campaign": { "description": "optional string indicating the value to set for the utm_campaign tracking parameter. If this isn't provided the email's from address will be used instead.", "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "string" } ] }, "metadata": { "description": "metadata an associative array of user metadata. Mandrill will store this metadata and make it available for retrieval. In addition, you can select up to 10 metadata fields to index and make searchable using the Mandrill search api.", "type": "object", "example": { "website": "www.example.com" } }, "recipient_metadata": { "description": "Per-recipient metadata that will override the global values specified in the metadata parameter.", "type": "array", "items": { "properties": { "rcpt": { "type": "string", "example": "recipient.email@example.com" }, "values": { "type": "object", "example": { "user_id": 123456 } } }, "type": "object" } }, "attachments": { "description": "an array of supported attachments to add to the message", "type": "array", "items": { "properties": { "type": { "description": "the MIME type of the attachment", "type": "string", "example": "text/plain" }, "name": { "description": "the file name of the attachment", "type": "string", "example": "myfile.txt" }, "content": { "description": "the content of the attachment as a base64-encoded string", "type": "string" } }, "type": "object" } }, "images": { "description": "an array of embedded images to add to the message", "type": "array", "items": { "properties": { "type": { "description": "the MIME type of the image - must start with \"image/\"", "type": "string", "example": "image/png" }, "name": { "description": "the content ID of the image - used to reference the image in your HTML content", "type": "string" }, "content": { "description": "the content of the image as a base64-encoded string", "type": "string" } }, "type": "object" } } }, "type": "object" }, "MessagesRescheduleRequest": { "description": "Request body for messages/reschedule", "type": "object", "allOf": [ { "$ref": "#/components/schemas/ApiKey" }, { "required": [ "id", "send_at" ], "properties": { "id": { "description": "a scheduled email id, as returned by any of the messages/send calls or messages/list-scheduled", "type": "string", "example": "I_dtFt2ZNPW5QD9-FaDU1A" }, "send_at": { "description": "the new UTC timestamp when the message should sent. Mandrill can't time travel, so if you specify a time in past the message will be sent immediately", "type": "string", "format": "date-time", "example": "2020-06-01 08:15:01" } }, "type": "object" } ] }, "MessagesRescheduleResponse": { "$ref": "#/components/schemas/MessagesScheduled" }, "MessagesScheduled": { "description": "Information about a scheduled message", "required": [ "_id", "created_at", "send_at", "from_email", "to", "subject" ], "properties": { "_id": { "description": "The message unique identifier", "type": "string" }, "created_at": { "description": "When the message was created", "type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$", "example": "2025-08-29 18:47:42" }, "send_at": { "description": "When the message is scheduled to be sent", "type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$", "example": "2025-09-05 18:47:41" }, "from_email": { "description": "The sender email address", "type": "string", "format": "email" }, "to": { "description": "The recipient email address", "type": "string", "format": "email" }, "subject": { "description": "The message subject", "type": "string" } }, "type": "object" }, "MessagesSearchRequest": { "description": "Request body for messages/search", "type": "object", "allOf": [ { "$ref": "#/components/schemas/ApiKey" }, { "properties": { "query": { "description": "search terms to find matching messages", "type": "string", "example": "*" }, "date_from": { "description": "start date", "type": [ "string", "null" ], "format": "date" }, "date_to": { "description": "end date", "type": [ "string", "null" ], "format": "date" }, "tags": { "description": "an array of tag names to narrow the search to", "type": [ "array", "null" ], "items": { "type": "string" } }, "senders": { "description": "an array of sender addresses to narrow the search to", "type": [ "array", "null" ], "items": { "type": "string", "format": "email" } }, "api_keys": { "description": "an array of API keys to narrow the search to", "type": [ "array", "null" ], "items": { "type": "string" } }, "limit": { "description": "the maximum number of results to return, defaults to 100, upper limit of 1000", "type": "integer", "maximum": 1000, "minimum": 1, "example": 100 } }, "type": "object" } ] }, "MessagesSearchResponse": { "description": "Array of messages matching the search query (can include both email and SMS messages)", "type": "array", "items": { "oneOf": [ { "$ref": "#/components/schemas/MessagesEmailInfo", "description": "Email message search result" }, { "$ref": "#/components/schemas/MessagesSmsInfo", "description": "SMS message search result" } ] } }, "MessagesSearchTimeSeries": { "description": "Time series data point for message search results", "required": [ "time", "sent", "opens", "clicks", "hard_bounces", "soft_bounces", "rejects", "complaints", "unsubs", "unique_opens", "unique_clicks" ], "properties": { "time": { "description": "The hour that the statistic occurred", "type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$", "example": "2025-08-29 18:00:00" }, "sent": { "description": "The number of emails sent during the time period", "type": "integer" }, "opens": { "description": "The number of emails opened during the time period", "type": "integer" }, "clicks": { "description": "The number of clicks during the time period", "type": "integer" }, "hard_bounces": { "description": "The number of hard bounces during the time period", "type": "integer" }, "soft_bounces": { "description": "The number of soft bounces during the time period", "type": "integer" }, "rejects": { "description": "The number of emails rejected during the time period", "type": "integer" }, "complaints": { "description": "The number of spam complaints during the time period", "type": "integer" }, "unsubs": { "description": "The number of unsubscribes during the time period", "type": "integer" }, "unique_opens": { "description": "The number of unique opens during the time period", "type": "integer" }, "unique_clicks": { "description": "The number of unique clicks during the time period", "type": "integer" } }, "type": "object" }, "MessagesSearchTimeSeriesRequest": { "description": "Request body for messages/search-time-series", "type": "object", "allOf": [ { "$ref": "#/components/schemas/ApiKey" }, { "properties": { "query": { "description": "the search terms to find matching messages for", "type": "string", "example": "email:gmail.com" }, "date_from": { "description": "start date", "type": [ "string", "null" ], "format": "date", "example": "2013-01-01" }, "date_to": { "description": "end date", "type": [ "string", "null" ], "format": "date", "example": "2013-01-02" }, "tags": { "description": "an array of tag names to narrow the search to, will return messages that contain ANY of the tags", "type": [ "array", "null" ], "items": { "type": "string" }, "example": [ "password-reset", "welcome" ] }, "senders": { "description": "an array of sender addresses to narrow the search to, will return messages sent by ANY of the senders", "type": [ "array", "null" ], "items": { "type": "string", "format": "email" }, "example": [ "sender@example.com" ] } }, "type": "object" } ] }, "MessagesSearchTimeSeriesResponse": { "description": "Array of hourly message stats matching the search query", "type": "array", "items": { "$ref": "#/components/schemas/MessagesSearchTimeSeries" } }, "MessagesSendMcTemplateRequest": { "description": "Request body for messages/send-mc-template", "type": "object", "allOf": [ { "$ref": "#/components/schemas/ApiKey" }, { "required": [ "mc_template_id", "message" ], "properties": { "mc_template_id": { "description": "the Mailchimp Transactional template ID from the user's account", "type": "integer", "example": 12345 }, "mc_template_version": { "description": "which version of the template to use - \"draft\" for draft content or \"published\" for published content. Defaults to \"published\". Note: requesting \"published\" when the template has not been published will return a 404 error.", "type": "string", "enum": [ "draft", "published" ], "example": "published" }, "message": { "$ref": "#/components/schemas/MessagesRequestComponent", "description": "the other information on the message to send - same as /messages/send" }, "async": { "description": "enable a background sending mode that is optimized for bulk sending. In async mode, messages/send will immediately return a status of \"queued\" for every recipient. To handle rejections when sending in async mode, set up a webhook for the 'reject' event. Defaults to false for messages with no more than 10 recipients; messages with more than 10 recipients are always sent asynchronously, regardless of the value of async.", "type": [ "boolean", "null" ] }, "ip_pool": { "description": "the name of the dedicated ip pool that should be used to send the message. If you do not have any dedicated IPs, this parameter has no effect. If you specify a pool that does not exist, your default pool will be used instead.", "type": "string" }, "send_at": { "description": "when this message should be sent as a UTC timestamp in YYYY-MM-DD HH:MM:SS format. If you specify a time in the past, the message will be sent immediately; for future dates, you're limited to one year from the date of scheduling.", "type": "string", "format": "date-time" } }, "type": "object" } ] }, "MessagesSendMcTemplateResponse": { "$ref": "#/components/schemas/MessagesSendResponse" }, "MessagesSendRawRequest": { "description": "Request body for messages/send-raw", "type": "object", "allOf": [ { "$ref": "#/components/schemas/ApiKey" }, { "required": [ "raw_message" ], "properties": { "raw_message": { "description": "the full MIME document of an email message", "type": "string" }, "from_email": { "description": "optionally define the sender address - otherwise we'll use the address found in the provided headers", "type": [ "string", "null" ], "format": "email" }, "from_name": { "description": "optionally define the sender alias", "type": [ "string", "null" ] }, "to": { "description": "optionally define the recipient to receive the message - otherwise we'll use the To, Cc, and Bcc headers provided in the document", "type": "array", "items": { "type": "string", "format": "email" }, "example": [ "recipient.email@example.com" ] }, "async": { "description": "enable a background sending mode that is optimized for bulk sending. In async mode, messages/send will immediately return a status of \"queued\" for every recipient. To handle rejections when sending in async mode, set up a webhook for the 'reject' event. Defaults to false for messages with no more than 10 recipients; messages with more than 10 recipients are always sent asynchronously, regardless of the value of async.", "type": [ "boolean", "null" ] }, "ip_pool": { "description": "the name of the dedicated ip pool that should be used to send the message. If you do not have any dedicated IPs, this parameter has no effect. If you specify a pool that does not exist, your default pool will be used instead.", "type": "string" }, "send_at": { "description": "when this message should be sent as a UTC timestamp in YYYY-MM-DD HH:MM:SS format. If you specify a time in the past, the message will be sent immediately; for future dates, you're limited to one year from the date of scheduling.", "type": "string", "format": "date-time" }, "return_path_domain": { "description": "a custom domain to use for the messages' return-path", "type": [ "string", "null" ], "example": null } }, "type": "object" } ] }, "MessagesSendRawResponse": { "$ref": "#/components/schemas/MessagesSendResponse" }, "MessagesSendRequest": { "description": "Request body for messages/send", "type": "object", "allOf": [ { "$ref": "#/components/schemas/ApiKey" }, { "required": [ "message" ], "properties": { "message": { "$ref": "#/components/schemas/MessagesRequestComponent", "description": "the information on the message to send" }, "async": { "description": "enable a background sending mode that is optimized for bulk sending. In async mode, messages/send will immediately return a status of \"queued\" for every recipient. To handle rejections when sending in async mode, set up a webhook for the 'reject' event. Defaults to false for messages with no more than 10 recipients; messages with more than 10 recipients are always sent asynchronously, regardless of the value of async.", "type": [ "boolean", "null" ] }, "ip_pool": { "description": "the name of the dedicated ip pool that should be used to send the message. If you do not have any dedicated IPs, this parameter has no effect. If you specify a pool that does not exist, your default pool will be used instead.", "type": "string" }, "send_at": { "description": "when this message should be sent as a UTC timestamp in YYYY-MM-DD HH:MM:SS format. If you specify a time in the past, the message will be sent immediately; for future dates, you're limited to one year from the date of scheduling.", "type": "string", "format": "date-time" } }, "type": "object" } ] }, "MessagesSendResponse": { "description": "Array of send results, one per recipient", "type": "array", "items": { "$ref": "#/components/schemas/MessagesSendResult" } }, "MessagesSendResult": { "description": "The sending results for a single recipient", "required": [ "email", "status", "_id" ], "properties": { "email": { "description": "The email address of the recipient", "type": "string", "format": "email", "example": "recipient.email@example.com" }, "status": { "description": "The sending status of the recipient", "type": "string", "enum": [ "sent", "queued", "scheduled", "rejected", "invalid" ] }, "reject_reason": { "description": "The reason for the rejection if the recipient status is rejected", "type": [ "string", "null" ], "enum": [ "hard-bounce", "soft-bounce", "spam", "unsub", "custom", "invalid-sender", "invalid", "test-mode-limit", "unsigned", "rule" ], "example": null }, "queued_reason": { "description": "The reason for the queuing if the recipient status is queued", "type": [ "string", "null" ], "enum": [ "attachments", "multiple-recipients", "free-trial-sends-exhausted", "hourly-quota-exhausted", "monthly-limit-reached", "sending-paused", "sending-suspended", "account-suspended", "sending-backlogged" ], "example": null }, "_id": { "description": "The message's unique id", "type": "string" } }, "type": "object" }, "MessagesSendSmsRequest": { "description": "Request body for messages/send-sms", "type": "object", "allOf": [ { "$ref": "#/components/schemas/ApiKey" }, { "required": [ "message" ], "properties": { "message": { "required": [ "sms" ], "properties": { "sms": { "required": [ "text", "to", "from", "consent" ], "properties": { "text": { "description": "The SMS message content to be sent.", "type": "string", "example": "Hello from Mandrill SMS!" }, "to": { "description": "The phone numbers to send the SMS to.", "type": "array", "items": { "type": "string", "pattern": "^\\+[1-9]\\d{1,14}$" }, "example": [ "+10000000000", "+10000000001" ] }, "from": { "description": "The phone number to send the SMS from.", "type": "string", "example": "+10000000000" }, "consent": { "description": "The consent type for this SMS", "type": "string", "enum": [ "onetime", "recurring", "recurring-no-confirm" ], "example": "onetime" }, "track_clicks": { "description": "whether or not to turn on click tracking for the message", "type": "boolean" } }, "type": "object" }, "merge": { "description": "Whether to evaluate merge tags in the message. Will automatically be set to true if either merge_vars or global_merge_vars are provided.", "type": "boolean" }, "merge_language": { "description": "the merge tag language to use when evaluating merge tags, either mailchimp or handlebars Possible values: \"mailchimp\" or \"handlebars\".", "type": "string" }, "global_merge_vars": { "description": "global merge variables to use for all recipients. You can override these per recipient.", "type": "array", "items": { "$ref": "#/components/schemas/MergeVar" } }, "merge_vars": { "description": "per-recipient merge variables, which override global merge variables with the same name.", "type": "array", "items": { "properties": { "rcpt": { "description": "Phone number of the recipient", "type": "string", "pattern": "^\\+[1-9]\\d{1,14}$", "example": "+11234567890" }, "vars": { "description": "Recipient-specific merge variables", "type": "array", "items": { "$ref": "#/components/schemas/MergeVar" } } }, "type": "object" } } }, "type": "object" }, "async": { "description": "enable a background sending mode that is optimized for bulk sending. In async mode, messages/send-sms will immediately return a status of \"queued\" for every recipient. To handle rejections when sending in async mode, set up a webhook for the 'reject' event. Defaults to false for messages with no more than 10 recipients; messages with more than 10 recipients are always sent asynchronously, regardless of the value of async.", "type": [ "boolean", "null" ] } }, "type": "object" } ] }, "MessagesSendSmsResponse": { "description": "Array of SMS send results, one per recipient", "type": "array", "items": { "$ref": "#/components/schemas/MessagesSmsMessage" } }, "MessagesSendTemplateRequest": { "description": "Request body for messages/send-template", "type": "object", "allOf": [ { "$ref": "#/components/schemas/ApiKey" }, { "required": [ "template_name", "template_content", "message" ], "properties": { "template_name": { "description": "the immutable slug of a template that exists in the user's account. Make sure you don't use the template name as this one might change.", "type": "string" }, "template_content": { "description": "an array of template content to send. Each item in the array should be a struct with two keys - name: the name of the content block to set the content for, and content: the actual content to put into the block", "type": "array", "items": { "properties": { "name": { "description": "the name of the mc:edit editable region to inject into", "type": "string" }, "content": { "description": "the content to inject", "type": "string" } }, "type": "object" } }, "message": { "$ref": "#/components/schemas/MessagesRequestComponent", "description": "the other information on the message to send - same as /messages/send, but without the html content" }, "async": { "description": "enable a background sending mode that is optimized for bulk sending. In async mode, messages/send will immediately return a status of \"queued\" for every recipient. To handle rejections when sending in async mode, set up a webhook for the 'reject' event. Defaults to false for messages with no more than 10 recipients; messages with more than 10 recipients are always sent asynchronously, regardless of the value of async.", "type": [ "boolean", "null" ] }, "ip_pool": { "description": "the name of the dedicated ip pool that should be used to send the message. If you do not have any dedicated IPs, this parameter has no effect. If you specify a pool that does not exist, your default pool will be used instead.", "type": "string" }, "send_at": { "description": "when this message should be sent as a UTC timestamp in YYYY-MM-DD HH:MM:SS format. If you specify a time in the past, the message will be sent immediately; for future dates, you're limited to one year from the date of scheduling.", "type": "string", "format": "date-time" } }, "type": "object" } ] }, "MessagesSendTemplateResponse": { "$ref": "#/components/schemas/MessagesSendResponse" }, "MessagesSmsContent": { "description": "The content of an SMS message", "allOf": [ { "$ref": "#/components/schemas/MessagesMessageBase" }, { "required": [ "channel", "to", "from", "text", "state" ], "properties": { "channel": { "description": "The channel type for this message", "type": "string", "enum": [ "sms" ], "example": "sms" }, "to": { "description": "The recipient phone number", "type": "string", "pattern": "^\\+[1-9]\\d{1,14}$", "example": "+10000000000" }, "from": { "description": "The SMS sender identifier", "type": "string", "example": "" }, "text": { "description": "The SMS message text content", "type": "string" }, "state": { "description": "Sending status of this message", "type": "string", "enum": [ "sent", "bounced", "rejected", "queued", "scheduled", "canceled" ], "example": "canceled" } }, "type": "object" } ] }, "MessagesSmsEvent": { "description": "Details about an SMS event", "required": [ "ts", "state" ], "properties": { "ts": { "description": "Unix timestamp when the event occurred", "type": "integer", "example": 1757080445 }, "state": { "description": "The state of the SMS event", "type": "string", "enum": [ "sent", "delivered", "failed", "canceled" ], "example": "canceled" }, "sub_state": { "description": "Additional state details", "type": [ "string", "null" ], "example": "NOT_SUBSCRIBED" } }, "type": "object" }, "MessagesSmsInfo": { "description": "Detailed information about a sent SMS message", "allOf": [ { "$ref": "#/components/schemas/MessagesMessageBase" }, { "$ref": "#/components/schemas/MessagesTrackingFields" }, { "required": [ "channel", "to", "from", "text", "consent", "sms_events" ], "properties": { "channel": { "description": "The channel type for this message", "type": "string", "enum": [ "sms" ], "example": "sms" }, "to": { "description": "The recipient phone number", "type": "string", "pattern": "^\\+[1-9]\\d{1,14}$", "example": "+10000000000" }, "from": { "description": "The SMS sender identifier", "type": "string", "example": "" }, "text": { "description": "The SMS message text content", "type": "string" }, "consent": { "description": "The consent type for this SMS", "type": "string", "enum": [ "onetime", "recurring", "recurring-no-confirm" ], "example": "onetime" }, "sms_events": { "description": "SMS events related to the message", "type": "array", "items": { "$ref": "#/components/schemas/MessagesSmsEvent" } }, "subaccount": { "description": "The subaccount used to send the message", "type": [ "string", "null" ] }, "reject": { "description": "Rejection details if message was rejected", "properties": { "reason": { "description": "The reason for rejection", "type": "string" }, "last_event_at": { "description": "When the rejection occurred", "type": "string" } }, "type": [ "object", "null" ] } }, "type": "object" } ] }, "MessagesSmsMessage": { "description": "The sending results for a single SMS recipient", "required": [ "to", "from", "status", "_id" ], "properties": { "to": { "description": "The phone number of the recipient", "type": "string", "pattern": "^\\+[1-9]\\d{1,14}$", "example": "+10000000000" }, "from": { "description": "The phone number of the sender", "type": "string", "example": "+10000000000" }, "status": { "description": "The sending status of the recipient", "enum": [ "sent", "queued", "scheduled", "rejected", "invalid" ], "example": "sent" }, "reject_reason": { "description": "The reason for the rejection if the recipient status is rejected", "type": [ "string", "null" ], "enum": [ "hard-bounce", "soft-bounce", "spam", "unsub", "custom", "invalid-sender", "invalid", "test-mode-limit", "unsigned", "rule" ], "example": null }, "queue_reason": { "description": "The reason for the queuing if the recipient status is queued", "type": [ "string", "null" ], "enum": [ "async requested by user", "multiple recipients" ], "example": null }, "_id": { "description": "The message's unique id", "type": "string", "example": "d451905551f64e279440e833d25b7ff0" } }, "type": "object" }, "MessagesSmtpEvent": { "description": "Details about an SMTP event", "required": [ "ts", "type", "diag", "source_ip", "destination_ip", "size" ], "properties": { "ts": { "description": "Unix timestamp when the event occurred", "type": "integer" }, "type": { "description": "The type of SMTP event", "type": "string", "enum": [ "sent", "bounced", "rejected", "delivered" ] }, "diag": { "description": "The SMTP response from the recipient's server or internal diagnostic", "type": "string" }, "source_ip": { "description": "The IP address that sent the message", "type": "string", "format": "ipv4" }, "destination_ip": { "description": "The IP address of the recipient's server (empty string for internal processing)", "type": "string", "example": "198.2.132.48" }, "size": { "description": "The size of the message in bytes", "type": "integer" } }, "type": "object" }, "MessagesTrackingFields": { "description": "Fields for tracking activity of a message", "required": [ "opens", "clicks", "opens_detail", "clicks_detail", "state" ], "properties": { "opens": { "description": "Number of times the message has been opened", "type": "integer" }, "clicks": { "description": "Number of times links in the message have been clicked", "type": "integer" }, "opens_detail": { "description": "Details about opens, if captured", "type": "array", "items": { "$ref": "#/components/schemas/MessagesOpenDetail" } }, "clicks_detail": { "description": "Details about clicks, if captured", "type": "array", "items": { "$ref": "#/components/schemas/MessagesClickDetail" } }, "state": { "description": "Sending status of this message", "type": "string", "enum": [ "sent", "bounced", "rejected", "queued", "scheduled", "canceled" ] }, "metadata": { "description": "Any custom metadata provided when the message was sent", "type": "object" } }, "type": "object" }, "MetadataAddRequest": { "description": "Request payload for adding a custom metadata field", "example": { "key": "ONzNrsmbtNXoIKyfPmjnig", "name": "group_id", "view_template": "{{value}}" }, "allOf": [ { "$ref": "#/components/schemas/ApiKey" }, { "required": [ "name" ], "properties": { "name": { "description": "A unique identifier for the metadata field", "type": "string", "maxLength": 64, "example": "group_id" }, "view_template": { "description": "Optional Mustache template to control how the metadata is rendered in your activity log", "type": [ "string", "null" ], "maxLength": 1024, "example": "{{value}}" } }, "type": "object", "additionalProperties": false } ] }, "MetadataAddResponse": { "$ref": "#/components/schemas/Metadata" }, "MetadataDeleteRequest": { "description": "Request payload for deleting a custom metadata field", "example": { "key": "ONzNrsmbtNXoIKyfPmjnig", "name": "group_id" }, "allOf": [ { "$ref": "#/components/schemas/ApiKey" }, { "required": [ "name" ], "properties": { "name": { "description": "The unique identifier of the metadata field to delete", "type": "string", "maxLength": 64, "example": "group_id" } }, "type": "object", "additionalProperties": false } ] }, "MetadataDeleteResponse": { "$ref": "#/components/schemas/Metadata" }, "MetadataListRequest": { "description": "Request payload for listing custom metadata fields", "example": { "key": "ONzNrsmbtNXoIKyfPmjnig" }, "allOf": [ { "$ref": "#/components/schemas/ApiKey" } ] }, "MetadataListResponse": { "description": "List of custom metadata fields for the account", "type": "array", "items": { "$ref": "#/components/schemas/MetadataResponseData" } }, "Metadata": { "$ref": "#/components/schemas/MetadataResponseData" }, "MetadataResponseData": { "description": "Response data for metadata field operations", "required": [ "name", "state" ], "properties": { "name": { "description": "Unique identifier for the metadata field", "type": "string", "maxLength": 64, "example": "group_id" }, "state": { "description": "Current state of the metadata field", "type": "string", "enum": [ "active", "delete", "index", "failed" ], "example": "active" }, "view_template": { "description": "Mustache template to control how the metadata is rendered in activity logs", "type": [ "string", "null" ], "maxLength": 1024, "example": "{{value}}" } }, "type": "object", "example": { "name": "group_id", "state": "active", "view_template": "{{value}}" }, "additionalProperties": false }, "MetadataUpdateRequest": { "description": "Request payload for updating a custom metadata field", "example": { "key": "ONzNrsmbtNXoIKyfPmjnig", "name": "group_id", "view_template": "{{value}}" }, "allOf": [ { "$ref": "#/components/schemas/ApiKey" }, { "required": [ "name", "view_template" ], "properties": { "name": { "description": "The unique identifier of the metadata field to update", "type": "string", "maxLength": 64, "example": "group_id" }, "view_template": { "description": "Mustache template to control how the metadata is rendered in your activity log", "type": "string", "maxLength": 1024, "example": "{{value}}" } }, "type": "object", "additionalProperties": false } ] }, "MetadataUpdateResponse": { "$ref": "#/components/schemas/Metadata" }, "RejectsAddRequest": { "description": "Request payload for adding an email to the rejection blacklist", "example": { "key": "ONzNrsmbtNXoIKyfPmjnig", "email": "user@example.com", "comment": "Manually blocked due to spam complaints", "subaccount": "cust-123" }, "allOf": [ { "$ref": "#/components/schemas/ApiKey" }, { "required": [ "email" ], "properties": { "email": { "description": "An email address to block", "type": "string", "format": "email", "example": "user@example.com" }, "comment": { "description": "An optional comment describing the rejection", "type": "string", "example": "Manually blocked due to spam complaints" }, "subaccount": { "description": "An optional unique identifier for the subaccount to limit the blacklist entry", "type": "string", "maxLength": 255, "example": "cust-123" } }, "type": "object", "additionalProperties": false } ] }, "RejectsAddResponse": { "description": "Response for adding an email to the rejection blacklist", "required": [ "email", "added" ], "properties": { "email": { "description": "The email address you provided", "type": "string", "format": "email", "example": "user@example.com" }, "added": { "description": "Whether the operation succeeded", "type": "boolean", "example": true } }, "type": "object", "example": { "email": "user@example.com", "added": true }, "additionalProperties": false }, "RejectsAddSmsRequest": { "description": "Request payload for adding a phone number to the SMS rejection denylist", "example": { "key": "ONzNrsmbtNXoIKyfPmjnig", "phone": "+12025551234", "comment": "Manually blocked due to spam", "subaccount": "cust-123" }, "allOf": [ { "$ref": "#/components/schemas/ApiKey" }, { "required": [ "phone" ], "properties": { "phone": { "description": "A phone number to block in E.164 format", "type": "string", "example": "+12025551234" }, "comment": { "description": "An optional comment describing the rejection", "type": "string", "example": "Manually blocked due to spam" }, "subaccount": { "description": "An optional unique identifier for the subaccount to limit the denylist entry", "type": "string", "maxLength": 255, "example": "cust-123" } }, "type": "object", "additionalProperties": false } ] }, "RejectsAddSmsResponse": { "$ref": "#/components/schemas/RejectsSmsReject" }, "RejectsDeleteRequest": { "description": "Request payload for deleting an email from the rejection blacklist", "example": { "key": "ONzNrsmbtNXoIKyfPmjnig", "email": "user@example.com", "subaccount": "cust-123" }, "allOf": [ { "$ref": "#/components/schemas/ApiKey" }, { "required": [ "email" ], "properties": { "email": { "description": "An email address to remove from the blacklist", "type": "string", "format": "email", "example": "user@example.com" }, "subaccount": { "description": "An optional unique identifier for the subaccount to limit the blacklist deletion", "type": "string", "maxLength": 255, "example": "cust-123" } }, "type": "object", "additionalProperties": false } ] }, "RejectsDeleteResponse": { "description": "Response for deleting an email from the rejection blacklist", "required": [ "email", "deleted" ], "properties": { "email": { "description": "The email address that was removed from the blacklist", "type": "string", "format": "email", "example": "user@example.com" }, "deleted": { "description": "Whether the address was deleted successfully", "type": "boolean", "example": true }, "subaccount": { "description": "The subaccount blacklist that the address was removed from, if any", "type": "string", "example": "cust-123" } }, "type": "object", "example": { "email": "user@example.com", "deleted": true, "subaccount": "cust-123" }, "additionalProperties": false }, "RejectsDeleteSmsRequest": { "description": "Request payload for deleting a phone number from the SMS rejection denylist", "example": { "key": "ONzNrsmbtNXoIKyfPmjnig", "phone": "+12025551234", "subaccount": "cust-123" }, "allOf": [ { "$ref": "#/components/schemas/ApiKey" }, { "required": [ "phone" ], "properties": { "phone": { "description": "A phone number in E.164 format", "type": "string", "example": "+12025551234" }, "subaccount": { "description": "An optional unique identifier for the subaccount to limit the denylist deletion", "type": "string", "maxLength": 255, "example": "cust-123" } }, "type": "object", "additionalProperties": false } ] }, "RejectsDeleteSmsResponse": { "$ref": "#/components/schemas/RejectsSmsReject" }, "RejectsListRequest": { "description": "Request payload for retrieving email rejection blacklist", "example": { "key": "ONzNrsmbtNXoIKyfPmjnig", "email": "user@example.com", "include_expired": false, "subaccount": "cust-123" }, "allOf": [ { "$ref": "#/components/schemas/ApiKey" }, { "properties": { "email": { "description": "An optional email address to search by", "type": "string", "example": "user@example.com" }, "include_expired": { "description": "Whether to include rejections that have already expired", "type": "boolean", "example": false }, "subaccount": { "description": "An optional unique identifier for the subaccount to limit the blacklist", "type": "string", "maxLength": 255, "example": "cust-123" } }, "type": "object", "additionalProperties": false } ] }, "RejectsListResponse": { "description": "Response containing up to 1000 rejection blacklist entries", "type": "array", "items": { "required": [ "email", "reason", "detail", "created_at", "last_event_at", "expires_at", "expired" ], "properties": { "email": { "description": "The email that is blocked", "type": "string", "format": "email", "example": "user@example.com" }, "reason": { "description": "The type of event that caused this rejection", "type": "string", "enum": [ "hard-bounce", "soft-bounce", "spam", "unsub", "custom" ], "example": "hard-bounce" }, "detail": { "description": "Extended details about the event, such as the SMTP diagnostic for bounces or the comment for manually-created rejections", "type": "string", "example": "550 5.1.1 User unknown" }, "created_at": { "description": "When the email was added to the blocklist", "type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$", "example": "2023-01-15 10:30:00" }, "last_event_at": { "description": "The timestamp of the most recent event that either created or renewed this rejection", "type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$", "example": "2023-01-15 10:30:00" }, "expires_at": { "description": "When the blocklist entry will expire (this may be in the past)", "type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$", "example": "2023-02-15 10:30:00" }, "expired": { "description": "Whether the blocklist entry has expired", "type": "boolean", "example": false }, "sender": { "description": "The sender that this blocklist entry applies to, or null if none", "properties": { "address": { "description": "The sender's email address", "type": "string", "format": "email", "example": "sender@example.com" }, "created_at": { "description": "The date and time that the sender was first seen by Mandrill as a UTC date string in YYYY-MM-DD HH:MM:SS format", "type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$", "example": "2023-01-01 00:00:00" }, "sent": { "description": "The total number of messages sent by this sender", "type": "integer", "example": 100 }, "hard_bounces": { "description": "The total number of hard bounces by messages by this sender", "type": "integer", "example": 5 }, "soft_bounces": { "description": "The total number of soft bounces by messages by this sender", "type": "integer", "example": 2 }, "rejects": { "description": "The total number of rejected messages by this sender", "type": "integer", "example": 7 }, "complaints": { "description": "The total number of spam complaints received for messages by this sender", "type": "integer", "example": 1 }, "unsubs": { "description": "The total number of unsubscribe requests received for messages by this sender", "type": "integer", "example": 3 } }, "type": [ "object", "null" ] }, "subaccount": { "description": "The subaccount that this denylist entry applies to, or null if none", "type": [ "string", "null" ], "example": "subaccount-123" } }, "type": "object", "additionalProperties": false }, "example": [ { "email": "user1@example.com", "reason": "hard-bounce", "detail": "550 5.1.1 User unknown", "created_at": "2023-01-15 10:30:00", "last_event_at": "2023-01-15 10:30:00", "expires_at": "2023-02-15 10:30:00", "expired": false, "sender": null, "subaccount": null }, { "email": "user2@example.com", "reason": "spam", "detail": "Manually blocked due to spam complaints", "created_at": "2023-01-10 14:20:00", "last_event_at": "2023-01-10 14:20:00", "expires_at": "2023-02-10 14:20:00", "expired": false, "sender": { "address": "sender@example.com", "created_at": "2023-01-01 00:00:00", "sent": 100, "hard_bounces": 5, "soft_bounces": 2, "rejects": 7, "complaints": 1, "unsubs": 3 }, "subaccount": "subaccount-123" } ] }, "RejectsListSmsRequest": { "description": "Request payload for retrieving the SMS rejection denylist", "example": { "key": "ONzNrsmbtNXoIKyfPmjnig", "phone": "+12025551234", "include_expired": false, "subaccount": "cust-123" }, "allOf": [ { "$ref": "#/components/schemas/ApiKey" }, { "properties": { "phone": { "description": "An optional phone number to search by in E.164 format", "type": "string", "example": "+12025551234" }, "include_expired": { "description": "Whether to include rejections that have already expired", "type": "boolean", "example": false }, "subaccount": { "description": "An optional unique identifier for the subaccount to limit the denylist", "type": "string", "maxLength": 255, "example": "cust-123" } }, "type": "object", "additionalProperties": false } ] }, "RejectsListSmsResponse": { "description": "Response containing up to 1000 SMS rejection denylist entries", "type": "array", "items": { "required": [ "phone", "created_at", "expired" ], "properties": { "phone": { "description": "The phone number on the denylist", "type": "string", "example": "+12025551234" }, "created_at": { "description": "The date and time that the entry was created", "type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$", "example": "2023-01-15 10:30:00" }, "expires_at": { "description": "The date and time that the entry expires", "type": [ "string", "null" ], "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$", "example": "2023-02-15 10:30:00" }, "expired": { "description": "Whether the entry has expired", "type": "boolean", "example": false }, "subaccount": { "description": "The subaccount that the entry belongs to", "type": [ "string", "null" ], "example": "cust-123" } }, "type": "object", "additionalProperties": false }, "example": [ { "phone": "+12025551234", "created_at": "2023-01-15 10:30:00", "expires_at": null, "expired": false, "subaccount": null } ] }, "RejectsSmsReject": { "description": "Response for adding or deleting a phone number from the SMS rejection denylist", "required": [ "phone" ], "properties": { "phone": { "description": "The phone number you provided", "type": "string", "example": "+12025551234" }, "added": { "description": "Whether the add operation succeeded", "type": "boolean" }, "deleted": { "description": "Whether the delete operation succeeded", "type": "boolean" }, "subaccount": { "description": "The subaccount denylist that the phone number was affected in, if any", "type": [ "string", "null" ], "example": "cust-123" } }, "type": "object", "example": { "phone": "+12025551234", "added": true }, "additionalProperties": false }, "SendersAddDomainRequest": { "description": "Request body for adding a sender domain.", "type": "object", "allOf": [ { "$ref": "#/components/schemas/ApiKey" }, { "required": [ "domain" ], "properties": { "domain": { "type": "string", "format": "hostname", "maxLength": 255, "example": "example.com" } }, "type": "object" } ] }, "SendersAddDomainResponse": { "$ref": "#/components/schemas/SendersSenderDomain" }, "SendersCheckDomainRequest": { "description": "Request body for checking a sender domain.", "type": "object", "allOf": [ { "$ref": "#/components/schemas/ApiKey" }, { "required": [ "domain" ], "properties": { "domain": { "type": "string", "format": "hostname", "maxLength": 255, "example": "example.com" } }, "type": "object" } ] }, "SendersCheckDomainResponse": { "$ref": "#/components/schemas/SendersSenderDomain" }, "SendersDeleteDomainRequest": { "description": "Request body for deleting a sender domain.", "type": "object", "allOf": [ { "$ref": "#/components/schemas/ApiKey" }, { "required": [ "domain" ], "properties": { "domain": { "description": "the domain name to delete", "type": "string", "format": "hostname", "maxLength": 255, "example": "example.com" } }, "type": "object" } ] }, "SendersDeleteDomainResponse": { "$ref": "#/components/schemas/SendersSenderDomain" }, "DmarcDetail": { "description": "Details about the DMARC status of a domain.", "properties": { "valid": { "description": "Whether this verification is valid.", "type": "boolean" }, "error": { "description": "An error message indicating why the verification failed.", "type": "string" } }, "type": "object" }, "SendersDomainsRequest": { "description": "Request payload for listing sender domains", "example": { "key": "ONzNrsmbtNXoIKyfPmjnig" }, "allOf": [ { "$ref": "#/components/schemas/ApiKey" } ] }, "SendersDomainsResponse": { "description": "Array of sender domain information for each sending domain used by the account", "type": "array", "items": { "$ref": "#/components/schemas/SendersSenderDomain" } }, "SendersHourStat": { "description": "Hourly stats row for a sender over the last 30 days.", "properties": { "time": { "description": "UTC hour in YYYY-MM-DD HH:MM:SS", "type": "string", "format": "date-time", "example": "2013-01-01 15:30:27" }, "sent": { "type": "integer" }, "hard_bounces": { "type": "integer" }, "soft_bounces": { "type": "integer" }, "rejects": { "type": "integer" }, "complaints": { "type": "integer" }, "opens": { "type": "integer" }, "unique_opens": { "type": "integer" }, "clicks": { "type": "integer" }, "unique_clicks": { "type": "integer" } }, "type": "object" }, "SendersInfoRequest": { "description": "Request payload for retrieving detailed information about a single sender", "example": { "key": "ONzNrsmbtNXoIKyfPmjnig", "address": "sender.example@mandrillapp.com" }, "allOf": [ { "$ref": "#/components/schemas/ApiKey" }, { "required": [ "address" ], "properties": { "address": { "description": "The email address of the sender", "type": "string", "format": "email", "example": "sender.example@mandrillapp.com" } }, "type": "object", "additionalProperties": false } ] }, "SendersInfoResponse": { "description": "Detailed sender info including time-window stats.", "type": "object", "allOf": [ { "$ref": "#/components/schemas/Sender" }, { "properties": { "stats": { "properties": { "today": { "$ref": "#/components/schemas/StatsWindow" }, "last_7_days": { "$ref": "#/components/schemas/StatsWindow" }, "last_30_days": { "$ref": "#/components/schemas/StatsWindow" }, "last_60_days": { "$ref": "#/components/schemas/StatsWindow" }, "last_90_days": { "$ref": "#/components/schemas/StatsWindow" } }, "type": "object" } }, "type": "object" } ] }, "SendersListRequest": { "description": "Request payload for listing senders used by this account", "example": { "key": "ONzNrsmbtNXoIKyfPmjnig" }, "allOf": [ { "$ref": "#/components/schemas/ApiKey" } ] }, "SendersListResponse": { "description": "Array of sender information for each sending address used by the account", "type": "array", "items": { "$ref": "#/components/schemas/Sender" } }, "SendersSenderDomain": { "description": "A domain used for sending by the account, including verification status.", "properties": { "domain": { "type": "string", "format": "hostname", "example": "example.com" }, "created_at": { "description": "The date and time that the sending domain was first seen.", "type": "string", "format": "date-time" }, "last_tested_at": { "description": "The date and time that the sending domain was last tested.", "type": "string", "format": "date-time" }, "spf": { "$ref": "#/components/schemas/VerificationDetail", "description": "Details about the domain's SPF record." }, "dkim": { "$ref": "#/components/schemas/VerificationDetail", "description": "Details about the domain's DKIM record." }, "dkim2": { "$ref": "#/components/schemas/VerificationDetail", "description": "Details about the domain's second DKIM record." }, "dmarc": { "$ref": "#/components/schemas/DmarcDetail", "description": "Details about the domain's DMARC record." }, "verified_at": { "description": "The date and time that the sending domain was verified.", "type": "string", "format": "date-time" }, "valid_signing": { "description": "Whether this domain can be used to sign messages.", "type": "boolean" }, "verify_txt_key": { "description": "The key for the TXT record used to verify the domain.", "type": "string" } }, "type": "object" }, "SendersTimeSeriesRequest": { "description": "Request payload for retrieving hourly stats for a sender", "example": { "key": "ONzNrsmbtNXoIKyfPmjnig", "address": "sender.example@mandrillapp.com" }, "allOf": [ { "$ref": "#/components/schemas/ApiKey" }, { "required": [ "address" ], "properties": { "address": { "description": "The email address of the sender", "type": "string", "format": "email", "example": "sender.example@mandrillapp.com" } }, "type": "object", "additionalProperties": false } ] }, "SendersTimeSeriesResponse": { "description": "Array of hourly stats for a sender over the last 30 days", "type": "array", "items": { "$ref": "#/components/schemas/SendersHourStat" } }, "VerificationDetail": { "description": "Details about the verification status of a domain.", "properties": { "valid": { "description": "Whether this verification is valid.", "type": "boolean" }, "valid_after": { "description": "The date and time that this verification was last tested.", "type": "string", "format": "date-time" }, "error": { "description": "An error message indicating why the verification failed.", "type": "string" } }, "type": "object" }, "SendersVerifyDomainRequest": { "description": "Request payload for sending a verification email to verify ownership of a domain", "example": { "key": "ONzNrsmbtNXoIKyfPmjnig", "domain": "example.com", "mailbox": "postmaster" }, "allOf": [ { "$ref": "#/components/schemas/ApiKey" }, { "required": [ "domain", "mailbox" ], "properties": { "domain": { "description": "A domain name at which you can receive email", "type": "string", "format": "hostname", "example": "example.com" }, "mailbox": { "description": "A mailbox at the domain where the verification email should be sent", "type": "string", "format": "mailbox", "example": "postmaster" } }, "type": "object", "additionalProperties": false } ] }, "SendersVerifyDomainResponse": { "description": "Result of a sender domain verification email request.", "required": [ "status", "domain", "email" ], "properties": { "status": { "type": "string", "enum": [ "sent", "already_verified" ] }, "domain": { "type": "string", "format": "hostname" }, "email": { "type": "string", "format": "email" } }, "type": "object", "example": { "status": "sent", "domain": "example.com", "email": "postmaster@example.com" } }, "SubaccountsAddRequest": { "description": "Request payload for creating a new subaccount", "example": { "key": "ONzNrsmbtNXoIKyfPmjnig", "id": "cust-123", "name": "ABC Widgets, Inc.", "notes": "Free plan user, signed up on 2013-01-01 12:00:00", "custom_quota": null }, "allOf": [ { "$ref": "#/components/schemas/ApiKey" }, { "required": [ "id" ], "properties": { "id": { "description": "A unique identifier for the subaccount to be used in sending calls", "type": "string", "maxLength": 255, "example": "cust-123" }, "name": { "description": "An optional display name to further identify the subaccount", "type": [ "string", "null" ], "maxLength": 1024, "example": "ABC Widgets, Inc." }, "notes": { "description": "Optional extra text to associate with the subaccount", "type": [ "string", "null" ], "example": "Free plan user, signed up on 2013-01-01 12:00:00" }, "custom_quota": { "description": "An optional manual hourly quota for the subaccount. If not specified, Mandrill will manage this based on reputation", "type": [ "integer", "null" ], "minimum": 1, "example": null } }, "type": "object", "additionalProperties": false } ] }, "SubaccountsAddResponse": { "$ref": "#/components/schemas/SubaccountsSubaccount" }, "SubaccountsDeleteRequest": { "description": "Request payload for deleting a subaccount", "example": { "key": "ONzNrsmbtNXoIKyfPmjnig", "id": "cust-123" }, "allOf": [ { "$ref": "#/components/schemas/ApiKey" }, { "required": [ "id" ], "properties": { "id": { "description": "The unique identifier of the subaccount to delete", "type": "string", "example": "cust-123" } }, "type": "object", "additionalProperties": false } ] }, "SubaccountsDeleteResponse": { "$ref": "#/components/schemas/SubaccountsSubaccount" }, "SubaccountsInfoRequest": { "description": "Request payload for subaccount operations requiring only a subaccount ID", "example": { "key": "ONzNrsmbtNXoIKyfPmjnig", "id": "cust-123" }, "allOf": [ { "$ref": "#/components/schemas/ApiKey" }, { "required": [ "id" ], "properties": { "id": { "description": "The unique identifier of the subaccount to query", "type": "string", "example": "cust-123" } }, "type": "object", "additionalProperties": false } ] }, "SubaccountsInfoResponse": { "description": "Complete subaccount information including sending statistics and configuration (returned by info endpoint)", "allOf": [ { "$ref": "#/components/schemas/SubaccountsSubaccount" }, { "required": [ "sent_hourly", "hourly_quota", "last_30_days", "notes" ], "properties": { "sent_hourly": { "description": "Number of emails the subaccount has sent in the last hour", "type": "integer", "example": 0 }, "hourly_quota": { "description": "Current hourly quota for the subaccount, either manual or reputation-based", "type": "integer", "example": 250 }, "notes": { "description": "Optional extra text to associate with the subaccount", "type": "string", "example": "" }, "last_30_days": { "$ref": "#/components/schemas/StatsWindow", "description": "Sending statistics for this subaccount in the last 30 days" } }, "type": "object" } ] }, "SubaccountsListRequest": { "description": "Request payload for listing subaccounts, optionally filtered by a prefix", "example": { "key": "ONzNrsmbtNXoIKyfPmjnig", "q": "cust-1" }, "allOf": [ { "$ref": "#/components/schemas/ApiKey" }, { "properties": { "q": { "description": "An optional prefix to filter the subaccounts' ids and names", "type": "string", "example": "cust-1" } }, "type": "object", "additionalProperties": false } ] }, "SubaccountsListResponse": { "description": "List of subaccounts for the account, up to a maximum of 1,000", "type": "array", "items": { "$ref": "#/components/schemas/SubaccountsSubaccount" } }, "SubaccountsPauseRequest": { "description": "Request payload for pausing a subaccount", "example": { "key": "ONzNrsmbtNXoIKyfPmjnig", "id": "cust-123" }, "allOf": [ { "$ref": "#/components/schemas/ApiKey" }, { "required": [ "id" ], "properties": { "id": { "description": "The unique identifier of the subaccount to pause", "type": "string", "example": "cust-123" } }, "type": "object", "additionalProperties": false } ] }, "SubaccountsPauseResponse": { "$ref": "#/components/schemas/SubaccountsSubaccount" }, "SubaccountsResumeRequest": { "description": "Request payload for resuming a paused subaccount", "example": { "key": "ONzNrsmbtNXoIKyfPmjnig", "id": "cust-123" }, "allOf": [ { "$ref": "#/components/schemas/ApiKey" }, { "required": [ "id" ], "properties": { "id": { "description": "The unique identifier of the subaccount to resume", "type": "string", "example": "cust-123" } }, "type": "object", "additionalProperties": false } ] }, "SubaccountsResumeResponse": { "$ref": "#/components/schemas/SubaccountsSubaccount" }, "SubaccountsSubaccount": { "description": "Basic subaccount information returned by most operations (add, update, delete, pause, resume, list)", "required": [ "id", "status", "reputation", "created_at", "sent_weekly", "sent_monthly", "sent_total" ], "properties": { "id": { "description": "Unique identifier for the subaccount", "type": "string", "maxLength": 255, "example": "4532345" }, "name": { "description": "Optional display name for the subaccount", "type": "string", "maxLength": 255, "example": "My Subaccount" }, "created_at": { "description": "Date and time the subaccount was created in UTC YYYY-MM-DD HH:MM:SS format", "type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$", "example": "2025-08-29 18:48:02.82578" }, "first_sent_at": { "description": "Date and time that the subaccount first sent as a UTC string in YYYY-MM-DD HH:MM:SS format", "type": [ "string", "null" ], "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$", "example": null }, "status": { "description": "Current sending status of the subaccount", "type": "string", "enum": [ "active", "paused" ], "example": "active" }, "reputation": { "description": "Subaccount reputation on a scale from 0 to 100", "type": "integer", "maximum": 100, "example": 33 }, "sent_weekly": { "description": "Number of emails the subaccount has sent so far this week (weeks start on midnight Monday, UTC)", "type": "integer", "example": 0 }, "sent_monthly": { "description": "Number of emails the subaccount has sent so far this month (months start on midnight of the 1st, UTC)", "type": "integer", "example": 0 }, "sent_total": { "description": "Number of emails the subaccount has sent since it was created", "type": "integer", "example": 0 }, "custom_quota": { "description": "Optional manual hourly quota for the subaccount. Only present when explicitly set during creation/update", "type": "integer", "minimum": 1 } }, "type": "object" }, "SubaccountsUpdateRequest": { "description": "Request payload for updating an existing subaccount", "example": { "key": "ONzNrsmbtNXoIKyfPmjnig", "id": "cust-123", "name": "ABC Widgets, Inc.", "notes": "Free plan user, signed up on 2013-01-01 12:00:00", "custom_quota": null }, "allOf": [ { "$ref": "#/components/schemas/ApiKey" }, { "required": [ "id" ], "properties": { "id": { "description": "The unique identifier of the subaccount to update", "type": "string", "example": "cust-123" }, "name": { "description": "An optional display name to further identify the subaccount", "type": [ "string", "null" ], "maxLength": 1024, "example": "ABC Widgets, Inc." }, "notes": { "description": "Optional extra text to associate with the subaccount", "type": [ "string", "null" ], "example": "Free plan user, signed up on 2013-01-01 12:00:00" }, "custom_quota": { "description": "An optional manual hourly quota for the subaccount. If not specified, Mandrill will manage this based on reputation", "type": [ "integer", "null" ], "minimum": 1, "example": null } }, "type": "object", "additionalProperties": false } ] }, "SubaccountsUpdateResponse": { "$ref": "#/components/schemas/SubaccountsSubaccount" }, "TagsAllTimeSeriesRequest": { "description": "Request payload for retrieving time series data for all tags", "example": { "key": "ONzNrsmbtNXoIKyfPmjnig" }, "allOf": [ { "$ref": "#/components/schemas/ApiKey" } ] }, "TagsAllTimeSeriesResponse": { "description": "Array of hourly stats across all tags for the last 30 days", "type": "array", "items": { "$ref": "#/components/schemas/TagsTimeSeriesWithTag" } }, "TagsDeleteRequest": { "description": "Request payload for deleting a tag", "type": "object", "example": { "key": "ONzNrsmbtNXoIKyfPmjnig", "tag": "example-tag" }, "allOf": [ { "$ref": "#/components/schemas/ApiKey" }, { "required": [ "tag" ], "type": "object", "additionalProperties": false }, { "properties": { "tag": { "description": "An existing tag name", "type": "string", "example": "example-tag" } }, "type": "object" } ] }, "TagsDeleteResponse": { "description": "Response containing information about a deleted tag including its final statistics", "required": [ "tag", "sent", "hard_bounces", "soft_bounces", "rejects", "complaints", "unsubs", "opens", "clicks", "unique_opens", "unique_clicks", "reputation" ], "properties": { "tag": { "description": "The name of the tag that was deleted", "type": "string", "example": "example-tag" }, "sent": { "description": "Total number of emails sent with this tag before deletion", "type": "integer" }, "hard_bounces": { "description": "Total number of hard bounces for emails with this tag before deletion", "type": "integer" }, "soft_bounces": { "description": "Total number of soft bounces for emails with this tag before deletion", "type": "integer" }, "rejects": { "description": "Total number of rejected emails with this tag before deletion", "type": "integer" }, "complaints": { "description": "Total number of spam complaints for emails with this tag before deletion", "type": "integer" }, "unsubs": { "description": "Total number of unsubscribe requests for emails with this tag before deletion", "type": "integer" }, "opens": { "description": "Total number of times emails with this tag were opened before deletion", "type": "integer" }, "clicks": { "description": "Total number of tracked URLs clicked in emails with this tag before deletion", "type": "integer" }, "unique_opens": { "description": "Total number of unique opens for emails with this tag before deletion", "type": "integer" }, "unique_clicks": { "description": "Total number of unique clicks for emails with this tag before deletion", "type": "integer" }, "reputation": { "description": "Final reputation score of the tag before deletion", "type": "integer", "maximum": 100, "minimum": 0 } }, "type": "object", "additionalProperties": false }, "TagsInfoRequest": { "description": "Request payload for getting tag info", "type": "object", "example": { "key": "ONzNrsmbtNXoIKyfPmjnig", "tag": "example-tag" }, "allOf": [ { "$ref": "#/components/schemas/ApiKey" }, { "required": [ "tag" ], "type": "object", "additionalProperties": false }, { "properties": { "tag": { "description": "An existing tag name", "type": "string", "example": "example-tag" } }, "type": "object" } ] }, "TagsInfoResponse": { "description": "Detailed tag information including aggregate statistics across different time windows", "required": [ "tag", "sent", "hard_bounces", "soft_bounces", "rejects", "complaints", "unsubs", "opens", "clicks", "unique_opens", "unique_clicks", "reputation", "stats" ], "properties": { "tag": { "description": "Tag name", "type": "string", "example": "test" }, "sent": { "description": "Total number of emails sent with this tag", "type": "integer" }, "hard_bounces": { "description": "Total number of hard bounces for emails with this tag", "type": "integer" }, "soft_bounces": { "description": "Total number of soft bounces for emails with this tag", "type": "integer" }, "rejects": { "description": "Total number of rejected emails with this tag", "type": "integer" }, "complaints": { "description": "Total number of spam complaints for emails with this tag", "type": "integer" }, "unsubs": { "description": "Total number of unsubscribe requests for emails with this tag", "type": "integer" }, "opens": { "description": "Total number of times emails with this tag have been opened", "type": "integer" }, "clicks": { "description": "Total number of tracked URLs clicked in emails with this tag", "type": "integer" }, "unique_opens": { "description": "Total number of unique opens for emails with this tag", "type": "integer" }, "unique_clicks": { "description": "Total number of unique clicks for emails with this tag", "type": "integer" }, "reputation": { "description": "Tag reputation score on scale 0-100", "type": "integer", "maximum": 100, "minimum": 0 }, "stats": { "description": "Aggregate summary of the tag's sending stats across different time windows", "required": [ "today", "last_7_days", "last_30_days", "last_60_days", "last_90_days" ], "properties": { "today": { "$ref": "#/components/schemas/StatsWindow" }, "last_7_days": { "$ref": "#/components/schemas/StatsWindow" }, "last_30_days": { "$ref": "#/components/schemas/StatsWindow" }, "last_60_days": { "$ref": "#/components/schemas/StatsWindow" }, "last_90_days": { "$ref": "#/components/schemas/StatsWindow" } }, "type": "object" } }, "type": "object", "additionalProperties": false }, "TagsListRequest": { "description": "Request payload for listing all user-defined tags", "example": { "key": "ONzNrsmbtNXoIKyfPmjnig" }, "allOf": [ { "$ref": "#/components/schemas/ApiKey" } ] }, "TagsListResponse": { "description": "Array of tags used in the account", "type": "array", "items": { "$ref": "#/components/schemas/TagsTag" } }, "TagsTag": { "description": "Tag information including sending statistics and reputation metrics", "required": [ "user_id", "tag", "sent", "hard_bounces", "soft_bounces", "rejects", "complaints", "unsubs", "opens", "clicks", "content_reviews", "content_rejections", "reject_resets", "unique_opens", "unique_clicks", "reputation", "confidence" ], "properties": { "user_id": { "description": "User ID associated with this tag", "type": "integer" }, "tag": { "description": "Tag name", "type": "string", "example": "test" }, "sent": { "description": "Total number of emails sent with this tag", "type": "integer" }, "hard_bounces": { "description": "Total number of hard bounces for emails with this tag", "type": "integer" }, "soft_bounces": { "description": "Total number of soft bounces for emails with this tag", "type": "integer" }, "rejects": { "description": "Total number of rejected emails with this tag", "type": "integer" }, "complaints": { "description": "Total number of spam complaints for emails with this tag", "type": "integer" }, "unsubs": { "description": "Total number of unsubscribe requests for emails with this tag", "type": "integer" }, "opens": { "description": "Total number of times emails with this tag have been opened", "type": "integer" }, "clicks": { "description": "Total number of tracked URLs clicked in emails with this tag", "type": "integer" }, "content_reviews": { "description": "Number of content reviews for this tag", "type": "integer" }, "content_rejections": { "description": "Number of content rejections for this tag", "type": "integer" }, "reject_resets": { "description": "Number of reject resets for this tag", "type": "integer" }, "unique_opens": { "description": "Total number of unique opens for emails with this tag", "type": "integer" }, "unique_clicks": { "description": "Total number of unique clicks for emails with this tag", "type": "integer" }, "reputation": { "description": "Tag reputation score on scale 0-100", "type": "integer", "maximum": 100, "minimum": 0 }, "confidence": { "description": "Confidence score for this tag", "type": "integer", "maximum": 100, "minimum": 0 } }, "type": "object", "additionalProperties": false }, "TagsTagTimeSeries": { "description": "Hourly statistics for a tag in a specific time period", "required": [ "sent", "hard_bounces", "soft_bounces", "rejects", "complaints", "unsubs", "opens", "clicks", "unique_opens", "unique_clicks", "time" ], "properties": { "sent": { "description": "Number of emails sent during the hour", "type": "integer" }, "hard_bounces": { "description": "Number of emails that hard bounced during the hour", "type": "integer" }, "soft_bounces": { "description": "Number of emails that soft bounced during the hour", "type": "integer" }, "rejects": { "description": "Number of emails rejected during the hour", "type": "integer" }, "complaints": { "description": "Number of spam complaints received during the hour", "type": "integer" }, "unsubs": { "description": "Number of unsubscribe requests received during the hour", "type": "integer" }, "opens": { "description": "Number of emails opened during the hour", "type": "integer" }, "unique_opens": { "description": "Number of unique opens generated by messages sent during the hour", "type": "integer" }, "clicks": { "description": "Number of tracked URLs clicked during the hour", "type": "integer" }, "unique_clicks": { "description": "Number of unique clicks generated by messages sent during the hour", "type": "integer" }, "time": { "description": "The hour as a UTC date string in YYYY-MM-DD HH:MM:SS format", "type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$", "example": "2025-08-29 15:00:00" } }, "type": "object", "additionalProperties": false }, "TagsTimeSeriesRequest": { "description": "Request payload for getting tag time series data", "type": "object", "example": { "key": "ONzNrsmbtNXoIKyfPmjnig", "tag": "example-tag" }, "allOf": [ { "$ref": "#/components/schemas/ApiKey" }, { "required": [ "tag" ], "type": "object", "additionalProperties": false }, { "properties": { "tag": { "description": "An existing tag name", "type": "string", "example": "example-tag" } }, "type": "object" } ] }, "TagsTimeSeriesResponse": { "description": "Array of hourly stats for the last 30 days for a tag", "type": "array", "items": { "$ref": "#/components/schemas/TagsTagTimeSeries" } }, "TagsTimeSeriesWithTag": { "description": "Hourly statistics for a tag in a specific time period, including the tag name", "type": "object", "allOf": [ { "$ref": "#/components/schemas/TagsTagTimeSeries" }, { "required": [ "tag" ], "type": "object" }, { "properties": { "tag": { "description": "Tag name for this time series entry", "type": "string", "example": "test" } }, "type": "object" } ] }, "TemplatesAddRequest": { "description": "Request payload for adding a new template", "example": { "key": "ONzNrsmbtNXoIKyfPmjnig", "name": "Example Template", "from_email": "sender@example.com", "from_name": "Example Name", "subject": "Welcome to our service", "code": "
example code
", "text": "Example text content", "publish": true, "labels": [ "example-label" ] }, "allOf": [ { "$ref": "#/components/schemas/ApiKey" }, { "required": [ "name" ], "properties": { "name": { "description": "Name for the new template - must be unique", "type": "string", "example": "Example Template" }, "from_email": { "description": "Default sending address for emails sent using this template", "type": [ "string", "null" ], "format": "email", "example": "sender@example.com" }, "from_name": { "description": "Default from name to be used", "type": [ "string", "null" ], "example": "Example Name" }, "subject": { "description": "Default subject line to be used", "type": [ "string", "null" ], "example": "Welcome to our service" }, "code": { "description": "HTML code for the template with mc:edit attributes for editable elements", "type": [ "string", "null" ], "example": "
example code
" }, "text": { "description": "Default text part to be used when sending with this template", "type": [ "string", "null" ], "example": "Example text content" }, "publish": { "description": "Set to false to add a draft template without publishing", "type": "boolean", "default": true, "example": false }, "labels": { "description": "Optional array of up to 10 labels to use for filtering templates", "type": "array", "items": { "type": "string", "maxLength": 100 }, "maxItems": 10, "example": [ "example-label" ] } }, "type": "object", "additionalProperties": false } ] }, "TemplatesAddResponse": { "$ref": "#/components/schemas/TemplatesTemplate" }, "TemplatesDeleteRequest": { "description": "Request payload for deleting a template", "example": { "key": "ONzNrsmbtNXoIKyfPmjnig", "name": "example-template" }, "allOf": [ { "$ref": "#/components/schemas/ApiKey" }, { "required": [ "name" ], "properties": { "name": { "description": "Immutable slug of an existing template", "type": "string", "example": "example-template" } }, "type": "object", "additionalProperties": false } ] }, "TemplatesDeleteResponse": { "$ref": "#/components/schemas/TemplatesTemplate" }, "TemplatesInfoRequest": { "description": "Request payload for getting template information", "example": { "key": "ONzNrsmbtNXoIKyfPmjnig", "name": "Example Template" }, "allOf": [ { "$ref": "#/components/schemas/ApiKey" }, { "required": [ "name" ], "properties": { "name": { "description": "Immutable name of an existing template", "type": "string", "example": "Example Template" } }, "type": "object", "additionalProperties": false } ] }, "TemplatesInfoResponse": { "$ref": "#/components/schemas/TemplatesTemplate" }, "TemplatesListRequest": { "description": "Request payload for listing templates", "example": { "key": "ONzNrsmbtNXoIKyfPmjnig", "label": "example-label" }, "allOf": [ { "$ref": "#/components/schemas/ApiKey" }, { "properties": { "label": { "description": "Optional label to filter the templates", "type": [ "string", "null" ], "example": "example-label" } }, "type": "object", "additionalProperties": false } ] }, "TemplatesListResponse": { "description": "Array of templates available to the account", "type": "array", "items": { "$ref": "#/components/schemas/TemplatesTemplate" } }, "TemplatesPublishRequest": { "description": "Request payload for publishing a template", "example": { "key": "ONzNrsmbtNXoIKyfPmjnig", "name": "Example Template" }, "allOf": [ { "$ref": "#/components/schemas/ApiKey" }, { "required": [ "name" ], "properties": { "name": { "description": "Immutable name of an existing template", "type": "string", "example": "Example Template" } }, "type": "object", "additionalProperties": false } ] }, "TemplatesPublishResponse": { "$ref": "#/components/schemas/TemplatesTemplate" }, "TemplatesRenderRequest": { "description": "Request payload for rendering a template with content and merge variables", "example": { "key": "ONzNrsmbtNXoIKyfPmjnig", "template_name": "example-template", "template_content": [ { "name": "editable", "content": "content" } ], "merge_vars": [ { "name": "merge1", "content": "merge1 content" } ] }, "allOf": [ { "$ref": "#/components/schemas/ApiKey" }, { "required": [ "template_name", "template_content" ], "properties": { "template_name": { "description": "Immutable name or slug of a template that exists in the user's account", "type": "string", "example": "example-template" }, "template_content": { "description": "Array of template content to render", "type": "array", "items": { "$ref": "#/components/schemas/TemplateContent" } }, "merge_vars": { "description": "Optional merge variables to use for injecting merge field content", "type": [ "array", "null" ], "items": { "$ref": "#/components/schemas/MergeVar" } } }, "type": "object", "additionalProperties": false } ] }, "TemplatesRenderResponse": { "description": "Result of rendering a template with content and merge variables", "required": [ "html" ], "properties": { "html": { "description": "Rendered HTML as a string with content and merge variables injected", "type": "string", "example": "
Rendered template content with merge variables
" } }, "type": "object" }, "TemplatesTemplate": { "description": "Template information including content, metadata, and settings", "required": [ "slug", "name", "labels", "code", "subject", "from_email", "from_name", "text", "publish_name", "publish_code", "publish_subject", "publish_from_email", "publish_from_name", "publish_text", "published_at", "created_at", "updated_at", "draft_updated_at", "is_broken_template" ], "properties": { "slug": { "description": "Immutable unique identifier for the template", "type": "string", "example": "test-template" }, "name": { "description": "Human-readable name of the template", "type": "string", "example": "test-template" }, "labels": { "description": "Array of labels for filtering templates", "type": "array", "items": { "type": "string", "maxLength": 100 }, "maxItems": 10, "example": [] }, "code": { "description": "Draft HTML code for the template with mc:edit attributes", "type": [ "string", "null" ], "example": "

test

" }, "subject": { "description": "Draft default subject line", "type": [ "string", "null" ], "example": "test" }, "from_email": { "description": "Draft default sending address", "type": [ "string", "null" ], "format": "email", "example": "test@mailchimp.com" }, "from_name": { "description": "Draft default from name", "type": [ "string", "null" ], "example": "Freddie" }, "text": { "description": "Draft default text part", "type": [ "string", "null" ], "example": "test" }, "publish_name": { "description": "Published name of the template", "type": "string", "example": "test-template" }, "publish_code": { "description": "Published HTML code for the template", "type": [ "string", "null" ], "example": "

test

" }, "publish_subject": { "description": "Published default subject line", "type": [ "string", "null" ], "example": "test" }, "publish_from_email": { "description": "Published default sending address", "type": [ "string", "null" ], "format": "email", "example": "test@mailchimp.com" }, "publish_from_name": { "description": "Published default from name", "type": [ "string", "null" ], "example": "Freddie" }, "publish_text": { "description": "Published default text part", "type": [ "string", "null" ], "example": "test" }, "published_at": { "description": "Date and time when template was last published in UTC YYYY-MM-DD HH:MM:SS format", "type": [ "string", "null" ], "format": "date-time", "example": "2025-08-29 18:47:40" }, "created_at": { "description": "Date and time when template was created in UTC YYYY-MM-DD HH:MM:SS format", "type": "string", "format": "date-time", "example": "2025-08-29 18:47:40.26276" }, "updated_at": { "description": "Date and time when template was last updated in UTC YYYY-MM-DD HH:MM:SS format", "type": "string", "format": "date-time", "example": "2025-08-29 18:47:40.26277" }, "draft_updated_at": { "description": "Date and time when template draft was last updated in UTC YYYY-MM-DD HH:MM:SS format", "type": "string", "format": "date-time", "example": "2025-08-29 18:47:40" }, "is_broken_template": { "description": "Whether the template has broken syntax or references", "type": "boolean", "example": false } }, "type": "object" }, "TemplateContent": { "description": "Content injection for template editable regions. Fields are optional to allow empty objects.", "properties": { "name": { "description": "Name of the mc:edit editable region to inject into", "type": [ "string", "null" ], "example": "editable" }, "content": { "description": "Content to inject into the editable region", "type": [ "string", "null" ], "example": "content" } }, "type": "object" }, "TemplatesTemplateHistory": { "description": "Hourly statistics for template usage", "required": [ "time", "sent", "hard_bounces", "soft_bounces", "rejects", "complaints", "opens", "unique_opens", "clicks", "unique_clicks" ], "properties": { "time": { "description": "Hour as a UTC date string in YYYY-MM-DD HH:MM:SS format", "type": "string", "format": "date-time", "example": "2013-01-01 15:00:00" }, "sent": { "description": "Number of emails sent during the hour", "type": "integer", "minimum": 0, "example": 42 }, "hard_bounces": { "description": "Number of emails that hard bounced during the hour", "type": "integer", "minimum": 0, "example": 1 }, "soft_bounces": { "description": "Number of emails that soft bounced during the hour", "type": "integer", "minimum": 0, "example": 2 }, "rejects": { "description": "Number of emails that were rejected during the hour", "type": "integer", "minimum": 0, "example": 0 }, "complaints": { "description": "Number of spam complaints received during the hour", "type": "integer", "minimum": 0, "example": 0 }, "opens": { "description": "Number of emails opened during the hour", "type": "integer", "minimum": 0, "example": 15 }, "unique_opens": { "description": "Number of unique opens generated by messages sent during the hour", "type": "integer", "minimum": 0, "example": 12 }, "clicks": { "description": "Number of tracked URLs clicked during the hour", "type": "integer", "minimum": 0, "example": 8 }, "unique_clicks": { "description": "Number of unique clicks generated by messages sent during the hour", "type": "integer", "minimum": 0, "example": 5 } }, "type": "object" }, "TemplatesTimeSeriesRequest": { "description": "Request payload for getting template time series data", "example": { "key": "ONzNrsmbtNXoIKyfPmjnig", "name": "Example Template" }, "allOf": [ { "$ref": "#/components/schemas/ApiKey" }, { "required": [ "name" ], "properties": { "name": { "description": "Name of an existing template", "type": "string", "example": "Example Template" } }, "type": "object", "additionalProperties": false } ] }, "TemplatesTimeSeriesResponse": { "description": "Array of hourly stats for the last 30 days for a template", "type": "array", "items": { "$ref": "#/components/schemas/TemplatesTemplateHistory" } }, "TemplatesUpdateRequest": { "description": "Request payload for updating an existing template", "example": { "key": "ONzNrsmbtNXoIKyfPmjnig", "name": "Example Template", "from_email": "sender@example.com", "from_name": "Example Name", "subject": "Welcome to our service", "code": "
new example code
", "text": "Example text content", "publish": true, "labels": [ "example-label" ] }, "allOf": [ { "$ref": "#/components/schemas/ApiKey" }, { "required": [ "name" ], "properties": { "name": { "description": "Immutable name of an existing template", "type": "string", "example": "Example Template" }, "from_email": { "description": "New default sending address", "type": [ "string", "null" ], "format": "email", "example": "sender@example.com" }, "from_name": { "description": "New default from name", "type": [ "string", "null" ], "example": "Example Name" }, "subject": { "description": "New default subject line", "type": [ "string", "null" ], "example": "Welcome to our service" }, "code": { "description": "New code for the template", "type": [ "string", "null" ], "example": "
new example code
" }, "text": { "description": "New default text part to be used", "type": [ "string", "null" ], "example": "Example text content" }, "publish": { "description": "Set to false to update the draft version without publishing", "type": "boolean", "default": true, "example": false }, "labels": { "description": "Optional array of up to 10 labels to use for filtering templates", "type": [ "array", "null" ], "items": { "type": "string", "maxLength": 100 }, "maxItems": 10, "example": [ "example-label" ] } }, "type": "object", "additionalProperties": false } ] }, "TemplatesUpdateResponse": { "$ref": "#/components/schemas/TemplatesTemplate" }, "UrlsAddTrackingDomainRequest": { "description": "Request payload for adding a tracking domain to your account", "example": { "key": "ONzNrsmbtNXoIKyfPmjnig", "domain": "track.example.com" }, "allOf": [ { "$ref": "#/components/schemas/ApiKey" }, { "required": [ "domain" ], "properties": { "domain": { "description": "A domain name to add for tracking", "type": "string", "format": "hostname", "example": "track.example.com" } }, "type": "object", "additionalProperties": false } ] }, "UrlsAddTrackingDomainResponse": { "$ref": "#/components/schemas/TrackingDomain" }, "UrlsCheckTrackingDomainRequest": { "description": "Request payload for checking the CNAME settings for a tracking domain", "example": { "key": "ONzNrsmbtNXoIKyfPmjnig", "domain": "track.example.com" }, "allOf": [ { "$ref": "#/components/schemas/ApiKey" }, { "required": [ "domain" ], "properties": { "domain": { "description": "An existing tracking domain name", "type": "string", "format": "hostname", "example": "track.example.com" } }, "type": "object", "additionalProperties": false } ] }, "UrlsCheckTrackingDomainResponse": { "$ref": "#/components/schemas/TrackingDomain" }, "UrlsDeleteTrackingDomainRequest": { "description": "Request payload for deleting a tracking domain from your account", "example": { "key": "ONzNrsmbtNXoIKyfPmjnig", "domain": "track.example.com" }, "allOf": [ { "$ref": "#/components/schemas/ApiKey" }, { "required": [ "domain" ], "properties": { "domain": { "description": "An existing tracking domain name", "type": "string", "format": "hostname", "example": "track.example.com" } }, "type": "object", "additionalProperties": false } ] }, "UrlsDeleteTrackingDomainResponse": { "$ref": "#/components/schemas/TrackingDomain" }, "TrackingDomain": { "description": "Tracking domain configuration and verification status", "required": [ "domain", "created_at", "last_tested_at", "cname", "valid_tracking" ], "properties": { "domain": { "description": "The tracking domain name", "type": "string", "format": "hostname", "example": "track.example.com" }, "created_at": { "description": "When the domain was added to the account", "type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}\\.\\d+$", "example": "2025-08-15 17:01:12.34214" }, "last_tested_at": { "description": "When the domain was last tested for CNAME configuration", "type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}\\.\\d+$", "example": "2025-08-15 17:01:12.39638" }, "cname": { "description": "CNAME record verification status and details", "required": [ "valid", "valid_after", "error" ], "properties": { "valid": { "description": "Whether the CNAME record is properly configured", "type": "boolean", "example": false }, "valid_after": { "description": "When the CNAME will be valid (if applicable)", "type": [ "string", "null" ], "example": null }, "error": { "description": "An error describing the CNAME record, or null if the record is correct", "type": [ "string", "null" ] } }, "type": "object" }, "valid_tracking": { "description": "Whether this domain is ready to be used for tracking", "type": "boolean", "example": false } }, "type": "object" }, "UrlsTrackingDomainsRequest": { "description": "Request payload for listing tracking domains", "example": { "key": "ONzNrsmbtNXoIKyfPmjnig" }, "allOf": [ { "$ref": "#/components/schemas/ApiKey" } ] }, "UrlsTrackingDomainsResponse": { "description": "Array of tracking domains and their status", "type": "array", "items": { "$ref": "#/components/schemas/TrackingDomain" } }, "UsersInfoRequest": { "description": "Request payload for retrieving user account information", "example": { "key": "ONzNrsmbtNXoIKyfPmjnig" }, "allOf": [ { "$ref": "#/components/schemas/ApiKey" } ] }, "UsersInfoResponse": { "description": "Authenticated user account information including sending stats", "required": [ "username", "created_at", "public_id", "reputation", "hourly_quota", "backlog", "stats" ], "properties": { "username": { "description": "Username for SMTP authentication", "type": "string" }, "created_at": { "description": "Account creation date in UTC YYYY-MM-DD HH:MM:SS format", "type": "string", "example": "2013-01-01 15:30:27" }, "public_id": { "description": "Unique permanent identifier for this user", "type": "string" }, "reputation": { "description": "User reputation on scale 0-100, 75+ is generally good", "type": "integer", "maximum": 100, "minimum": 0 }, "hourly_quota": { "description": "Maximum emails delivered per hour. Any emails beyond that will be accepted and queued for later delivery. Users with higher reputations will have higher hourly quotas", "type": "integer" }, "backlog": { "description": "Number of emails queued due to quota limits", "type": "integer" }, "stats": { "description": "Aggregate sending statistics across different time windows", "required": [ "today", "last_7_days", "last_30_days", "last_60_days", "last_90_days", "all_time" ], "properties": { "today": { "$ref": "#/components/schemas/StatsWindow" }, "last_7_days": { "$ref": "#/components/schemas/StatsWindow" }, "last_30_days": { "$ref": "#/components/schemas/StatsWindow" }, "last_60_days": { "$ref": "#/components/schemas/StatsWindow" }, "last_90_days": { "$ref": "#/components/schemas/StatsWindow" }, "all_time": { "$ref": "#/components/schemas/StatsWindow" } }, "type": "object" } }, "type": "object" }, "UsersPing2Request": { "description": "Request payload for validating an API key with a ping (strict JSON parser version)", "example": { "key": "ONzNrsmbtNXoIKyfPmjnig" }, "allOf": [ { "$ref": "#/components/schemas/ApiKey" } ] }, "UsersPing2Response": { "description": "Static JSON payload with PING: PONG!", "const": { "PING": "PONG!" } }, "UsersPingRequest": { "description": "Request payload for validating an API key with a ping", "example": { "key": "ONzNrsmbtNXoIKyfPmjnig" }, "allOf": [ { "$ref": "#/components/schemas/ApiKey" } ] }, "UsersPingResponse": { "description": "The string 'PONG!'", "type": "string", "const": "PONG!" }, "UsersSendersRequest": { "description": "Request payload for retrieving senders associated with this account", "example": { "key": "ONzNrsmbtNXoIKyfPmjnig" }, "allOf": [ { "$ref": "#/components/schemas/ApiKey" } ] }, "UsersSendersResponse": { "description": "Array of sender information for each sending address used by the account", "type": "array", "items": { "$ref": "#/components/schemas/Sender" } }, "WebhooksAddRequest": { "description": "Request payload for creating a new webhook.", "type": "object", "example": { "key": "ONzNrsmbtNXoIKyfPmjnig", "url": "https://example.com/webhook", "description": "My webhook for tracking email events", "events": [ "send", "delivered", "hard_bounce", "soft_bounce", "open", "click", "spam", "unsub", "reject" ] }, "allOf": [ { "$ref": "#/components/schemas/ApiKey" }, { "required": [ "url" ], "type": "object" }, { "properties": { "url": { "description": "The URL to POST batches of events", "type": "string", "format": "active-uri" }, "description": { "description": "An optional description of the webhook", "type": [ "string", "null" ] }, "events": { "description": "Optional list of event types that will trigger the webhook", "type": "array", "items": { "type": "string" }, "example": [ "send", "delivered", "hard_bounce", "soft_bounce", "open", "click", "spam", "unsub", "reject" ] } }, "type": "object" } ] }, "WebhooksAddResponse": { "$ref": "#/components/schemas/Webhook" }, "WebhooksDeleteRequest": { "description": "Request payload for deleting a webhook.", "type": "object", "example": { "key": "ONzNrsmbtNXoIKyfPmjnig", "id": 12345 }, "allOf": [ { "$ref": "#/components/schemas/ApiKey" }, { "required": [ "id" ], "type": "object" }, { "properties": { "id": { "description": "The unique identifier of a webhook belonging to this account", "type": "integer" } }, "type": "object" } ] }, "WebhooksDeleteResponse": { "$ref": "#/components/schemas/Webhook" }, "WebhooksInfoRequest": { "description": "Request payload for getting webhook info.", "type": "object", "example": { "key": "ONzNrsmbtNXoIKyfPmjnig", "id": 12345 }, "allOf": [ { "$ref": "#/components/schemas/ApiKey" }, { "required": [ "id" ], "type": "object" }, { "properties": { "id": { "description": "The unique identifier of a webhook belonging to this account", "type": "integer" } }, "type": "object" } ] }, "WebhooksInfoResponse": { "$ref": "#/components/schemas/Webhook" }, "WebhooksListRequest": { "description": "Request payload for listing all webhooks", "example": { "key": "ONzNrsmbtNXoIKyfPmjnig" }, "allOf": [ { "$ref": "#/components/schemas/ApiKey" } ] }, "WebhooksListResponse": { "description": "Array of webhooks configured for the account", "type": "array", "items": { "$ref": "#/components/schemas/Webhook" } }, "WebhooksUpdateRequest": { "description": "Request payload for updating an existing webhook.", "type": "object", "example": { "key": "ONzNrsmbtNXoIKyfPmjnig", "id": 12345, "url": "https://example.com/webhook", "description": "Updated webhook description", "events": [ "send", "delivered", "hard_bounce", "soft_bounce", "open", "click", "spam", "unsub", "reject" ] }, "allOf": [ { "$ref": "#/components/schemas/ApiKey" }, { "required": [ "id", "url" ], "type": "object" }, { "properties": { "id": { "description": "The unique identifier of a webhook belonging to this account", "type": "integer" }, "url": { "description": "The URL to POST batches of events", "type": "string", "format": "active-uri" }, "description": { "description": "An optional description of the webhook", "type": [ "string", "null" ] }, "events": { "description": "Optional list of event types that will trigger the webhook", "type": "array", "items": { "type": "string" }, "example": [ "send", "delivered", "hard_bounce", "soft_bounce", "open", "click", "spam", "unsub", "reject" ] } }, "type": "object" } ] }, "WebhooksUpdateResponse": { "$ref": "#/components/schemas/Webhook" }, "Webhook": { "description": "Webhook configuration for receiving event notifications.", "required": [ "id", "url", "created_at", "batches_sent", "events_sent", "events" ], "properties": { "id": { "description": "Unique identifier for the webhook", "type": "integer" }, "url": { "description": "The URL where webhook events will be posted", "type": "string", "format": "uri" }, "auth_key": { "description": "The key used for webhook authentication", "type": [ "string", "null" ], "example": "gplJ8yWptFTqCoq5S1SHPA" }, "description": { "description": "Optional description of the webhook", "type": [ "string", "null" ] }, "events": { "description": "Array of event types that will trigger the webhook", "type": "array", "items": { "type": "string" }, "example": [ "send", "delivered", "deferral", "hard_bounce", "soft_bounce", "open", "click", "spam", "unsub", "reject", "blacklist", "whitelist" ] }, "created_at": { "description": "When the webhook was created (UTC YYYY-MM-DD HH:MM:SS.microseconds)", "type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}\\.\\d+$" }, "last_sent_at": { "description": "When the last event was sent to this webhook (UTC YYYY-MM-DD HH:MM:SS)", "type": [ "string", "null" ], "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$" }, "batches_sent": { "description": "Number of batches sent to this webhook", "type": "integer" }, "events_sent": { "description": "Total number of events sent to this webhook", "type": "integer" }, "last_error": { "description": "Last error message received when attempting to call the webhook", "type": [ "string", "null" ] } }, "type": "object", "example": { "id": 12345, "url": "https://example.com/webhook", "description": "Webhook for tracking email events", "auth_key": "gplJ8yWptFTqCoq5S1SHPA", "events": [ "send", "delivered", "deferral", "hard_bounce", "soft_bounce", "open", "click", "spam", "unsub", "reject", "blacklist", "whitelist" ], "created_at": "2013-01-01 15:30:27.123456", "last_sent_at": "2013-01-01 15:30:49", "batches_sent": 42, "events_sent": 1365, "last_error": null } } }, "responses": { "ExportNotFound": { "description": "Unknown export job", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExportNotFoundError" } } } }, "IPInvalidCustomDns": { "description": "Invalid custom DNS configuration", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/IPInvalidCustomDnsError" } } } }, "IPInvalidDeletePool": { "description": "Cannot delete default pool or non-empty pool", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/IPInvalidDeletePoolError" } } } }, "IPInvalidEmptyDefaultPool": { "description": "Cannot leave default pool empty", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/IPInvalidEmptyDefaultPoolError" } } } }, "IPNotFound": { "description": "Unknown dedicated IP", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/IPNotFoundError" } } } }, "IPOrPoolNotFound": { "description": "Unknown IP or pool", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/IPOrPoolNotFoundError" } } } }, "IPPoolNotFound": { "description": "Unknown IP pool", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/IPPoolNotFoundError" } } } }, "InboundDomainNotFound": { "description": "Unknown inbound domain", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InboundDomainNotFoundError" } } } }, "InboundRouteNotFound": { "description": "Unknown inbound route", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InboundRouteNotFoundError" } } } }, "Unauthorized": { "description": "Invalid or missing API key.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidKeyError" } } } }, "MctemplateInvalidVersion": { "description": "Invalid mc_template_version parameter", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MctemplateInvalidVersionError" } } } }, "MctemplateNotFound": { "description": "Mailchimp template not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MctemplateNotFoundError" } } } }, "MessageNotFound": { "description": "Message not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MessageNotFoundError" } } } }, "MessageServiceUnavailable": { "description": "Service unavailable", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MessageServiceUnavailableError" } } } }, "MessageSmsSubaccountNotFound": { "description": "Unknown subaccount for SMS message", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MessageSmsSubaccountNotFoundError" } } } }, "MessageSubaccountNotFound": { "description": "Unknown subaccount", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MessageSubaccountNotFoundError" } } } }, "MessageTemplateOrSubaccountNotFound": { "description": "Template or subaccount not found", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/Error", "description": "Unknown_Template: Template not found" }, { "$ref": "#/components/schemas/Error", "description": "Unknown_Subaccount: Subaccount not found" } ] } } } }, "MetadataNotFound": { "description": "Unknown metadata field", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MetadataNotFoundError" } } } }, "PaymentRequired": { "description": "A paid plan is required to use this feature.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PaymentRequiredError" } } } }, "RejectEmailNotFound": { "description": "Email not found in rejection list or unknown subaccount", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RejectEmailNotFoundError" } } } }, "RejectPhoneNotFound": { "description": "Phone number not found in rejection list or unknown subaccount", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RejectPhoneNotFoundError" } } } }, "RejectSubaccountNotFound": { "description": "Unknown subaccount", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RejectSubaccountNotFoundError" } } } }, "RateLimited": { "description": "Request rate limit exceeded. Retry after a brief delay.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RequestLimitExceededError" } } } }, "SenderCannotDeleteVerified": { "description": "Cannot delete verified sender domain — please login to confirm deletion", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SenderCannotDeleteVerifiedError" } } } }, "SenderDomainNotFound": { "description": "Unknown sender domain", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SenderDomainNotFoundError" } } } }, "SenderNotFound": { "description": "Unknown sender", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SenderNotFoundError" } } } }, "ServerError": { "description": "An unexpected internal server error occurred.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ServerError" } } } }, "SubaccountNotFound": { "description": "Unknown subaccount", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SubaccountNotFoundError" } } } }, "TagInvalidName": { "description": "Invalid tag name", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TagInvalidNameError" } } } }, "TemplateInvalidData": { "description": "Invalid template data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TemplateInvalidDataError" } } } }, "TemplateNotFound": { "description": "Template not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TemplateNotFoundError" } } } }, "UrlCannotDeleteVerified": { "description": "Cannot delete verified tracking domain — please login to confirm deletion", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UrlCannotDeleteVerifiedError" } } } }, "UrlInvalidDomain": { "description": "Invalid tracking domain", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UrlInvalidDomainError" } } } }, "UrlNotFound": { "description": "Unknown tracking domain", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UrlNotFoundError" } } } }, "ValidationError": { "description": "One or more request parameters failed validation.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "WebhookNotFound": { "description": "Unknown webhook", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebhookNotFoundError" } } } } } }, "tags": [ { "name": "Allowlist", "description": "Operations for managing email allowlist for rejection management" }, { "name": "Exports", "description": "Operations for exporting account data including rejection lists, allowlists, and activity history" }, { "name": "Inbound", "description": "Operations for managing inbound email domains and routing" }, { "name": "IPs", "description": "Operations for managing dedicated IPs, IP pools, warmup processes, and custom DNS configuration" }, { "name": "MC Templates", "description": "Operations for managing and rendering Mailchimp Transactional templates" }, { "name": "Messages", "description": "Operations related to sending and managing messages" }, { "name": "Metadata", "description": "Operations for managing custom metadata fields" }, { "name": "Rejects", "description": "Operations for managing email rejection blacklist" }, { "name": "Senders", "description": "Sender analytics and domain verification operations" }, { "name": "Subaccounts", "description": "Operations for managing subaccounts including creation, configuration, and status control" }, { "name": "Tags", "description": "Operations related to managing and analyzing user-defined tags" }, { "name": "Templates", "description": "Operations for managing email templates including creation, updating, publishing, and rendering" }, { "name": "URLs", "description": "URL tracking domain management operations" }, { "name": "Users", "description": "Operations related to user account and credentials" }, { "name": "Webhooks", "description": "Operations for managing webhook endpoints and event subscriptions" } ] }