POST/v1/user-groupsCreate a user group

Create a user group description
parameterorganizationIdThe organization where the groups will be created: Number
headerAuthorizationAuthentication token (bearer token or API key).
{
"name" : String,
"description" : String,
"remarks" : String,
"externalId" : String,
"source" : String,
"users" : [{
"userId" : Number,
"groupAdmin" : Boolean
}]
}

Response

status200All ok, returned the id of created user group
status401Invalid authentication token
status403Insufficient rights
status404User group not found
Number

Example: Create a user group for POST request

POST/v1/user-groups

parameterorganizationId1
headerAuthorizationBearer a064fac8-878e-4aa8-a2d9-e5a8b3fe1de3
{
"name": "Test group",
"description": "group for test"
}

Response

status200
headerAccess-Control-Expose-Headersauthorization, content-type
headerAccess-Control-Allow-Headersauthorization, content-type
headerAccess-Control-Allow-MethodsGET, POST, DELETE, OPTIONS, PUT
headerAccess-Control-Allow-Origin*
headerStrict-Transport-Securitymax-age=31536000; includeSubDomains
headerX-Frame-OptionsSAMEORIGIN
headerX-Content-Type-Optionsnosniff
headerX-XSS-Protection1; mode=block
headerContent-Security-Policydefault-src 'none'; frame-ancestors 'none'; base-uri 'none'; form-action 'none'
headerReferrer-Policyno-referrer
headerFeature-Policyself
headerPermissions-policyinterest-cohort=()
4

Example: Create a user group with users

POST/v1/user-groups

parameterorganizationId1
headerAuthorizationBearer a9e4f3b6-424c-46bc-8b8f-e5cbd6d65e3f
{
"name": "Group with users",
"description": "group created with initial users",
"users": [{
"userId": 1,
"groupAdmin": false
}
]
}

Response

status200
headerAccess-Control-Expose-Headersauthorization, content-type
headerAccess-Control-Allow-Headersauthorization, content-type
headerAccess-Control-Allow-MethodsGET, POST, DELETE, OPTIONS, PUT
headerAccess-Control-Allow-Origin*
headerStrict-Transport-Securitymax-age=31536000; includeSubDomains
headerX-Frame-OptionsSAMEORIGIN
headerX-Content-Type-Optionsnosniff
headerX-XSS-Protection1; mode=block
headerContent-Security-Policydefault-src 'none'; frame-ancestors 'none'; base-uri 'none'; form-action 'none'
headerReferrer-Policyno-referrer
headerFeature-Policyself
headerPermissions-policyinterest-cohort=()
4

Example: Create a source-only group (a source without an external id)