---
title: "Customer Events"
method: POST
path: "customer.events"
tags: ["Webhooks"]
---

# Customer Events

`POST customer.events` (webhook)

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

The payload structure is **identical** across all events. Only the `event` field changes.

**Security**: Every request includes an `x-webhook-signature` header and an `x-afriex-business-id` header carrying your business id. You **must** verify this signature using Afriex's public key before processing. The key is an elliptic-curve (secp384r1 / P-384) key, not RSA. The signature is ECDSA with SHA-256, DER-encoded and then base64-encoded, computed over the exact raw request body, so verify it before parsing or re-serialising the JSON. See the [Webhooks Overview & Security](https://docs.afriex.com/api-reference/endpoint/webhooks/introduction) section for verification instructions.

## Payload

- object
  - `id` string, uuid, required: Unique ID of this event. Every delivery attempt of the same event carries the same `id`, so use it to ignore a delivery you have already processed.
  - `event` 'CUSTOMER.CREATED' | 'CUSTOMER.UPDATED' | 'CUSTOMER.DELETED', required: Identifies which customer event occurred
  - `createdAt` string, date-time, required: When Afriex created the event. Retries keep this value, and the signature covers it, so you can reject a delivery that is older than you expect.
  - `data` object, required: The customer data relevant to this event
    - `customerId` string, required: Unique identifier of the customer
    - `name` string, required
    - `email` string, email, required
    - `phone` string, required: Phone number in E.164 international format
    - `countryCode` string, required: ISO 3166-1 alpha-2 country code
    - `meta` object: Optional metadata attached to the customer.
    - `createdAt` string: The date and time the customer was created.
    - `updatedAt` string: The date and time the customer was last updated.

## Acknowledgement `200`

Acknowledge receipt. Return any 2xx status code quickly. Response body is ignored.

## Other responses

- `400`: Bad Request, malformed payload, invalid/missing signature, etc. Afriex will retry delivery.
- `401`: Unauthorized, signature verification failed.

---

[API](https://skmtc.dev/afriex/apis/afriex-business-api.md) - [All operations](https://skmtc.dev/afriex/apis/afriex-business-api/llms.txt) - [OpenAPI document](https://skmtc.dev/afriex/apis/afriex-business-api/revisions/d94198b6c256?raw)
