POST api/v1/sms/messages

This method creates a secure message and sends the notification message to the recipients selected in the request. The recipients must be in the address book. This method allows the requester to set the expiry date for the message, the number of reads that each recipient is allowed to view the message, whether the recipient is allowed to response to the message. Also the method allows the requester whether to they receive delivery and read notifications.

Request Information

URI Parameters

None.

Body Parameters

Either xml or json request.

MessageSecure
NameDescriptionTypeAdditional information
Contacts

List of contacts either individual or group contacts

Contacts

Required

MessageOptions

Message options.

MessageOptionsSecure

Required

Content

The actual message for the contacts to view.

string

Required

DateToSend

The date the message will be scheduled to be sent to the contacts.

date

None.

Reference

Stores a reference for the message.

string

Required

Sender

The name of the sender that sent the message.

string

None.

ResponseAlert

integer

Required

TemplateID

The id of a fixed message which the message will replace text of the message content.

string

None.

ResponseLimit

The number of times each recipient can send a response to the original message. [Requires TwoWay Feature]

integer

None.

Request Formats

application/json, text/json

Sample:
{
  "Contacts": {
    "ContactID": {
      "sample string 1": 0,
      "sample string 2": 0
    },
    "GroupID": {
      "sample string 1": 0,
      "sample string 2": 0
    }
  },
  "Content": "sample string 1",
  "DateToSend": "2017-09-24T12:20:00.9161926Z",
  "MessageOptions": {
    "AuthenticationMethod": 0,
    "DeliveryReceipt": true,
    "DeliverToValidatedOnly": true,
    "EmailReadReceipt": true,
    "ExpiryDate": "2017-09-24T12:20:00.9161926Z",
    "Reads": 1,
    "SmsReadReceipt": true
  },
  "Reference": "sample string 2",
  "Sender": "sample string 3",
  "ResponseAlert": 4,
  "TemplateID": "sample string 5",
  "ResponseLimit": 6
}

Response Information

Resource Description

Sms Transaction

ResponseOfSmsTransaction
NameDescriptionTypeAdditional information
Error

Error

None.

ResponseData

ResponseDataOfSmsTransaction

None.

Response Formats

application/json, text/json

Sample:
{
  "Error": {
    "ErrorCode": "sample string 1",
    "ErrorReason": "sample string 2"
  },
  "ResponseData": {
    "Identification": {
      "UserId": "sample string 1"
    },
    "Result": "sample string 1",
    "Detail": {
      "MessageID": "sample string 1",
      "NoOfContacts": "sample string 2",
      "NoOfQuickRecipients": "sample string 3",
      "NoOfSMS": "sample string 4",
      "NoOfEmails": "sample string 5",
      "PreTransaction": "sample string 6",
      "PostTransaction": "sample string 7",
      "CreditsUsed": "sample string 8",
      "MessageText": "sample string 9"
    }
  }
}

application/xml, text/xml

Sample:
<ResponseOfSmsTransaction xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <Error>
    <ErrorCode>sample string 1</ErrorCode>
    <ErrorReason>sample string 2</ErrorReason>
  </Error>
  <ResponseData>
    <Result>sample string 1</Result>
    <Identification>
      <UserId>sample string 1</UserId>
    </Identification>
    <Detail>
      <MessageID>sample string 1</MessageID>
      <NoOfContacts>sample string 2</NoOfContacts>
      <NoOfQuickRecipients>sample string 3</NoOfQuickRecipients>
      <NoOfSMS>sample string 4</NoOfSMS>
      <NoOfEmails>sample string 5</NoOfEmails>
      <PreTransaction>sample string 6</PreTransaction>
      <PostTransaction>sample string 7</PostTransaction>
      <CreditsUsed>sample string 8</CreditsUsed>
      <MessageText>sample string 9</MessageText>
    </Detail>
  </ResponseData>
</ResponseOfSmsTransaction>