Skip to main content

The Event Object

Events represent activities and actions within your application. They can trigger webhooks and are used for audit logging.

Attributes

id
string
required
Unique identifier for the eventExample: evt_123
app_id
string
required
Application ID where the event occurred
slug
string
required
Event type identifierExample: user.created
category
string
required
Event category for grouping related eventsExample: user
controller
string
Originating controller that triggered the eventExample: UsersController
action
string
Originating action that triggered the eventExample: create
app_user_id
string
ID of the user associated with this event
data
object
required
Event payload containing relevant dataExample: { "user_id": "usr_123", "email": "user@example.com" }
metadata
object
Additional metadata about the eventExample: { "ip_address": "192.168.1.1", "user_agent": "Mozilla/5.0" }
params
object
Captured request parameters
note
string
Optional note or description
ip_address
string
IP address where the event originatedExample: 192.168.1.1
user_agent
string
Browser or client user agent stringExample: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7)
created_at
string
required
ISO 8601 timestamp when the event was created
updated_at
string
required
ISO 8601 timestamp when the event was last updated

Example Event Object

{
  "id": "evt_123",
  "app_id": "app_123",
  "slug": "user.created",
  "category": "user",
  "controller": "UsersController",
  "action": "create",
  "app_user_id": "usr_456",
  "data": {
    "user_id": "usr_456",
    "email": "user@example.com",
    "name": "John Doe"
  },
  "metadata": {
    "source": "api",
    "version": "v1"
  },
  "params": {},
  "ip_address": "192.168.1.1",
  "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7)",
  "created_at": "2024-01-15T10:30:00Z",
  "updated_at": "2024-01-15T10:30:00Z"
}