Create customer group
POST
/v2/customers/groups
Creates a new customer group for a business.
The request must include the name
value of the group.
Name | Description |
---|---|
idempotency_
|
The idempotency key for the request. See the Idempotency guide for more information. |
group
Required
|
The customer group to create. |
Response Fields
Name | Description |
---|---|
errors
|
Any errors that occurred during the request. |
group
|
The successfully created customer group. |
Examples
POST
/v2/customers/groups
cURL
- cURL
- Ruby
- Python
- C#
- Java
- PHP
- Node.js
curl https://connect.squareup.com/v2/customers/groups \
-X POST \
-H 'Square-Version: 2021-02-26' \
-H 'Authorization: Bearer ACCESS_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"group": {
"name": "Loyal Customers"
}
}'
Response JSON
{
"group": {
"id": "2TAT3CMH4Q0A9M87XJZED0WMR3",
"name": "Loyal Customers",
"created_at": "2020-04-13T21:54:57.863Z",
"updated_at": "2020-04-13T21:54:58Z"
}
}