• Example searches: “transaction”, “CreateOrder”, “/v2/locations”, “inventory”, “delete customer”

You are viewing an old version of the API
Create customer group BETA

POST /v2/customers/groups

Creates a new customer group for a business.

The request must include the name value of the group.


Permissions
CUSTOMERS_WRITE
Guide
Create a customer group
Try in API Explorer
Name Description
idempotency_key
string

The idempotency key for the request. See the Idempotency guide for more information.

group
CustomerGroup

Required

The customer group to create.

Response Fields

Name Description
errors
Error [ ]

Any errors that occurred during the request.

group
CustomerGroup

The successfully created customer group.

Examples

You are viewing an old version of the API
POST /v2/customers/groups
cURL
  • cURL
  • Ruby
  • Python
  • C#
  • Java
  • PHP
curl https://connect.squareup.com/v2/customers/groups \
  -X POST \
  -H 'Square-Version: 2020-09-23' \
  -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"
  }
}

Share Feedback

Thanks for visiting the Square API documentation. What's on your mind?