openapi: 3.1.0 info: title: Transactional email description: 'Send transactional emails to one or multiple recipients, using either custom HTML/plain-text content or a triggered campaign template. Use this API to send individual or batch transactional emails, personalise content with campaign templates and personalisation values, attach files, and retrieve delivery and engagement statistics aggregated by day, week, month, or all time.' version: 2.1.1 x-readme: headers: [] explorer-enabled: true proxy-enabled: true x-readme-fauxas: true x-samples-languages: - curl - csharp - java - javascript - node - python - php - ruby externalDocs: description: Learn more about Dotdigital APIs url: https://developer.dotdigital.com servers: - url: https://{region}-api.dotdigital.com variables: region: default: r1 enum: - r1 - r2 - r3 description: The Dotdigital region id your account belongs to security: - basicAuth: [] paths: /v2/email: parameters: - in: header name: x-ddg-integration-token required: false description: If you are a partner of Dotdigital and have a [verified integration](https://developer.dotdigital.com/docs/partner-integration-verification) then include your [integration tracking token](https://developer.dotdigital.co/docs/verified-integration-tracking) here. schema: type: string pattern: /^(?:\{{0,1}(?:[0-9a-fA-F]){8}-(?:[0-9a-fA-F]){4}-(?:[0-9a-fA-F]){4}-(?:[0-9a-fA-F]){4}-(?:[0-9a-fA-F]){12}\}{0,1})$/ example: 5a96bc79-19a7-4544-973b-e2da0c9136f9 post: summary: Send transactional email deprecated: false description: Send a transactional email to one recipient operationId: send-transactional-email tags: - Transactional email parameters: [] requestBody: content: application/json: schema: type: object required: - toAddresses - subject properties: toAddresses: type: array description: The email address(es) to send to maxItems: 100 items: type: string format: email ccAddresses: type: array description: The CC email address or address to to send to maxItems: 100 items: type: string format: email bccAddresses: type: array description: The BCC email address or address to to send to maxItems: 100 items: type: string format: email subject: type: string description: The subject line for your email fromAddress: type: string description: 'The From address for your email. Note: The From address must already be added to your account. Otherwise, your account''''s default From address is used' htmlContent: type: string description: The HTML content for your email plainTextContent: type: string description: The plain text content for your email metadata: type: object additionalProperties: true description: The metadata for your email. JSON object a max of 1500 characters attachments: type: array description: 'A Base64 encoded string. All attachment types are supported. Maximum file size: 15 MB' items: properties: fileName: type: string description: The file name for the attachment mimeType: type: string description: The MIME type of the file content: type: string description: Base64 data for the file, max 15MB required: - fileName - mimeType - content type: object responses: '200': description: Request to send transactional email accepted /v2/email/batch: parameters: - in: header name: x-ddg-integration-token required: false description: If you are a partner of Dotdigital and have a [verified integration](https://developer.dotdigital.com/docs/partner-integration-verification) then include your [integration tracking token](https://developer.dotdigital.co/docs/verified-integration-tracking) here. schema: type: string pattern: /^(?:\{{0,1}(?:[0-9a-fA-F]){8}-(?:[0-9a-fA-F]){4}-(?:[0-9a-fA-F]){4}-(?:[0-9a-fA-F]){4}-(?:[0-9a-fA-F]){12}\}{0,1})$/ example: 5a96bc79-19a7-4544-973b-e2da0c9136f9 post: summary: Send batch transactional email deprecated: false description: Send a transactional email to multiple recipients operationId: send-batch-transactional-email tags: - Transactional email parameters: [] requestBody: content: application/json: schema: type: array description: An array of transactional emails to send items: type: object required: - toAddresses - subject properties: toAddresses: type: array description: The email address(es) to send to maxItems: 100 items: type: string format: email ccAddresses: type: array description: The CC email address or address to to send to maxItems: 100 items: type: string format: email bccAddresses: type: array description: The BCC email address or address to to send to maxItems: 100 items: type: string format: email subject: type: string description: The subject line for your email fromAddress: type: string description: 'The From address for your email. Note: The From address must already be added to your account. Otherwise, your account''''s default From address is used' htmlContent: type: string description: The HTML content for your email plainTextContent: type: string description: The plain text content for your email metadata: type: object additionalProperties: true description: The metadata for your email. JSON object a max of 1500 characters attachments: type: array description: 'A Base64 encoded string. All attachment types are supported. Maximum file size: 15 MB' items: properties: fileName: type: string description: The file name for the attachment mimeType: type: string description: The MIME type of the file content: type: string description: Base64 data for the file, max 15MB required: - fileName - mimeType - content type: object examples: Request Example: value: - toAddresses: - test1@randomdomain.com subject: Enter Subject line here fromAddress: tests@mycompany.com htmlContent: '' plainTextContent: This is an email with no associated metadata. - toAddresses: - test2@randomdomain.com - test3@anotherdomain.com subject: Your test email is here fromAddress: tests@mycompany.com htmlContent: '' plainTextContent: This is an email with no associated metadata. summary: Request Example responses: '200': description: Request to send email accepted content: application/json: schema: type: array items: type: object required: - index properties: index: type: integer default: 0 examples: - 0 failureCode: type: string description: The failure code failureReason: type: string description: The failure reason examples: Result: summary: Result value: - index: 0 - failureCode: ERROR_PARAMETER_INVALID failureReason: ToAddresses field is empty or invalid. ERROR_PARAMETER_INVALID index: 1 - index: 2 /v2/email/triggered-campaign: parameters: - in: header name: x-ddg-integration-token required: false description: If you are a partner of Dotdigital and have a [verified integration](https://developer.dotdigital.com/docs/partner-integration-verification) then include your [integration tracking token](https://developer.dotdigital.co/docs/verified-integration-tracking) here. schema: type: string pattern: /^(?:\{{0,1}(?:[0-9a-fA-F]){8}-(?:[0-9a-fA-F]){4}-(?:[0-9a-fA-F]){4}-(?:[0-9a-fA-F]){4}-(?:[0-9a-fA-F]){12}\}{0,1})$/ example: 5a96bc79-19a7-4544-973b-e2da0c9136f9 post: summary: Send transactional email using a triggered campaign deprecated: false description: Sends a transactional email using a triggered campaign operationId: send-transactional-email-using-a-triggered-campaign tags: - Transactional email requestBody: content: application/json: schema: title: Transactional Email Request description: Transactional Email Request type: object required: - toAddresses - campaignId properties: toAddresses: type: array description: The email address(es) to send to maxItems: 100 items: type: string format: email ccAddresses: type: array description: The CC email address or address to to send to maxItems: 100 items: type: string format: email bccAddresses: type: array description: The BCC email address or address to to send to maxItems: 100 items: type: string format: email fromAddress: type: string description: 'The From address for your email. Note: The From address must already be added to your account. Otherwise, your account''''s default From address is used.' campaignId: type: integer description: The ID of the triggered campaign, which needs to be included within the request body. format: int32 personalizationValues: type: array description: Each personalisation value is a key-value pair; the placeholder name of the personalization value needs to be included in the request body. items: properties: name: type: string description: Name of the data pair value: type: string description: Value of the pair required: - name - value type: object metadata: type: object additionalProperties: true description: The metadata for your email. JSON object a max of 1500 characters attachments: type: array description: 'A Base64 encoded string. All attachment types are supported. Maximum file size: 15 MB.' items: properties: fileName: type: string description: The file name for the attachment mimeType: type: string description: The MIME type of the file content: type: string description: Base64 data for the file, max 15MB required: - fileName - mimeType - content type: object responses: '200': description: '200' content: text/plain: schema: type: object properties: {} examples: Result: summary: Result value: The result returned will be a '200 OK' with no content in the response. /v2/email/triggered-campaign/batch: parameters: - in: header name: x-ddg-integration-token required: false description: If you are a partner of Dotdigital and have a [verified integration](https://developer.dotdigital.com/docs/partner-integration-verification) then include your [integration tracking token](https://developer.dotdigital.co/docs/verified-integration-tracking) here. schema: type: string pattern: /^(?:\{{0,1}(?:[0-9a-fA-F]){8}-(?:[0-9a-fA-F]){4}-(?:[0-9a-fA-F]){4}-(?:[0-9a-fA-F]){4}-(?:[0-9a-fA-F]){12}\}{0,1})$/ example: 5a96bc79-19a7-4544-973b-e2da0c9136f9 post: summary: Send batch transactional email using a triggered campaign deprecated: false description: '' operationId: send-batch-transactional-email-using-a-triggered-campaign tags: - Transactional email parameters: [] requestBody: content: application/json: schema: type: array description: Emails to Send items: title: Transactional Email Request description: Transactional Email Request type: object required: - toAddresses - campaignId properties: toAddresses: type: array description: The email address(es) to send to maxItems: 100 items: type: string format: email ccAddresses: type: array description: The CC email address or address to to send to maxItems: 100 items: type: string format: email bccAddresses: type: array description: The BCC email address or address to to send to maxItems: 100 items: type: string format: email fromAddress: type: string description: 'The From address for your email. Note: The From address must already be added to your account. Otherwise, your account''''s default From address is used.' campaignId: type: integer description: The ID of the triggered campaign, which needs to be included within the request body. format: int32 personalizationValues: type: array description: Each personalisation value is a key-value pair; the placeholder name of the personalization value needs to be included in the request body. items: properties: name: type: string description: Name of the data pair value: type: string description: Value of the pair required: - name - value type: object metadata: type: object additionalProperties: true description: The metadata for your email. JSON object a max of 1500 characters attachments: type: array description: 'A Base64 encoded string. All attachment types are supported. Maximum file size: 15 MB.' items: properties: fileName: type: string description: The file name for the attachment mimeType: type: string description: The MIME type of the file content: type: string description: Base64 data for the file, max 15MB required: - fileName - mimeType - content type: object examples: Request Example: value: - toAddresses: - test1@example.com campaignId: 1043 - toAddresses: - test2@example.com - test3@example.com campaignId: 456 summary: Request Example responses: '200': description: Request to send email accepted content: application/json: schema: type: array items: type: object required: - index properties: index: type: integer default: 0 examples: - 0 failureCode: type: string description: The failure code failureReason: type: string description: The failure reason examples: Result: summary: Result value: - index: 0 - failureCode: ERROR_PARAMETER_INVALID failureReason: ToAddresses field is empty or invalid. ERROR_PARAMETER_INVALID index: 1 - index: 2 /v2/email/stats/since-date/{date}: parameters: - in: header name: x-ddg-integration-token required: false description: If you are a partner of Dotdigital and have a [verified integration](https://developer.dotdigital.com/docs/partner-integration-verification) then include your [integration tracking token](https://developer.dotdigital.co/docs/verified-integration-tracking) here. schema: type: string pattern: /^(?:\{{0,1}(?:[0-9a-fA-F]){8}-(?:[0-9a-fA-F]){4}-(?:[0-9a-fA-F]){4}-(?:[0-9a-fA-F]){4}-(?:[0-9a-fA-F]){12}\}{0,1})$/ example: 5a96bc79-19a7-4544-973b-e2da0c9136f9 get: summary: Get transactional email statistics deprecated: false description: Gets transactional email reporting statistics for a specified time period operationId: get-transactional-email-statistics tags: - Transactional email parameters: - name: date in: path description: The UTC date (yyyy-mm-dd) from which transactional email reporting statistics will be returned required: true example: '' schema: type: string format: date default: '2021-01-01' - name: endDate in: query description: The UTC end date (yyyy-mm-dd) up to which transactional email reporting statistics will be returned (inclusive) required: false schema: type: string format: date - name: aggregatedBy in: query description: The data aggregation period for transactional email reporting statistics required: false schema: type: string enum: - AllTime - Month - Week - Day responses: '200': description: '200' content: application/json: schema: type: array items: type: object properties: startDate: type: string format: date description: Start of the reporting period. examples: - '2021-04-06 00:00:00+00:00' endDate: type: string format: date description: End of the reporting period. examples: - '2021-04-30 23:59:59+00:00' numSent: type: integer default: 0 description: Number of transactional email sent. examples: - 50 numDelivered: type: integer default: 0 description: Number of transactional email delivered. examples: - 23 numOpens: type: integer default: 0 description: Number of transactional email opened. examples: - 40 numClicks: type: integer default: 0 description: Number of tracked links inside transactional email that have been clicked. examples: - 0 numIspComplaints: type: integer default: 0 description: Number of ISP complaints triggered by transactional email. examples: - 0 numBounces: type: integer default: 0 description: Number of transactional email that couldn't be delivered. examples: - 27 examples: Result: summary: Result value: - startDate: '2021-04-06 00:00:00+00:00' endDate: '2021-04-30 23:59:59+00:00' numSent: 50 numDelivered: 23 numOpens: 40 numClicks: 0 numIspComplaints: 0 numBounces: 27 - startDate: '2021-05-01 00:00:00+00:00' endDate: '2021-05-31 23:59:59+00:00' numSent: 51 numDelivered: 37 numOpens: 33 numClicks: 0 numIspComplaints: 0 numBounces: 14 - startDate: '2021-06-01 00:00:00+00:00' endDate: '2021-06-30 23:59:59+00:00' numSent: 9 numDelivered: 9 numOpens: 10 numClicks: 0 numIspComplaints: 0 numBounces: 0 - startDate: '2021-07-01 00:00:00+00:00' endDate: '2021-07-31 23:59:59+00:00' numSent: 8 numDelivered: 8 numOpens: 9 numClicks: 0 numIspComplaints: 0 numBounces: 0 components: securitySchemes: basicAuth: type: http scheme: basic schemas: templateEmailRequest: title: Transactional Email Request description: Transactional Email Request type: object required: - toAddresses - campaignId properties: toAddresses: type: array description: The email address(es) to send to maxItems: 100 items: type: string format: email ccAddresses: type: array description: The CC email address or address to to send to maxItems: 100 items: type: string format: email bccAddresses: type: array description: The BCC email address or address to to send to maxItems: 100 items: type: string format: email fromAddress: type: string description: 'The From address for your email. Note: The From address must already be added to your account. Otherwise, your account''''s default From address is used.' campaignId: type: integer description: The ID of the triggered campaign, which needs to be included within the request body. format: int32 personalizationValues: type: array description: Each personalisation value is a key-value pair; the placeholder name of the personalization value needs to be included in the request body. items: properties: name: type: string description: Name of the data pair value: type: string description: Value of the pair required: - name - value type: object metadata: type: object additionalProperties: true description: The metadata for your email. JSON object a max of 1500 characters attachments: type: array description: 'A Base64 encoded string. All attachment types are supported. Maximum file size: 15 MB.' items: properties: fileName: type: string description: The file name for the attachment mimeType: type: string description: The MIME type of the file content: type: string description: Base64 data for the file, max 15MB required: - fileName - mimeType - content type: object emailRequest: type: object required: - toAddresses - subject properties: toAddresses: type: array description: The email address(es) to send to maxItems: 100 items: type: string format: email ccAddresses: type: array description: The CC email address or address to to send to maxItems: 100 items: type: string format: email bccAddresses: type: array description: The BCC email address or address to to send to maxItems: 100 items: type: string format: email subject: type: string description: The subject line for your email fromAddress: type: string description: 'The From address for your email. Note: The From address must already be added to your account. Otherwise, your account''''s default From address is used' htmlContent: type: string description: The HTML content for your email plainTextContent: type: string description: The plain text content for your email metadata: type: object additionalProperties: true description: The metadata for your email. JSON object a max of 1500 characters attachments: type: array description: 'A Base64 encoded string. All attachment types are supported. Maximum file size: 15 MB' items: properties: fileName: type: string description: The file name for the attachment mimeType: type: string description: The MIME type of the file content: type: string description: Base64 data for the file, max 15MB required: - fileName - mimeType - content type: object