Customer Groups
Customer groups let you organize customers into flexible categories, like Zendesk organizations, Intercom companies, or custom segments. Customers can belong to multiple groups. A group is test or live data like its customers: a test key creates and reaches only test groups, and a live key only live ones.
The Customer Group object
Unique group identifier
Group name
URL-friendly slug (auto-generated from name if omitted)
Optional description
External platform ID (for import matching, e.g., Zendesk org ID)
Arbitrary key-value metadata
Number of customers in this group in the key's mode (a test key counts test customers, a live key live ones), the same customers the members list returns
When the group was created
Last modification timestamp
Endpoints
/api/v1/teams/{teamId}/customer-groupsList Customer Groups
Retrieve a paginated list of customer groups.
Query Parameters
search string Search groups by name
page integer Page number (default: 1)
pageSize integer Results per page (default: 20, max: 100)
Code Examples
curl -X GET "https://www.cstar.help/api/v1/teams/{teamId}/customer-groups" \
-H "Authorization: Bearer sk_live_your_key" Responses
{
"data": [
{
"id": "a1b2c3d4-...",
"object": "customer_group",
"name": "Acme Corp",
"slug": "acme-corp",
"description": "Enterprise tier customer",
"customerCount": 42,
"createdAt": "2025-01-15T10:00:00Z"
}
],
"pagination": {
"total": 15,
"page": 1,
"pageSize": 20,
"hasMore": false
}
} {
"success": false,
"error": {
"type": "authentication_error",
"code": "invalid_api_key",
"message": "The API key provided is invalid or has been revoked",
"doc_url": "https://www.cstar.help/developers/errors#invalid_api_key",
"request_id": "req_abc123"
},
"meta": {
"timestamp": "2025-12-10T14:30:00Z"
}
} {
"success": false,
"error": {
"type": "authentication_error",
"code": "insufficient_permissions",
"message": "Your API key does not have permission for this operation",
"doc_url": "https://www.cstar.help/developers/errors#insufficient_permissions",
"request_id": "req_abc123"
},
"meta": {
"timestamp": "2025-12-10T14:30:00Z"
}
} {
"success": false,
"error": {
"type": "rate_limit_error",
"code": "rate_limit_exceeded",
"message": "Rate limit exceeded. Try again in 60 seconds.",
"retryAfter": 60,
"doc_url": "https://www.cstar.help/developers/errors#rate_limit_exceeded",
"request_id": "req_abc123"
},
"meta": {
"timestamp": "2025-12-10T14:30:00Z"
}
} /api/v1/teams/{teamId}/customer-groupsCreate Customer Group
Create a new customer group.
Request Body
name string requiredGroup name
slug string URL-friendly slug. Made from the name if omitted (acme-corp, or acme-corp-2 when another group holds it)
description string Optional description
externalId string External platform ID for import matching
customFields object Arbitrary key-value metadata
Code Examples
curl -X POST "https://www.cstar.help/api/v1/teams/{teamId}/customer-groups" \
-H "Authorization: Bearer sk_live_your_key" \
-H "Content-Type: application/json" \
-d '{"name": "Acme Corp", "description": "Enterprise tier"}' Responses
{
"id": "a1b2c3d4-...",
"object": "customer_group",
"name": "Acme Corp",
"slug": "acme-corp",
"customerCount": 0,
"createdAt": "2025-01-15T10:00:00Z"
} {
"success": false,
"error": {
"type": "invalid_request_error",
"code": "resource_conflict",
"message": "A group named \"Acme Corp\" already exists in live mode.",
"doc_url": "https://www.cstar.help/developers/errors#resource_conflict",
"request_id": "req_abc123"
},
"meta": {
"timestamp": "2025-12-10T14:30:00Z"
}
} {
"success": false,
"error": {
"type": "invalid_request_error",
"code": "idempotency_key_reused",
"message": "The Idempotency-Key was already used for a request with a different body. Generate a new key for this request.",
"doc_url": "https://www.cstar.help/developers/errors#idempotency_key_reused",
"request_id": "req_abc123"
},
"meta": {
"requestId": "req_abc123",
"timestamp": "2025-12-10T14:30:00Z"
}
} {
"success": false,
"error": {
"type": "authentication_error",
"code": "invalid_api_key",
"message": "The API key provided is invalid or has been revoked",
"doc_url": "https://www.cstar.help/developers/errors#invalid_api_key",
"request_id": "req_abc123"
},
"meta": {
"timestamp": "2025-12-10T14:30:00Z"
}
} {
"success": false,
"error": {
"type": "authentication_error",
"code": "insufficient_permissions",
"message": "Your API key does not have permission for this operation",
"doc_url": "https://www.cstar.help/developers/errors#insufficient_permissions",
"request_id": "req_abc123"
},
"meta": {
"timestamp": "2025-12-10T14:30:00Z"
}
} {
"success": false,
"error": {
"type": "rate_limit_error",
"code": "rate_limit_exceeded",
"message": "Rate limit exceeded. Try again in 60 seconds.",
"retryAfter": 60,
"doc_url": "https://www.cstar.help/developers/errors#rate_limit_exceeded",
"request_id": "req_abc123"
},
"meta": {
"timestamp": "2025-12-10T14:30:00Z"
}
} /api/v1/teams/{teamId}/customer-groups/{groupId}Get Customer Group
Retrieve a single customer group by ID.
Path Parameters
groupId string requiredCustomer group ID
Code Examples
curl -X GET "https://www.cstar.help/api/v1/teams/{teamId}/customer-groups/{groupId}" \
-H "Authorization: Bearer sk_live_your_key" Responses
{
"id": "a1b2c3d4-...",
"object": "customer_group",
"name": "Acme Corp",
"slug": "acme-corp",
"description": "Enterprise tier customer",
"customFields": {
"tier": "enterprise",
"region": "us-west"
},
"customerCount": 42,
"createdAt": "2025-01-15T10:00:00Z"
} {
"success": false,
"error": {
"type": "authentication_error",
"code": "invalid_api_key",
"message": "The API key provided is invalid or has been revoked",
"doc_url": "https://www.cstar.help/developers/errors#invalid_api_key",
"request_id": "req_abc123"
},
"meta": {
"timestamp": "2025-12-10T14:30:00Z"
}
} {
"success": false,
"error": {
"type": "authentication_error",
"code": "insufficient_permissions",
"message": "Your API key does not have permission for this operation",
"doc_url": "https://www.cstar.help/developers/errors#insufficient_permissions",
"request_id": "req_abc123"
},
"meta": {
"timestamp": "2025-12-10T14:30:00Z"
}
} {
"success": false,
"error": {
"type": "rate_limit_error",
"code": "rate_limit_exceeded",
"message": "Rate limit exceeded. Try again in 60 seconds.",
"retryAfter": 60,
"doc_url": "https://www.cstar.help/developers/errors#rate_limit_exceeded",
"request_id": "req_abc123"
},
"meta": {
"timestamp": "2025-12-10T14:30:00Z"
}
} /api/v1/teams/{teamId}/customer-groups/{groupId}Update Customer Group
Update a customer group. Only provided fields are changed.
Path Parameters
groupId string requiredCustomer group ID
Request Body
name string Group name
slug string URL-friendly slug
description string | null Description. An empty string or null clears it
customFields object Custom metadata
Code Examples
curl -X PATCH "https://www.cstar.help/api/v1/teams/{teamId}/customer-groups/{groupId}" \
-H "Authorization: Bearer sk_live_your_key" \
-H "Content-Type: application/json" \
-d '{"name": "Acme Corp Updated"}' Responses
{
"id": "a1b2c3d4-...",
"object": "customer_group",
"name": "Acme Corp Updated"
} {
"success": false,
"error": {
"type": "invalid_request_error",
"code": "resource_conflict",
"message": "A group named \"Acme Corp Updated\" already exists in live mode.",
"doc_url": "https://www.cstar.help/developers/errors#resource_conflict",
"request_id": "req_abc123"
},
"meta": {
"timestamp": "2025-12-10T14:30:00Z"
}
} {
"success": false,
"error": {
"type": "invalid_request_error",
"code": "idempotency_key_reused",
"message": "The Idempotency-Key was already used for a request with a different body. Generate a new key for this request.",
"doc_url": "https://www.cstar.help/developers/errors#idempotency_key_reused",
"request_id": "req_abc123"
},
"meta": {
"requestId": "req_abc123",
"timestamp": "2025-12-10T14:30:00Z"
}
} {
"success": false,
"error": {
"type": "authentication_error",
"code": "invalid_api_key",
"message": "The API key provided is invalid or has been revoked",
"doc_url": "https://www.cstar.help/developers/errors#invalid_api_key",
"request_id": "req_abc123"
},
"meta": {
"timestamp": "2025-12-10T14:30:00Z"
}
} {
"success": false,
"error": {
"type": "authentication_error",
"code": "insufficient_permissions",
"message": "Your API key does not have permission for this operation",
"doc_url": "https://www.cstar.help/developers/errors#insufficient_permissions",
"request_id": "req_abc123"
},
"meta": {
"timestamp": "2025-12-10T14:30:00Z"
}
} {
"success": false,
"error": {
"type": "rate_limit_error",
"code": "rate_limit_exceeded",
"message": "Rate limit exceeded. Try again in 60 seconds.",
"retryAfter": 60,
"doc_url": "https://www.cstar.help/developers/errors#rate_limit_exceeded",
"request_id": "req_abc123"
},
"meta": {
"timestamp": "2025-12-10T14:30:00Z"
}
} /api/v1/teams/{teamId}/customer-groups/{groupId}Delete Customer Group
Delete a customer group. Members are removed from the group but not deleted.
Path Parameters
groupId string requiredCustomer group ID
Code Examples
curl -X DELETE "https://www.cstar.help/api/v1/teams/{teamId}/customer-groups/{groupId}" \
-H "Authorization: Bearer sk_live_your_key" Responses
{
"deleted": true,
"id": "a1b2c3d4-..."
} {
"success": false,
"error": {
"type": "authentication_error",
"code": "invalid_api_key",
"message": "The API key provided is invalid or has been revoked",
"doc_url": "https://www.cstar.help/developers/errors#invalid_api_key",
"request_id": "req_abc123"
},
"meta": {
"timestamp": "2025-12-10T14:30:00Z"
}
} {
"success": false,
"error": {
"type": "authentication_error",
"code": "insufficient_permissions",
"message": "Your API key does not have permission for this operation",
"doc_url": "https://www.cstar.help/developers/errors#insufficient_permissions",
"request_id": "req_abc123"
},
"meta": {
"timestamp": "2025-12-10T14:30:00Z"
}
} {
"success": false,
"error": {
"type": "rate_limit_error",
"code": "rate_limit_exceeded",
"message": "Rate limit exceeded. Try again in 60 seconds.",
"retryAfter": 60,
"doc_url": "https://www.cstar.help/developers/errors#rate_limit_exceeded",
"request_id": "req_abc123"
},
"meta": {
"timestamp": "2025-12-10T14:30:00Z"
}
} /api/v1/teams/{teamId}/customer-groups/{groupId}/membersList Group Members
List customers that belong to a group.
Path Parameters
groupId string requiredCustomer group ID
Query Parameters
page integer Page number (default: 1)
pageSize integer Results per page (default: 20, max: 100)
Code Examples
curl -X GET "https://www.cstar.help/api/v1/teams/{teamId}/customer-groups/{groupId}/members" \
-H "Authorization: Bearer sk_live_your_key" Responses
{
"data": [
{
"id": "cus_xxx",
"object": "customer",
"name": "Rick Astley",
"email": "rick@acme.com",
"sentiment": "neutral",
"tags": [
"vip"
],
"joinedGroupAt": "2025-01-15T10:00:00Z"
}
],
"pagination": {
"total": 42,
"page": 1,
"pageSize": 20,
"hasMore": true
}
} {
"success": false,
"error": {
"type": "authentication_error",
"code": "invalid_api_key",
"message": "The API key provided is invalid or has been revoked",
"doc_url": "https://www.cstar.help/developers/errors#invalid_api_key",
"request_id": "req_abc123"
},
"meta": {
"timestamp": "2025-12-10T14:30:00Z"
}
} {
"success": false,
"error": {
"type": "authentication_error",
"code": "insufficient_permissions",
"message": "Your API key does not have permission for this operation",
"doc_url": "https://www.cstar.help/developers/errors#insufficient_permissions",
"request_id": "req_abc123"
},
"meta": {
"timestamp": "2025-12-10T14:30:00Z"
}
} {
"success": false,
"error": {
"type": "rate_limit_error",
"code": "rate_limit_exceeded",
"message": "Rate limit exceeded. Try again in 60 seconds.",
"retryAfter": 60,
"doc_url": "https://www.cstar.help/developers/errors#rate_limit_exceeded",
"request_id": "req_abc123"
},
"meta": {
"timestamp": "2025-12-10T14:30:00Z"
}
} /api/v1/teams/{teamId}/customer-groups/{groupId}/membersAdd Members to Group
Add one or more customers to a group. Duplicates are silently skipped.
Path Parameters
groupId string requiredCustomer group ID
Request Body
customerId string Single customer ID to add
customerIds string[] Array of customer IDs to add (max 100). Use this OR customerId.
Code Examples
curl -X POST "https://www.cstar.help/api/v1/teams/{teamId}/customer-groups/{groupId}/members" \
-H "Authorization: Bearer sk_live_your_key" \
-H "Content-Type: application/json" \
-d '{"customerIds": ["cus_xxx", "cus_yyy"]}' Responses
{
"added": 3,
"total": 5,
"skipped": 2
} {
"success": false,
"error": {
"type": "invalid_request_error",
"code": "idempotency_key_in_use",
"message": "A request with this Idempotency-Key is still being processed. Retry after it finishes.",
"doc_url": "https://www.cstar.help/developers/errors#idempotency_key_in_use",
"request_id": "req_abc123"
},
"meta": {
"requestId": "req_abc123",
"timestamp": "2025-12-10T14:30:00Z"
}
} {
"success": false,
"error": {
"type": "invalid_request_error",
"code": "idempotency_key_reused",
"message": "The Idempotency-Key was already used for a request with a different body. Generate a new key for this request.",
"doc_url": "https://www.cstar.help/developers/errors#idempotency_key_reused",
"request_id": "req_abc123"
},
"meta": {
"requestId": "req_abc123",
"timestamp": "2025-12-10T14:30:00Z"
}
} {
"success": false,
"error": {
"type": "authentication_error",
"code": "invalid_api_key",
"message": "The API key provided is invalid or has been revoked",
"doc_url": "https://www.cstar.help/developers/errors#invalid_api_key",
"request_id": "req_abc123"
},
"meta": {
"timestamp": "2025-12-10T14:30:00Z"
}
} {
"success": false,
"error": {
"type": "authentication_error",
"code": "insufficient_permissions",
"message": "Your API key does not have permission for this operation",
"doc_url": "https://www.cstar.help/developers/errors#insufficient_permissions",
"request_id": "req_abc123"
},
"meta": {
"timestamp": "2025-12-10T14:30:00Z"
}
} {
"success": false,
"error": {
"type": "rate_limit_error",
"code": "rate_limit_exceeded",
"message": "Rate limit exceeded. Try again in 60 seconds.",
"retryAfter": 60,
"doc_url": "https://www.cstar.help/developers/errors#rate_limit_exceeded",
"request_id": "req_abc123"
},
"meta": {
"timestamp": "2025-12-10T14:30:00Z"
}
} /api/v1/teams/{teamId}/customer-groups/{groupId}/membersRemove Member from Group
Remove a customer from a group.
Path Parameters
groupId string requiredCustomer group ID
Query Parameters
customerId string requiredCustomer ID to remove
Code Examples
curl -X DELETE "https://www.cstar.help/api/v1/teams/{teamId}/customer-groups/{groupId}/members?customerId=cus_xxx" \
-H "Authorization: Bearer sk_live_your_key" Responses
{
"removed": true,
"customerId": "cus_xxx",
"groupId": "a1b2c3d4-..."
} {
"success": false,
"error": {
"type": "authentication_error",
"code": "invalid_api_key",
"message": "The API key provided is invalid or has been revoked",
"doc_url": "https://www.cstar.help/developers/errors#invalid_api_key",
"request_id": "req_abc123"
},
"meta": {
"timestamp": "2025-12-10T14:30:00Z"
}
} {
"success": false,
"error": {
"type": "authentication_error",
"code": "insufficient_permissions",
"message": "Your API key does not have permission for this operation",
"doc_url": "https://www.cstar.help/developers/errors#insufficient_permissions",
"request_id": "req_abc123"
},
"meta": {
"timestamp": "2025-12-10T14:30:00Z"
}
} {
"success": false,
"error": {
"type": "rate_limit_error",
"code": "rate_limit_exceeded",
"message": "Rate limit exceeded. Try again in 60 seconds.",
"retryAfter": 60,
"doc_url": "https://www.cstar.help/developers/errors#rate_limit_exceeded",
"request_id": "req_abc123"
},
"meta": {
"timestamp": "2025-12-10T14:30:00Z"
}
}