Proud winners of the 2026 CFIN Foodtech Frontier Awards. Learn more →

Account Events

Webhook events for user accounts

Account events are triggered when user accounts are created.

#TypeScript Interfaces

Copy these interfaces to type your webhook handlers:

/** Base event properties included in all webhook events */
interface BaseEvent {
  /** Unique event identifier (UUID) */
  id: string;
  /** Event type */
  kind: string;
  /** ISO 8601 timestamp */
  time: string;
  /** Transaction identifier for grouping related events */
  transactionId: string;
}

#account.created

Triggered when a new user account is created.

{
  "id": "evt_abc123",
  "kind": "account.created",
  "time": "2024-01-15T10:30:00Z",
  "transactionId": "txn_xyz789",
  "userId": "user_456",
  "firstName": "John",
  "lastName": "Smith",
  "email": "john.smith@example.com",
  "facilityName": "Main Warehouse"
}

#Example Handler

async function handleAccountWebhook(event: AccountCreatedEvent) {
  if (event.kind === "account.created") {
    console.log(`New account created for ${event.firstName} ${event.lastName}`);
    // Provision access in external systems
    // Send welcome notification
  }
}