GET
/
v1
/
orgs
/
{org_id}
/
workspaces
/
{workspace_id}
/
campaigns
List Campaigns
curl --request GET \
  --url https://apps.sarvam.ai/api/scheduling/v1/orgs/{org_id}/workspaces/{workspace_id}/campaigns \
  --header 'X-API-Key: <api-key>'
{
  "items": [
    {
      "name": "<string>",
      "campaign_id": "<string>",
      "status": "ended",
      "app_id": "<string>",
      "created_by": "<string>",
      "created_at": "2023-11-07T05:31:56Z",
      "updated_at": "2023-11-07T05:31:56Z",
      "description": "<string>",
      "app_type": "agent",
      "app_version": 123,
      "updated_by": "<string>"
    }
  ],
  "total": 123,
  "limit": 123,
  "offset": 123,
  "next_page_uri": "<string>",
  "prev_page_uri": "<string>"
}
Returns a paginated list of campaigns in your workspace.

Filtering and sorting

ParameterDefaultNotes
campaign_statusFilter by status: scheduled, active, paused, ended, cancelled
searchSearch campaigns by name
sort_bycreated_atField to sort results by
sort_orderdescasc or desc
limit10Results per page (max 100)
offset0Number of results to skip for pagination
To monitor all currently running campaigns, filter with campaign_status=active. To find a specific campaign, combine search with an optional status filter.

Pagination

The response includes next_page_uri and prev_page_uri for navigating pages. Both are null when there is no adjacent page. To fetch the next page, increment offset by limit or follow next_page_uri directly.

Authorizations

X-API-Key
string
header
required

Path Parameters

org_id
string
required
workspace_id
string
required

Query Parameters

campaign_status
enum<string> | null

Campaign lifecycle status: scheduledactiveended. Can be paused or cancelled at any point.

Available options:
ended,
active,
paused,
scheduled,
cancelled
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
default:created_at

Field to sort by

sort_order
string | null
default:desc

Sort order (asc or desc)

search
string | null

Search query string

Response

Successful Response

Paginated list of campaigns.

items
CampaignMetadata · object[]
required

List of campaigns on this page

total
integer
required

Total number of campaigns 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