# Update a business

Changes a business's `name`, its `external_id`, or both, and returns the updated
[Business object](https://developers.lazyinvoice.co.il/embedded/objects/businesses/). A field you omit or send as null keeps its value.
An empty body changes nothing and returns the business as it is.

The new `external_id` must be unique within your platform. When it is taken, nothing changes, not
even the `name` sent in the same request.

```text
PATCH https://embedded-api.lazyinvoice.co.il/v1/businesses/{biz_id}
```

## Parameters

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `biz_id` | string | Yes | The Lazy ID of the business, returned when the business was created. |

### Body

A JSON object with these fields.

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `name` | string or null | No | The business's display name. Leading and trailing spaces are removed. Omit or send null to keep it. |
| `external_id` | string or null | No | Your own ID for the business, unique within your platform. Leading and trailing spaces are removed. Omit or send null to keep it. |

## Responses

### 200 OK

The updated business. The body is a [Business object](https://developers.lazyinvoice.co.il/embedded/objects/businesses/).

## Errors

Every error body is the [error envelope](https://developers.lazyinvoice.co.il/embedded/errors/). Any endpoint can also return 401, 429 and 500; [Errors](https://developers.lazyinvoice.co.il/embedded/errors/) explains them.

| Status | Code, cause and what to do |
| --- | --- |
| 400 | `validation_error`: a body that is not valid JSON or not a JSON object, an empty, mistyped or unknown field, or an unknown query parameter. Fix the request; `param` names the field at fault when there is one. |
| 404 | `not_found`: no business with this `biz_id` belongs to your platform. Check the `biz_id`; a deleted business stays not found. |
| 409 | `business_exists`: another business of your platform already has this `external_id`; the error's `biz_id` names it. Use that business, or choose another `external_id`. |

## Retry safety

Safe to retry. Sending the same values again changes nothing more.

## Async behavior and events

None. The change is complete when the response arrives, and Lazy sends no webhook for it.

## Examples

### Rename a business

```bash
curl -X PATCH https://embedded-api.lazyinvoice.co.il/v1/businesses/biz_8fKq2LmZp4TnWx7RcV1a \
  -H "Authorization: Bearer $LAZY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "Dana Levi Studio"}'
```

Response: `200 OK`

```json
{
  "biz_id": "biz_8fKq2LmZp4TnWx7RcV1a",
  "external_id": "customer-1042",
  "name": "Dana Levi Studio",
  "created_at": "2026-10-02T09:14:03.512874+00:00"
}
```

### The new external ID is taken

```bash
curl -X PATCH https://embedded-api.lazyinvoice.co.il/v1/businesses/biz_8fKq2LmZp4TnWx7RcV1a \
  -H "Authorization: Bearer $LAZY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"external_id": "customer-1043"}'
```

Response: `409 Conflict`

```json
{
  "error": {
    "code": "business_exists",
    "message": "A business with this external_id already exists",
    "biz_id": "biz_3TnWx7RcV1a8fKq2LmZp",
    "request_id": "q8Zr1Ndk2vLp0Xw7HcYt3Rb9Fs6Mj4Ge5Ua1Ki8Oy2Wn0Tz7Ql3Px=="
  }
}
```

Added in: [October 2026](https://developers.lazyinvoice.co.il/embedded/changelog/#october-2026)
