EmailSend

Queues an email message to be sent to one or more recipients

post/emails:send

Query parameters

api-versionstring required

Version of API to invoke.

Headers

Operation-Idstring uuid

This is the ID provided by the customer to identify the long running operation. If an ID is not provided by the customer, the service will generate one.

x-ms-client-request-idstring uuid

Tracking ID sent with the request to help with debugging.

Request body

headersobject

Custom email headers to be passed.

senderAddressstring required

Sender email address from a verified domain.

userEngagementTrackingDisabledboolean

Indicates whether user engagement tracking should be disabled for this request if the resource-level user engagement tracking setting was already enabled in the control plane.

Example request

{
  "senderAddress": "info@contoso.com",
  "content": {
    "subject": "An exciting offer especially for you!",
    "plainText": "This exciting offer was created especially for you, our most loyal customer.",
    "html": "<html><head><title>Exciting offer!</title></head><body><h1>This exciting offer was created especially for you, our most loyal customer.</h1></body></html>"
  },
  "recipients": {
    "to": [
      {
        "address": "abc@contoso.com",
        "displayName": "abc"
      }
    ],
    "cc": [
      {
        "address": "abc@contoso.com",
        "displayName": "abc"
      }
    ],
    "bcc": [
      {
        "address": "abc@contoso.com",
        "displayName": "abc"
      }
    ]
  },
  "attachments": [
    {
      "name": "attachment.pdf",
      "contentType": "text/plain",
      "contentInBase64": "TG9yZW0gaXBzdW0gZG9sb3Igc2l0IGFtZXQ=",
      "contentId": "inline_image_id"
    }
  ],
  "replyTo": [
    {
      "address": "abc@contoso.com",
      "displayName": "abc"
    }
  ]
}

Response

The service has accepted the request and will start processing the message later. It will return 'Accepted' immediately and include an 'Operation-Location' header. Client side should further query the operation/message status using the URL specified in 'Operation-Location' header. Once the send operation has succeeded, you can get additional status about email delivery through either Azure Monitor or Event Grid events (for events reference, please refer to: https://learn.microsoft.com/en-us/azure/event-grid/communication-services-email-events)

idstring required

The unique id of the operation. Use a UUID.

status'NotStarted' | 'Running' | 'Succeeded' | 'Failed' | 'Canceled' required

Status of operation.

errorErrorDetail — unresolved $ref

Changes