Skip to main content

Groups

Base: https://crm-service.<domain>/api/v2/entity/group.

Create​

POST/api/v2/entity/groupcrm-service
curl -s https://crm-service.scenid.cloud/api/v2/entity/group \
-H "Authorization: Bearer $TOKEN" -H 'Content-Type: application/json' \
-d '{
"data": { "name": "Key accounts", "groupType": "manual", "labels": ["vip", "sales"] },
"members": [{ "humanId": "SC-COMPANY" }],
"return": true
}'

data.name is required and unique (entity/group-already-exists). groupType is manual (default) or filter. members is a list of objects { humanId }. data is validated against the full Group schema by default; pass "schema": "minimal" to validate against just name instead, or "strict": true to reject any field not in the schema being validated against. Response 201: { "result": "OK", "humanId": "..." } or the entity with return.

Update​

PUT/api/v2/entity/group/{humanId}crm-service

Body: data, overwrite, strict, config, features, return. data is merged into the existing data by default — overwrite: true replaces it entirely instead (fields present on the entity but absent from data are then deleted). strict: true rejects any field in data not in the Group schema. Response 200 { "result": "OK", "humanId": "..." }. Errors: entity/data-missing, group/config-invalid, group/features-invalid, entity/group-already-exists.

Delete​

DELETE/api/v2/entity/group/{humanId}crm-service

200 { "result": "deleted", "humanId": "..." }.

Add a member​

POST/api/v2/entity/group/{groupHumanId}/members/{targetHumanId}crm-service

PUT works too. The body is ignored, except return. Response { "result": "OK", "humanId": "..." }. The target can be a company or a person.

Remove a member​

DELETE/api/v2/entity/group/{groupHumanId}/members/{targetHumanId}crm-service

200 { "result": "deleted", "humanId": "..." }.

Other group endpoints​

The Customers app uses more group routes that the SDK does not wrap: /{humanId}/members (bulk add), /{humanId}/members/remove, /{humanId}/members/refresh, /{humanId}/members/diff, /{humanId}/head, /{humanId}/features. Feature routes need customers.group.manage, and the acl feature needs owner or customers.admin.