Everything about MMS
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.
1500 characters
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)
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.
/uploads?convert=mms
File type | Required to be passed to uploads endpoint first? |
---|---|
jpg |
No |
gif |
No |
jpeg |
Yes |
png |
Yes |
bmp |
Yes |
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
media_file | string | true | none | Media file you want to send |
to | string | true | none | Recipient phone number in E.164 format |
body | string | true | none | Your message |
subject | string | true | none | Subject line (max 20 characters) |
from | string | true | yes | Your sender id |
Refer to Status Codes for definitions of HTTP status code responses.
Successful response
{- "media_file": "{{imageFileURL}}",
- "messages": [
- {
- "source": "php",
- "to": "+61411111111",
- "from": "+61411111111",
- "subject": "Test MMS",
- "body": "Image attached",
- "schedule": 1512538536
}
]
}
{- "http_code": 200,
- "response_code": "SUCCESS",
- "response_msg": "Messages queued for delivery.",
- "data": {
- "total_price": 13.2,
- "total_count": 1,
- "queued_count": 1,
- "messages": [
- {
- "list_id": null,
- "contact_id": 4,
- "message_id": "D7A79BF1-4806-43F8-8339-6B9F8385D9A4",
- "to": "+61298444214",
- "subject": "This is a subject",
- "from": "+61411111111",
- "body": "John This is a test message.",
- "country": "AU",
- "custom_string": "",
- "schedule": "",
- "message_parts": 1,
- "message_price": "2.4200",
- "status": "SUCCESS"
}
]
}
}
Get Price for MMS sent
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
media_file | string | true | none | Media file you want to send |
to | string | true | none | Recipient phone number in E.164 format |
body | string | true | none | Your message |
subject | string | true | none | Subject line (max 20 characters) |
from | string | true | yes | Your sender id |
Refer to Status Codes for definitions of HTTP status code responses.
Successful response
{- "media_file": "{{imageFileURL}}",
- "messages": [
- {
- "source": "php",
- "subject": "This is a subject",
- "from": "test",
- "body": "This is a test message.",
- "to": "+61437887639",
- "country": "AU"
}
]
}
{- "http_code": 200,
- "response_code": "SUCCESS",
- "response_msg": "Messages queued for delivery.",
- "data": {
- "total_price": 19.36,
- "total_count": 1,
- "queued_count": 1,
- "messages": [
- {
- "list_id": null,
- "contact_id": 4,
- "message_id": "D7A79BF1-4806-43F8-8339-6B9F8385D9A4",
- "to": "+61298444214",
- "subject": "This is a subject",
- "from": "+61411111111",
- "body": "John This is a test message.",
- "country": "AU",
- "custom_string": "",
- "schedule": "",
- "message_parts": 1,
- "message_price": "2.4200",
- "status": "SUCCESS"
}
]
}
}
Get all mms history
Parameter | In | Type | Required | Description |
---|---|---|---|---|
date_from | query | integer(int32) | false | Start date (Unix Timestamp e.g. 1436849372) |
date_to | query | integer(int32) | false | End date (Unix Timestamp e.g. 1436879372) |
page | query | integer(int32) | false | Page number |
limit | query | integer(int32) | false | Number of records per page |
Refer to Status Codes for definitions of HTTP status code responses.
Successful response
curl --include \ --header "Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA==" \ 'https://rest.clicksend.com/v3/mms/history?date_from=&date_to='
{- "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": [
- {
- "direction": "out",
- "date": "1436932432",
- "to": "+16783270696",
- "body": "Chocolate bar icing icing oat cake carrot cake jelly cotton 1iQByXxdLN.",
- "status": "Completed",
- "from": "sendlist",
- "schedule": "1436879372",
- "status_code": null,
- "status_text": null,
- "error_code": null,
- "error_text": "string",
- "message_id": "4E90F4C3-43A3-489D-9AB8-DA1F4332A0C3",
- "message_parts": "1.00",
- "message_price": "0.070000",
- "from_email": null,
- "list_id": null,
- "custom_string": "this is a test",
- "contact_id": 0,
- "user_id": 1,
- "subaccount_id": 1,
- "country": "US",
- "carrier": "string",
- "first_name": "John",
- "last_name": "Doe",
- "_api_username": "johndoe"
}
]
}
}
Export all mms history
Parameter | In | Type | Required | Description |
---|---|---|---|---|
filename | query | string | true | Filename to download history as |
Refer to Status Codes for definitions of HTTP status code responses.
Successful response
curl --include \ --header "Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA==" \ 'https://rest.clicksend.com/v3/mms/history/export?filename={filename}'
{- "http_code": 200,
- "response_code": "SUCCESS",
- "response_msg": "Download your file here.",
}