SkillhabitDocs

Smart Groups

Create and manage rule-based groups whose membership is computed from custom field conditions.

GET
/smart-groups/{smartGroupId}/managers

Returns user ids of managers assigned to the smart group.

AuthorizationBearer <token>

A JSON Web Token

In: header

Path Parameters

smartGroupId*string

Smart group id.

Response Body

application/json

curl -X GET "https://example.com/smart-groups/3f1d8b12-7c4a-4b68-9e6d-2c7a0b1f4d22/managers"
{  "userIds": [    "string"  ]}
POST
/smart-groups/{smartGroupId}/managers

Adds users as managers of the smart group.

AuthorizationBearer <token>

A JSON Web Token

In: header

Path Parameters

smartGroupId*string

Smart group id.

Request Body

application/json

User ids to add as managers.

TypeScript Definitions

Use the request body type in TypeScript.

User ids to add as managers

Response Body

application/json

curl -X POST "https://example.com/smart-groups/3f1d8b12-7c4a-4b68-9e6d-2c7a0b1f4d22/managers" \  -H "Content-Type: application/json" \  -d '{    "userIds": [      "string"    ]  }'
Empty
GET
/smart-groups

Returns smart groups for the customer (id and name only). Use skip and limit for pagination. Optional filter matches group names (case-insensitive substring).

AuthorizationBearer <token>

A JSON Web Token

In: header

Query Parameters

skip?integer

Number of smart groups to skip.

Formatint32
Default0
limit?integer

Maximum number of smart groups to return.

Formatint32
Default100
filter?string

Optional case-insensitive group name substring filter.

Default""

Response Body

application/json

curl -X GET "https://example.com/smart-groups?skip=0&limit=100&filter=sales"
{  "smartGroups": [    {      "smartGroupId": "string",      "name": "string"    }  ]}
POST
/smart-groups

Creates a smart group. Membership is defined by conditions (combined with AND), not by adding users directly. Returns the generated smartGroupId. Conditions are validated against custom field definitions (see GET /custom-fields).

AuthorizationBearer <token>

A JSON Web Token

In: header

Request Body

application/json

Smart group definition. Required: name and conditions (at least one). Optional: managers.

TypeScript Definitions

Use the request body type in TypeScript.

Create a smart group. Membership is computed from conditions (AND logic); users cannot be added manually. Required: name and at least one condition. Optional: managers (user ids). The smart group id is generated by the API.

Response Body

application/json

application/json

curl -X POST "https://example.com/smart-groups" \  -H "Content-Type: application/json" \  -d '{    "name": "string",    "conditions": [      {}    ]  }'
{  "smartGroupId": "string"}
GET
/smart-groups/{smartGroupId}

Returns a smart group by id, including conditions and managers. Set query parameter includeMembers=true to include member user ids (computed from conditions).

AuthorizationBearer <token>

A JSON Web Token

In: header

Path Parameters

smartGroupId*string

Smart group id.

Query Parameters

includeMembers?boolean

When true, include current member user ids computed from the smart-group conditions.

Defaultfalse

Response Body

application/json

curl -X GET "https://example.com/smart-groups/3f1d8b12-7c4a-4b68-9e6d-2c7a0b1f4d22?includeMembers=false"
{  "smartGroupId": "string",  "name": "string",  "conditions": [    {      "customFieldId": "string",      "choiceIds": [        "string"      ],      "systemCondition": "IS_ANY"    }  ],  "managers": [    "string"  ],  "members": [    "string"  ]}
DELETE
/smart-groups/{smartGroupId}

Deletes a smart group. Idempotent if the group does not exist.

AuthorizationBearer <token>

A JSON Web Token

In: header

Path Parameters

smartGroupId*string

Smart group id.

Response Body

curl -X DELETE "https://example.com/smart-groups/3f1d8b12-7c4a-4b68-9e6d-2c7a0b1f4d22"
Empty
DELETE
/smart-groups/{smartGroupId}/managers/{userId}

Removes a user from the managers of the smart group.

AuthorizationBearer <token>

A JSON Web Token

In: header

Path Parameters

smartGroupId*string

Smart group id.

userId*string

User id to remove from smart-group managers.

Response Body

curl -X DELETE "https://example.com/smart-groups/3f1d8b12-7c4a-4b68-9e6d-2c7a0b1f4d22/managers/7f9c2a1e-4b8d-4f6a-9c2e-1d3b5a7e9c01"
Empty
POST
/smart-groups/{smartGroupId}/replace-conditions

Replaces all conditions on the smart group and recalculates which users are members. Users cannot be added or removed directly; use this endpoint to change membership rules.

AuthorizationBearer <token>

A JSON Web Token

In: header

Path Parameters

smartGroupId*string

Smart group id whose conditions should be replaced.

Request Body

application/json

New conditions; at least one required. All previous conditions are replaced.

TypeScript Definitions

Use the request body type in TypeScript.

Replace all conditions on a smart group and recalculate membership. Previous conditions are discarded.

Response Body

application/json

curl -X POST "https://example.com/smart-groups/3f1d8b12-7c4a-4b68-9e6d-2c7a0b1f4d22/replace-conditions" \  -H "Content-Type: application/json" \  -d '{    "conditions": [      {}    ]  }'
Empty
POST
/smart-groups/{smartGroupId}/rename

Updates the display name of a smart group.

AuthorizationBearer <token>

A JSON Web Token

In: header

Path Parameters

smartGroupId*string

Smart group id to rename.

Request Body

application/json

New name for the smart group.

TypeScript Definitions

Use the request body type in TypeScript.

New name for the smart group

Response Body

application/json

curl -X POST "https://example.com/smart-groups/3f1d8b12-7c4a-4b68-9e6d-2c7a0b1f4d22/rename" \  -H "Content-Type: application/json" \  -d '{    "name": "string"  }'
Empty