Send an MMS Message
Overview
Easily send an MMS message with some media content.
Authentication
Authentication is done by passing your TSG Global API key via the Authorization header in the format "Authorization: Bearer <api_key>" (using the messaging API key specifically). API credentials can be found here: https://customer-portal.tsgglobal.com/account
Method
Send an MMS message.
POST
https://mmsc.tsgglobal.world/mms
The MMS API attempts to mirror an MM4 request, as such it shares some structural similarities and naming. Particularly the use of the ‘type’ field to denote the type of request. Currently only Forward Requests are available.
Request Body
Example POST
Delivery Receipts (DLRs)
DLRs for MMS messages are customer-enabled by optionally flagging a request for a DLR when POSTing to the API. Please include “request_delivery_reports”: true as in the above example, requesting that a DLR be sent to you. Omitting or setting it to false will result in no DLRs being forwarded to you.
Part Kinds
plain
Plain parts are used for text attachments, these include text/*
media types that do not include any binary or restricted characters (i.e. nulls).
data-uri
RFC2397 data URIs may be used to specify content_encoding, content_type and body in a single string. These strings however have a 65535 character limit.
uri
Parts can also be provided as URIs, the content_type will be taken from the request or determined based on the extension of the link.
Content downloaded from a URI must be 3 MB or less, otherwise it will be rejected and the message will have a nulled attachment.
The requested resource MUST return a valid Content-Length
, failure to do so will result in the attachment being nullified. NOTE: The server MUST respond to HEAD and GET requests for the attachment to be retrieved.
embedded
Parts MAY be embedded, in which all the data is included but MAY be compressed or encoded in a different format for transfer. Data in an embedded body must NOT exceed 1Mb (when compressed)
The body of the part will be decoded by applying:
transfer_encoding
content_encoding
To encode the part, apply the encodings in the reverse.
Note: All headers are subject to filter and may be excluded.
Any headers that start with following will not be added to the message:
x-mms-
content-
checksum-
x-checksum-
message-id
Example 200 OK Response
data.attributes.messages
will contain a message for each recipient. The provided message_id
will be used to reference the message in DLRs.
Additional Examples
Example - Escape Special Characters
Example - New Lines in Body
Example - the UTF-8 character - for more information please refer to RFC8259
Example - JSON Unicode escape
Frequently Asked Questions
Q - What is the maximum plain body text limit for an MMS message A - We recommend using 1000 characters or less.
Q - How many participants can I have in an MMS conversation A - We recommend having 10 or fewer participants in an MMS conversation.
Q - My request failed with a 400 Bad Request and a message saying unexpected character at X A - The JSON payload was malformed, did you include any new lines inside strings?
Q - How can I send a Line-feed/Carriage-return/other-non-printable-characters? A - JSON supports several escape sequences for handling non-printable-characters (see above).
Q - Can I send UTF-8 characters? A - Yes you can, the API supports UTF-8 encoding.
Q - Can I send an emoji? A - Yes you can, either using the unicode escape sequence or the UTF-8 character.
Last updated