Sinch offers MMS capabilities for its customers over the JSON API. On this page, you will find general information on and considerations for the MMS JSON API. For the API reference, click here. For the API status code reference, click here.
HTTPS. Authentication of API calls is done by using the accounts API key as well as IP whitelisting. Authenticating your API call can be done by passing the account’s API key into the
x-api-keyheader. Each API request must contain the API key passed into the header.
|Sends an MMS defined in a JSON schema to a single mobile number.|
|Stores an MMS defined in a JSON schema. Once saved, the MMS can be used by other functions through its |
|Sends a saved MMS Template from a specified account to a single mobile number.|
The following URL can be used by the JSON API:
Every MMS created using the JSON API will be transcoded for the destination handset based on your Account Settings. Additionally, any MMS which triggers an SMS Fallback containing a link to the MMS content hosted on a web page is optimized for the mobile web browser. To transcode a binary MMS, we must know what type of handset the user has. We are able to obtain this handset type information from delivery receipts, and we store the record in a handset cache for later use. We have a database of attributes which we manually match to every new handset in the cache, allowing us to adapt the content during MMS delivery.
POSTrequest method and the request body is UTF-8 encoded and JSON formatted according to the schemas described in this document. Postback notifications are issued as
HTTPrequests to the pre-configured postback URL you have provisioned to your account. Postback notifications are forwarded to your server one by one and require an
HTTP STATUS 200response as acknowledgement.We expect your server to accept the postback
HTTPrequest we send within 10 seconds by responding with a standard
HTTP STATUS 200header (success). If establishing a connection to your postback URL or your response takes longer than 10 seconds, the connection will time out and be dropped. If the connection times out or the
HTTPcode is not 200, we will retry the postback notification again approximately five minutes later. There is a maximum of 5 retries per notification.
Postback notifications to your Postback URL are queued and will be sent over a single keep-alive connection as fast as you accept them. Consider storing the raw postback requests and performing any heavy database processing operations later, asynchronously, for better performance.
During your onboarding, we will provide you with the host IP addresses from where the postback notification request will originate. If you perform any IP whitelisting or have a firewall configured, these IP addresses must then be granted access to your server hosting the postback URL. Please note that we may update the postback IP address in the future. You will be notified in advance of any changes.
saveMMSaction, it can be used by other functions through the
mms-idreturned from the
N003postback response. When an MMS is saved and transcoded successfully, the system will generate a postback notification and unlock the MMS template for further use. If an MMS contains audio/video, the postback will be sent when the encoding of the MMS audio/video is finished. Otherwise, the postback notification will be sent instantly after image and other content is transcoded in real-time and stored. In the postback you will receive the
mms-idfor the MMS created and the tracking-id that was originally received as the API Request Acknowledgement.
- Always use international number format. You must use the international format when sending MMS. International format includes both the country code and the phone number. We use the country code to determine routing of the message. There should be no dialing prefixes (for example, no
001). For example, the US number
774-555-9144in international number format would be
17745559144because the USA country code is
- Always set the proper file MIME type headers and extensions. Extensions are optional in the filename as long as the proper MIME type is set in the headers for that content. It is always recommended to use the proper file extension AND set the MIME type header. Query strings are supported for files.
- Delivery success takes precedence over audio and video content quality. Occasionally, the picture quality will be reduced to fit handset message size requirements.
- Video content may be reduced in quality to fit delivery limitations and, if it still does not fit, will be delivered as a fallback SMS.
- If the Transcoding is
ONfor the account, MMS containing audio/video can be used only when the audio/video encoding is completed.
- After submission, you will not be given a successful acknowledgement of audio/video encoding when a message is submitted.
- The status of audio/video encoding will be sent to your Postback URL after it has been completed.
- Content validation rules:
- Supported MIME TYPE and Supported Extension SHALL pass at validation and transcoding.
- Supported MIME TYPE and Invalid Extension SHALL pass at validation and transcoding.
- Supported MIME TYPE and No Extension SHALL pass at validation and transcoding.
- "Octet-stream" MIME TYPE and Supported Extension SHALL pass at validation and transcoding assuming the content is what the extension claims. Otherwise, it SHALL fail at transcoding.
- "Octet-stream" MIME TYPE and Invalid Extension SHALL fail at validation.
- "Octet-stream" MIME TYPE and No Extension SHALL fail at validation.
- MMS messages are delivered in B64 encoding. To estimate the final size of Base64 encoded binary data, multiply the file size by 1.37 times the original data size + 814 bytes (for headers).
E113when your API requests exceed the throughput limit and instructs your system to retry. If you receive this error code you should throttle back your request speed or number of connections and retry any rejected API calls with this
E113error code again.