> To build or manage a Wix site with an AI agent, follow https://www.wix.com/headless/skill.md
> It builds a new Wix site or puts your own site online, from a prompt, and keeps changing it afterwards. The pages are code in any web technology, and Wix runs the backend.
> It works through the Wix plugin (the Wix MCP and the Wix skills), the Wix CLI or no Wix login, and puts the site live on Wix hosting or on another host.
> Business features include a store, bookings, events and tickets, a restaurant, a blog, forms, members and many more.
> Read the Wix skills online at https://www.wix.com/skills
> 
> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - If a reference page seems to be missing its schema (parameters, return types, or type definitions), append `?schema=true` to its `.md` URL (e.g. `https://dev.wix.com/docs/contexts/contexts/stores/category-info/use-category-info-context.md?schema=true`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

# SendEmailTransmission

# Package: emails

# Namespace: EmailTransmissionService

# Method link: https://dev.wix.com/docs/api-reference/business-management/marketing/emails/email-transmission-v1/send-email-transmission.md

## Permission Scopes:
Manage Email Marketing: SCOPE.DC-PROMOTE.EMAIL-MARKETING

## Introduction

Creates and sends an email transmission to one or more recipients.

The email is sent asynchronously. The returned transmission has `ACCEPTED` status.
Call [Get Email Transmission](https://dev.wix.com/docs/api-reference/business-management/marketing/emails/email-transmission-v1/get-email-transmission.md) or listen for the Email Transmission Updated webhook to track delivery status.

---

## REST API

### Schema

```
 Method: sendEmailTransmission
 Description: Creates and sends an email transmission to one or more recipients.  The email is sent asynchronously. The returned transmission has `ACCEPTED` status. Call [Get Email Transmission](https://dev.wix.com/docs/api-reference/business-management/marketing/emails/email-transmission-v1/get-email-transmission.md) or listen for the Email Transmission Updated webhook to track delivery status.
 URL: https://www.wixapis.com/email-transmissions/v1/email-transmissions/send
 Method: POST
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  emailTransmission, emailTransmission.emailSubject, emailTransmission.emailHtmlContent, emailTransmission.toRecipients, emailTransmission.type, emailTransmission.attachments.fileName, emailTransmission.attachments.remote.fetchUrl, emailTransmission.attachments.localBase64
 Method parameters: 
   param name: emailTransmission | type: EmailTransmission | description: An email transmission represents a single email send request, including its recipients, HTML content, sender information, type, and delivery status. Creating an email transmission triggers the email to be sent asynchronously to all specified recipients. | required: true 
    - ONE-OF: - required: true
     - name: marketingOptions | type: MarketingOptions | description: Options for marketing emails.  Used only when `type` is `MARKETING`.  
        - name: unsubscribeUrlPlaceholder | type: string | description: Placeholder in `emailHtmlContent` that gets replaced with a recipient-specific unsubscribe URL before the email is sent. Case-sensitive. For example, `{{unsubscribe_url}}` or `[UNSUBSCRIBE_URL]`. The placeholder must be unique within the HTML content.  If not set, an unsubscribe link in the site's default language is appended to the bottom of the email.  | validation: minLength 4, maxLength 100
        - name: emailSubject | type: string | description: Subject line of the email. | required: true | validation: maxLength 200
        - name: emailHtmlContent | type: string | description: Full HTML content of the email.  Not returned in `queryEmailTransmissions`. Use `getEmailTransmission` to retrieve the HTML content of a specific transmission.  Stored for 30 days after the transmission is created. After that, this field returns `"<expired>"`. | required: true | validation: maxLength 1000000
        - name: metadata | type: object | description: Custom key-value pairs attached to the transmission to identify the context in which the email was sent. These values are passed to the email service provider and included in domain event payloads. Keys and values support letters, numbers, and hyphens only (no spaces or other special characters). Length of keys and values must be between 1 and 50 characters.  Default: `{}`  | validation: maxItems 10, format map
        - name: senderName | type: string | description: Display name shown as the sender.  Default: None (no display name is set).  | validation: minLength 1, maxLength 50
        - name: senderEmailAddress | type: string | description: Sender email address. Must be verified using the Sender Emails API before use.  If the provided address can't be used as a FROM address (for example, addresses from free email providers such as gmail.com), the email is sent from `no-reply@et.wixsitemail.com` and the provided address is automatically used as the reply-to address instead.  Default: `no-reply@et.wixsitemail.com`  | validation: format EMAIL
        - name: replyTo | type: Recipient | description: Recipient that receives replies to this email. When a recipient replies, the reply is directed to this address instead of the sender address.  Default: When `senderEmailAddress` is provided and the email is sent from the Wix shared sender address, replies are automatically directed to `senderEmailAddress`.  
           - ONE-OF: 
              - name: contactId | type: string | description: GUID of the contact to send the email to. The contact's email address is retrieved from the Contacts API.  | validation: format GUID
              - name: userId | type: string | description: GUID of the Wix user to send the email to. The user must be a site collaborator.  The user's email address is retrieved from the Users API.  | validation: format GUID
              - name: emailAddress | type: string | description: Email address to send the email to. A contact is created with this address if one doesn't already exist.  | validation: format EMAIL
           - name: name | type: string | description: Display name of the recipient.  | validation: minLength 1, maxLength 50
        - name: toRecipients | type: array<Recipient> | description: List of recipients the email is sent to. | required: true | validation: minItems 1, maxItems 100
        - name: type | type: Type | description: Email type. | required: true 
             - enum:
             -     TRANSACTIONAL: Email triggered by a specific action, such as an order confirmation or booking reminder. No unsubscribe link is added.
             -     MARKETING: Email sent to multiple recipients as part of a campaign, such as a newsletter or promotion. An unsubscribe link is automatically added.
        - name: customHeaders | type: object | description: Custom headers to include in the email. Keys should have max length of 64 and must start with a letter and contain only letters, digits and hyphens. Keys are case insensitive and must be unique (for example, "X-Foo" and "x-foo" cannot both be provided). Values should have max length of 900 and must contain only printable ASCII characters (0x20-0x7E). The keys should not contain reserved headers (case insensitive) from this list: * BCC * CC * Content-Type * Content-Transfer-Encoding * DKIM-Signature * Feedback-GUID * From * Precedence * Received * Reply-To * Return-Path * Sender * Subject * To * X-Abuse-Id If provided header happens to be also set by the system internally (for example "List-Unsubscribe"), provided header value will then be overridden.  | validation: maxItems 20, format map
        - name: emailTextContent | type: string | description: Plain text content of the email (optional).  Not returned in `queryEmailTransmissions`. Use `getEmailTransmission` to retrieve the text content of a specific transmission.  Stored for 30 days after the transmission is created. After that, this field returns `"<expired>"`.  | validation: minLength 1, maxLength 200000
        - name: attachments | type: array<Attachment> | description: Email attachments. Total size for all attachments must not exceed 20 MB when base64-encoded. Emails are either sent with all attachments or not sent at all. If any attachment fails to process, email transmission status is set to `ABORTED`.  | validation: maxItems 10
           - ONE-OF: 
              - name: remote | type: RemoteFile | description: Remote file that will be downloaded from provided URL once.  
                 - name: fetchUrl | type: string | description: File download URL. It must be publicly accessible without authentication and stay valid until status has changed to `PROCESSED`. Download must finish in less than 30 seconds, max supported file size is 10 MB after base64 encoding.  | validation: maxLength 2048, format WEB_URL
              - name: local | type: LocalFile | description: Base64-encoded content of the local file.  
                 - name: contentBase64 | type: string | description: Base64-encoded content of the attachment file. This field is not returned in `getEmailTransmission`, `queryEmailTransmissions` nor domain events.  | validation: minLength 1, maxLength 10000000
           - name: fileName | type: string | description: Name of the attached file. Following extensions are not supported: "adp", "app", "asp", "bas", "bat", "cmd", "com", "cpl", "dll", "exe", "fxp", "gadget", "hta", "inf", "ins", "isp", "jar", "js", "jse", "ksh", "mar", "msi", "msp", "prf", "prg", "ps1", "reg", "scf", "scr", "sct", "sys", "url", "vb", "vbe", "vbs", "vsmacros", "ws", "wsc", "wsf".  | validation: minLength 1, maxLength 100
           - name: contentType | type: string | description: MIME type of the attached file (optional). If not provided, the MIME type will be inferred on best effort.  | validation: minLength 1, maxLength 100
   param name: idempotencyKey | type: idempotencyKey | description: Unique key used to prevent duplicate transmissions. If a request with the same idempotency key is received, the original response is returned without creating a new transmission.  Keys are remembered for about 1 hour. This period isn't guaranteed and may change. After it passes, a request with the same key can create a new transmission.  | validation: format GUID
 Return type: SendEmailTransmissionResponse
  - name: emailTransmission | type: EmailTransmission | description: Sent email transmission.  
     - ONE-OF: 
        - name: marketingOptions | type: MarketingOptions | description: Options for marketing emails.  Used only when `type` is `MARKETING`.  
           - name: unsubscribeUrlPlaceholder | type: string | description: Placeholder in `emailHtmlContent` that gets replaced with a recipient-specific unsubscribe URL before the email is sent. Case-sensitive. For example, `{{unsubscribe_url}}` or `[UNSUBSCRIBE_URL]`. The placeholder must be unique within the HTML content.  If not set, an unsubscribe link in the site's default language is appended to the bottom of the email.  | validation: minLength 4, maxLength 100
     - ONE-OF: 
        - name: rejectedOptions | type: RejectedOptions | description: Details about why the email transmission was rejected.  Returned only when `status` is `REJECTED`.  | read-only: true 
           - name: rejectionReasons | type: array<RejectionReason> | description: Reasons why the email transmission was rejected. The blacklists are managed by Wix and aren't queryable. If you believe your content was flagged incorrectly, contact Wix support.  | read-only: true | validation: minItems 1, maxItems 10
                 - enum:
                 -     BLACKLISTED_SENDER_EMAIL: Sender email address is on the Wix blacklist.
                 -     BLACKLISTED_SENDER_NAME: Sender display name is on the Wix blacklist.
                 -     BLACKLISTED_REPLY_TO_EMAIL: Reply-to email address is on the Wix blacklist.
                 -     BLACKLISTED_REPLY_TO_NAME: Reply-to display name is on the Wix blacklist.
                 -     BLACKLISTED_LINK: Email content contains a link that is on the Wix blacklist.
                 -     BLACKLISTED_TEXT: Email content contains text that is on the Wix blacklist.
                 -     FRAUDULENT_CONTENT: Email content was identified as fraudulent, such as phishing or a scam.
        - name: abortedOptions | type: AbortedOptions | description: Details about why the email transmission was aborted.  Returned only when `status` is `ABORTED`.  | read-only: true 
           - name: abortionReasons | type: array<AbortionReason> | description: Reasons why the email transmission was aborted.  | read-only: true | validation: minItems 1, maxItems 10
                 - enum:
                 -     FILE_DOWNLOAD_ERROR: Error downloading file.
                 -     ATTACHMENT_TOO_BIG: Downloaded file exceeds the allowed limit of 10 MB.
                 -     TOTAL_ATTACHMENTS_SIZE_TOO_BIG: Total size of attachments exceeds the allowed limit of 20 MB.
                 -     NO_VALID_RECIPIENTS: No valid recipients were found.
     - name: id | type: string | description: Email transmission GUID.  | read-only: true | validation: format GUID
     - name: createdDate | type: string | description: Date and time the email transmission was created.  | read-only: true | validation: format date-time
     - name: updatedDate | type: string | description: Date and time the email transmission was last updated.  | read-only: true | validation: format date-time
     - name: revision | type: string | description: Revision number, which increments by 1 each time the email transmission is updated.  | read-only: true | validation: format int64
     - name: emailSubject | type: string | description: Subject line of the email.  | validation: maxLength 200
     - name: emailHtmlContent | type: string | description: Full HTML content of the email.  Not returned in `queryEmailTransmissions`. Use `getEmailTransmission` to retrieve the HTML content of a specific transmission.  Stored for 30 days after the transmission is created. After that, this field returns `"<expired>"`.  | validation: maxLength 1000000
     - name: metadata | type: object | description: Custom key-value pairs attached to the transmission to identify the context in which the email was sent. These values are passed to the email service provider and included in domain event payloads. Keys and values support letters, numbers, and hyphens only (no spaces or other special characters). Length of keys and values must be between 1 and 50 characters.  Default: `{}`  | validation: maxItems 10, format map
     - name: senderName | type: string | description: Display name shown as the sender.  Default: None (no display name is set).  | validation: minLength 1, maxLength 50
     - name: senderEmailAddress | type: string | description: Sender email address. Must be verified using the Sender Emails API before use.  If the provided address can't be used as a FROM address (for example, addresses from free email providers such as gmail.com), the email is sent from `no-reply@et.wixsitemail.com` and the provided address is automatically used as the reply-to address instead.  Default: `no-reply@et.wixsitemail.com`  | validation: format EMAIL
     - name: replyTo | type: Recipient | description: Recipient that receives replies to this email. When a recipient replies, the reply is directed to this address instead of the sender address.  Default: When `senderEmailAddress` is provided and the email is sent from the Wix shared sender address, replies are automatically directed to `senderEmailAddress`.  
        - ONE-OF: 
           - name: contactId | type: string | description: GUID of the contact to send the email to. The contact's email address is retrieved from the Contacts API.  | validation: format GUID
           - name: userId | type: string | description: GUID of the Wix user to send the email to. The user must be a site collaborator.  The user's email address is retrieved from the Users API.  | validation: format GUID
           - name: emailAddress | type: string | description: Email address to send the email to. A contact is created with this address if one doesn't already exist.  | validation: format EMAIL
        - name: id | type: string | description: Recipient GUID. Auto-generated value that uniquely identifies the recipient in the email transmission.  | read-only: true | validation: format GUID
        - name: name | type: string | description: Display name of the recipient.  | validation: minLength 1, maxLength 50
        - name: status | type: RecipientStatus | description: Status of this particular recipient.  | read-only: true 
             - enum:
             -     PENDING: Recipient is still waiting to be processed.
             -     SENT: Email for this recipient was sent (it's not the same as "delivered" because it can still bounce).
             -     FAILED: Recipient was excluded (see "failureReason" for more details).
        - name: failureReason | type: FailureReason | description: Reason why the email couldn't be delivered to this recipient. `NONE` means the email was successfully sent.  Returned once the transmission reaches `PROCESSED` or `ABORTED` status.  | read-only: true 
             - enum:
             -     NONE: Email was successfully sent to this recipient.
             -     RECIPIENT_NOT_FOUND: Contact or user wasn't found by the provided ID.
             -     EMAIL_ADDRESS_MISSING: Contact or user doesn't have an email address.
             -     EMAIL_ADDRESS_INVALID: Email address doesn't exist or is invalid.
             -     EMAIL_ADDRESS_BOUNCED: Email address has previously bounced and can't be sent to.
             -     MARKETING_CONSENT_NOT_GIVEN: Recipient hasn't given consent to receive marketing emails.
             -     NOT_SITE_COLLABORATOR: User isn't a collaborator on this site. Only site collaborators can be specified as recipients by user ID.
     - name: toRecipients | type: array<Recipient> | description: List of recipients the email is sent to.  | validation: minItems 1, maxItems 100
     - name: type | type: Type | description: Email type.  
         - enum:
         -     TRANSACTIONAL: Email triggered by a specific action, such as an order confirmation or booking reminder. No unsubscribe link is added.
         -     MARKETING: Email sent to multiple recipients as part of a campaign, such as a newsletter or promotion. An unsubscribe link is automatically added.
     - name: status | type: Status | description: Current status of the email transmission.  | read-only: true 
         - enum:
         -     ACCEPTED: Email transmission was accepted and is queued for processing.
         -     IN_PROGRESS: Email transmission is being processed - the content is being checked, attachments are being prepared, recipients are being resolved, emails are being sent.
         -     PROCESSED: Email transmission has been fully processed. At least one email was sent. See `toRecipients` for per-recipient delivery information.
         -     REJECTED: Email transmission was not sent because it failed an abuse check. No emails were sent. See `rejectedOptions` for details.
         -     ABORTED: Email transmission was not sent because attachments couldn't be attached or zero valid recipients were found. No emails were sent. See `abortedOptions` for details.
     - name: customHeaders | type: object | description: Custom headers to include in the email. Keys should have max length of 64 and must start with a letter and contain only letters, digits and hyphens. Keys are case insensitive and must be unique (for example, "X-Foo" and "x-foo" cannot both be provided). Values should have max length of 900 and must contain only printable ASCII characters (0x20-0x7E). The keys should not contain reserved headers (case insensitive) from this list: * BCC * CC * Content-Type * Content-Transfer-Encoding * DKIM-Signature * Feedback-GUID * From * Precedence * Received * Reply-To * Return-Path * Sender * Subject * To * X-Abuse-Id If provided header happens to be also set by the system internally (for example "List-Unsubscribe"), provided header value will then be overridden.  | validation: maxItems 20, format map
     - name: emailTextContent | type: string | description: Plain text content of the email (optional).  Not returned in `queryEmailTransmissions`. Use `getEmailTransmission` to retrieve the text content of a specific transmission.  Stored for 30 days after the transmission is created. After that, this field returns `"<expired>"`.  | validation: minLength 1, maxLength 200000
     - name: attachments | type: array<Attachment> | description: Email attachments. Total size for all attachments must not exceed 20 MB when base64-encoded. Emails are either sent with all attachments or not sent at all. If any attachment fails to process, email transmission status is set to `ABORTED`.  | validation: maxItems 10
        - ONE-OF: 
           - name: remote | type: RemoteFile | description: Remote file that will be downloaded from provided URL once.  
              - name: fetchUrl | type: string | description: File download URL. It must be publicly accessible without authentication and stay valid until status has changed to `PROCESSED`. Download must finish in less than 30 seconds, max supported file size is 10 MB after base64 encoding.  | validation: maxLength 2048, format WEB_URL
           - name: local | type: LocalFile | description: Base64-encoded content of the local file.  
              - name: contentBase64 | type: string | description: Base64-encoded content of the attachment file. This field is not returned in `getEmailTransmission`, `queryEmailTransmissions` nor domain events.  | validation: minLength 1, maxLength 10000000
        - name: fileName | type: string | description: Name of the attached file. Following extensions are not supported: "adp", "app", "asp", "bas", "bat", "cmd", "com", "cpl", "dll", "exe", "fxp", "gadget", "hta", "inf", "ins", "isp", "jar", "js", "jse", "ksh", "mar", "msi", "msp", "prf", "prg", "ps1", "reg", "scf", "scr", "sct", "sys", "url", "vb", "vbe", "vbs", "vsmacros", "ws", "wsc", "wsf".  | validation: minLength 1, maxLength 100
        - name: contentType | type: string | description: MIME type of the attached file (optional). If not provided, the MIME type will be inferred on best effort.  | validation: minLength 1, maxLength 100
        - name: metadata | type: AttachmentMetadata | description: Metadata about the attachment.  | read-only: true 
           - name: sizeBytes | type: integer | description: Size of the attached file in bytes.  | read-only: true | validation: minimum 1
           - name: downloadUrl | type: string | description: File download URL.  | read-only: true | validation: maxLength 2048, format WEB_URL

 Possible Errors:
   HTTP Code: 400 | Status Code: INVALID_ARGUMENT | Application Code: TOTAL_ATTACHMENTS_SIZE_TOO_BIG | Description: Total size of local attachments exceeds the allowed limit.
   HTTP Code: 400 | Status Code: INVALID_ARGUMENT | Application Code: INVALID_METADATA | Description: One or more metadata keys or values contain invalid characters. Keys and values must consist of 1-50 alphanumeric characters or hyphens.
   HTTP Code: 400 | Status Code: INVALID_ARGUMENT | Application Code: INVALID_CUSTOM_HEADERS | Description: One or more custom header keys or values contain invalid characters or key is reserved. Keys must start with a letter and contain only letters, digits and hyphens. Values must contain only printable ASCII characters (0x20-0x7E).
   HTTP Code: 400 | Status Code: INVALID_ARGUMENT | Application Code: UNSUPPORTED_ATTACHMENT | Description: One or more attachments has unsupported file name extension.
   HTTP Code: 400 | Status Code: INVALID_ARGUMENT | Application Code: INVALID_ATTACHMENT_LOCAL_CONTENT | Description: One or more local file attachments has invalid content.
   HTTP Code: 403 | Status Code: PERMISSION_DENIED | Application Code: ACCOUNT_SUSPENDED | Description: This site's account is suspended due to a terms of service violation.
   HTTP Code: 428 | Status Code: FAILED_PRECONDITION | Application Code: UNVERIFIED_SENDER_EMAIL | Description: The provided `senderEmailAddress` hasn't been verified. Verify the sender email using the Sender Emails API before sending.
   HTTP Code: 428 | Status Code: FAILED_PRECONDITION | Application Code: OUT_OF_QUOTA | Description: The site has reached its email sending quota. Upgrade the site's Email Marketing plan to send more emails.


```

### Examples

### Send a transactional email
Send a transactional email to a contact by contact ID.

```curl
curl -X POST \
'https://www.wixapis.com/email-transmissions/v1/email-transmissions/send' \
-H 'Authorization: <AUTH>' \
-H 'Content-Type: application/json' \
-d '{
  "emailTransmission": {
    "emailSubject": "Your order has been confirmed",
    "emailHtmlContent": "<p>Hi John, your order #12345 has been confirmed. Thank you for shopping with us!</p>",
    "senderName": "My Store",
    "senderEmailAddress": "store@myshop.com",
    "replyTo": {
      "emailAddress": "store@myshop.com"
    },
    "toRecipients": [
      {
        "contactId": "2b79d09c-6c61-4fe3-9769-2c791343e8d3"
      }
    ],
    "type": "TRANSACTIONAL"
  },
  "idempotencyKey": "d7a341c4-196b-46e7-813c-2b0fc1847ec6"
}'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.emailTransmissions.emailTransmissions.sendEmailTransmission(emailTransmission, options)
 Description: Creates and sends an email transmission to one or more recipients.  The email is sent asynchronously. The returned transmission has `ACCEPTED` status. Call [Get Email Transmission](https://dev.wix.com/docs/api-reference/business-management/marketing/emails/email-transmission-v1/get-email-transmission.md) or listen for the Email Transmission Updated webhook to track delivery status.
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  emailTransmission, emailTransmission.emailSubject, emailTransmission.emailHtmlContent, emailTransmission.toRecipients, emailTransmission.toRecipients, emailTransmission.type, emailTransmission.attachments.fileName, emailTransmission.attachments.remote.fetchUrl, emailTransmission.attachments.localBase64
 Method parameters: 
   param name: emailTransmission | type: EmailTransmission | description: An email transmission represents a single email send request, including its recipients, HTML content, sender information, type, and delivery status. Creating an email transmission triggers the email to be sent asynchronously to all specified recipients. | required: true 
    - ONE-OF: - required: true
     - name: marketingOptions | type: MarketingOptions | description: Options for marketing emails.  Used only when `type` is `MARKETING`.  
        - name: unsubscribeUrlPlaceholder | type: string | description: Placeholder in `emailHtmlContent` that gets replaced with a recipient-specific unsubscribe URL before the email is sent. Case-sensitive. For example, `{{unsubscribe_url}}` or `[UNSUBSCRIBE_URL]`. The placeholder must be unique within the HTML content.  If not set, an unsubscribe link in the site's default language is appended to the bottom of the email.  | validation: minLength 4, maxLength 100
        - name: emailSubject | type: string | description: Subject line of the email. | required: true | validation: maxLength 200
        - name: emailHtmlContent | type: string | description: Full HTML content of the email.  Not returned in `queryEmailTransmissions`. Use `getEmailTransmission` to retrieve the HTML content of a specific transmission.  Stored for 30 days after the transmission is created. After that, this field returns `"<expired>"`. | required: true | validation: maxLength 1000000
        - name: metadata | type: object | description: Custom key-value pairs attached to the transmission to identify the context in which the email was sent. These values are passed to the email service provider and included in domain event payloads. Keys and values support letters, numbers, and hyphens only (no spaces or other special characters). Length of keys and values must be between 1 and 50 characters.  Default: `{}`  | validation: maxItems 10, format map
        - name: senderName | type: string | description: Display name shown as the sender.  Default: None (no display name is set).  | validation: minLength 1, maxLength 50
        - name: senderEmailAddress | type: string | description: Sender email address. Must be verified using the Sender Emails API before use.  If the provided address can't be used as a FROM address (for example, addresses from free email providers such as gmail.com), the email is sent from `no-reply@et.wixsitemail.com` and the provided address is automatically used as the reply-to address instead.  Default: `no-reply@et.wixsitemail.com`  | validation: format EMAIL
        - name: replyTo | type: Recipient | description: Recipient that receives replies to this email. When a recipient replies, the reply is directed to this address instead of the sender address.  Default: When `senderEmailAddress` is provided and the email is sent from the Wix shared sender address, replies are automatically directed to `senderEmailAddress`.  
           - ONE-OF: - required: true
              - name: contactId | type: string | description: GUID of the contact to send the email to. The contact's email address is retrieved from the Contacts API.  | validation: format GUID
              - name: userId | type: string | description: GUID of the Wix user to send the email to. The user must be a site collaborator.  The user's email address is retrieved from the Users API.  | validation: format GUID
              - name: emailAddress | type: string | description: Email address to send the email to. A contact is created with this address if one doesn't already exist.  | validation: format EMAIL
           - name: name | type: string | description: Display name of the recipient.  | validation: minLength 1, maxLength 50
        - name: toRecipients | type: array<Recipient> | description: List of recipients the email is sent to. | required: true | validation: minItems 1, maxItems 100
        - name: type | type: Type | description: Email type. | required: true 
             - enum:
             -     TRANSACTIONAL: Email triggered by a specific action, such as an order confirmation or booking reminder. No unsubscribe link is added.
             -     MARKETING: Email sent to multiple recipients as part of a campaign, such as a newsletter or promotion. An unsubscribe link is automatically added.
        - name: customHeaders | type: object | description: Custom headers to include in the email. Keys should have max length of 64 and must start with a letter and contain only letters, digits and hyphens. Keys are case insensitive and must be unique (for example, "X-Foo" and "x-foo" cannot both be provided). Values should have max length of 900 and must contain only printable ASCII characters (0x20-0x7E). The keys should not contain reserved headers (case insensitive) from this list: * BCC * CC * Content-Type * Content-Transfer-Encoding * DKIM-Signature * Feedback-GUID * From * Precedence * Received * Reply-To * Return-Path * Sender * Subject * To * X-Abuse-Id If provided header happens to be also set by the system internally (for example "List-Unsubscribe"), provided header value will then be overridden.  | validation: maxItems 20, format map
        - name: emailTextContent | type: string | description: Plain text content of the email (optional).  Not returned in `queryEmailTransmissions`. Use `getEmailTransmission` to retrieve the text content of a specific transmission.  Stored for 30 days after the transmission is created. After that, this field returns `"<expired>"`.  | validation: minLength 1, maxLength 200000
        - name: attachments | type: array<Attachment> | description: Email attachments. Total size for all attachments must not exceed 20 MB when base64-encoded. Emails are either sent with all attachments or not sent at all. If any attachment fails to process, email transmission status is set to `ABORTED`.  | validation: maxItems 10
           - ONE-OF: - required: true
              - name: remote | type: RemoteFile | description: Remote file that will be downloaded from provided URL once.  
                 - name: fetchUrl | type: string | description: File download URL. It must be publicly accessible without authentication and stay valid until status has changed to `PROCESSED`. Download must finish in less than 30 seconds, max supported file size is 10 MB after base64 encoding.  | validation: maxLength 2048, format WEB_URL
              - name: local | type: LocalFile | description: Base64-encoded content of the local file.  
                 - name: contentBase64 | type: string | description: Base64-encoded content of the attachment file. This field is not returned in `getEmailTransmission`, `queryEmailTransmissions` nor domain events.  | validation: minLength 1, maxLength 10000000
           - name: fileName | type: string | description: Name of the attached file. Following extensions are not supported: "adp", "app", "asp", "bas", "bat", "cmd", "com", "cpl", "dll", "exe", "fxp", "gadget", "hta", "inf", "ins", "isp", "jar", "js", "jse", "ksh", "mar", "msi", "msp", "prf", "prg", "ps1", "reg", "scf", "scr", "sct", "sys", "url", "vb", "vbe", "vbs", "vsmacros", "ws", "wsc", "wsf".  | validation: minLength 1, maxLength 100
           - name: contentType | type: string | description: MIME type of the attached file (optional). If not provided, the MIME type will be inferred on best effort.  | validation: minLength 1, maxLength 100
   param name: options | type: SendEmailTransmissionOptions  none  
        - name: idempotencyKey | type: string | description: Unique key used to prevent duplicate transmissions. If a request with the same idempotency key is received, the original response is returned without creating a new transmission.  Keys are remembered for about 1 hour. This period isn't guaranteed and may change. After it passes, a request with the same key can create a new transmission.  | validation: format GUID
 Return type: PROMISE<SendEmailTransmissionResponse>
  - name: emailTransmission | type: EmailTransmission | description: Sent email transmission.  
     - ONE-OF: 
        - name: marketingOptions | type: MarketingOptions | description: Options for marketing emails.  Used only when `type` is `MARKETING`.  
           - name: unsubscribeUrlPlaceholder | type: string | description: Placeholder in `emailHtmlContent` that gets replaced with a recipient-specific unsubscribe URL before the email is sent. Case-sensitive. For example, `{{unsubscribe_url}}` or `[UNSUBSCRIBE_URL]`. The placeholder must be unique within the HTML content.  If not set, an unsubscribe link in the site's default language is appended to the bottom of the email.  | validation: minLength 4, maxLength 100
     - ONE-OF: 
        - name: rejectedOptions | type: RejectedOptions | description: Details about why the email transmission was rejected.  Returned only when `status` is `REJECTED`.  | read-only: true 
           - name: rejectionReasons | type: array<RejectionReason> | description: Reasons why the email transmission was rejected. The blacklists are managed by Wix and aren't queryable. If you believe your content was flagged incorrectly, contact Wix support.  | read-only: true | validation: minItems 1, maxItems 10
                 - enum:
                 -     BLACKLISTED_SENDER_EMAIL: Sender email address is on the Wix blacklist.
                 -     BLACKLISTED_SENDER_NAME: Sender display name is on the Wix blacklist.
                 -     BLACKLISTED_REPLY_TO_EMAIL: Reply-to email address is on the Wix blacklist.
                 -     BLACKLISTED_REPLY_TO_NAME: Reply-to display name is on the Wix blacklist.
                 -     BLACKLISTED_LINK: Email content contains a link that is on the Wix blacklist.
                 -     BLACKLISTED_TEXT: Email content contains text that is on the Wix blacklist.
                 -     FRAUDULENT_CONTENT: Email content was identified as fraudulent, such as phishing or a scam.
        - name: abortedOptions | type: AbortedOptions | description: Details about why the email transmission was aborted.  Returned only when `status` is `ABORTED`.  | read-only: true 
           - name: abortionReasons | type: array<AbortionReason> | description: Reasons why the email transmission was aborted.  | read-only: true | validation: minItems 1, maxItems 10
                 - enum:
                 -     FILE_DOWNLOAD_ERROR: Error downloading file.
                 -     ATTACHMENT_TOO_BIG: Downloaded file exceeds the allowed limit of 10 MB.
                 -     TOTAL_ATTACHMENTS_SIZE_TOO_BIG: Total size of attachments exceeds the allowed limit of 20 MB.
                 -     NO_VALID_RECIPIENTS: No valid recipients were found.
     - name: _id | type: string | description: Email transmission GUID.  | read-only: true | validation: format GUID
     - name: _createdDate | type: Date | description: Date and time the email transmission was created.  | read-only: true 
     - name: _updatedDate | type: Date | description: Date and time the email transmission was last updated.  | read-only: true 
     - name: revision | type: string | description: Revision number, which increments by 1 each time the email transmission is updated.  | read-only: true | validation: format int64
     - name: emailSubject | type: string | description: Subject line of the email.  | validation: maxLength 200
     - name: emailHtmlContent | type: string | description: Full HTML content of the email.  Not returned in `queryEmailTransmissions`. Use `getEmailTransmission` to retrieve the HTML content of a specific transmission.  Stored for 30 days after the transmission is created. After that, this field returns `"<expired>"`.  | validation: maxLength 1000000
     - name: metadata | type: object | description: Custom key-value pairs attached to the transmission to identify the context in which the email was sent. These values are passed to the email service provider and included in domain event payloads. Keys and values support letters, numbers, and hyphens only (no spaces or other special characters). Length of keys and values must be between 1 and 50 characters.  Default: `{}`  | validation: maxItems 10, format map
     - name: senderName | type: string | description: Display name shown as the sender.  Default: None (no display name is set).  | validation: minLength 1, maxLength 50
     - name: senderEmailAddress | type: string | description: Sender email address. Must be verified using the Sender Emails API before use.  If the provided address can't be used as a FROM address (for example, addresses from free email providers such as gmail.com), the email is sent from `no-reply@et.wixsitemail.com` and the provided address is automatically used as the reply-to address instead.  Default: `no-reply@et.wixsitemail.com`  | validation: format EMAIL
     - name: replyTo | type: Recipient | description: Recipient that receives replies to this email. When a recipient replies, the reply is directed to this address instead of the sender address.  Default: When `senderEmailAddress` is provided and the email is sent from the Wix shared sender address, replies are automatically directed to `senderEmailAddress`.  
        - ONE-OF: - required: true
           - name: contactId | type: string | description: GUID of the contact to send the email to. The contact's email address is retrieved from the Contacts API.  | validation: format GUID
           - name: userId | type: string | description: GUID of the Wix user to send the email to. The user must be a site collaborator.  The user's email address is retrieved from the Users API.  | validation: format GUID
           - name: emailAddress | type: string | description: Email address to send the email to. A contact is created with this address if one doesn't already exist.  | validation: format EMAIL
        - name: _id | type: string | description: Recipient GUID. Auto-generated value that uniquely identifies the recipient in the email transmission.  | read-only: true | validation: format GUID
        - name: name | type: string | description: Display name of the recipient.  | validation: minLength 1, maxLength 50
        - name: status | type: RecipientStatus | description: Status of this particular recipient.  | read-only: true 
             - enum:
             -     PENDING: Recipient is still waiting to be processed.
             -     SENT: Email for this recipient was sent (it's not the same as "delivered" because it can still bounce).
             -     FAILED: Recipient was excluded (see "failureReason" for more details).
        - name: failureReason | type: FailureReason | description: Reason why the email couldn't be delivered to this recipient. `NONE` means the email was successfully sent.  Returned once the transmission reaches `PROCESSED` or `ABORTED` status.  | read-only: true 
             - enum:
             -     NONE: Email was successfully sent to this recipient.
             -     RECIPIENT_NOT_FOUND: Contact or user wasn't found by the provided ID.
             -     EMAIL_ADDRESS_MISSING: Contact or user doesn't have an email address.
             -     EMAIL_ADDRESS_INVALID: Email address doesn't exist or is invalid.
             -     EMAIL_ADDRESS_BOUNCED: Email address has previously bounced and can't be sent to.
             -     MARKETING_CONSENT_NOT_GIVEN: Recipient hasn't given consent to receive marketing emails.
             -     NOT_SITE_COLLABORATOR: User isn't a collaborator on this site. Only site collaborators can be specified as recipients by user ID.
     - name: toRecipients | type: array<Recipient> | description: List of recipients the email is sent to.  | validation: minItems 1, maxItems 100
     - name: type | type: Type | description: Email type.  
         - enum:
         -     TRANSACTIONAL: Email triggered by a specific action, such as an order confirmation or booking reminder. No unsubscribe link is added.
         -     MARKETING: Email sent to multiple recipients as part of a campaign, such as a newsletter or promotion. An unsubscribe link is automatically added.
     - name: status | type: Status | description: Current status of the email transmission.  | read-only: true 
         - enum:
         -     ACCEPTED: Email transmission was accepted and is queued for processing.
         -     IN_PROGRESS: Email transmission is being processed - the content is being checked, attachments are being prepared, recipients are being resolved, emails are being sent.
         -     PROCESSED: Email transmission has been fully processed. At least one email was sent. See `toRecipients` for per-recipient delivery information.
         -     REJECTED: Email transmission was not sent because it failed an abuse check. No emails were sent. See `rejectedOptions` for details.
         -     ABORTED: Email transmission was not sent because attachments couldn't be attached or zero valid recipients were found. No emails were sent. See `abortedOptions` for details.
     - name: customHeaders | type: object | description: Custom headers to include in the email. Keys should have max length of 64 and must start with a letter and contain only letters, digits and hyphens. Keys are case insensitive and must be unique (for example, "X-Foo" and "x-foo" cannot both be provided). Values should have max length of 900 and must contain only printable ASCII characters (0x20-0x7E). The keys should not contain reserved headers (case insensitive) from this list: * BCC * CC * Content-Type * Content-Transfer-Encoding * DKIM-Signature * Feedback-GUID * From * Precedence * Received * Reply-To * Return-Path * Sender * Subject * To * X-Abuse-Id If provided header happens to be also set by the system internally (for example "List-Unsubscribe"), provided header value will then be overridden.  | validation: maxItems 20, format map
     - name: emailTextContent | type: string | description: Plain text content of the email (optional).  Not returned in `queryEmailTransmissions`. Use `getEmailTransmission` to retrieve the text content of a specific transmission.  Stored for 30 days after the transmission is created. After that, this field returns `"<expired>"`.  | validation: minLength 1, maxLength 200000
     - name: attachments | type: array<Attachment> | description: Email attachments. Total size for all attachments must not exceed 20 MB when base64-encoded. Emails are either sent with all attachments or not sent at all. If any attachment fails to process, email transmission status is set to `ABORTED`.  | validation: maxItems 10
        - ONE-OF: - required: true
           - name: remote | type: RemoteFile | description: Remote file that will be downloaded from provided URL once.  
              - name: fetchUrl | type: string | description: File download URL. It must be publicly accessible without authentication and stay valid until status has changed to `PROCESSED`. Download must finish in less than 30 seconds, max supported file size is 10 MB after base64 encoding.  | validation: maxLength 2048, format WEB_URL
           - name: local | type: LocalFile | description: Base64-encoded content of the local file.  
              - name: contentBase64 | type: string | description: Base64-encoded content of the attachment file. This field is not returned in `getEmailTransmission`, `queryEmailTransmissions` nor domain events.  | validation: minLength 1, maxLength 10000000
        - name: fileName | type: string | description: Name of the attached file. Following extensions are not supported: "adp", "app", "asp", "bas", "bat", "cmd", "com", "cpl", "dll", "exe", "fxp", "gadget", "hta", "inf", "ins", "isp", "jar", "js", "jse", "ksh", "mar", "msi", "msp", "prf", "prg", "ps1", "reg", "scf", "scr", "sct", "sys", "url", "vb", "vbe", "vbs", "vsmacros", "ws", "wsc", "wsf".  | validation: minLength 1, maxLength 100
        - name: contentType | type: string | description: MIME type of the attached file (optional). If not provided, the MIME type will be inferred on best effort.  | validation: minLength 1, maxLength 100
        - name: metadata | type: AttachmentMetadata | description: Metadata about the attachment.  | read-only: true 
           - name: sizeBytes | type: integer | description: Size of the attached file in bytes.  | read-only: true | validation: minimum 1
           - name: downloadUrl | type: string | description: File download URL.  | read-only: true | validation: maxLength 2048, format WEB_URL

 Possible Errors:
   HTTP Code: 400 | Status Code: INVALID_ARGUMENT | Application Code: TOTAL_ATTACHMENTS_SIZE_TOO_BIG | Description: Total size of local attachments exceeds the allowed limit.
   HTTP Code: 400 | Status Code: INVALID_ARGUMENT | Application Code: INVALID_METADATA | Description: One or more metadata keys or values contain invalid characters. Keys and values must consist of 1-50 alphanumeric characters or hyphens.
   HTTP Code: 400 | Status Code: INVALID_ARGUMENT | Application Code: INVALID_CUSTOM_HEADERS | Description: One or more custom header keys or values contain invalid characters or key is reserved. Keys must start with a letter and contain only letters, digits and hyphens. Values must contain only printable ASCII characters (0x20-0x7E).
   HTTP Code: 400 | Status Code: INVALID_ARGUMENT | Application Code: UNSUPPORTED_ATTACHMENT | Description: One or more attachments has unsupported file name extension.
   HTTP Code: 400 | Status Code: INVALID_ARGUMENT | Application Code: INVALID_ATTACHMENT_LOCAL_CONTENT | Description: One or more local file attachments has invalid content.
   HTTP Code: 403 | Status Code: PERMISSION_DENIED | Application Code: ACCOUNT_SUSPENDED | Description: This site's account is suspended due to a terms of service violation.
   HTTP Code: 428 | Status Code: FAILED_PRECONDITION | Application Code: UNVERIFIED_SENDER_EMAIL | Description: The provided `senderEmailAddress` hasn't been verified. Verify the sender email using the Sender Emails API before sending.
   HTTP Code: 428 | Status Code: FAILED_PRECONDITION | Application Code: OUT_OF_QUOTA | Description: The site has reached its email sending quota. Upgrade the site's Email Marketing plan to send more emails.


```

### Examples

### Send a transactional email
Send a transactional email to a contact by contact ID.

```javascript
import { emailTransmissions } from "@wix/email-transmissions";

async function sendEmailTransmission() {
  const response = await emailTransmissions.sendEmailTransmission(
    {
      emailSubject: "Your order has been confirmed",
      emailHtmlContent: "<p>Hi John, your order #12345 has been confirmed. Thank you for shopping with us!</p>",
      senderName: "My Store",
      toRecipients: [
        {
          contactId: "2b79d09c-6c61-4fe3-9769-2c791343e8d3",
        },
      ],
      type: "TRANSACTIONAL",
    },
    {
      idempotencyKey: "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    },
  );
}

/* Promise resolves to:
 * {
 *   "emailTransmission": {
 *     "_id": "dd266d88-6aac-48f5-a7b4-4ce61a92732f",
 *     "_createdDate": "2026-07-20T14:43:11.093Z",
 *     "_updatedDate": "2026-07-20T14:43:11.093Z",
 *     "emailSubject": "Your order has been confirmed",
 *     "emailHtmlContent": "<p>Hi John, your order #12345 has been confirmed. Thank you for shopping with us!</p>",
 *     "senderName": "My Store",
 *     "toRecipients": [
 *       {
 *         "contactId": "2b79d09c-6c61-4fe3-9769-2c791343e8d3",
 *         "failureReason": "NONE"
 *       }
 *     ],
 *     "type": "TRANSACTIONAL",
 *     "status": "ACCEPTED"
 *   }
 * }
 */

```

### sendEmailTransmission (self-managed)
Self-managed SDK calls require you to [create a client](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/about-the-wix-client.md).

```javascript
import { createClient } from '@wix/sdk';
import { emailTransmissions } from '@wix/email-transmissions';
// Import the auth strategy for the relevant access type
// Import the relevant host module if needed

const myWixClient = createClient ({
  modules: { emailTransmissions },
  // Include the auth strategy and host as relevant
});


async function sendEmailTransmission(emailTransmission,options) {
  const response = await myWixClient.emailTransmissions.sendEmailTransmission(emailTransmission,options);
};
```

---