---
title: "Update customer profile"
method: PATCH
path: "/api/v1/customer/{customerId}"
tags: ["Customers"]
---

# Update customer profile

`PATCH /api/v1/customer/{customerId}`

## Request

- Base URL: `https://sandbox.api.afriex.com`
- URL: `https://sandbox.api.afriex.com/api/v1/customer/{customerId}`
- Auth: API key in header `x-api-key`
- TypeScript: <https://skmtc.dev/afriex/apis/afriex-business-api/docs/api/v1/customer/:customerId/patch.ts> (a function with typed inputs; its response is checked against the schema)

Partially updates a customer's profile. Send at least one of `fullName`, `email`, or `phone`; omitted fields are left unchanged. Unrecognised keys are ignored, and a body with none of the three recognised keys fails with `422`. `phone` is validated against the customer's stored `countryCode` (it cannot be changed here) and stored in E.164 format.

## Path parameters

- `customerId` string, required

## Request body

- object: Partial profile update. At least one of fullName, email, or phone must be present. Unrecognised keys are ignored.
  - `fullName` string: The full name of the customer.
  - `email` string, email: The email of the customer.
  - `phone` string: The phone number of the customer. Must be valid for the customer's stored `countryCode`; saved in E.164 format.

## Response `200`

Customer updated successfully.

- object
  - `data` Customer
    - `customerId` string: The unique identifier for the customer.
    - `reference` string: A shortened reference for the customer. Returned on every customer response (create, list, by-ID, update, KYC and verify) and used as the pool-account reference when submitting a payment proof. Falls back to the customer id when no shortened reference has been assigned.
    - `name` string: The full name of the customer.
    - `email` string, email: The email of the customer.
    - `phone` string: The phone number of the customer in E.164 format.
    - `countryCode` string: The country code of the customer in ISO 3166-1 alpha-2 format.
    - `meta` object: Optional meta data you can attach to the customer. On the responses of `PATCH /api/v1/customer/{customerId}/kyc` and `POST /api/v1/customer/{customerId}/verify` this holds `meta.kyc.data`, the customer's stored KYC documents, in place of your meta data.
    - `createdAt` string: The date and time the customer was created.
    - `updatedAt` string: The date and time the customer was last updated.

## Other responses

- `400`: Malformed customer ID in the path, or an invalid email or phone value.
- `401`: Unauthorized.
- `404`: Customer not found.
- `409`: The new email or phone already belongs to another customer of this business.
- `422`: Request failed schema validation. `details.friendlyMessage` carries the specific field error.
- `500`: Server error.
- `503`: Temporarily unavailable: an upstream service failed or timed out, or the API is momentarily offline. Retry with backoff and honour the Retry-After header when present.

---

[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)
