---
title: "GET /v2/threads"
method: GET
path: "/v2/threads"
---

# GET /v2/threads

`GET /v2/threads`

## Request

- Base URL: `https://api.langtail.com`
- URL: `https://api.langtail.com/v2/threads`
- Auth: none declared. Required headers: `X-API-Key`

Get a list of threads within your project.

## Query parameters

- `limit` number, nullable
- `after` string, nullable

## Headers

- `X-API-Key` string, required

## Response `200`

Successful response

- object
  - `object` 'list', required
  - `data` object[], required
    - `id` string: The unique identifier for the thread.
    - `createdAt` integer: The Unix timestamp (in seconds) of when the thread was created.
    - `projectId` string: The ID of the project this thread belongs to.
    - `createLog` object, nullable: A log created by the first message that creates the thread.
      - `id` string: The unique identifier for the log.
      - `url` string: The URL of the request.
      - `stream` boolean: Indicates if the request was streamed.
      - `metadata` string: Additional metadata associated with the log.
      - `promptId` string: The ID of the prompt used.
      - `threadId` string, nullable: The ID of the associated thread, if any.
      - `assistant` boolean: Indicates if an assistant was used.
      - `projectId` string: The ID of the project.
      - `requestIP` string: The IP address of the request.
      - `startedAt` string, date-time: The timestamp when the request started.
      - `variables` string: Variables used in the request.
      - `parameters` string: Parameters used in the request.
      - `promptSlug` string: The slug of the prompt used.
      - `doNotRecord` boolean: Indicates if the request should not be recorded.
      - `environment` string: The environment in which the request was made.
      - `openAIKeyId` string: The ID of the OpenAI key used.
      - `projectSlug` string: The slug of the project.
      - `requestData` string: Data associated with the request.
      - `deploymentId` string: The ID of the deployment.
      - `organizationId` string: The ID of the organization.
      - `projectAPIKeyId` string: The ID of the project API key.
      - `organizationSlug` string: The slug of the organization.
      - `deploymentVersion` string, nullable: The version of the deployment, if applicable.
      - `promptHistoryHash` string: A hash of the prompt history.
      - `openAIOrganization` string, nullable: The OpenAI organization, if applicable.
    - `metadata` object, nullable: A set of key-value pairs that can be attached to the thread. This can be used to store additional information about the thread to facilitate filtering or organization.
  - `first_id` string, nullable: The ID of the first thread in the list, or null if the list is empty.
  - `last_id` string, nullable: The ID of the last thread in the list, or null if the list is empty.
  - `has_more` boolean, required: Whether there are more threads available after this batch.

## Other responses

- `401`: Unauthorized

---

[API](https://skmtc.dev/langtail/apis/langtail-prompt-endpoint.md) - [All operations](https://skmtc.dev/langtail/apis/langtail-prompt-endpoint/llms.txt) - [OpenAPI document](https://skmtc.dev/langtail/apis/langtail-prompt-endpoint/revisions/7186c80b2e39?raw)
