PUT api/v1/sms/messages/{messageID}

This method allows the user to update a message that has already been sent. The updates that are allowed are: 1. The content of the message. 2. Add new contacts to the message. 3. Removing contacts from the message. 4. Updating the expiration date. 5. Updating the dissolve settings. Updates are allowed only if the following conditions are met: 1) The message has not expired. 2) The message has not been read by any of the recipients if updating the contents of the message.

Request Information

URI Parameters

NameDescriptionTypeAdditional information
messageID

The Id of the message to be modified.

string

Required

Body Parameters

Either xml or json request.

MessageDetails
NameDescriptionTypeAdditional information
messageId

The unique identifier for the message.

globally unique identifier

Required

DateReceived

The date the sender created the message.

string

Required

DateToSend

The date the message was scheduled to be sent to the contract.

string

Required

DateSent

The actual date the message was sent.

string

Required

Sender

The name of the sender that sent the message.

string

Required

DateModified

The date the template was last modified.

string

Required

AccountID

The unique Id of the account.

globally unique identifier

None.

StatusID

Unique Id of the status.

string

None.

Content

The actual message.

string

None.

Reference

Reference of the message sent.

string

None.

ExpiryDate

The day the encrypted message should expire.

string

None.

DeliveryReceipt

Delivery receipt

boolean

None.

SmsReadReceipt

Read reciept.

boolean

None.

EmailReadReceipt

Read reciept.

boolean

None.

GroupID

globally unique identifier

None.

ContactID

integer

None.

NoOfReads

integer

None.

AdditionalGroupID

globally unique identifier

None.

AdditionalContactID

PersonNumber field of the contact

integer

Required

RemoveGroupID

globally unique identifier

None.

RemoveContactID

integer

None.

MessageType

string

None.

NoOfContacts

integer

None.

AuthenticationMethod

Authentication type for the account

MessageAuthenticationType

Required

Request Formats

application/json, text/json

Sample:
{
  "messageId": "b7560e10-c67a-4625-9acc-9b3584b288bf",
  "DateReceived": "sample string 2",
  "DateToSend": "sample string 3",
  "DateSent": "sample string 4",
  "Sender": "sample string 5",
  "DateModified": "sample string 6",
  "AccountID": "fbe77f08-122e-4342-aaed-447d2fabc513",
  "StatusID": "sample string 8",
  "Content": "sample string 9",
  "Reference": "sample string 10",
  "ExpiryDate": "sample string 11",
  "DeliveryReceipt": true,
  "SmsReadReceipt": true,
  "EmailReadReceipt": true,
  "GroupID": "e2df8e98-2001-414b-90b5-6c3a400db058",
  "ContactID": 16,
  "NoOfReads": 1,
  "AdditionalGroupID": "a5cf790c-857d-4927-9446-9685e32b10d0",
  "AdditionalContactID": 18,
  "RemoveGroupID": "3f357f74-02ef-4fc0-95df-ddc0950415ae",
  "RemoveContactID": 20,
  "MessageType": "sample string 21",
  "NoOfContacts": 1,
  "AuthenticationMethod": 0
}

application/xml, text/xml

Sample:
<MessageDetails xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <ID>b7560e10-c67a-4625-9acc-9b3584b288bf</ID>
  <DateReceived>sample string 2</DateReceived>
  <DateToSend>sample string 3</DateToSend>
  <DateSent>sample string 4</DateSent>
  <Sender>sample string 5</Sender>
  <DateModified>sample string 6</DateModified>
  <AccountID>fbe77f08-122e-4342-aaed-447d2fabc513</AccountID>
  <StatusID>sample string 8</StatusID>
  <Content>sample string 9</Content>
  <Reference>sample string 10</Reference>
  <ExpiryDate>sample string 11</ExpiryDate>
  <DeliveryReceipt>true</DeliveryReceipt>
  <SmsReadReceipt>true</SmsReadReceipt>
  <EmailReadReceipt>true</EmailReadReceipt>
  <GroupID>e2df8e98-2001-414b-90b5-6c3a400db058</GroupID>
  <ContactID>16</ContactID>
  <NoOfReads>1</NoOfReads>
  <AdditionalGroupID>a5cf790c-857d-4927-9446-9685e32b10d0</AdditionalGroupID>
  <AdditionalContactID>18</AdditionalContactID>
  <RemoveGroupID>3f357f74-02ef-4fc0-95df-ddc0950415ae</RemoveGroupID>
  <RemoveContactID>20</RemoveContactID>
  <MessageType>sample string 21</MessageType>
  <NoOfContacts>1</NoOfContacts>
  <AuthenticationMethod>ANONYMOUS</AuthenticationMethod>
</MessageDetails>

Response Information

Resource Description

Sms transaction and balance.

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>