Send an MMS

Send messages to mobile phones with image and long textmessage.



Request parameters

Parameter Example Description
to +46766861004 The phone number of the recipient, in E.164 format.
from +46766861004
The phone number to send with. Must be an MMS-enabled Virtual Phone Number or the text "noreply", 46elks will replace the sender id with a random phonenumber if "noreply" is used.
message Hi! This is an Message to your phone! An message to be sent with the MMS. Either message or image must be present in the API request.
Either a data URL or a publicly accessible URL that points to an image. GIF, PNG and JPEG images are supported. Either image or message must be present in the API request.

Sample code

curl \
  -u <Username>:<API Password> \
  -d from=+46766861004 \
  -d to=+46766861004 \
  -d image=""
import HTTPotion.base
authdata = [basic_auth: {'',

request = %{
            "from"    => "+46766861004",
            "to"      => "+46766861004",
            "image"   => ""

request_data = URI.encode_query(request)

  [body: request_data , ibrowse: authdata]
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

public class UnirestSendMMS {
  public static void main(String[] args) {
    try {
      System.out.println("Sending MMS");

      HttpResponse response ="")
        .field("to", "+46766861004")
        .field("from", "+46766861004")
        .field("image", "")


    catch (Exception e){
function sendMMS ($mms) {
  $username = "USERNAME";
  $password = "PASSWORD";
  $context = stream_context_create(array(
    'http' => array(
      'method' => 'POST',
      'header'  => 'Authorization: Basic '.
                   base64_encode($username.':'.$password). "\r\n".
                   "Content-type: application/x-www-form-urlencoded\r\n",
      'content' => http_build_query($mms),
      'timeout' => 10
  $response = file_get_contents("",
    false, $context);

  if (!strstr($http_response_header[0],"200 OK"))
    return $http_response_header[0];
  return $response;
$mms = array(
  "from" => "+46766861004",   /* You need an mms enabled phone number */
  "to" => "+46766861004",  /* The mobile number you want to send the image to */
  "image" => "",
echo sendMMS($mms);
import requests

auth = (

fields = {
    'from': '+46723175800',
    'to': '+46723175800',
    'image': ''

response =

require 'net/http'

uri = URI('')
req =
req.basic_auth '', ''
  :from => '+46704508449',
  :to => '+46704508449',
  :image => ''

res = Net::HTTP.start(,
    :use_ssl => uri.scheme == 'https') do |http|
  http.request req

puts res.body

More examples
C - C# - Go - Google App Script - Haskell - Node.js - Postman


Example JSON response
  "direction": "outgoing",
  "from": "+46766861218",
  "created": "2016-11-03T12:44:56.180704",
  "to": "+46723175800",
  "cost": 12500,
  "message": "Hej!",
  "id": "mf3d05c159aa49e1951c5301bc6af1bac"
Attribute Type Description
id string The unique id of the message in our systems.
from string The phonenumber the MMS was sent from.
to string Phoenumber that the MMS was sent to.
message string The text message if the MMS contains a text.
created string The time in UTC when the SMS object was created in our systems.
cost integer The cost of sending the MMS. Specified in 10000s of the currency of the account (SEK or EUR). For example, for an account with currency SEK a cost of 3500 means that it cost 0.35SEK. Learn more about the details of pricing.