GET
/
{resourceSlug}
/
session
/
{sessionId}
/
messages.json?messageId=
{messageId}
curl --request GET \
  --url 'https://app.agentcloud.dev/{resourceSlug}/session/{sessionId}/messages.json?messageId={messageId}'
{
  "messages": [
    {
      "_id": "<string>",
      "orgId": "<string>",
      "teamId": "<string>",
      "sessionId": "<string>",
      "chunkId": "<string>",
      "message": {},
      "ts": 123,
      "authorId": "<string>",
      "isFeedback": true,
      "displayType": "bubble",
      "authorName": "<string>",
      "tokens": 123,
      "chunks": [
        {
          "ts": 123,
          "chunk": "<string>",
          "tokens": 123
        }
      ],
      "codeBlocks": [
        {
          "language": "<string>",
          "codeBlock": "<string>"
        }
      ],
      "completed": true
    }
  ]
}

Path Parameters

resourceSlug
string
required

The resourceSlug is a url parameter of the teamId associated with the user. Anywhere the resourceSlug is used can be interpreted as a teamId

sessionId
string
required

The sessionId of the session to retrieve

Query Parameters

messageId
string

Optional query parameter to declare a messageId to get messages generated after. i.e. get all messages generated after message: {messageId}. This is useful when attempting to gather messages in a stream.

Response

200
messages.json
JSON object containing array of all associated messages from this session, will return an empty array if the request is successful but there are no associated agents.
messages
object[]

A message used within a session, can be either an AI generated message or a user generated message.