Create User Group
This endpoint allows you to create a new user group within an organization. User groups help organize users and manage permissions effectively.
πΉ Endpoint Detailsβ
POST /api/v1/user-groups
π Authenticationβ
| Header | Required | Description |
|---|---|---|
| Content-Type | Yes | Must be application/json |
| Authorization | Yes | Format: ONLIVESITE Credential:ONLIVEAccessKeyId, Signature=CalculatedSignature |
π Request Structureβ
Request Body Propertiesβ
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
| name | string | Yes | Name of the user group (min length: 1) | "Sales Team" |
| description | string | No | Detailed description of the group's purpose | "Sales team with product access" |
| externalId | string | No | External identifier for system integration | "SALES_TEAM_01" |
| extraFields | object | No | Additional custom fields | See example below |
π§© Request Exampleβ
curl -X POST "https://openapi.onlive.site/api/v1/user-groups/" \
-H "Content-Type: application/json" \
-H "Authorization: ONLIVESITE Credential:ONLIVEAccessKeyId, Signature=CalculatedSignature" \
-d '{
"name": "Sales Team",
"description": "Sales team members with access to product management",
"externalId": "SALES_TEAM_01",
"extraFields": {
"department": "Sales",
"location": "New York",
"allowedFeatures": [
"product_management",
"sales_reports"
]
}
}'
π€ Response Formatβ
Successful Response (201 Created)β
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Sales Team",
"description": "Sales team members with access to product management",
"externalId": "SALES_TEAM_01",
"organizationId": "123e4567-e89b-12d3-a456-426614174000",
"extraFields": {
"department": "Sales",
"location": "New York",
"allowedFeatures": ["product_management", "sales_reports"]
},
"createdAt": "2025-05-22T10:30:00Z",
"updatedAt": "2025-05-22T10:30:00Z"
}
β Error Responsesβ
This endpoint follows the standard error format.
π Notesβ
- The
organizationIdis automatically derived from your authentication credentials - The response includes system-generated fields:
id: Unique identifier for the grouporganizationId: Your organization's IDcreatedAt: Creation timestampupdatedAt: Last modification timestamp
- All timestamps are in ISO 8601 format with UTC timezone
- The
extraFieldsobject can contain any valid JSON structure
β Common Use Casesβ
- π₯ New Department: Create a group for a new department or team
- π Access Control: Set up groups with specific feature permissions
- π Regional Teams: Create groups for different office locations
- π Project Teams: Organize users by project or function
- π System Integration: Create groups that map to external systems