POST api/v1/sms/messages/longmessages

This method sends a long message to the contacts specified in the request or contained in the groups specified in the request. The system will check that the contact has permission to perform this action.

Request Information

URI Parameters

None.

Body Parameters

MessageLong
NameDescriptionTypeAdditional information
Contacts

List of contacts either individual or group contacts

ContactsIncQuick

Required

MessageOptions

Message options.

MessageOptions

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
    },
    "QuickRecipients": {
      "sample string 1": 0,
      "sample string 2": 0
    }
  },
  "Content": "sample string 1",
  "DateToSend": "2017-11-17T17:15:09.6476746Z",
  "MessageOptions": {
    "DeliveryReceipt": true,
    "DeliverToValidatedOnly": true,
    "EmailReadReceipt": true,
    "ExpiryDate": "2017-11-17T17:15:09.6476746Z",
    "Reads": 1,
    "SmsReadReceipt": true
  },
  "Reference": "sample string 2",
  "Sender": "sample string 3",
  "ResponseAlert": 4,
  "TemplateID": "sample string 5",
  "ResponseLimit": 6
}

Response Information

Resource Description

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>