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.

post

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.

Path parameters
sidstringrequired

Stream ID

midstringrequired

Parent message ID

Header parameters
sessionTokenstringrequired

Authorization token used to make delegated calls.

keyManagerTokenstringoptional

Key Manager authentication token.

Body
messagestringoptional

The message payload in MessageML.

datastringoptional

Optional message data in EntityJSON.

versionstringoptional

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

silentstringoptional

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

Responses
curl -L \
  --request POST \
  --url 'youragentURL.symphony.com/agent/v4/stream/{sid}/message/{mid}/update' \
  --header 'sessionToken: text' \
  --header 'Content-Type: multipart/form-data' \
  --form 'message=text' \
  --form 'data=text' \
  --form 'version=text' \
  --form 'silent=text'
{
  "messageId": "text",
  "parentMessageId": "text",
  "timestamp": 1,
  "message": "text",
  "sharedMessage": {
    "messageId": "text",
    "parentMessageId": "text",
    "timestamp": 1,
    "message": "text",
    "sharedMessage": {
      "messageId": "text",
      "parentMessageId": "text",
      "timestamp": 1,
      "message": "text",
      "sharedMessage": "[Circular Reference]",
      "data": "text",
      "attachments": [
        {
          "id": "text",
          "name": "text",
          "size": 1,
          "images": [
            {
              "id": "text",
              "dimension": "text"
            }
          ]
        }
      ],
      "user": {
        "userId": 1,
        "firstName": "text",
        "lastName": "text",
        "displayName": "text",
        "email": "text",
        "username": "text"
      },
      "stream": {
        "streamId": "text",
        "streamType": "text",
        "roomName": "text",
        "members": [
          {
            "userId": 1,
            "firstName": "text",
            "lastName": "text",
            "displayName": "text",
            "email": "text",
            "username": "text"
          }
        ],
        "external": true,
        "crossPod": true
      },
      "externalRecipients": true,
      "diagnostic": "text",
      "userAgent": "text",
      "originalFormat": "text",
      "disclaimer": "text",
      "sid": "fa691cd3-484a-4109-aeb2-57c05b78c95b",
      "replacing": "text",
      "replacedBy": "text",
      "initialTimestamp": 1,
      "initialMessageId": "text",
      "silent": true
    },
    "data": "text",
    "attachments": [
      {
        "id": "text",
        "name": "text",
        "size": 1,
        "images": [
          {
            "id": "text",
            "dimension": "text"
          }
        ]
      }
    ],
    "user": {
      "userId": 1,
      "firstName": "text",
      "lastName": "text",
      "displayName": "text",
      "email": "text",
      "username": "text"
    },
    "stream": {
      "streamId": "text",
      "streamType": "text",
      "roomName": "text",
      "members": [
        {
          "userId": 1,
          "firstName": "text",
          "lastName": "text",
          "displayName": "text",
          "email": "text",
          "username": "text"
        }
      ],
      "external": true,
      "crossPod": true
    },
    "externalRecipients": true,
    "diagnostic": "text",
    "userAgent": "text",
    "originalFormat": "text",
    "disclaimer": "text",
    "sid": "fa691cd3-484a-4109-aeb2-57c05b78c95b",
    "replacing": "text",
    "replacedBy": "text",
    "initialTimestamp": 1,
    "initialMessageId": "text",
    "silent": true
  },
  "data": "text",
  "attachments": [
    {
      "id": "text",
      "name": "text",
      "size": 1,
      "images": [
        {
          "id": "text",
          "dimension": "text"
        }
      ]
    }
  ],
  "user": {
    "userId": 1,
    "firstName": "text",
    "lastName": "text",
    "displayName": "text",
    "email": "text",
    "username": "text"
  },
  "stream": {
    "streamId": "text",
    "streamType": "text",
    "roomName": "text",
    "members": [
      {
        "userId": 1,
        "firstName": "text",
        "lastName": "text",
        "displayName": "text",
        "email": "text",
        "username": "text"
      }
    ],
    "external": true,
    "crossPod": true
  },
  "externalRecipients": true,
  "diagnostic": "text",
  "userAgent": "text",
  "originalFormat": "text",
  "disclaimer": "text",
  "sid": "fa691cd3-484a-4109-aeb2-57c05b78c95b",
  "replacing": "text",
  "replacedBy": "text",
  "initialTimestamp": 1,
  "initialMessageId": "text",
  "silent": true
}
  • 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

Was this helpful?