Instances

List all waiting instances for an organization

Returns paginated list of workflow instances currently waiting for external events. Supports filtering by workflow_id and event_name. Pages by cursor with after_id or before_id. A wait state has no single id, so a cursor is "<instance_id>:<step_index>", the instance_id and step_index of a row from a previous response. The default order is timeout_at ascending with rows that have no timeout last; ties break on instance_id then step_index.

get/v1/workflows/instances/waiting

Request

  • Base URL
    https://api.paymongo.com
  • URL
    https://api.paymongo.com/v1/workflows/instances/waiting
  • Auth
    none required

Query parameters

workflow_idstring

Filter by workflow ID

event_namestring

Filter by event name

limitinteger

Page size (default: 10, max: 100)

after_idstring

Return the page after this position: either the opaque next_cursor from a previous response, or a bare wait state row id of the form <instance_id>:<step_index>. Mutually exclusive with before_id

before_idstring

Return the page before this position: either the opaque prev_cursor from a previous response, or a bare wait state row id of the form <instance_id>:<step_index>. Mutually exclusive with after_id

sort_by'created_at' | 'updated_at' | 'timeout_at'

Sort column (default: timeout_at ascending, rows without a timeout last)

sort_order'asc' | 'desc'

Sort direction; requires sort_by

internalboolean

Superuser only: filter by internal flag

Response

List of waiting instances

has_moreboolean

HasMore is true when more results exist beyond this page: after the last row when paging forward, before the first row when paging backward with before_id.

next_cursorstring

Opaque cursor for the last row on the page. Echo it as after_id to read the next page. It normally carries the sort it was issued under, so sort_by need not be repeated; for a very long text sort value the API falls back to a plain row id, which carries no sort, so a client pinning a non-default sort should keep sending sort_by. Omitted when the page has no rows.

prev_cursorstring

Opaque cursor for the first row on the page. Echo it as before_id to read the previous page. It normally carries the sort it was issued under, so sort_by need not be repeated; for a very long text sort value the API falls back to a plain row id, which carries no sort, so a client pinning a non-default sort should keep sending sort_by. Omitted when the page has no rows.

Example response

{
  "data": [
    {
      "definition_path": "0.then.1",
      "description": "Waiting for payment confirmation",
      "event_name": "payment.paid",
      "instance_id": "inst_abc123",
      "status": "waiting",
      "step_index": 2,
      "timeout_at": "2026-01-15 11:30:00+00:00"
    }
  ],
  "meta": {
    "limit": 10
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.