---
title: "Update customer"
method: PUT
path: "/customers"
tags: ["Customers"]
---

# Update customer

`PUT /customers`

Use when updating customer details (e.g. name, email, or metadata). Identify by id or external_customer_id.

## Query parameters

- `id` string
- `external_customer_id` string

## Request body

- DtoUpdateCustomerRequest — Request object for updating an existing customer. All fields are optional - only provided fields will be updated
  - `address_city` string — address_city is the updated city name with maximum 100 characters
  - `address_country` string — address_country is the updated two-letter ISO 3166-1 alpha-2 country code
  - `address_line1` string — address_line1 is the updated primary address line with maximum 255 characters
  - `address_line2` string — address_line2 is the updated secondary address line with maximum 255 characters
  - `address_postal_code` string — address_postal_code is the updated postal code with maximum 20 characters
  - `address_state` string — address_state is the updated state, province, or region name with maximum 100 characters
  - `email` string — email is the updated email address and must be a valid email format if provided
  - `external_id` string — external_id is the updated external identifier for the customer
  - `integration_entity_mapping` DtoIntegrationEntityMapping[] — integration_entity_mapping contains provider integration mappings for this customer
    - `id` string, required — id is the external entity ID from the provider
    - `provider` 'stripe' | 'razorpay' | 'paypal', required — provider is the integration provider name (e.g., "stripe", "razorpay")
  - `metadata` object — metadata contains updated key-value pairs that will replace existing metadata
  - `name` string — name is the updated name or company name for the customer
  - `parent_customer_external_id` string — parent_customer_external_id is the external ID of the parent customer from your system Exactly one of parent_customer_id or parent_customer_external_id may be provided If you provide the external ID, the parent customer value will be ignored
  - `parent_customer_id` string — parent_customer_id is the internal FlexPrice ID of the parent customer

## Response `200`

OK

- DtoCustomerResponse — Customer response object containing all customer information
  - `address_city` string — AddressCity is the city of the customer's address
  - `address_country` string — AddressCountry is the country of the customer's address (ISO 3166-1 alpha-2)
  - `address_line1` string — AddressLine1 is the first line of the customer's address
  - `address_line2` string — AddressLine2 is the second line of the customer's address
  - `address_postal_code` string — AddressPostalCode is the postal code of the customer's address
  - `address_state` string — AddressState is the state of the customer's address
  - `created_at` string
  - `created_by` string
  - `email` string — Email is the email of the customer
  - `environment_id` string — EnvironmentID is the environment identifier for the customer
  - `external_id` string — ExternalID is the external identifier for the customer
  - `id` string — ID is the unique identifier for the customer
  - `metadata` object — Metadata
  - `name` string — Name is the name of the customer
  - `parent_customer` DtoCustomerResponse — recursive
  - `parent_customer_id` string — ParentCustomerID is the parent customer identifier for the customer
  - `status` 'published' | 'deleted' | 'archived'
  - `tenant_id` string
  - `updated_at` string
  - `updated_by` string

## Other responses

- `400` — Invalid request
- `500` — Server error

---

[API](https://skmtc.dev/flexprice/apis/flexprice-api-2.md) · [All operations](https://skmtc.dev/flexprice/apis/flexprice-api-2/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/flexprice/flexprice-api-2/revisions/bc91c95fbb1a/schema)
