---
title: "Update a customer"
method: PATCH
path: "/customers/{customerId}"
tags: ["Customers"]
---

# Update a customer

`PATCH /customers/{customerId}`

## Request

- Base URL: `https://api3.autarc.energy/v1`
- URL: `https://api3.autarc.energy/v1/customers/{customerId}`
- Auth: API key in header `X-Api-Key`

Partially updates a customer: only the fields you send change. An empty string clears `companyName`, `email`, `phoneNumber` and `responsibleProfileId`. `address`, when sent, must be complete and replaces the customer's primary address (or adds one). Unknown fields are rejected with 400. Responds with the stored customer.

## Path parameters

- `customerId` string, required

## Request body

- PatchCustomerRequest: Every field is optional; at least one must be sent.
  - `firstName` string
  - `lastName` string
  - `companyName` string: Empty string clears it.
  - `email` string: Empty string clears it.
  - `phoneNumber` string: Empty string clears it.
  - `responsibleProfileId` string: Team member (see `GET /team-members`) responsible for the customer. Must belong to your company; empty string clears it.
  - `address` object: The customer's primary address. All of `addressLine1`, `postalCode`, `city` and `country` are required when sent.
    - `addressLine1` string, required: Street and house number
    - `postalCode` string, required
    - `city` string, required
    - `country` string, required
    - `countryCode` string: ISO 3166-1 alpha-2 code, e.g. DE or GB

## Response `200`

OK

- Customer
  - `id` string, uuid
  - `firstName` string
  - `lastName` string
  - `companyId` string, uuid
  - `humanId` string, nullable
  - `createdAt` string, date-time
  - `updatedAt` string, date-time
  - `address` Address
    - `addressLine1` string, required
    - `addressLine2` string, nullable
    - `postalCode` string, required
    - `city` string, required
    - `country` string, required
    - `countryCode` string, nullable: The ISO country code.
    - `latitude` number, nullable
    - `longitude` number, nullable
  - `email` string, email, nullable
  - `invoiceEmail` string, email, nullable
  - `phoneNumber` string, nullable
  - `isCompany` boolean
  - `companyName` string, nullable
  - `availability` 'morning' | 'afternoon' | 'evening' | 'weekend_only' | 'flexible'
  - `description` string, nullable
  - `website` string, uri, nullable

## Other responses

- `400`: Invalid request — a malformed id, filter, pagination parameter or body. The body is a plain-text message naming the problem.
- `404`: The specified resource was not found

---

[API](https://skmtc.dev/autarc/apis/autarc-2-0-api.md) - [All operations](https://skmtc.dev/autarc/apis/autarc-2-0-api/llms.txt) - [OpenAPI document](https://skmtc.dev/autarc/apis/autarc-2-0-api/revisions/adfb20a40efc?raw)
