Skip to content
Start Trading

Get Threads

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

List authorized conversation metadata, newest first. Use page_size and page_token for pagination, and the messages endpoint for conversation history.

With account_id, list only conversations linked to that account and require current account access. Without it, list only conversations with no linked account.

ParametersExpand Collapse
ThreadGetThreadsParams params
Optional<Long> accountId

Lists only conversations for this account, or unlinked conversations when omitted. Other reads authorize the resource’s linked account. Omit when no account is selected; empty values and the string null are invalid.

formatint64
minimum1
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
LocalDateTime createdAt
String title
LocalDateTime updatedAt

Get Threads

package com.clearstreet.api.example;

import com.clearstreet.api.client.ClearStreetClient;
import com.clearstreet.api.client.okhttp.ClearStreetOkHttpClient;
import com.clearstreet.api.models.v1.omniai.threads.ThreadGetThreadsParams;
import com.clearstreet.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();

        ThreadGetThreadsResponse response = client.v1().omniAi().threads().getThreads();
    }
}
{
  "data": [
    {
      "created_at": "2026-04-23T15:15:54.929830+00:00",
      "id": "019dbae9-73b3-7fe0-bd14-25fe57e91475",
      "title": "What is the 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": "account_id must be positive"
  },
  "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 the 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": "account_id must be positive"
  },
  "metadata": {
    "request_id": "3d8aa540-5f00-4efe-bf63-e55ee65ac14b"
  }
}