Get Session Messages (Project API Key)

Retrieve a paginated list of messages for a specific chat session using your project API Key.

Retrieve a paginated list of messages for a specific chat session.

POST
/getSessionMessages
api-key<token>

API key for authentication. Generate your API key from the Integration settings in your YourGPT dashboard.

In: header

Request Body

application/json

session_uid*string

The unique session identifier obtained from the Get Sessions or Create Session API

orderBy?string

Sort order of messages. Defaults to ASC

Value in"ASC" | "DESC"
limit?integer

Number of messages per page (max 100). Defaults to 10

Rangevalue <= 100
page?integer

Page number for pagination. Defaults to 1

Response Body

application/json

application/json

application/json

curl -X POST "https://api.yourgpt.ai/chatbot/v1/getSessionMessages" \  -H "Content-Type: application/json" \  -d '{    "session_uid": "string"  }'
{
  "type": "RXSUCCESS",
  "message": "string",
  "data": [
    {
      "id": 0,
      "session_id": 0,
      "send_by": "string",
      "rate": "string",
      "message": "string",
      "type": 0,
      "seen": "string",
      "sender_id": 0,
      "content_type": "string",
      "choices": [],
      "targets": {},
      "url": "string",
      "delivered": "string",
      "provider_message_id": "string",
      "streaming": true,
      "response_source": "string",
      "extra_data": {},
      "createdAt": "2019-08-24T14:15:22Z",
      "deleted_at": "2019-08-24T14:15:22Z",
      "AILog": [
        {
          "id": 0,
          "query_message_id": 0,
          "reply_message_id": 0,
          "source_node": "string"
        }
      ]
    }
  ]
}
{
  "type": "RXERROR",
  "message": "string"
}
{
  "type": "RXERROR",
  "message": "string"
}