---
title: "Create customer"
method: POST
path: "/customers"
tags: ["Customers"]
---

# Create customer

`POST /customers`

Use when onboarding a new billing customer (e.g. sign-up or CRM sync). Ideal for linking via external_customer_id to your app's user id.

## Request body

- CreateCustomerRequest — Request object for creating a new customer in the system
  - `address_city` string — address_city is the city name with maximum 100 characters
  - `address_country` string — address_country is the two-letter ISO 3166-1 alpha-2 country code
  - `address_line1` string — address_line1 is the primary address line with maximum 255 characters
  - `address_line2` string — address_line2 is the secondary address line with maximum 255 characters
  - `address_postal_code` string — address_postal_code is the ZIP code or postal code with maximum 20 characters
  - `address_state` string — address_state is the state, province, or region name with maximum 100 characters
  - `contact` string — contact is an optional contact number for the customer (e.g. phone)
  - `email` string — email is the customer's email address and must be a valid email format if provided
  - `external_id` string, required — external_id is the unique identifier from your system to reference this customer (required)
  - `integration_entity_mapping` CreateEntityIntegrationMappingRequest[] — integration_entity_mapping contains provider integration mappings for this customer
    - `entity_id` string, required
    - `entity_type` 'customer' | 'plan' | 'invoice' | 'subscription' | 'payment' | 'credit_note' | 'addon' | 'item' | 'item_price' | 'price' | 'invoice_line_item', required
    - `metadata` object
    - `provider_entity_id` string, required
    - `provider_type` string, required
  - `metadata` object — metadata contains additional key-value pairs for storing extra information
  - `name` string, required — name is the full name or company name of the customer
  - `onboarding_workflow_name` string — onboarding_workflow_name is given if a custom onboarding workflow is to be triggered for this customer
  - `skip_onboarding_workflow` boolean — skip_onboarding_workflow when true, prevents the customer onboarding workflow from being triggered This is used internally when a customer is created via a workflow to prevent infinite loops Default: false
  - `tax_rate_overrides` TaxRateOverride[] — tax_rate_overrides contains tax rate configurations to be linked to this customer
    - `auto_apply` boolean
    - `currency` string, required
    - `metadata` object
    - `priority` integer
    - `tax_rate_code` string, required
  - `timezone` string — timezone is the customer's IANA timezone name (e.g. "Asia/Kolkata", "America/New_York") Defaults to "UTC" if not provided

## Response `201`

Created

- CustomerResponse — 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
  - `contact` string — Contact is an optional contact number for the customer (e.g. phone)
  - `created_at` string, date-time
  - `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
  - `integrations` EntityIntegrationMappingResponse[]
    - `created_at` string, date-time
    - `created_by` string
    - `entity_id` string
    - `entity_type` 'customer' | 'plan' | 'invoice' | 'subscription' | 'payment' | 'credit_note' | 'addon' | 'item' | 'item_price' | 'price' | 'invoice_line_item'
    - `environment_id` string
    - `id` string
    - `metadata` object
    - `provider_entity_id` string
    - `provider_type` string
    - `status` 'published' | 'deleted' | 'archived'
    - `tenant_id` string
    - `updated_at` string, date-time
    - `updated_by` string
  - `metadata` object — Metadata
  - `name` string — Name is the name of the customer
  - `status` 'published' | 'deleted' | 'archived'
  - `tenant_id` string
  - `timezone` string — Timezone is the customer's IANA timezone name (e.g. "Asia/Kolkata"). Defaults to "UTC". Inherited by subscriptions at creation time.
  - `updated_at` string, date-time
  - `updated_by` string

## Other responses

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

---

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