Skip to main content
GET
/
digests
/
schedules
/
{schedule_id}
/
instances
JavaScript
import Courier from '@trycourier/courier';

const client = new Courier({
  apiKey: process.env['COURIER_API_KEY'], // This is the default and can be omitted
});

const digestInstanceListResponse = await client.digests.schedules.listInstances('schedule_id');

console.log(digestInstanceListResponse.has_more);
{
  "type": "list",
  "has_more": false,
  "cursor": null,
  "url": "/digests/schedules/sch%2F00000000-0000-0000-0000-000000000000/instances",
  "next_url": null,
  "items": [
    {
      "digest_instance_id": "a1b2c3d4-0000-0000-0000-000000000000",
      "status": "IN_PROGRESS",
      "event_count": 3,
      "user_id": "user-123",
      "tenant_id": "tenant-abc",
      "disabled": false,
      "created_at": "2024-01-01T00:00:00.000Z",
      "categories": [
        {
          "category_key": "comments",
          "retain": "first"
        }
      ],
      "category_key_counts": {
        "comments": 3
      }
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

schedule_id
string
required

The ID of the digest schedule, in the form sch/{uuid}. The value must be URL-encoded (e.g. sch%2F00000000-0000-0000-0000-000000000000).

Query Parameters

cursor
string

A cursor token from a previous response, used to fetch the next page of results.

limit
integer
default:20

The maximum number of digest instances to return. Defaults to 20, with a maximum of 100.

Required range: x <= 100

Response

type
enum<string>
required

Always list for a paginated list response.

Available options:
list
items
DigestInstance · object[]
required

The digest instances for this page of results.

has_more
boolean
required

Whether there are more digest instances to fetch using the cursor.

cursor
string | null

A cursor token for fetching the next page of results, or null when there are none.

url
string

The path of the current request.

next_url
string | null

The path to fetch the next page of results, or null when there are none.