---
title: "List accounts eligible for a trigger"
method: GET
path: "/api/v1/connections/{connection_id}/triggers/{trigger_name}/eligible-accounts"
tags: ["Triggers"]
---

# List accounts eligible for a trigger

`GET /api/v1/connections/{connection_id}/triggers/{trigger_name}/eligible-accounts`

## Request

- Base URL: `https://$SCALEKIT_ENVIRONMENT_URL`
- URL: `https://$SCALEKIT_ENVIRONMENT_URL/api/v1/connections/{connection_id}/triggers/{trigger_name}/eligible-accounts`
- Auth: OAuth 2
  - Client credentials
  - Token URL: `https://$SCALEKIT_ENVIRONMENT_URL/oauth/token`
- TypeScript: <https://skmtc.dev/scalekit/apis/scalekit-api-reference/docs/api/v1/connections/:connection_id/triggers/:trigger_name/eligible-accounts/get.ts> (a function with typed inputs; its response is checked against the schema)

Lists the connected accounts on a connection, and marks each one as eligible or ineligible for one trigger. Use this endpoint to choose which accounts to subscribe, before calling CreateTriggerSubscription or BatchCreateTriggerSubscriptions. Pass the connection ID and the trigger name in the path. Use query to search account identifiers, and page_size and page_token to page through the results. An ineligible account is returned with a reason and a remedy instead of being left out, so you can see why an account is refused. Each account also carries its health for this trigger: a state, and the single action that resolves it. Returns one page of accounts, the next and previous page tokens, and total_size, which counts the accounts on this connection that match the query.

## Path parameters

- `connection_id` string, required
- `trigger_name` string, required

## Query parameters

- `query` string
- `page_size` integer
- `page_token` string

## Response `200`

One page of the connection's accounts, each with its eligibility and health for the trigger, plus page tokens and the total match count

- TriggersListEligibleAccountsResponse
  - `accounts` TriggersEligibleAccount[]: One page of the connection's connected accounts, eligible and ineligible, each with its health for this trigger.
    - `eligible` boolean: Whether this account can be subscribed to the trigger. When false, reason and remedy explain why and what to do.
    - `health` TriggersAccountHealth: Whether a connected account can receive triggers at all. Worked out from the account's current state on every read.
      - `action` 'RECONNECT' | 'COMPLETE_SETUP': The single action that resolves an account's health state. - RECONNECT: Have the account's user connect the account again. - COMPLETE_SETUP: Have the account's user finish the connection flow the account started.
      - `blocks_tool_calls` boolean: Whether the account's credential itself is unusable, so tool calls made with it fail too. True only for NEEDS_REAUTHENTICATION. False for AWAITING_CONFIRMATION and WRONG_APP: the credential still works and tool calls still succeed, so an agent should keep using the account; only trigger events cannot reach it.
      - `reason` string: Why the account is in this state. Empty when the state is READY.
      - `remedy` string: What to do about it. Empty when the state is READY.
      - `state` 'READY' | 'AWAITING_CONFIRMATION' | 'WRONG_APP' | 'DISCONNECTED' | 'NEEDS_REAUTHENTICATION': A connected account's own state, evaluated for what the trigger in question routes by: a webhook trigger needs the provider workspace captured, and an account-scoped webhook trigger the provider user too. - READY: The account can receive triggers. - AWAITING_CONFIRMATION: Connected and working, but Scalekit has not confirmed which provider workspace or user it belongs to, so inbound events cannot be routed to it. - WRONG_APP: Authorized under a different OAuth app than the connection now uses. - DISCONNECTED: The account was disconnected. - NEEDS_REAUTHENTICATION: The credential itself is unusable: it has expired, or the account has not finished connecting.
    - `id` string: ID of the connected account. Pass it as connected_account_id when creating a subscription.
    - `identifier` string: The identifier the connected account was created with: the value you passed as identifier, such as your app's user ID or the user's email address. When the account has no identifier, this is the connected account ID.
    - `reason` string: Why this account cannot receive the trigger. Populated whenever eligible is false.
    - `remedy` string: What to do so the account can receive the trigger. Populated whenever eligible is false.
  - `next_page_token` string: Pass as page_token to read the next page. Empty when there is no next page.
  - `prev_page_token` string: Pass as page_token to read the previous page. Empty when there is no previous page.
  - `total_size` integer: How many of this connection's accounts match the query, across every page. Accounts on other connections are never counted.

## Other responses

- `400`: Invalid request - connection_id is not a valid connection ID, page_token is not a token from a previous response, or query is longer than 100 characters
- `404`: Not found - the connection does not exist in this environment, the connection's provider publishes no trigger with this name, or Triggers is not enabled for the environment
- `500`: Internal error - the accounts for this trigger could not be read; retry the request

## Changes

- **2026-10-30** `f47f1022d844`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/scalekit/apis/scalekit-api-reference/changes/api/v1/connections/:connection_id/triggers/:trigger_name/eligible-accounts/get.md)

---

[API](https://skmtc.dev/scalekit/apis/scalekit-api-reference.md) - [All operations](https://skmtc.dev/scalekit/apis/scalekit-api-reference/llms.txt) - [OpenAPI document](https://skmtc.dev/scalekit/apis/scalekit-api-reference/revisions/f47f1022d844?raw)
