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

Endpoint

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

Path Parameters

id
string
required
The unique organization 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/organizations/550e8400-e29b-41d4-a716-446655440000/threads?status=active&sortBy=total_volume&sortOrder=desc&limit=10"

Example Response

200 - Success
{
  "threads": [
    {
      "id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
      "title": "2026 World Cup Predictions",
      "description": "Predict match outcomes for the 2026 FIFA World Cup",
      "image": "https://cdn.kash.bot/threads/world-cup-2026.jpg",
      "status": "active",
      "startTime": "2026-06-11T00:00:00Z",
      "endTime": "2026-07-19T00:00:00Z",
      "marketCount": 48,
      "totalVolume": "5600000",
      "participantCount": 1250,
      "createdAt": "2026-01-15T00:00:00Z"
    }
  ],
  "pagination": {
    "offset": 0,
    "limit": 10,
    "total": 5,
    "hasMore": false
  },
  "_meta": {
    "organizationId": "550e8400-e29b-41d4-a716-446655440000",
    "requestedAt": "2026-03-04T12:00:00Z"
  }
}
404 - Organization Not Found
{
  "error": "Organization not found",
  "message": "No organization exists with ID: 550e8400-e29b-41d4-a716-446655440000",
  "code": "NOT_FOUND"
}

Common Use Cases

Build an organization landing page

async function buildOrgPage(orgId) {
  const [orgRes, threadsRes] = await Promise.all([
    fetch(`https://app.kash.bot/api/organizations/${orgId}`),
    fetch(`https://app.kash.bot/api/organizations/${orgId}/threads?status=active&sortBy=total_volume&sortOrder=desc`),
  ]);

  const { organization } = await orgRes.json();
  const { threads } = await threadsRes.json();

  return { organization, threads };
}