# Set a customer's external reference

`PATCH /v1/platforms/{orgId}/customers/{customerId}`

Sets or clears `external_ref`, your own identifier for the customer. It must be unique among your active customers.

Requires: organization platform (active); permission platform:customers_manage

## Request body

- `external_ref` (string, required): 

```json
{
  "external_ref": "acme-001"
}
```

Errors: external_ref_exists

```bash
curl -X PATCH "https://sandbox-api.payezy.io/v1/platforms/$ORG_ID/customers/$CUSTOMER_ID" \
  -H "Authorization: Bearer $PAYEZY_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "external_ref": "acme-001"
}'
```
