---
title: "Get BigCommerce agent threads"
method: GET
path: "/bigcommerce/channels/{channelId}/threads"
tags: ["Agent", "BigCommerce"]
---

# Get BigCommerce agent threads

`GET /bigcommerce/channels/{channelId}/threads`

## Request

- Base URL: `https://api.takeshape.io`
- URL: `https://api.takeshape.io/bigcommerce/channels/{channelId}/threads`
- Auth: HTTP bearer

Retrieves a list of conversation threads/sessions for AI agents on a BigCommerce channel.

## Path parameters

- `channelId` number, required

## Query parameters

- `first` integer
- `last` integer
- `after` string, uuid
- `before` string, uuid
- `query` string
- `sort` 'asc' | 'desc'

## Response `200`

List of threads retrieved successfully

- ThreadListResponse
  - `threads` ThreadResponse[], required: List of active threads for the agent
    - `id` string, required: The unique session/thread ID
    - `agentName` string, required: The name of the agent
    - `status` 'created' | 'started' | 'suspended' | 'done', required: The status of the agent thread
    - `schemaId` string, required: The schema ID associated with the thread
    - `schemaHash` string, required: The schema hash for version tracking
    - `createdAt` string, required: ISO timestamp when the thread was created
    - `updatedAt` string, required: ISO timestamp when the thread was last updated
    - `firstMessageInput` union: The input of the first message in the thread, or empty if no messages yet
      - object
        - `type` 'string', required
        - `content` string, required
      - object
        - `type` 'unknown', required
        - `data` unknown
    - `duration` number: Duration of the thread in milliseconds, only set when status is done
    - `lastMessageOutput` union: The output of the last message in the thread, if available
      - object
        - `type` 'generate', required
        - `data` unknown
      - object
        - `type` 'graphql', required
        - `data` unknown
      - object
        - `type` 'chat', required
        - `data` object, required
          - `content` string, required: The text content of the chat message
          - `artifact` object: Optional artifacts associated with the chat message
          - `references` object[], required: References to other threads or messages
            - `_tid` string, required: The thread ID that this message references
      - object
        - `type` 'unknown', required
        - `data` unknown

## Other responses

- `400`: Invalid request - channel does not exist
- `401`: Unauthorized - invalid or missing store token
- `404`: Channel or schema not found

---

[API](https://skmtc.dev/takeshape/apis/takeshape-rest-api.md) - [All operations](https://skmtc.dev/takeshape/apis/takeshape-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/takeshape/apis/takeshape-rest-api/revisions/2e088f4d4c64?raw)
