---
title: "Update a customer"
method: PUT
path: "/customers/{id}"
tags: ["Admin Customers"]
---

# Update a customer

`PUT /customers/{id}`

## Request

- Base URL: `http://localhost:8000/api/admin`
- URL: `http://localhost:8000/api/admin/customers/{id}`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/bagisto/apis/bagisto-admin-api/docs/customers/:id/put.ts> (a function with typed inputs; its response is checked against the schema)

Update a customer

## Path parameters

- `id` integer, required

## Request body

- object
  - `first_name` string
  - `last_name` string
  - `email` string
  - `phone` string, nullable
  - `gender` 'Male' | 'Female' | 'Other', nullable
  - `date_of_birth` string, nullable
  - `customer_group_id` integer
  - `channel_id` integer, nullable
  - `status` integer
  - `subscribed_to_news_letter` boolean, nullable
  - `password` string, nullable

## Response `200`

Customer updated.

## Other responses

- `400`: Invalid input
- `404`: Not found
- `422`: Validation failure.

---

[API](https://skmtc.dev/bagisto/apis/bagisto-admin-api.md) - [All operations](https://skmtc.dev/bagisto/apis/bagisto-admin-api/llms.txt) - [OpenAPI document](https://skmtc.dev/bagisto/apis/bagisto-admin-api/revisions/3198f11be70f?raw)
