> ## Documentation Index
> Fetch the complete documentation index at: https://docs.afriex.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Customer Events

Afriex delivers real-time notifications to your configured webhook URL whenever a customer is **created**, **updated**, or **deleted**.

## Security

See [Webhooks Introduction](/api-reference/endpoint/webhooks/introduction) for setup, signature validation, and retry behavior.

## Event Types

* `CUSTOMER.CREATED` - A new customer has been created
* `CUSTOMER.UPDATED` - Customer information has been updated
* `CUSTOMER.DELETED` - A customer has been deleted

## Sample Payloads

### Customer Created

```json theme={null}
{
  "event": "CUSTOMER.CREATED",
  "data": {
    "name": "John Doe",
    "email": "johndoe@gmail.com",
    "phone": "+2348012345678",
    "customerId": "698b0440cba7ec3daee9163d",
    "countryCode": "NG",
    "meta": {
      "source": "whatsapp"
    },
    "createdAt": "2026-02-10T10:11:12.415Z",
    "updatedAt": "2026-02-10T10:11:12.415Z"
  }
}
```

### Customer Updated

```json theme={null}
{
  "event": "CUSTOMER.UPDATED",
  "data": {
    "name": "John Smith",
    "email": "johnsmith@gmail.com",
    "phone": "+2348012345678",
    "customerId": "698b0440cba7ec3daee9163d",
    "countryCode": "NG",
    "meta": {
      "source": "whatsapp",
      "verified": true
    },
    "createdAt": "2026-02-10T10:11:12.415Z",
    "updatedAt": "2026-02-11T15:30:45.123Z"
  }
}
```

### Customer Deleted

```json theme={null}
{
  "event": "CUSTOMER.DELETED",
  "data": {
    "name": "John Smith",
    "email": "johnsmith@gmail.com",
    "phone": "+2348012345678",
    "customerId": "698b0440cba7ec3daee9163d",
    "countryCode": "NG",
    "meta": {
      "source": "whatsapp",
      "verified": true
    },
    "createdAt": "2026-02-10T10:11:12.415Z",
    "updatedAt": "2026-02-11T15:30:45.123Z"
  }
}
```

The `event` field will be `CUSTOMER.CREATED`, `CUSTOMER.UPDATED`, or `CUSTOMER.DELETED` depending on the action that triggered the notification.

For delete events, only the `customerId` and `deletedAt` timestamp are included in the payload since the customer record has been removed from the system.

## Response

Return `200` (or another `2xx`) after successful validation and processing.
