Skip to main content

Overview

The Users API allows you to create API users (users that won’t have UI access) and list users in your organization. API users can be created with or without Auth0 accounts, and must be assigned to at least one team.

Create Users

Create one or more API users in bulk. Users must be assigned to at least one team. By default, API users are created without Auth0 accounts (isApiUser: true). Endpoint: POST /qsi/gather/users
curl -X POST https://api.prod.qualifi.hr/qsi/gather/users \
  -H "x-api-key: ${API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
    "users": [
      {
        "firstName": "John",
        "lastName": "Doe",
        "email": "[email protected]",
        "teamIds": ["team-uuid-1"]
      }
    ]
  }'
{
  "users": [
    {
      "firstName": "John",
      "lastName": "Doe",
      "email": "[email protected]",
      "phone": "+1234567890",
      "teamIds": ["team-uuid-1", "team-uuid-2"],
      "createAuth0Account": false
    },
    {
      "firstName": "Jane",
      "lastName": "Smith",
      "email": "[email protected]",
      "teamIds": ["team-uuid-1"],
      "createAuth0Account": true
    }
  ]
}
CRITICAL: Every user MUST be assigned to at least one team. The teamIds array is REQUIRED and must contain at least one valid team ID. All teamIds must belong to the organization from the API credential.

List Users

List users in your organization. Optionally filter by team and include/exclude team associations. Endpoint: GET /qsi/gather/users
teamId
string
Filter users by team ID
includeTeams
boolean
Include team details in response (default: true)
curl -X GET "https://api.prod.qualifi.hr/qsi/gather/users?teamId=team-uuid&includeTeams=true" \
  -H "x-api-key: ${API_KEY}"

Response with Team Details (includeTeams=true or omitted)

{
  "data": {
    "users": [
      {
        "id": "user-uuid-1",
        "firstName": "John",
        "lastName": "Doe",
        "email": "[email protected]",
        "phone": "+1234567890",
        "isApiUser": true,
        "teams": [
          {
            "id": "team-uuid-1",
            "name": "Engineering Team",
            "displayName": "Engineering",
            "description": "Engineering and development team",
            "organizationId": "org-uuid",
            "createdAt": "2024-01-01T00:00:00Z",
            "updatedAt": "2024-01-01T00:00:00Z"
          },
          {
            "id": "team-uuid-2",
            "name": "Sales Team",
            "displayName": "Sales",
            "description": null,
            "organizationId": "org-uuid",
            "createdAt": "2024-01-01T00:00:00Z",
            "updatedAt": "2024-01-01T00:00:00Z"
          }
        ],
        "organizationId": "org-uuid",
        "createdAt": "2024-01-01T00:00:00Z",
        "updatedAt": "2024-01-01T00:00:00Z"
      }
    ]
  },
  "meta": {
    "requestId": "uuid",
    "timestamp": "2024-01-01T00:00:00Z"
  }
}

Response without Team Details (includeTeams=false)

{
  "data": {
    "users": [
      {
        "id": "user-uuid-1",
        "firstName": "John",
        "lastName": "Doe",
        "email": "[email protected]",
        "phone": "+1234567890",
        "isApiUser": true,
        "teamIds": ["team-uuid-1", "team-uuid-2"],
        "organizationId": "org-uuid",
        "createdAt": "2024-01-01T00:00:00Z",
        "updatedAt": "2024-01-01T00:00:00Z"
      }
    ]
  },
  "meta": {
    "requestId": "uuid",
    "timestamp": "2024-01-01T00:00:00Z"
  }
}

API Users vs Regular Users

API Users (isApiUser: true):
  • Created without Auth0 accounts by default
  • Cannot access the UI/dashboard
  • Used for API operations and attribution
  • Set createAuth0Account: false (or omit) when creating
Regular Users (isApiUser: false):
  • Created with Auth0 accounts
  • Can access the UI/dashboard
  • Set createAuth0Account: true when creating
API users are useful for tracking API operations and attributing actions to specific users without requiring UI access. They must still be assigned to at least one team.

Validation Rules

User-Team Association Requirements

  • CRITICAL: Every user MUST be assigned to at least one team
  • When creating users:
    • teamIds array is REQUIRED and must contain at least one valid team ID
    • All teamIds must belong to the organization from the API credential
    • Returns 400 error if validation fails

Error Responses

{
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Missing required fields, empty teamIds array, or invalid data"
  },
  "meta": {
    "requestId": "uuid",
    "timestamp": "2024-01-01T00:00:00Z"
  }
}