Skip to main content
PUT
/
v1
/
customers
/
{id}
curl -X PUT https://api.flexprice.io/v1/customers/cust_abc123xyz789 \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Acme Corp (Updated)",
    "email": "billing-new@acme.com",
    "metadata": {
      "plan_tier": "enterprise_plus",
      "renewal_date": "2025-01-15"
    }
  }'
{
  "id": "cust_abc123xyz789",
  "external_id": "user_12345",
  "name": "Acme Corp (Updated)",
  "email": "billing-new@acme.com",
  "address_line1": "123 Main Street",
  "address_line2": "",
  "address_city": "San Francisco",
  "address_state": "CA",
  "address_postal_code": "94105",
  "address_country": "US",
  "parent_customer_id": null,
  "metadata": {
    "plan_tier": "enterprise_plus",
    "renewal_date": "2025-01-15"
  },
  "environment_id": "env_prod_001",
  "tenant_id": "tenant_001",
  "status": "published",
  "created_at": "2024-01-15T10:30:00Z",
  "updated_at": "2024-01-20T14:45:00Z",
  "created_by": "user_admin",
  "updated_by": "user_admin"
}
Use this endpoint when updating customer details (e.g., name, email, or metadata). You can identify the customer by FlexPrice ID or external customer ID.

Path Parameters

id
string
The unique FlexPrice customer ID (e.g., cust_abc123xyz789). Can be provided as path parameter or query parameter.

Query Parameters

id
string
The unique FlexPrice customer ID. Alternative to path parameter.
external_customer_id
string
The external customer ID from your system. Use this to update by your own identifier instead of the FlexPrice ID.
Provide either id (as path or query parameter) or external_customer_id, but not both. If both are provided, they must refer to the same customer.

Request Body

All fields are optional. Only the fields you provide will be updated.
external_id
string
Updated external identifier for the customer.
name
string
Updated name or company name.
email
string
Updated email address. Must be a valid email format if provided.
address_line1
string
Updated primary address line. Maximum 255 characters.
address_line2
string
Updated secondary address line. Maximum 255 characters.
address_city
string
Updated city name. Maximum 100 characters.
address_state
string
Updated state, province, or region name. Maximum 100 characters.
address_postal_code
string
Updated postal code. Maximum 20 characters.
address_country
string
Updated two-letter ISO 3166-1 alpha-2 country code.
metadata
object
Updated metadata key-value pairs. This will replace the existing metadata completely.
parent_customer_id
string
Updated parent customer FlexPrice ID.
parent_customer_external_id
string
Updated parent customer external ID. Provide either parent_customer_id or parent_customer_external_id, but not both.
integration_entity_mapping
array
Updated provider integration mappings.

Response

id
string
The unique FlexPrice customer ID.
external_id
string
The external identifier.
name
string
The customer’s name or company name.
email
string
The customer’s email address.
address_line1
string
Primary address line.
address_line2
string
Secondary address line.
address_city
string
City name.
address_state
string
State or region name.
address_postal_code
string
Postal code.
address_country
string
Two-letter country code.
parent_customer_id
string
The parent customer ID if applicable.
metadata
object
Custom metadata key-value pairs.
environment_id
string
The environment ID.
tenant_id
string
The tenant ID.
status
string
The customer status.
created_at
string
ISO 8601 timestamp of creation.
updated_at
string
ISO 8601 timestamp of last update.
created_by
string
The ID of the user who created the customer.
updated_by
string
The ID of the user who last updated the customer.
curl -X PUT https://api.flexprice.io/v1/customers/cust_abc123xyz789 \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Acme Corp (Updated)",
    "email": "billing-new@acme.com",
    "metadata": {
      "plan_tier": "enterprise_plus",
      "renewal_date": "2025-01-15"
    }
  }'
{
  "id": "cust_abc123xyz789",
  "external_id": "user_12345",
  "name": "Acme Corp (Updated)",
  "email": "billing-new@acme.com",
  "address_line1": "123 Main Street",
  "address_line2": "",
  "address_city": "San Francisco",
  "address_state": "CA",
  "address_postal_code": "94105",
  "address_country": "US",
  "parent_customer_id": null,
  "metadata": {
    "plan_tier": "enterprise_plus",
    "renewal_date": "2025-01-15"
  },
  "environment_id": "env_prod_001",
  "tenant_id": "tenant_001",
  "status": "published",
  "created_at": "2024-01-15T10:30:00Z",
  "updated_at": "2024-01-20T14:45:00Z",
  "created_by": "user_admin",
  "updated_by": "user_admin"
}

Partial Updates

This endpoint supports partial updates, meaning you only need to send the fields you want to change. All other fields will remain unchanged. Example: To update only the email address:
{
  "email": "new-email@acme.com"
}

Metadata

The metadata field replaces the entire existing metadata object. If you want to preserve existing keys, you must include them in your update request.