GET
/
v1
/
orgs
/
{org_id}
/
workspaces
/
{workspace_id}
/
campaigns
/
{campaign_id}
/
cohorts
List Cohorts
curl --request GET \
  --url https://apps.sarvam.ai/api/scheduling/v1/orgs/{org_id}/workspaces/{workspace_id}/campaigns/{campaign_id}/cohorts \
  --header 'X-API-Key: <api-key>'
{
  "items": [
    {
      "name": "<string>",
      "cohort_id": "<string>",
      "status": "processing",
      "source_type": "pre_signed_url",
      "created_by": "<string>",
      "created_at": "2023-11-07T05:31:56Z",
      "updated_at": "2023-11-07T05:31:56Z",
      "result": {
        "total_records": 123,
        "valid_records": 123,
        "rejected_records": 123
      },
      "updated_by": "<string>"
    }
  ],
  "total": 123,
  "limit": 123,
  "offset": 123,
  "next_page_uri": "<string>",
  "prev_page_uri": "<string>"
}

Authorizations

X-API-Key
string
header
required

Path Parameters

org_id
string
required
workspace_id
string
required
campaign_id
string
required

Query Parameters

offset
integer
default:0

Number of records to skip

Required range: x >= 0
limit
integer
default:10

Number of records to return (max 100)

Required range: 1 <= x <= 100
sort_by
string | null

Field to sort by

sort_order
string | null

Sort order (asc or desc)

search
string | null

Search query string

Response

Successful Response

Paginated list of cohorts.

items
CohortMetadata · object[]
required

List of cohorts on this page

total
integer
required

Total number of cohorts matching the query

limit
integer
required

Maximum number of items per page

offset
integer
required

Number of items skipped

next_page_uri
string | null

URI to fetch the next page, or null if this is the last page

prev_page_uri
string | null

URI to fetch the previous page, or null if this is the first page