Example Send Requests

This examples on this page show request to UK numbers. If you are sending messages to the US, you do not need to include the smsfrom parameter.

These examples are also to the single SMS endpoint (http://sms.openmarket.com/sms/v1/send) rather than the broadcast SMS endpoint.

Plain text using Modified Latin-9

This sends the message Hello World from the account MyAccount, with password P4ssw0rD, to the recipient 447700900750. Note that the message content, Hello World is URL encoded, so a blank space is represented by %20).

http://sms.openmarket.com/sms/v1/send?user=MyAccount&pass=P4ssw0rD&smsto=447700900750&smsmsg=Hello%20World&smsfrom=58870

This request sends the message Welcome to ACME as a flash message. Setting report=7 enables delivery reports:

http://sms.openmarket.com/sms/v1/send?user=MyAccount&pass=P4ssw0rD&smsto=447700900750&smsmsg=Welcome%20to%20ACME&flash=1&report=7&smsfrom=58870

This request sends the message Very long message as a concatenated multipart message:

http://sms.openmarket.com/sms/v1/send?user=MyAccount&pass=P4ssw0rD&smsto=447700900750&smsmsg=Very%20long%20message&split=2&smsfrom=58870

Plain text using GSM 03.38

This sends the message Hello World from the account MyAccount, with password P4ssw0rD, to the recipient 447700900750. Note that the message content, Hello World is URL encoded, so a blank space is represented by %20).

http://sms.openmarket.com/sms/v1/send?user=MyAccount&pass=P4ssw0rD&smsto=447700900750&smsia5=Hello%20World&smsfrom=58870

This request sends the message Welcome to ACME as a flash message. Setting report=7 enables delivery reports:

http://sms.openmarket.com/sms/v1/send?user=MyAccount&pass=P4ssw0rD&smsto=447700900750&smsia5=Hello%20World&flash=1&report=7&smsfrom=58870

This request sends the message First part of long message. It uses the smsudh parameter to send it as a concatenated multipart message:

http://sms.openmarket.com/sms/v1/send?user=MyAccount&pass=P4ssw0rD&smsto=447700900750&smsia5=First%20part%20of%20long%20message&smsudh=06050430393039&smsfrom=58870

Plain text using UCS-2 Unicode

This sends the message “γεια!” from the account MyAccount, with password P4ssw0rD, to the recipient 447700900750. The message is sent using a series of UCS-2 16-bit words. For example, the character 三 (the Japanese symbol for the number three) is hexadecimal encoded as 4E09. As UCS-2 Unicode is a 16-bit encoding, using it to send SMS messages restricts the maximum number of characters per message to 70.

http://sms.openmarket.com/sms/v1/send?user=MyAccount&pass=P4ssw0rD&smsto=447700900750&smsucs2=03b303b503b903b10021&smsfrom=58870

WAP Push

This sends a WAP Push SI message for the address http://www.example.com/. The parameter push_action requests that the WAP Push is displayed to the end user as soon as the mobile phone is free to do so. The WAP Push is uniquely identified in the mobile phone with siid=example.com-siid123. The push_siname is a description for the WAP Push which the mobile phone may display to the end user.

http://sms.openmarket.com/sms/v1/send?user=MyAccount&pass=P4sSw0rD&smsto=447700900750&smsfrom=58870&pushtype=0&push_href=http%3A%2F%2Fwww.example.com%2F&push_action=2&push_siid=example.com-siid123&push_siname=example+123

This request deletes a WAP Push SI message on an end user's mobile phone. The parameter push_action identifies that the request is to delete rather than add a WAP Push on the mobile phone. The parameter push_siid identifies the WAP Push to delete.

http://sms.openmarket.com/sms/v1/send?user=MyAccount&pass=P4sSw0rD&smsto=447700900750&smsfrom=58870&pushtype=0&push_href=http%3A%2F%2Fwww.example.com%2F&push_action=4&push_siid=example.com-siid123&push_siname=example+123

MMS notification

This sends an MMS notification to the number 447700900750. The mms_messagelocation parameter tells the mobile phone to collect the MMS content from http://example.com/123456. The mms_expire parameter sets the message to expire after 24 hours.

http://sms.openmarket.com/sms/v1/send?user=MyAccount&pass=P4sSw0rD&smsto=447700900750&smsfrom=58870&mms_messagelocation=http%3A%2F%2Fexample.com%2F123456&mms_expire=1440&mms_messageclass=80&mms_notification=1&mms_version=1.0&mms_from=%2B447700900999%2FTYPE%3DPLMN&mms_transaction_id=654321&mms_subject=Test%20MMS&mms_messagesize=35000

Binary data message

This sends the binary content 0x01020304 to port 0x1234 on the mobile phone, from the account MyAccount, with password P4ssw0rD, to the recipient 447700900750.

http://sms.openmarket.com/sms/v1/send?user=MyAccount&pass=P4ssw0rD&smsto=447700900750&smsfrom=58870&smsmsg=01020304&smsudh=06050412341234

vCards

The following example request:

http://sms.openmarket.com/sms/v1/send?user=MyAccount&pass=MyP4S5w0rD&smsto=447700900750&smsfrom=58870&vcard_data=BEGIN%3AVCARD%0D%0AVERSION%3A2.1%0D%0AFN%3AJohn+Smith%0D%0ATEL%3BWORK%3BVOICE%3A442071231234%0D%0ATEL%3BMOBILE%3BVOICE%3A447700900999%0D%0ATEL%3BHOME%3BFAX%3A442071231235%0D%0AEND%3AVCARD

sends a vCard for John Smith to the number 447700900750. Each line in the vCard must have a carriage return and line feed character (different mobile phones require either one of these characters). The URL encoding for these is %0D%0A.

The example vCard, before being URL encoded, has the following format and content:

BEGIN:VCARD
VERSION:2.1
FN:John Smith
TEL;WORK;VOICE:442071231234
TEL;MOBILE;VOICE:447700900999
TEL;HOME;FAX:442071231235
END:VCARD