Skip to content
Get started

Get Threads

ThreadGetThreadsResponse v1().omniAi().threads().getThreads(ThreadGetThreadsParamsparams, RequestOptionsrequestOptions = RequestOptions.none())
GET/v1/omni-ai/threads

List conversation threads.

Returns thread metadata ordered by most recently created first. Use page_size and page_token for pagination. Thread objects contain only metadata (title, timestamps) — use the messages endpoint for conversation history.

ParametersExpand Collapse
ThreadGetThreadsParams params
long accountId

Account ID for the request

formatint64
Optional<Long> pageSize

The number of items to return per page. Only used when page_token is not provided.

formatint64
maximum100
minimum1
Optional<String> pageToken

Token for retrieving the next or previous page of results. Contains encoded pagination state; when provided, page_size is ignored.

formatbyte
ReturnsExpand Collapse
class ThreadGetThreadsResponse:
List<Thread> data
String id
String createdAt
String title
String updatedAt

Get Threads

package com.clear_street.api.example;

import com.clear_street.api.client.ClearStreetClient;
import com.clear_street.api.client.okhttp.ClearStreetOkHttpClient;
import com.clear_street.api.models.v1.omniai.threads.ThreadGetThreadsParams;
import com.clear_street.api.models.v1.omniai.threads.ThreadGetThreadsResponse;

public final class Main {
    private Main() {}

    public static void main(String[] args) {
        ClearStreetClient client = ClearStreetOkHttpClient.builder()
            .fromEnv()
            .apiKey("My API Key")
            .build();

        ThreadGetThreadsParams params = ThreadGetThreadsParams.builder()
            .accountId(0L)
            .build();
        ThreadGetThreadsResponse response = client.v1().omniAi().threads().getThreads(params);
    }
}
{
  "data": [
    {
      "created_at": "2026-04-23T15:15:54.929830+00:00",
      "id": "019dbae9-73b3-7fe0-bd14-25fe57e91475",
      "title": "What is current price of AAPL?",
      "updated_at": "2026-04-23T15:15:54.929830+00:00"
    }
  ],
  "metadata": {
    "request_id": "eb95e1b8-d245-41b1-bbd0-cc1073e68bfd"
  }
}
{
  "error": {
    "code": 400,
    "message": "Failed to deserialize query string: missing field `account_id`"
  },
  "metadata": {
    "request_id": "3d8aa540-5f00-4efe-bf63-e55ee65ac14b"
  }
}
Returns Examples
{
  "data": [
    {
      "created_at": "2026-04-23T15:15:54.929830+00:00",
      "id": "019dbae9-73b3-7fe0-bd14-25fe57e91475",
      "title": "What is current price of AAPL?",
      "updated_at": "2026-04-23T15:15:54.929830+00:00"
    }
  ],
  "metadata": {
    "request_id": "eb95e1b8-d245-41b1-bbd0-cc1073e68bfd"
  }
}
{
  "error": {
    "code": 400,
    "message": "Failed to deserialize query string: missing field `account_id`"
  },
  "metadata": {
    "request_id": "3d8aa540-5f00-4efe-bf63-e55ee65ac14b"
  }
}