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. The format is the following:[YYYY-MM-DDTHH:MM:SSZ]

string

Required

DateToSend

The date the message was scheduled to be sent to the contract. The format is the following:[YYYY-MM-DDTHH:MM:SSZ]

string

Required

DateSent

The actual date the message was sent. The format is the following:[YYYY-MM-DDTHH:MM:SSZ]

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 date the encrypted message should expire. The format is the following:[YYYY-MM-DDTHH:MM:SSZ]

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": "a2301eec-c74e-49bd-9715-bcb545c82ea1",
  "DateReceived": "sample string 2",
  "DateToSend": "sample string 3",
  "DateSent": "sample string 4",
  "Sender": "sample string 5",
  "DateModified": "sample string 6",
  "AccountID": "cd444c79-770b-4c0e-9465-be84da1948a2",
  "StatusID": "sample string 8",
  "Content": "sample string 9",
  "Reference": "sample string 10",
  "ExpiryDate": "sample string 11",
  "DeliveryReceipt": true,
  "SmsReadReceipt": true,
  "EmailReadReceipt": true,
  "GroupID": "037449b6-e0dd-4438-933b-895837c5719f",
  "ContactID": 16,
  "NoOfReads": 1,
  "AdditionalGroupID": "6c186358-71ce-4828-8367-6ce0e8827db7",
  "AdditionalContactID": 18,
  "RemoveGroupID": "610e210d-91d4-4554-ac60-e1c9a0d6faba",
  "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>a2301eec-c74e-49bd-9715-bcb545c82ea1</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>cd444c79-770b-4c0e-9465-be84da1948a2</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>037449b6-e0dd-4438-933b-895837c5719f</GroupID>
  <ContactID>16</ContactID>
  <NoOfReads>1</NoOfReads>
  <AdditionalGroupID>6c186358-71ce-4828-8367-6ce0e8827db7</AdditionalGroupID>
  <AdditionalContactID>18</AdditionalContactID>
  <RemoveGroupID>610e210d-91d4-4554-ac60-e1c9a0d6faba</RemoveGroupID>
  <RemoveContactID>20</RemoveContactID>
  <MessageType>sample string 21</MessageType>
  <NoOfContacts>1</NoOfContacts>
  <AuthenticationMethod>ANONYMOUS</AuthenticationMethod>
</MessageDetails>

application/x-www-form-urlencoded

Sample:

Sample not available.

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>