v2026.1 Open Portal ↗
On this page

Users & Groups API

Endpoints Overview

MethodPathDescription
GET/prod/api/usersList users
GET/prod/api/users/:idGet user
POST/prod/api/usersCreate user (admin)
PATCH/prod/api/users/:idUpdate user
DELETE/prod/api/users/:idDeactivate user (admin)
GET/prod/api/groupsList assignment groups
GET/prod/api/groups/:idGet group
POST/prod/api/groupsCreate group
PATCH/prod/api/groups/:id/membersAdd/remove members

List Users

curl -H "Authorization: Bearer $TOKEN"   "https://your-instance.stackflow-tech.com/prod/api/users?role=itsm_agent&active=true&limit=50"

Get User

{
  "id": "usr_abc123",
  "email": "jane.doe@example.com",
  "given_name": "Jane",
  "family_name": "Doe",
  "display_name": "Jane Doe",
  "role": "itsm_agent",
  "active": true,
  "department": "IT Operations",
  "location": "New York",
  "assignment_groups": ["Platform Engineering", "SRE Team"],
  "cognito_sub": "uuid-...",
  "last_login": "2026-05-19T09:00:00Z",
  "created_at": "2025-06-01T00:00:00Z"
}

Create User

curl -X POST   https://your-instance.stackflow-tech.com/prod/api/users   -H "Authorization: Bearer $TOKEN"   -H "Content-Type: application/json"   -d '{
    "email": "new.user@example.com",
    "given_name": "New",
    "family_name": "User",
    "role": "itsm_agent",
    "department": "IT Operations",
    "assignment_groups": ["Level 1 Support"],
    "send_welcome_email": true
  }'
Cognito Provisioning: Creating a user via this API automatically creates a Cognito account in User Pool us-east-1_WKK1AVJ2m with a temporary password and sends a welcome email via Amazon SES if send_welcome_email: true.

Update User

curl -X PATCH   https://your-instance.stackflow-tech.com/prod/api/users/usr_abc123   -H "Authorization: Bearer $TOKEN"   -H "Content-Type: application/json"   -d '{"role": "itsm_manager", "department": "IT Management"}'

Assignment Groups

# List all groups
curl -H "Authorization: Bearer $TOKEN"   https://your-instance.stackflow-tech.com/prod/api/groups

# Create a group
curl -X POST   https://your-instance.stackflow-tech.com/prod/api/groups   -H "Authorization: Bearer $TOKEN"   -H "Content-Type: application/json"   -d '{
    "name": "Database Reliability",
    "description": "DBA and SRE team for database incidents",
    "manager": "dba-lead@example.com",
    "email": "db-reliability@example.com",
    "schedule": "24x7"
  }'

# Add members to group
curl -X PATCH   https://your-instance.stackflow-tech.com/prod/api/groups/grp_001/members   -H "Authorization: Bearer $TOKEN"   -H "Content-Type: application/json"   -d '{"add": ["dba1@example.com", "dba2@example.com"], "remove": []}'

Roles Reference

RoleDescriptionKey Permissions
viewerRead-only accessView all records, no write access
requesterSelf-service portal onlySubmit catalog requests, view own tickets
itsm_agentITSM front-line agentManage incidents, changes, requests; use AI Copilot
itsm_managerITSM team leadAll agent permissions + SLA config, reports, CAB
cloud_adminCloud operationsCloud management, CMDB write, discovery config
knowledge_authorKB authorCreate/publish KB articles, manage categories
super_adminPlatform administratorFull access to all modules and admin settings

Field Reference

FieldTypeDescription
emailstringPrimary identifier, must be unique (required)
given_namestringFirst name
family_namestringLast name
roleenumUser role (see Roles Reference)
activebooleanAccount active status
assignment_groupsarrayGroups the user belongs to
cognito_substringCognito user pool subject identifier