---
title: "Update customers matching a filter"
method: PATCH
path: "/v1/customers"
tags: ["Workflows"]
---

# Update customers matching a filter

`PATCH /v1/customers`

## Request

- Base URL: `https://api.workwing.io`
- URL: `https://api.workwing.io/v1/customers`
- Auth: HTTP bearer

Update every customer matching the query filters. To update one customer, use `PATCH /v1/customers/{customerId}`.

Requires an `Idempotency-Key` header.

## Headers

- `Idempotency-Key` string, required

## Request body

- object
  - `customer_type` 'T_PERSON' | 'T_ORGANIZATION': Type of customer record
  - `name` string
  - `last_name` string
  - `email` string, email
  - `phone` string
  - `contact_first_name` string
  - `contact_last_name` string
  - `contact_email` string, email
  - `contact_phone` string
  - `address_line1` string
  - `address_line2` string
  - `city` string
  - `state` string
  - `postal_code` string
  - `country` string
  - `external_crm_id` string
  - `external_crm_type` string

## Response `200`

Updated customer(s)

- object: Updated customer(s)
  - `data` object[]
    - `id` string, uuid
    - `brand_id` string, uuid
    - `customer_type` 'T_PERSON' | 'T_ORGANIZATION': Type of customer record
    - `name` string: First name (T_PERSON) or company name (T_ORGANIZATION)
    - `last_name` string, nullable
    - `email` string, email, nullable
    - `phone` string, nullable
    - `contact_first_name` string, nullable: Organization contact
    - `contact_last_name` string, nullable
    - `contact_email` string, email, nullable
    - `contact_phone` string, nullable
    - `address_line1` string, nullable
    - `address_line2` string, nullable
    - `city` string, nullable
    - `state` string, nullable
    - `postal_code` string, nullable
    - `country` string, nullable
    - `primary_location_id` string, uuid, nullable: The customer's default service location
    - `custom_fields` object, nullable: Custom field values keyed by field_key
    - `sms_opt_in` boolean, nullable
    - `email_opt_in` boolean, nullable
    - `service_notifications_enabled` boolean: Whether the customer is sent job status notifications
    - `external_crm_id` string, nullable: External CRM system ID
    - `external_crm_type` string, nullable: CRM system type
    - `created_by_user_id` string, uuid, nullable
    - `created_at` string, date-time, nullable
    - `updated_at` string, date-time, nullable
  - `meta` object
    - `request_id` string
    - `timestamp` string, date-time

---

[API](https://skmtc.dev/workwing/apis/workwing-api.md) · [All operations](https://skmtc.dev/workwing/apis/workwing-api/llms.txt) · [OpenAPI document](https://skmtc.dev/workwing/apis/workwing-api/revisions/54bb14368a35?raw)
