Download OpenAPI specification:Download

MMS

This API sends, saves, or sends a saved MMS defined in the JSON to a single mobile number. The sent or saved MMS may contain slides embedded with text, images, videos, audios, and/or other objects. Calls to the API are made in the form of HTTP requests using the POST request method with UTF-8 encoded JSON data passed inside the request body. All requests are expected to include a content-type HTTP header (for example, Content-Type: application/json; charset=utf-8).

Important:

Sinch will send an HTTP GET request to the server that is specified in the JSON slide of the embedded images, videos, audios, and/or other object URIs to retrieve the contents of the media file. The HTTP response header Sinch receives from the server MUST contain the Content-Length field indicating the size of the resource. Otherwise, the API request will fail. Customers using CDNs that employ chunked transfer encoding may run into problems in which the server returns a Transfer-Encoding field with a value of "chunked" specified in the HTTP GET response, rather than the server returning Content-Length. If a Transfer-Encoding field with a value of "chunked" is specified in an HTTP, the API request will be rejected.

Important:

All media files are expected to serve a valid content-type header (for example, text/plain, image/gif, audio/mp3, video/mp4, etc.). If a file server serves a file using the application/octet-stream content-type header instead, it may be rejected if the MIME type cannot be determined by other means.

Send, save, or send a saved MMS

This request is used to send, save, or send a saved MMS message.

SecurityApiKey
Request
Request Body schema: application/json
required

This request is used to send, save, or send a saved MMS message.

action
required
string
Default: "sendmms"

The action for this API request. In this case, to send an MMS.

service-id
required
string

The ID of the campaign.

to
required
string

Destination phone number with country code.

from
required
string

Shortcode, or Toll Free, or 10DLC with country code.

required
Array of image (object) or audio (object) or video (object) or contact (object) or calendar (object) or pdf (object)

Slide content node which contains the content URL. Must contain at least one slide object. A maximum of 8 slides may be specified for a single MMS message. Acceptable slide content includes:

  • image (cannot be used with video, contact, calendar, or pdf)
  • audio (cannot be used with video, contact, calendar, or pdf)
  • video (cannot be used with image, audio, contact, calendar, or pdf)
  • contact (cannot be used with image, audio, or video)
  • calendar (cannot be used with image, audio, or video)
  • pdf (cannot be used with image, audio, or video)
  • message-text (maximum of 5000 characters)

Note that you cannot include multiple files of the same MIME type on the same slide. Also note that, if transcoding is ON for the account, the API shall reformat the content when necessary, so it can be delivered to the end-users handset in the best possible way.

from-mask
string

Only carriers in certain countries allow Alphanumeric senders. Not supported in the USA.

message-subject
string

MMS subject text. Limit to 40 characters for best deliverability. Maximum of 80 characters.

fallback-sms-text
string

Must be included if disable-fallback-sms is set to false. Text to be included when SMS sent as a fallback. For best deliverability, limit string to 110 characters.

disable-fallback-sms-link
boolean

Set to true to prevent a link to the MMS content from being included in the SMS fallback message.

disable-fallback-sms
boolean

Set to true to prevent delivery of fallback SMS message.

fallback-sms-link-expiration
string <date-time>

Expiration for the SMS fallback link. If not populated, defaults to 1 year from the time and date at which the API request was made. Maximum of 1 year. Accepts ISO8601 Date format. Only applies to fallback SMS messages.

mms-expiry-timestamp
string <date-time>

MMS delivery attempts will stop after the date and time specified in this field. If the MMS is already delivered to the device, it will remain in the device's inbox. If not populated, the expiration value defaults to 3 days from the time and date at which the API request was made. Maximum of 3 days. Accepts ISO8601 Date format.

client-reference
string

Customer transaction ID of the request. Passed back in all postbacks for this transaction. Maximum length of 64 characters.

cache-content
boolean

Caching is done for every sendmms request by default unless overridden by the API request by populating this field with false. If cache is found, the original content won't be downloaded to validate.

Responses
200

Response

Response Schema: application/json
status
string

Indicates the status of the action. Either success or failure.

status-details
string

More details about the status of the action. Returned with success status for any action.

tracking-id
string

Transaction ID for the request. Used for identifying postbacks received for this API request. Returned with success status for any action.

to
string

Destination phone number with country code. Returned when sendmms or sendsavedmms have a success status.

mms-id
string

The ID of the sent MMS template. Returned when sendsavedmms has a success status.

from
string

Shortcode or Toll Free/10DLC number with country code that will be used to send a saved MMS. Returned when sendsavedmms has a success status.

error-code
string

Code that identifies the specific error that was encountered. Returned with failure status for any action.

error-info
string

Message that explains the error code. Returned with failure status for any action.

post/
Request samples
application/json
{
  • "value": {
    • "action": "sendmms",
    • "service-id": "YOUR_CAMPAIGN_ID",
    • "to": "RECIPIENT_PHONE_NUMBER_WITH_COUNTRY_CODE",
    • "from": "YOUR_PHONE_NUMBER",
    • "from-mask": "YOUR_MASK",
    • "message-subject": "YOUR_SUBJECT_TEXT",
    • "fallback-sms-text": "TEXT_OF_FALLBACK_SMS",
    • "disable-fallback-sms-link": false,
    • "disable-fallback-sms": false,
    • "fallback-sms-link-expiration": "EXPIRATION_DATE_UTC",
    • "mms-expiry-timestamp": "ISO8601_DATE_FORMAT",
    • "client-reference": "CLIENT_SUPPLIED_IDENTIFIER",
    • "cache-content": true,
    • "slide": [
      ]
    },
  • "action": "sendMMS"
}
Response samples
application/json
{
  • "status": "success",
  • "to": "DESTINATION_PHONE_NUMBER",
  • "tracking-id": "UNIQUE-TRANSACTION-ID",
  • "status-details": "MMS request accepted and queued for processing and delivery."
}