---
title: "Create or update Customer (saveCustomer)"
method: POST
path: "/api/customer"
tags: ["customer-controller"]
---

# Create or update Customer (saveCustomer)

`POST /api/customer`

Creates or Updates the Customer. When creating customer, platform generates Customer Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Customer Id will be present in the response. Specify existing Customer Id to update the Customer. Referencing non-existing Customer Id will cause 'Not Found' error.Remove 'id', 'tenantId' from the request body example (below) to create new Customer entity. 

Available for users with 'TENANT_ADMIN' authority.

## Query parameters

- `nameConflictPolicy` 'FAIL' | 'UNIQUIFY'
- `uniquifySeparator` string
- `uniquifyStrategy` 'RANDOM' | 'INCREMENTAL'

## Request body

- Customer
  - `id` CustomerId
    - `id` string, uuid, required — ID of the entity, time-based UUID v1
    - `entityType` 'CUSTOMER', required — string
  - `createdTime` integer — Timestamp of the customer creation, in milliseconds
  - `country` string — Country
  - `state` string — State
  - `city` string — City
  - `address` string — Address Line 1
  - `address2` string — Address Line 2
  - `zip` string — Zip code
  - `phone` string — Phone number
  - `email` string, required — Email
  - `title` string, required — Title of the customer
  - `tenantId` TenantId
    - `id` string, uuid, required — ID of the entity, time-based UUID v1
    - `entityType` 'TENANT', required — string
  - `version` integer
  - `name` string — Name of the customer. Read-only, duplicated from title for backward compatibility
  - `additionalInfo` unknown

## Response `200`

OK

- Customer
  - `id` CustomerId
    - `id` string, uuid, required — ID of the entity, time-based UUID v1
    - `entityType` 'CUSTOMER', required — string
  - `createdTime` integer — Timestamp of the customer creation, in milliseconds
  - `country` string — Country
  - `state` string — State
  - `city` string — City
  - `address` string — Address Line 1
  - `address2` string — Address Line 2
  - `zip` string — Zip code
  - `phone` string — Phone number
  - `email` string, required — Email
  - `title` string, required — Title of the customer
  - `tenantId` TenantId
    - `id` string, uuid, required — ID of the entity, time-based UUID v1
    - `entityType` 'TENANT', required — string
  - `version` integer
  - `name` string — Name of the customer. Read-only, duplicated from title for backward compatibility
  - `additionalInfo` unknown

---

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