List ChatKit threads

Changed on

List ChatKit threads with optional pagination and user filters.

get/chatkit/threads

Request

  • Base URL
    https://api.openai.com/v1
  • URL
    https://api.openai.com/v1/chatkit/threads
  • Auth
    HTTP bearer

Query parameters

limitinteger

Maximum number of thread items to return. Defaults to 20.

order'asc' | 'desc'

Sort order for results by creation time. Defaults to desc.

afterstring

List items created after this thread item ID. Defaults to null for the first page.

beforestring

List items created before this thread item ID. Defaults to null for the newest results.

userstring

Filter threads that belong to this user identifier. Defaults to null to return all users.

Response

Success

object'list' required

The type of object returned, must be list.

first_idstring nullable required

The ID of the first item in the list.

last_idstring nullable required

The ID of the last item in the list.

has_moreboolean required

Whether there are more items available.

Example response

{
  "data": [
    {
      "id": "cthr_def456",
      "object": "chatkit.thread",
      "created_at": 1712345600,
      "title": "Demo feedback",
      "status": {
        "type": "active"
      },
      "user": "user_456"
    }
  ]
}

Changes

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status