Skip to content

List webhook events

webhook_events.list(**kwargs) -> PageNumberPage<WebhookEvent { id, created_at, event_name, 3 more } >
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.

ParametersExpand Collapse
created_after: Time
formatdate-time
created_before: Time
formatdate-time
event_name: :"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
minLength1
One of the following:
:"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: Integer

Items per page (default: 20, max: 100)

minimum1
maximum100
page: Integer

Page number (default: 1)

minimum1
resource_id: String
minLength1
resource_type: :enrollment | :employee | :employer | 3 more
  • enrollment - Enrollment
  • employee - Employee
  • employer - Employer
  • dependent - Dependent
  • plan_year - Plan Year
  • payroll_deduction - Payroll Deduction
minLength1
One of the following:
:enrollment
:employee
:employer
:dependent
:plan_year
:payroll_deduction
ReturnsExpand Collapse
class WebhookEvent { id, created_at, event_name, 3 more }
id: String

Prefixed unique identifier for this webhook event (e.g., wevt_...).

created_at: Time

When the event occurred, in UTC.

formatdate-time
event_name: String

The event type, formatted as {resource}.{action} (e.g., enrollment.accepted).

organization_id: String

The organization this event belongs to.

resource_id: String

Prefixed ID of the affected resource. Use this to fetch the current state from the API.

resource_type: String

The type of resource affected (e.g., enrollment, employee).

List webhook events

require "vitable_connect"

vitable_connect = VitableConnect::Client.new(
  api_key: "My API Key",
  environment: "environment_1" # defaults to "production"
)

page = vitable_connect.webhook_events.list

puts(page)
{
  "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
  }
}
Returns Examples
{
  "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
  }
}