Skip to main content

Create user groups

Create user groups within a community channel. Each community channel supports up to 50 user groups.

Request method

POST: https://Base URL/v4/community-channel/user-group/add

Rate limit: 100 requests per second

Signature required: All server API requests require signature verification. See API request signature.

Request body

The request body is in application/json format and supports the following parameters:

ParameterTypeRequiredDescription
channelIdStringYesThe community channel ID. Must already exist.
userGroupsObject[]YesList of user group objects. Maximum 10 per request.
userGroups[].userGroupIdStringYesThe user group ID. Supports uppercase and lowercase letters and numbers. Maximum 64 characters.

Request example

HTTP
POST /v4/community-channel/user-group/add HTTP/1.1
Host: api.sg-light-api.com
App-Key: uwd1c0sxdlx2
Nonce: 14314
Timestamp: 1408710653491
Signature: 45beb7cc7307889a8e711219a47b7cf6a5b000e8
Content-Type: application/json

{
"channelId": "groupId1",
"userGroups": [
{
"userGroupId": "id1"
},
{
"userGroupId": "id2"
}
]
}

Response

FieldTypeDescription
codeNumberStatus code. 0 indicates success. 24418 = user group limit exceeded. 24419 = duplicate user group ID.

Response example

HTTP
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

{"code":0}