Skip to main content
GET
/
threads
/
{thread_id}
Get Thread
curl --request GET \
  --url https://api.example.com/threads/{thread_id}
import requests

url = "https://api.example.com/threads/{thread_id}"

response = requests.get(url)

print(response.text)
const options = {method: 'GET'};

fetch('https://api.example.com/threads/{thread_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.example.com/threads/{thread_id}",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
]);

$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.example.com/threads/{thread_id}"

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

	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.example.com/threads/{thread_id}")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://api.example.com/threads/{thread_id}")

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

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
{
  "thread_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "metadata": {},
  "state_updated_at": "2023-11-07T05:31:56Z",
  "config": {},
  "values": {},
  "interrupts": {},
  "ttl": {
    "ttl_minutes": 123,
    "expires_at": "2023-11-07T05:31:56Z"
  },
  "extracted": {}
}
{
  "detail": "<string>"
}
{
  "detail": "<string>"
}

Path Parameters

thread_id
string<uuid>
required

The ID of the thread.

Query Parameters

include
string

Comma-separated list of additional fields to include.

Response

Success

thread_id
string<uuid>
required

The ID of the thread.

created_at
string<date-time>
required

The time the thread was created.

updated_at
string<date-time>
required

The last time the thread was updated.

metadata
Metadata · object
required

The thread metadata.

status
enum<string>
required

The status of the thread.

Available options:
idle,
busy,
interrupted,
error
state_updated_at
string<date-time>

The last time the thread state was updated.

config
Config · object

The thread config.

values
Values · object

The current state of the thread.

interrupts
Interrupts · object

The current interrupts of the thread.

ttl
TTL Info · object

TTL information if set for this thread. Only present when ?include=ttl is passed.

extracted
Extracted · object

Extracted values from thread JSONB columns, populated when extract is specified in search request.