Update Message

Update an existing message.

Available on Agent 20.13.1+ with SBE 20.13.2+ in Beta. Starting with SBE 20.16, the feature is now in Controlled Availability. Starting with Agent 23.6, this endpoint is OBO-enabled.

Update an existing message.

Update an existing message. The existing message must be a valid social message, that has not been deleted.

The message can be provided as MessageMLV2 or PresentationML. Both formats support Freemarker templates.

The optional parameter "data" can be used to provide a JSON payload containing entity data. If the message contains explicit references to entity data (in "data-entity-id" element attributes), this parameter is required.

If the message is in MessageML and fails schema validation a client error results

If the message is updated then 200 is returned.

Regarding authentication, you must either use the sessionToken which was created for delegated app access or both the sessionToken and keyManagerToken together.

POSTyouragentURL.symphony.com/agent/v4/stream/{sid}/message/{mid}/update
Path parameters
sid*string

Stream ID

mid*string

Parent message ID

Header parameters
Body
messagestring

The message payload in MessageML.

datastring

Optional message data in EntityJSON.

versionstring

Optional message version in the format "major.minor". If empty, defaults to the latest supported version.

silentstring

Optional boolean field that will determine if the user/s should receive the message as read or not (true by default)

Response

Message sent.

Body
messageIdstring

Id of the message

parentMessageIdstring

Id of the parent message, set when the message is a reply to another message or a forwarded message. Since Agent 20.14.

timestampinteger (int64)

Timestamp of the message in milliseconds since Jan 1 1970

messagestring (MessageMLV2)

Message content in MessageMLV2

sharedMessageV4Message (object)

A representation of a message sent by a user of Symphony

datastring (JSON)

Message data in EntityJSON

attachmentsarray of V4AttachmentInfo (object)

Message attachments

userV4User (object)
streamV4Stream (object)
externalRecipientsboolean

Indicates if the message have external recipients. Only present on real time messaging.

diagnosticstring

Details if event failed to parse for any reason. The contents of this field may not be useful, depending on the nature of the error. Only present when error occurs.

userAgentstring

User agent string for client that sent the message. Allows callers to identify which client sent the origin message (e.g. API Agent, SFE Client, mobile, etc)

originalFormatstring

Indicates the format in which the message was originally sent. This could have been either:

  • com.symphony.markdown - Markdown OR Message ML V1
  • com.symphony.messageml.v2 - Message ML V2
disclaimerstring

Message that may be sent along with a regular message if configured for the POD, usually the first message sent in a room that day.

sidstring

Unique session identifier from where the message was created.

Example: "fa691cd3-484a-4109-aeb2-57c05b78c95b"
replacingstring

Id of the message that the current message is replacing (present only if set)

replacedBystring

Id of the message that the current message is being replaced with (present only if set)

initialTimestampinteger (int64)

Timestamp of when the initial message has been created in milliseconds since Jan 1 1970 (present only if set)

initialMessageIdstring

Id the the initial message that has been updated (present only if set)

silentboolean

When false the user/s will receive the message update as unread (true by default)

Request
const response = await fetch('youragentURL.symphony.com/agent/v4/stream/{sid}/message/{mid}/update', {
    method: 'POST',
    headers: {
      "sessionToken": "text",
      "Content-Type": "multipart/form-data"
    },
    body: JSON.stringify({}),
});
const data = await response.json();
Response
{
  "messageId": "text",
  "parentMessageId": "text",
  "timestamp": 0,
  "message": "text",
  "data": "text",
  "attachments": [
    {
      "id": "text",
      "name": "text",
      "size": 0,
      "images": [
        {
          "id": "text",
          "dimension": "text"
        }
      ]
    }
  ],
  "user": {
    "userId": 0,
    "firstName": "text",
    "lastName": "text",
    "displayName": "text",
    "email": "text",
    "username": "text"
  },
  "stream": {
    "streamId": "text",
    "streamType": "text",
    "roomName": "text",
    "members": [
      {
        "userId": 0,
        "firstName": "text",
        "lastName": "text",
        "displayName": "text",
        "email": "text",
        "username": "text"
      }
    ],
    "external": false,
    "crossPod": false
  },
  "externalRecipients": false,
  "diagnostic": "text",
  "userAgent": "text",
  "originalFormat": "text",
  "disclaimer": "text",
  "sid": "fa691cd3-484a-4109-aeb2-57c05b78c95b",
  "replacing": "text",
  "replacedBy": "text",
  "initialTimestamp": 0,
  "initialMessageId": "text",
  "silent": false
}
  • For authentication, you must either use the sessionToken that was created for delegated application access, or both the sessionToken and keyManagerToken together.

📘 Controlled Availability

Message Update is currently released with Controlled Availability because of the following limitations:

  • This feature is not yet supported on Mobile, where updates are displayed as new messages instead of replacing the existing one.

  • The flag silent=false, that can be used to make an update be displayed as an unread message, is not fully supported yet.

Both limits will be lifted in a future release.

🚧 Permissions and guidelines

  • Entitlement canUpdateMessage is required.

  • Wall posts cannot be updated.

  • It is not possible to update messages sent by other users (except when using OBO with the proper permissions)

  • There is no time limit to update old messages, however we discourage updating very old messages as this won't provide a good user experience.

  • There is no limit of how many times a message can be updated, but we discourage updating it more than a 1000 times.

  • When used as a OBO endpoint, the end user must have the canUpdateMessage entitlement enabled, and the App must have the SEND_MESSAGES permission.

Last updated