Skip to main content
Fetches a paginated list of threads belonging to a specific partner. Supports status filtering and sorting.

Endpoint

GET https://app.kash.bot/api/partners/:id/threads

Path Parameters

id
string
required
The unique partner identifier (UUID format)

Query Parameters

status
string
default:"active"
Filter by thread status: active, upcoming, closed, all
limit
number
default:"50"
Maximum number of results per page (max: 100)
offset
number
default:"0"
Pagination offset for fetching subsequent pages
sortBy
string
default:"created_at"
Field to sort by: created_at, start_time, total_volume
sortOrder
string
default:"desc"
Sort direction: asc, desc

Response

threads
array
Array of thread objects
pagination
object
Pagination metadata
_meta
object
Request metadata

Rate Limit

100 requests per minute per IP address

Example Request

curl "https://app.kash.bot/api/partners/6ba7b810-9dad-11d1-80b4-00c04fd430c8/threads?status=active&limit=10"

Example Response

200 - Success
{
  "threads": [
    {
      "id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
      "title": "NBA Playoffs 2026",
      "description": "Predict the outcomes of every NBA playoff series",
      "image": "https://cdn.kash.bot/threads/nba-playoffs.jpg",
      "status": "active",
      "startTime": "2026-04-15T00:00:00Z",
      "endTime": "2026-06-20T00:00:00Z",
      "marketCount": 30,
      "totalVolume": "3200000",
      "participantCount": 890,
      "createdAt": "2026-03-01T00:00:00Z"
    }
  ],
  "pagination": {
    "offset": 0,
    "limit": 10,
    "total": 2,
    "hasMore": false
  },
  "_meta": {
    "partnerId": "6ba7b810-9dad-11d1-80b4-00c04fd430c8",
    "requestedAt": "2026-03-04T12:00:00Z"
  }
}
404 - Partner Not Found
{
  "error": "Partner not found",
  "message": "No partner exists with ID: 6ba7b810-9dad-11d1-80b4-00c04fd430c8",
  "code": "NOT_FOUND"
}

Common Use Cases

Build a partner page with threads and markets

async function buildPartnerPage(partnerId) {
  // Fetch partner branding + threads in parallel
  const [partnerRes, threadsRes] = await Promise.all([
    fetch(`https://app.kash.bot/api/partners/${partnerId}`),
    fetch(`https://app.kash.bot/api/partners/${partnerId}/threads?status=active`),
  ]);

  const { partner } = await partnerRes.json();
  const { threads } = await threadsRes.json();

  // Fetch markets for each thread
  const threadsWithMarkets = await Promise.all(
    threads.map(async (thread) => {
      const { markets } = await fetch(
        `https://app.kash.bot/api/threads/${thread.id}/markets?limit=5`
      ).then(r => r.json());
      return { ...thread, markets };
    })
  );

  return { partner, threads: threadsWithMarkets };
}