Skip to main content

Overview

The customer.created webhook is triggered when a new customer is created in your Metrifox account.

When It’s Triggered

This event is sent immediately after a customer is successfully created through:
  • The Metrifox API (POST /api/v1/customers)
  • CSV upload
  • Any other customer creation method

Payload Structure

{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "type": "customer.created",
  "created_at": 1704067200000,
  "data": {
    "customer": {
      "id": "123",
      "customer_key": "cust_abc123",
      "name": "John Doe",
      "email": "john@example.com",
      "tenant_id": "456",
      "created_at": "2024-01-01T00:00:00Z",
      "updated_at": "2024-01-01T00:00:00Z"
      // ... other customer fields
    }
  }
}

Data Fields

The data.customer object contains the full customer record with all fields that were set during creation, including:
  • id: Internal customer ID
  • customer_key: The unique customer key (immutable)
  • name: Customer name
  • email: Customer email address
  • tenant_id: The tenant ID this customer belongs to
  • created_at: Timestamp when the customer was created
  • updated_at: Timestamp when the customer was last updated
  • Additional custom fields as configured

Example Use Cases

  • Sync new customers to your CRM system
  • Send welcome emails to new customers
  • Create customer records in external systems
  • Trigger onboarding workflows