Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Semantic Message Search

Hybrid search combining semantic and keyword base matching.

Semantic search for messages

post

Search messages semantically according to the natural-language query provided in the request body. The "text" field holds the query and the optional "streamId" field restricts the search to a single stream.

Query parameters
skipintegerOptional

No. of results to skip.

limitintegerOptional

Max no. of results to return. If no value is provided, 25 is the default.

Header parameters
sessionTokenstringRequired

Session authentication token.

keyManagerTokenstringOptional

Key Manager authentication token.

Body
textstringOptional

The natural-language query to search for semantically.

threadIdstringOptional

Restrict the semantic search to this stream/thread.

Responses
200

OK

application/json

A representation of a message sent by a user of Symphony

messageIdstringOptional

Id of the message

parentMessageIdstringOptional

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

timestampinteger · int64Optional

Timestamp of the message in milliseconds since Jan 1 1970

messagestring · MessageMLV2Optional

Message content in MessageMLV2

datastring · JSONOptional

Message data in EntityJSON

externalRecipientsbooleanOptional

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

diagnosticstringOptional

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.

userAgentstringOptional

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)

originalFormatstringOptional

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
disclaimerstringOptional

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.

sidstringOptional

Unique session identifier from where the message was created.

Example: fa691cd3-484a-4109-aeb2-57c05b78c95b
replacingstringOptional

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

replacedBystringOptional

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

initialTimestampinteger · int64Optional

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

initialMessageIdstringOptional

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

silentbooleanOptional

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

post/v4/message/search/semantic
POST /agent/v4/message/search/semantic HTTP/1.1
Host: youragentURL.symphony.com
sessionToken: text
Content-Type: application/json
Accept: */*
Content-Length: 33

{
  "text": "text",
  "threadId": "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": {
          "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,
              "recipientTenantIds": [
                1
              ]
            },
            "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,
            "recipientTenantIds": [
              1
            ]
          },
          "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,
          "recipientTenantIds": [
            1
          ]
        },
        "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,
        "recipientTenantIds": [
          1
        ]
      },
      "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,
      "recipientTenantIds": [
        1
      ]
    },
    "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
  }
]

Usage

The Semantic Search API finds messages by meaning, not just exact keywords. It combines keyword matching with semantic search in a single query, so a search for a concept still returns relevant messages that don’t contain the exact words. This helps AI agents and large language models in particular, because they can find the messages and context they need much more reliably.

Enablement

This API needs extra setup from the Symphony team toenable the API and re-index your historical data so past messages are searchable. To get started, contact Symphony Support.

Last updated

Was this helpful?