---
title: "Patch Customer"
description: "Change the phone number, the country or your own identifier of a customer."
canonical_url: "https://docs.stablegate.com/docs/apiref/customers/patch-customer"
---
# Patch Customer

> Change the phone number, the country or your own identifier of a customer.

::api-operation{color="warning" endpoint="/v1/customers/{customer_uuid}/" method="PATCH"}
Send only the fields you change. The country is an ISO 3166-1 alpha-3 code; a two-letter code is accepted and stored as its three-letter form. A customer of another partner answers 404.

## Authorization

::field-group
::field{name="X-Api-Key" type="string" :required="true"}
API key generated in the Developers section of the Stablegate app. Send it in the `X-Api-Key` header on every request; the partner API does not require request signing.
::
::

## Path parameters

::field-group
:field[Customer UUID]{name="customer_uuid" type="string<uuid>" :required="true"}
::

## Headers

::field-group
::field{name="Idempotency-Key" type="string"}
Makes the request safe to retry. The same key with the same body replays the cached response with `Idempotency-Replay: true`; a different body under the same key answers 422. Keys are kept for 24 hours.
::
::

## Request body

::field-group
:field[Phone number in international format]{name="phone" type="string | null"}:field[ISO 3166-1 alpha-3 country code]{name="country_code" type="string | null"}:field[The partner's own identifier of this customer]{name="external_reference" type="string | null"}
::

## Responses

::tabs
:tabs-item[Successful Response]{label="204"}::tabs-item{label="422"}
Validation Error

::field-group
:field{name="trace_id" type="string" :required="true"}::field{name="error_code" type="string" :required="true"}
One of: `devapi_internal_error`, `devapi_request_validation_error`, `devapi_iban_parse_error`, `devapi_customer_close_error`, `devapi_bank_code_required_error`, `devapi_download_aol_error`, `devapi_not_found_error`, `devapi_bad_request_error`, `devapi_email_occupied_error`, `devapi_idempotency_invalid_key`, `devapi_idempotency_key_misuse`, `devapi_idempotency_request_in_progress`, `devapi_kyc_application_link_error`, `devapi_instant_verification_error`, `devapi_unauthorized_error`, `devapi_forbidden_error`, `devapi_method_not_allowed_error`, `devapi_service_unavailable_error`
::

:field{name="message" type="string" :required="true"}::field{name="details" type="object[]" :required="true"}
::collapsible{name="properties"}
::field-group
:field{name="loc" type="string | string[]" :required="true"}:field{name="msg" type="string" :required="true"}:field{name="type" type="string" :required="true"}
::
::
::
::
::
::

::template{v-slot:samples=""}
::code-switcher{body="{"phone":"string","country_code":"string","external_reference":"string"}" method="PATCH" path="/v1/customers/CUSTOMER_UUID/"}
```bash
curl https://api.stablegate.com/v1/customers/CUSTOMER_UUID/ \
  --request PATCH \
  --header 'X-Api-Key: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
  "phone": "string",
  "country_code": "string",
  "external_reference": "string"
}'
```
::

::code-group
```text [204]
No content
```

```json [422]
{
  "trace_id": "string",
  "error_code": "devapi_internal_error",
  "message": "string",
  "details": [
    {
      "loc": "string",
      "msg": "string",
      "type": "string"
    }
  ]
}
```
::
::
::


## Sitemap

See the full [sitemap](https://docs.stablegate.com/sitemap.md) for all pages.
