## List webhook events `webhook_events.list(WebhookEventListParams**kwargs) -> SyncPageNumberPage[WebhookEvent]` **get** `/v1/webhook-events` Retrieves a paginated list of webhook events for the authenticated organization. Supports filtering by event name, resource type, resource ID, and date range. ### Parameters - `created_after: Optional[Union[str, datetime]]` - `created_before: Optional[Union[str, datetime]]` - `event_name: Optional[Literal["enrollment.accepted", "enrollment.terminated", "enrollment.elected", 8 more]]` * `enrollment.accepted` - Enrollment Accepted * `enrollment.terminated` - Enrollment Terminated * `enrollment.elected` - Enrollment Elected * `enrollment.granted` - Enrollment Granted * `enrollment.waived` - Enrollment Waived * `enrollment.started` - Enrollment Started * `employee.eligibility_granted` - Employee Eligibility Granted * `employee.eligibility_terminated` - Employee Eligibility Terminated * `employee.deactivated` - Employee Deactivated * `payroll_deduction.created` - Payroll Deduction Created * `employer.eligibility_policy_created` - Employer Eligibility Policy Created - `"enrollment.accepted"` - `"enrollment.terminated"` - `"enrollment.elected"` - `"enrollment.granted"` - `"enrollment.waived"` - `"enrollment.started"` - `"employee.eligibility_granted"` - `"employee.eligibility_terminated"` - `"employee.deactivated"` - `"payroll_deduction.created"` - `"employer.eligibility_policy_created"` - `limit: Optional[int]` Items per page (default: 20, max: 100) - `page: Optional[int]` Page number (default: 1) - `resource_id: Optional[str]` - `resource_type: Optional[Literal["enrollment", "employee", "employer", 3 more]]` * `enrollment` - Enrollment * `employee` - Employee * `employer` - Employer * `dependent` - Dependent * `plan_year` - Plan Year * `payroll_deduction` - Payroll Deduction - `"enrollment"` - `"employee"` - `"employer"` - `"dependent"` - `"plan_year"` - `"payroll_deduction"` ### Returns - `class WebhookEvent: …` - `id: str` Prefixed unique identifier for this webhook event (e.g., `wevt_...`). - `created_at: datetime` When the event occurred, in UTC. - `event_name: str` The event type, formatted as `{resource}.{action}` (e.g., `enrollment.accepted`). - `organization_id: str` The organization this event belongs to. - `resource_id: str` Prefixed ID of the affected resource. Use this to fetch the current state from the API. - `resource_type: str` The type of resource affected (e.g., `enrollment`, `employee`). ### Example ```python import os from vitable_connect import VitableConnect client = VitableConnect( api_key=os.environ.get("VITABLE_CONNECT_API_KEY"), # This is the default and can be omitted ) page = client.webhook_events.list() page = page.data[0] print(page.id) ``` #### Response ```json { "data": [ { "id": "wevt_abc123def456", "organization_id": "org_xyz789", "event_name": "enrollment.accepted", "resource_type": "enrollment", "resource_id": "enrl_sample123", "created_at": "2024-06-15T14:30:00Z" }, { "id": "wevt_def456ghi789", "organization_id": "org_xyz789", "event_name": "employee.deactivated", "resource_type": "employee", "resource_id": "empl_sample456", "created_at": "2024-06-15T12:00:00Z" } ], "pagination": { "page": 1, "limit": 20, "total": 2, "total_pages": 1 } } ```