Email - Get Send Result

Gets the status of the email send operation.

GET {endpoint}/emails/operations/{operationId}?api-version=2023-03-31

URI Parameters

Name In Required Type Description
endpoint
path True

string

url

The communication resource, for example https://my-resource.communication.azure.com

operationId
path True

string

ID of the long running operation (GUID) returned from a previous call to send email

api-version
query True

string

Version of API to invoke.

Request Header

Name Required Type Description
Authorization True

string

An authentication string containing a signature generated using HMAC-SHA256 scheme.

Responses

Name Type Description
200 OK

EmailSendResult

Message status was successfully retrieved.

Headers

retry-after: integer

Other Status Codes

ErrorResponse

Error

Headers

x-ms-error-code: string

Security

Authorization

An authentication string containing a signature generated using HMAC-SHA256 scheme.

Type: apiKey
In: header

Examples

Get Message Status FailedTerminalStatus
Get Message Status NonTerminalStatus
Get Message Status SuccessTerminalStatus

Get Message Status FailedTerminalStatus

Sample request

GET https://contoso.westus.communications.azure.com/emails/operations/F9168C5E-CEB2-4faa-B6BF-329BF39FA1E4?api-version=2023-03-31

Sample response

{
  "id": "F9168C5E-CEB2-4faa-B6BF-329BF39FA1E4",
  "status": "Failed",
  "error": {
    "code": "EmailDropped",
    "message": "Email was dropped after several attempts to deliver."
  }
}

Get Message Status NonTerminalStatus

Sample request

GET https://contoso.westus.communications.azure.com/emails/operations/F9168C5E-CEB2-4faa-B6BF-329BF39FA1E4?api-version=2023-03-31

Sample response

retry-after: 100
{
  "id": "F9168C5E-CEB2-4faa-B6BF-329BF39FA1E4",
  "status": "Running"
}

Get Message Status SuccessTerminalStatus

Sample request

GET https://contoso.westus.communications.azure.com/emails/operations/F9168C5E-CEB2-4faa-B6BF-329BF39FA1E4?api-version=2023-03-31

Sample response

{
  "id": "F9168C5E-CEB2-4faa-B6BF-329BF39FA1E4",
  "status": "Succeeded"
}

Definitions

Name Description
EmailSendResult

Status of the long running operation

EmailSendStatus

Status of operation.

ErrorAdditionalInfo

The resource management error additional info.

ErrorDetail

The error detail.

ErrorResponse

Error response

EmailSendResult

Status of the long running operation

Name Type Description
error

ErrorDetail

Error details when status is a non-success terminal state.

id

string

The unique id of the operation. Use a UUID.

status

EmailSendStatus

Status of operation.

EmailSendStatus

Status of operation.

Name Type Description
Canceled

string

Failed

string

NotStarted

string

Running

string

Succeeded

string

ErrorAdditionalInfo

The resource management error additional info.

Name Type Description
info

object

The additional info.

type

string

The additional info type.

ErrorDetail

The error detail.

Name Type Description
additionalInfo

ErrorAdditionalInfo[]

The error additional info.

code

string

The error code.

details

ErrorDetail[]

The error details.

message

string

The error message.

target

string

The error target.

ErrorResponse

Error response

Name Type Description
error

ErrorDetail

The error object.