identity.notification-pref.query ​
List active notification preferences for the authenticated user
List notification preferences for the authenticated user (actor).
Always scoped to the actor — never returns other users' preferences. Only active preferences (deleted_at IS NULL) are returned.
Inputs:
- actor: Cognito sub (required)
- organization_uuid: Optional org scope
Outputs (terminal state_data):
- preferences: list of preference dicts (no int ids)
- count: number of preferences returned
Overview ​
| Property | Value |
|---|---|
| Workflow type | Atomic |
| Library | App-identity |
| Version | 1.0 |
Input Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
actor | string | Yes | — | Cognito sub of the authenticated user |
organization_uuid | uuid | No | — | Optional: restrict results to a single organization |
Output Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
actor | string | No | — | — |
organization_uuid | uuid | No | — | — |
preferences | list | Yes | — | — |
count | integer | Yes | — | — |
failure_reason | string | No | — | — |
failure_type | string | No | — | — |
failed_action | string | No | — | — |
failed_at_state | string | No | — | — |
failed_step | string | No | — | — |
failed_layer | string | No | — | — |
error | string | No | — | — |
error_type | string | No | — | — |
States ​
| State | Initial | Terminal | Success | Auto-advance | Description |
|---|---|---|---|---|---|
pending | Yes | No | — | execute | — |
completed | No | Yes | Yes | — | — |
failed | No | Yes | No | — | — |
State Diagram ​
Transitions ​
| From | Action | To | Description |
|---|---|---|---|
pending | execute | completed | — |
* (any state) | fail | failed | — |
API Usage ​
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "identity.notification-pref.query",
"initial_data": {
"actor": "value"
}
}