logo   HOME

SMS Messaging

This page lists the optional parameters, request data and reponse in xml

Get maximum characters allowed for long-code message [HTTP GET]

https://appapi.dlangemobile.com/xml/messages/{api_key}/longcode/maxcharacters

URL Parameters

  • api_key (Required) - Your API application key.

Example XML Response

<int>5</int>

Error Codes

  • 001 - API key is required.
  • 002 - Invalid API key.

Get long-code message footer [HTTP GET]

https://appapi.dlangemobile.com/xml/messages/{api_key}/longcode/footer

URL Parameters

  • api_key (Required) - Your API application key.

Example XML Response

<string>message footer</string>

Error Codes

  • 001 - API key is required.
  • 002 - Invalid API key.

Send long-code message [HTTP POST]

https://appapi.dlangemobile.com/xml/messages/{api_key}/longcode?start_time={start_time}&end_time={end_time}

URL Parameters

  • api_key (Required) - Your API application key.

Query string Parameters

  • start_time (Optional) - Start time to send the message. Must be in hh:mm format. This is required if end_time is provided.
  • end_time (Optional) - End time to send the message. Must be in hh:mm format. This is required if start_time is provided.

Request Notes

  • Content - Content of message to be sent. Must be less than or equal to the maximum number of characters allowed.
  • RecipientContacts - List of contact ID's set as recipients.
  • RecipientGroups - List of group ID's set as recipients.
  • PhoneNumbers - List of phone numbers to set as recipients. Values must contain the '+' sign, the country code and the mobile phone number. Ex. +12345678901., where +1 is the country code.
  • BranchCode (Optional) - Use this if you want to associate the SMS to a particular branch or store.
  • Type (Optional) - Use this if you want to associate the SMS to a particular campaign type like "Marketing", "Payment Alert", or any campaign type you want.


  • For sending MMS, just include the Media element content and add the elements below. Please note that either MediaId, MediaURL or MediaContent should have a value. The media file size should be up to 740.0KB and supported files are Images(.png, .jpg, .jpeg, .gif), Audio(.mp3), Video(.mp4), and vCard(.vcf) only.

  • UseMMS - (Optional). Set this value to "true" if you want to send MMS message. If set to "false" or this element is not included in the request, the message will be sent as SMS.
  • Media (Optional) - Contains the media elements. Use this if you want to send MMS.
  • MediaId - (Optional). Valid Id of the media file. You can create a media here and use the MediaId from the XML response. This is recommended when you send the same media file to your customers.
  • MediaURL - (Optional). Valid URL to a media file.
  • MediaContent - (Optional). Media file byte array encoded in Base64.
  • MediaFileName - (Optional). File name of the media file provided in MediaContent. Required only if MediaContent is provided.


  • For sending SMS with calendar invite, just include the CalendarEvent element.

  • CalendarEvent (Optional) - Contains the calendar event elements. Use this if you want to send message with calendar invite. The content of the message should contain a keyword (#URL#) where the calendar invite link will be placed.
  • Example: Hello John, please join our meeting on Sept. 29, 2024 @ 2pm. For the calendar invite, click here #URL#. Reply STOP to stop
  • Title - (Required). Calendar invite title.
  • StartDateTime - (Required). Calendar invite start date and time. Must be in {yyyy}-{mm}-{dd}T{hh}:{mm}:{ss} format.
  • EndDateTime - (Required). Calendar invite end date and time. Must be in {yyyy}-{mm}-{dd}T{hh}:{mm}:{ss} format.
  • Location - (Required). Calendar invite location.
  • Description - (Required). Calendar invite description.

  • For sending SMS Messaging with calendar invite, just include the CalendarEvent element.

Example XML Request

<Message>
  <Content>my sms message</Content>
  <RecipientContacts>
    <int>2</int>
    <int>34</int>
  </RecipientContacts>
  <RecipientGroups>
    <int>45</int>
    <int>78</int>
  </RecipientGroups>
  <PhoneNumbers>
    <string>+18543234567</string>
    <string>+18354372635</string>
  </PhoneNumbers>
  <BranchCode>1234</BranchCode>
  <Type>Reminder Alert</Type>
</Message>

Example XML Request for sending MMS using MediaId

<Message>
  <Content>my MMS message</Content>
  <PhoneNumbers>
    <string>+18543234567</string>
    <string>+18354372635</string>
  </PhoneNumbers>
  <UseMMS>true</UseMMS>
  <Media>
    <MediaId>98928dc1-0a63-4f35-b721-9065eecae199</MediaId>
  </Media>
</Message>

Example XML Request for sending MMS using MediaURL

<Message>
  <Content>my MMS message</Content>
  <PhoneNumbers>
    <string>+18543234567</string>
    <string>+18354372635</string>
  </PhoneNumbers>
  <UseMMS>true</UseMMS>
  <Media>
    <MediaURL>https://[valid domain address]/samplephoto.jpg</MediaURL>
  </Media>
</Message>

Example XML Request for sending SMS with calendar invite

<Message>
  <Content>Hello John, please join our meeting on Sept. 29, 2024 @ 2pm. For the calendar invite, click here #URL#. Reply STOP to stop</Content>
  <PhoneNumbers>
    <string>+18543234567</string>
    <string>+18354372635</string>
  </PhoneNumbers> 
  <CalendarEvent>
    <Title>Project Meeting</Title>
    <StartDateTime>2024-09-29T14:00:00</StartDateTime>
    <EndDateTime>2024-09-29T15:00:00</EndDateTime>
    <Location>Augusta Office</Location>
    <Description>Project Progress Report Meeting</Description>
  </CalendarEvent>
</Message>

Response Notes

  • ID - Automatically-assigned ID used check if message is sent.

Example XML Response

<int>5</int>

Error Codes

  • 001 - API key is required.
  • 002 - Invalid API key.
  • 305 - Invalid start or end time. Times must be in hh:mm format and between 00:00 to 23:59.
  • 306 - Start time should be earlier than end time.
  • 305 - Invalid start or end time. Times must be in hh:mm format and between 00:00 to 23:59.
  • 307 - Include at least one recipient.
  • 308 - Message contains one or more invalid phone number(s). Enter 10 digit number for recipients.
  • 309 - No SMS message in the request XML data.
  • 310 - SMS message number of characters should be less than the max length..
  • 311 - Message queued for sending. You do not have enough credits to send to all recipients.
  • 312 - Message contains no valid recipients..
  • 313 - Message contains one or more non-existing group IDs.
  • 314 - Message contains one or more non-existing contact IDs.
  • 315 - Provide a valid message info. Request XML data is invalid or not passed as post data.
  • 316 - Not enough credits left to send to all recipients.
  • 317 - Sending of messages to international numbers is not allowed.
  • 318 - This method is not allowed for reseller accounts.
  • 319 - No long-code number assigned.
  • 399 - MMS sending not allowed.
  • 400 - Invalid value for UseMMS. Valid values are "True", "true", "False", "false" only.
  • 401 - No media provided. For sending MMS, please provide value for either MediaURL (a valid URL for the media file) or MediaContent (media file byte array encoded in Base64).
  • 402 - Invalid MediaURL. MediaURL should be a valid link to a media file.
  • 403 - Invalid media for MMS. Supported file types are .png, .jpg, .jpeg, .gif, .mp4, .mp3, and .vcf only.
  • 404 - Media file is too large. Please provide a media file of up to 740.0KB only.
  • 405 - MediaContent is not a valid file. It should be the media file byte array encoded in Base64.
  • 406 - Invalid MediaFilename. MediaFilename value is required when MediaContent is provided.
  • 407 - Invalid Media Id.
  • 408 - Media has expired.
  • 432 - #URL# keyword is required in the Message content when sending a calendar invite.
  • 433 - Calendar invite startdatetime and enddatetime is required.
  • 434 - Calendar invite title is required.
  • 435 - Calendar invite location is required.
  • 436 - Calendar invite description is required.