Skip to main content
Get Message By Id
curl --request GET \
  --url https://{api_endpoint}/v1/threads/{thread_id}/messages/{message_id} \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://{api_endpoint}/v1/threads/{thread_id}/messages/{message_id}"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://{api_endpoint}/v1/threads/{thread_id}/messages/{message_id}', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://{api_endpoint}/v1/threads/{thread_id}/messages/{message_id}",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer <token>"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://{api_endpoint}/v1/threads/{thread_id}/messages/{message_id}"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://{api_endpoint}/v1/threads/{thread_id}/messages/{message_id}")
  .header("Authorization", "Bearer <token>")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://{api_endpoint}/v1/threads/{thread_id}/messages/{message_id}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "tenant_id": "<string>",
  "thread_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "assistant": {
    "assistant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "assistant_name": "<string>",
    "is_default": false
  },
  "role": "<string>",
  "content": [
    {
      "json_schema": {},
      "ui_schema": {},
      "form_data": {},
      "id": "<string>",
      "form_operation": "<string>",
      "sub_type": "<string>",
      "event_type": "<string>",
      "dps_payload_id": "<string>"
    }
  ],
  "created_by": "<string>",
  "created_by_username": "<string>",
  "created_on": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "parent_message_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "mentions": [
    {
      "type": "<string>",
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "name": "<string>"
    }
  ],
  "document_ids": [
    "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  ],
  "additional_properties": {
    "wxa_message": {},
    "display_properties": {
      "skip_render": false,
      "is_async": false,
      "form_operation": ""
    },
    "tool_calls": [
      {}
    ],
    "tool_call_id": "<string>",
    "tool_name": "<string>",
    "wxo_connection_status": {
      "connection_status": "<string>",
      "connection_message": "<string>"
    }
  },
  "context": {},
  "step_history": [
    {}
  ],
  "message_state": {}
}
{
  "detail": [
    {
      "loc": [
        "<string>"
      ],
      "msg": "<string>",
      "type": "<string>"
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

thread_id
string
required
message_id
string
required

Response

Successful Response

id
string<uuid>
required
tenant_id
string
required
thread_id
string<uuid>
required
assistant
AssistantInfo · object
required
role
string
required
content
AssistantContent · object[]
required
created_by
string | null
created_by_username
string | null
created_on
string<date-time> | null
updated_at
string<date-time> | null
parent_message_id
string<uuid> | null
mentions
(Mention · object | AssistantMention · object)[] | null
document_ids
string<uuid>[] | null
additional_properties
AdditionalProperties · object | null
context
Context · object | null
step_history
Step History · object[] | null
message_state
Message State · object | null