POST /V1/customers
POST /V1/customers is a Magento 2 REST endpoint in the Webapi module. Create or update a customer. Requires an admin Bearer token with ACL Magento_Customer::manage.
Last verified: against Magento 2.4.9.
Returns
Magento\Customer\Api\Data\CustomerInterface
Service contract
Magento\Customer\Api\CustomerRepositoryInterface::save
Authorization
Admin Bearer token with ACL:
- Magento_Customer::manage
Body parameters
Example request
Auto-generated from the service contract — paste-ready against your store's /rest/default base. Replace the host, store code, ACL token, and any required values before running.
Headers
Path
/V1/customersBody
{
"customer": {
"addresses": [
{
"city": "",
"company": "",
"country_id": "",
"custom_attributes": [
{
"attribute_code": "",
"value": ""
}
],
"customer_id": 0,
"default_billing": false,
"default_shipping": false,
"extension_attributes": {},
"fax": "",
"firstname": "",
"id": 0,
"lastname": "",
"middlename": "",
"postcode": "",
"prefix": "",
"region": {
"extension_attributes": {},
"region": "",
"region_code": "",
"region_id": 0
},
"region_id": 0,
"street": [
{}
],
"suffix": "",
"telephone": "",
"vat_id": ""
}
],
"confirmation": "",
"created_at": "",
"created_in": "",
"custom_attributes": [
{
"attribute_code": "",
"value": ""
}
],
"default_billing": "",
"default_shipping": "",
"disable_auto_group_change": 0,
"dob": "",
"email": "",
"extension_attributes": {},
"firstname": "",
"gender": 0,
"group_id": 0,
"id": 0,
"lastname": "",
"middlename": "",
"prefix": "",
"store_id": 0,
"suffix": "",
"taxvat": "",
"updated_at": "",
"website_id": 0
},
"passwordHash": ""
}Related in Webapi
Other endpoints shipped by the same module.
/V1/customers/:id
Delete customer by Customer ID.
Webapi · Magento\Customer\Api\CustomerRepositoryInterface::deleteById
/V1/customers/:id
Get customer by Customer ID.
Webapi · Magento\Customer\Api\CustomerRepositoryInterface::getById
/V1/customers/me
Get customer by Customer ID.
Webapi · Magento\Customer\Api\CustomerRepositoryInterface::getById
/V1/customers/me
Create or update a customer.
Webapi · Magento\Customer\Api\CustomerRepositoryInterface::save
/V1/customers/me/session
Get customer by Customer ID.
Webapi · Magento\Customer\Api\CustomerRepositoryInterface::getById
Every Magento dev tool, in one hosted workspace.
Free to sign up. Nothing to install. Drafts, audits, and projects saved across every tool.