Share via


Mms - Send

Sends MMS message from a phone number that belongs to the authenticated account.

POST {endpoint}/mms?api-version=2024-01-14-preview

URI Parameters

Name In Required Type Description
endpoint
path True

string (url)

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

api-version
query True

string

Version of API to invoke

Request Body

Name Required Type Description
attachments True

MmsSendRequestAttachment[]

A list of media attachments to include as part of the MMS. You can have maximum 10 attachments.

from True

string

The sender's identifier (typically phone number in E.164 format) that is owned by the authenticated account.

recipients True

MmsRecipient[]

The recipient phone numbers in E.164 format.

message

string

minLength: 0
maxLength: 1000

The contents of the message that will be sent to the recipient.

sendOptions

MmsSendOptions

Optional configuration for sending MMS messages.

Responses

Name Type Description
202 Accepted

MmsSendResponse

Accepted

Examples

Send Message

Sample request

POST https://resourcename.communication.azure.com//mms?api-version=2024-01-14-preview

{
  "from": "+18004567891",
  "recipients": [
    {
      "to": "+18335852071"
    },
    {
      "to": "+11234567890"
    },
    {
      "to": "+112345678910abc"
    }
  ],
  "message": "Hey, Let's go for Dinner to these nice place",
  "attachments": [
    {
      "contentType": "image/png",
      "contentInBase64": "iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAF1SURBVHhe7dyxUVVRGEbRc28sCR04YxMklkAmAQ4d2ANUYBEOERppwJAb2AQJDUBA/K7Dm1OCwb7jWsk5X7zzf3k9/7CNvdq2H+9+PX6a6+jmflwt6/g25+6s8yVCkBhBYgSJESRGkBhBYgSJESRGkBhBYgSJESRGkBhBYgSJESRGkBhBYgSJESRGkBhBYgSJESRGkBhBYgSJESRGkBhBYgSJESRGkBhBYgSJESRGkBhBYgSJESRGkBhBYgSJESRGkJi380x3878729j+nPx8/Drn0fXD+Lhu48ucAPDfWMbty+X8789yeBqfT3/PdXR4GO/Hsp7NuTvLcvu85yOY37er04u5jg73qyOY/DuCxAgSI0iMIDGCxAgSI0iMIDGCxAgSI0iMIDGCxAgSI0iMIDGCxAgSI0iMIDGCxAgSI0iMIDGCxAgSI0iMIDGCxAgSI0iMIDGCxAgSI0iMIDGCxAgSI0iMIDGCxAgSI0iMIDGCpIzxF44oJKb+uryCAAAAAElFTkSuQmCC"
    }
  ],
  "sendOptions": {
    "enableDeliveryReport": true,
    "tag": "CustomerId"
  }
}

Sample response

{
  "value": [
    {
      "to": "+18335852071",
      "messageId": "9f339141-1539-49e1-828f-80ee3b5804e5",
      "httpStatusCode": 202,
      "successful": true
    },
    {
      "to": "+11234567890",
      "messageId": "571697e9-baba-4d8a-b493-e919bde9723a",
      "httpStatusCode": 202,
      "successful": true
    },
    {
      "to": "+112345678910abc",
      "httpStatusCode": 400,
      "errorMessage": "Invalid phone number format.",
      "successful": false
    }
  ]
}

Definitions

Name Description
MmsContentType

MIME type of attachment.

MmsRecipient

Represents properties for a single recipient.

MmsSendMessageRequest

Represents the properties of a send MMS message request.

MmsSendOptions

Optional configuration for sending MMS messages.

MmsSendRequestAttachment

Represents the properties of a send request attachment.

MmsSendResponse

Response for a successful or multi status MMS send request.

MmsSendResponseItem

MMS response for a single recipient.

MmsContentType

MIME type of attachment.

Value Description
image/png
image/jpeg
image/gif
image/bmp
audio/wav
audio/x-wav
audio/ac3
audio/amr
video/mp4
video/x-msvideo
text/plain

MmsRecipient

Represents properties for a single recipient.

Name Type Description
repeatabilityFirstSent

string

MUST be sent by clients to specify that a request is repeatable. Repeatability-First-Sent is used to specify the date and time at which the request was first created.eg- Tue, 26 Mar 2019 16:06:51 GMT.

repeatabilityRequestId

string

If specified, the client directs that the request is repeatable; that is, the client can make the request multiple times with the same Repeatability-Request-ID and get back an appropriate response without the server executing the request multiple times. The value of the Repeatability-Request-ID is an opaque string representing a client-generated, 36-character hexadecimal case-insensitive encoding of a UUID (GUID), identifier for the request.

to

string

minLength: 1

The recipient's phone number in E.164 format.

MmsSendMessageRequest

Represents the properties of a send MMS message request.

Name Type Description
attachments

MmsSendRequestAttachment[]

A list of media attachments to include as part of the MMS. You can have maximum 10 attachments.

from

string

The sender's identifier (typically phone number in E.164 format) that is owned by the authenticated account.

message

string

minLength: 0
maxLength: 1000

The contents of the message that will be sent to the recipient.

recipients

MmsRecipient[]

The recipient phone numbers in E.164 format.

sendOptions

MmsSendOptions

Optional configuration for sending MMS messages.

MmsSendOptions

Optional configuration for sending MMS messages.

Name Type Description
enableDeliveryReport

boolean

Enable this flag to receive a delivery report for this message on the Azure Resource EventGrid.

tag

string

Use this field to provide metadata that will then be sent back in the corresponding Delivery Report.

MmsSendRequestAttachment

Represents the properties of a send request attachment.

Name Type Description
contentInBase64

string (byte)

minLength: 1

Content of the attachment encoded in base 64.

contentType

MmsContentType

MIME type of attachment.

MmsSendResponse

Response for a successful or multi status MMS send request.

Name Type Description
value

MmsSendResponseItem[]

MMS response for a single recipient.

MmsSendResponseItem

MMS response for a single recipient.

Name Type Description
errorMessage

string

Optional error message in case of 4xx/5xx/repeatable errors.

httpStatusCode

integer (int32)

HTTP Status code.

messageId

string

The identifier of the outgoing message. Only present if message processed.

repeatabilityResult enum:
  • accepted
  • rejected

The result of a repeatable request with one of the case-insensitive values accepted or rejected.

successful

boolean

Indicates if the message is processed successfully or not.

to

string

minLength: 1

The recipient's phone number in E.164 format.