MMS

Everything about MMS

Languages
Servers
https://rest.clicksend.com/

Send MMS

Request

Send MMS

You can post up to 1000 messages with each API call. You can send to a mix of contacts and contact lists, as long as the total number of recipients is up to 1000. The response contains a status and details for each recipient.

Refer to Application Status Codes for the possible response message status strings.

How many characters can I send in a message?

Standard MMS Message

1500 characters

Unicode MMS Message

500 characters

If a message is longer the allowed number of characters it will be truncated. If a message contains any characters that aren't in the GSM 03.38 character set, the message type will be treated as unicode. (https://en.wikipedia.org/wiki/GSM_03.38)

Maximum File Size

You can send a single attachment with a size of up to 250 kB. Some older devices can only accept attachments with up to 30 kB.

Supported File Types

  • Supported file types are listed below. If you need to convert a file to a supported format, it can be first passed to our uploads endpoint: /uploads?convert=mms
  • This will return a URL to the converted image file that can be used in the /mms/send endpoint.
  • Contact us to add support for any other file type.

Images

File typeRequired to be passed to uploads endpoint first?
jpgNo
gifNo
jpegYes
pngYes
bmpYes

Properties

NameTypeRequiredRestrictionsDescription
media_filestringtruenoneMedia file you want to send
tostringtruenoneRecipient phone number in E.164 format
bodystringtruenoneYour message
subjectstringtruenoneSubject line (max 20 characters)
fromstringtrueyesYour sender id

Refer to Status Codes for definitions of HTTP status code responses.

This endpoint requires authentication,more info...
Headers
Content-Typestring
Example: application/json
Bodyapplication/json
media_filestring
Example: "{{imageFileURL}}"
messagesArray of objects
Example: [{"source":"php","to":"+61411111111","from":"+61411111111","subject":"Test MMS","body":"Image attached","schedule":1512538536}]
curl --include \
     --header "Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA=="  \
     --request POST \
     --header "Content-Type: application/json" \

     --data-binary "    {
        \"media_file\":\"http://yourdomain.com/tpLaX6A.gif\",
        \"messages\":[
           {
             \"source\" : \"php\",
             \"subject\": \"This is a subject\",
             \"from\" : \"test\",
             \"body\" : \"This is a test body with special character: 英\",
             \"to\": \"+61437111222\",
             \"country\": \"AU\"
           }
        ]
    }" \
'https://rest.clicksend.com/v3/mms/send'

Responses

Successful response

Bodyapplication/json
http_codeinteger

The HTTP status code of the response.

Example: 200
response_codestring

The response code indicating the status of the operation.

Example: "SUCCESS"
response_msgstring

A message describing the outcome of the operation.

Example: "Messages queued for delivery."
dataobject
Response
application/json
{ "http_code": 200, "response_code": "SUCCESS", "response_msg": "Messages queued for delivery.", "data": { "total_price": 13.2, "total_count": 1, "queued_count": 1, "messages": [] } }

Calculate MMS Price

Request

Get Price for MMS sent

Properties

NameTypeRequiredRestrictionsDescription
media_filestringtruenoneMedia file you want to send
tostringtruenoneRecipient phone number in E.164 format
bodystringtruenoneYour message
subjectstringtruenoneSubject line (max 20 characters)
fromstringtrueyesYour sender id

Refer to Status Codes for definitions of HTTP status code responses.

This endpoint requires authentication,more info...
Headers
Content-Typestring
Example: application/json
Bodyapplication/json
media_filestring
Example: "{{imageFileURL}}"
messagesArray of objects
Example: [{"source":"php","subject":"This is a subject","from":"test","body":"This is a test message.","to":"+61437887639","country":"AU"}]
curl --include \
     --header "Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA=="  \
     --request POST \
     --header "Content-Type: application/json" \

     --data-binary "    {
        \"media_file\":\"http://yourdomain.com/tpLaX6A.gif\",
        \"messages\":[
           {
             \"source\" : \"php\",
             \"subject\": \"This is a subject\",
             \"from\" : \"test\",
             \"body\" : \"This is a test body with special character: 英\",
             \"to\": \"+61437111222\",
             \"country\": \"AU\"
           }
        ]
    }" \
'https://rest.clicksend.com/v3/mms/price'

Responses

Successful response

Bodyapplication/json
http_codeinteger

The HTTP status code of the response.

Example: 200
response_codestring

The response code indicating the status of the operation.

Example: "SUCCESS"
response_msgstring

A message describing the outcome of the operation.

Example: "Messages queued for delivery."
dataobject
Response
application/json
{ "http_code": 200, "response_code": "SUCCESS", "response_msg": "Messages queued for delivery.", "data": { "total_price": 19.36, "total_count": 1, "queued_count": 1, "messages": [] } }

View MMS History

Request

Get all mms history

Parameters

ParameterInTypeRequiredDescription
date_fromqueryinteger(int32)falseStart date (Unix Timestamp e.g. 1436849372)
date_toqueryinteger(int32)falseEnd date (Unix Timestamp e.g. 1436879372)
pagequeryinteger(int32)falsePage number
limitqueryinteger(int32)falseNumber of records per page

Refer to Status Codes for definitions of HTTP status code responses.

This endpoint requires authentication,more info...
Query
limitinteger
Example: limit=100
Headers
Content-Typestring
Example: application/json
curl --include \
     --header "Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA=="  \

'https://rest.clicksend.com/v3/mms/history?date_from=&date_to='

Responses

Successful response

Bodyapplication/json
http_codeinteger

The HTTP status code of the response.

Example: 200
response_codestring

The response code indicating the status of the operation.

Example: "SUCCESS"
response_msgstring

A message describing the outcome of the operation.

Example: "Here are your data."
dataobject
Response
application/json
{ "http_code": 200, "response_code": "SUCCESS", "response_msg": "Here are your data.", "data": { "total": 2, "per_page": 15, "current_page": 1, "last_page": 1, "next_page_url": null, "prev_page_url": null, "from": 1, "to": 2, "data": [] } }

Export MMS History

Request

Export all mms history

Parameters

ParameterInTypeRequiredDescription
filenamequerystringtrueFilename to download history as

Refer to Status Codes for definitions of HTTP status code responses.

This endpoint requires authentication,more info...
Query
filenamestring
Example: filename=MMS_history.csv
qstring
order_bystring
Example: order_by=date_added:desc
date_fromstring
date_tostring
limitinteger
Example: limit=50000
Headers
Content-Typestring
Example: application/json
curl --include \
     --header "Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA=="  \

'https://rest.clicksend.com/v3/mms/history/export?filename={filename}'

Responses

Successful response

Bodyapplication/json
http_codeinteger

The HTTP status code of the response.

Example: 200
response_codestring

The response code indicating the status of the operation.

Example: "SUCCESS"
response_msgstring

A message describing the outcome of the operation.

Example: "Download your file here."
dataobject
Response
application/json
{ "http_code": 200, "response_code": "SUCCESS", "response_msg": "Download your file here.", "data": { "url": "https://rest.clicksend.com/files/22D55AF9-6CF0-476D-A8B3-82A998FD2738?filename=export.csv" } }