---
title: "Search"
method: POST
path: "/api/v1/search/users"
tags: ["User"]
---

# Search

`POST /api/v1/search/users`

Search users based on filters specified in the request body.

## Request body

- C1ApiUserV1SearchUsersRequest — Search for users based on some filters.
  - `delegateStatus` 'DELEGATE_STATUS_UNSPECIFIED' | 'DELEGATE_STATUS_HAS_DELEGATE' | 'DELEGATE_STATUS_NO_DELEGATE' — Filter for users based on their delegate status.
  - `delegatedUserIds` string[], nullable — Filter for users that have any of the delegated user IDs on this list.
  - `departments` string[], nullable — Search for users that have any of the departments on this list.
  - `email` string — Search for users based on their email (exact match).
  - `excludeIds` string[], nullable — An array of users IDs to exclude from the results.
  - `excludeOrigins` string[], nullable — Filter to exclude users with these origins.
  - `excludeTypes` string[], nullable — An array of types to exclude from the results.
  - `expandMask` C1ApiUserV1UserExpandMask — The user expand mask is used to indicate which related objects should be expanded in the response. The supported paths are 'role_ids', 'manager_ids', 'delegated_user_id', 'directory_ids', and '*'.
    - `paths` string[], nullable — An array of paths to be expanded in the response.
  - `ids` string[], nullable — Deprecated. Use refs array instead.
  - `isDelegate` boolean — Filter for users who are delegates of at least one other user.
  - `jobTitles` string[], nullable — Search for users that have any of the job titles on this list.
  - `managerIds` string[], nullable — Search for users that have any of the manager IDs on this list.
  - `origins` string[], nullable — Filter to include only users with these origins.
  - `pageSize` integer — The pageSize where 0 <= pageSize <= 100. Values < 10 will be set to 10. A value of 0 returns the default page size (currently 25)
  - `pageToken` string — The pageToken field.
  - `query` string — Query the apps with a fuzzy search on display name and emails.
  - `refs` C1ApiUserV1UserRef[], nullable — An array of user refs to restrict the return values to by ID.
    - `id` string — The id of the user.
  - `roleIds` string[], nullable — Search for users that have any of the role IDs on this list.
  - `userStatuses` string[], nullable — Search for users that have any of the statuses on this list. This can only be ENABLED, DISABLED, and DELETED

## Response `200`

Successful response

- C1ApiUserV1SearchUsersResponse — The SearchUsersResponse message.
  - `expanded` object[], nullable — List of related objects
    - `@type` string — The type of the serialized message.
  - `list` C1ApiUserV1UserView[], nullable — The list of results containing up to X results, where X is the page size defined in the request
    - `delegatedUserPath` string — JSONPATH expression indicating the location of the user objects of delegates of the current user in the expanded array.
    - `directoriesPath` string — JSONPATH expression indicating the location of directory objects in the expanded array.
    - `managersPath` string — JSONPATH expression indicating the location of the user objects that managed the current user in the expanded array.
    - `rolesPath` string — JSONPATH expression indicating the location of the roles of the current user in the expanded array.
    - `user` C1ApiUserV1User — The User object provides all of the details for an user, as well as some configuration.
      - `createdAt` string, date-time
      - `delegatedUserId` string — The id of the user to whom tasks will be automatically reassigned to.
      - `deletedAt` string, date-time
      - `department` string — The department which the user belongs to in the organization.
      - `departmentSources` C1ApiUserV1UserAttributeMappingSource[], nullable — A list of objects mapped based on department attribute mappings configured in the system.
        - `appId` string — The appId field.
        - `appUserId` string — The appUserId field.
        - `appUserProfileAttributeKey` string — The appUserProfileAttributeKey field.
        - `userAttributeMappingId` string — The userAttributeMappingId field.
        - `value` string — The value field.
      - `directoryIds` string[], nullable — A list of unique ids that represent different directories.
      - `directoryStatus` 'UNKNOWN' | 'ENABLED' | 'DISABLED' | 'DELETED' — The status of the user in the directory.
      - `directoryStatusSources` C1ApiUserV1UserAttributeMappingSource[], nullable — A list of objects mapped based on directoryStatus attribute mappings configured in the system.
        - `appId` string — The appId field.
        - `appUserId` string — The appUserId field.
        - `appUserProfileAttributeKey` string — The appUserProfileAttributeKey field.
        - `userAttributeMappingId` string — The userAttributeMappingId field.
        - `value` string — The value field.
      - `displayName` string — The display name of the user.
      - `email` string — This is the user's email.
      - `emailSources` C1ApiUserV1UserAttributeMappingSource[], nullable — A list of source data for the email attribute.
        - `appId` string — The appId field.
        - `appUserId` string — The appUserId field.
        - `appUserProfileAttributeKey` string — The appUserProfileAttributeKey field.
        - `userAttributeMappingId` string — The userAttributeMappingId field.
        - `value` string — The value field.
      - `emails` string[], nullable — This is a list of all of the user's emails from app users.
      - `employeeIdSources` C1ApiUserV1UserAttributeMappingSource[], nullable — A list of source data for the employee IDs attribute.
        - `appId` string — The appId field.
        - `appUserId` string — The appUserId field.
        - `appUserProfileAttributeKey` string — The appUserProfileAttributeKey field.
        - `userAttributeMappingId` string — The userAttributeMappingId field.
        - `value` string — The value field.
      - `employeeIds` string[], nullable — This is a list of all of the user's employee IDs from app users.
      - `employmentStatus` string — The users employment status.
      - `employmentStatusSources` C1ApiUserV1UserAttributeMappingSource[], nullable — A list of objects mapped based on employmentStatus attribute mappings configured in the system.
        - `appId` string — The appId field.
        - `appUserId` string — The appUserId field.
        - `appUserProfileAttributeKey` string — The appUserProfileAttributeKey field.
        - `userAttributeMappingId` string — The userAttributeMappingId field.
        - `value` string — The value field.
      - `employmentType` string — The employment type of the user.
      - `employmentTypeSources` C1ApiUserV1UserAttributeMappingSource[], nullable — A list of objects mapped based on employmentType attribute mappings configured in the system.
        - `appId` string — The appId field.
        - `appUserId` string — The appUserId field.
        - `appUserProfileAttributeKey` string — The appUserProfileAttributeKey field.
        - `userAttributeMappingId` string — The userAttributeMappingId field.
        - `value` string — The value field.
      - `id` string — A unique identifier of the user.
      - `jobTitle` string — The job title of the user.
      - `jobTitleSources` C1ApiUserV1UserAttributeMappingSource[], nullable — A list of objects mapped based on jobTitle attribute mappings configured in the system.
        - `appId` string — The appId field.
        - `appUserId` string — The appUserId field.
        - `appUserProfileAttributeKey` string — The appUserProfileAttributeKey field.
        - `userAttributeMappingId` string — The userAttributeMappingId field.
        - `value` string — The value field.
      - `managerIds` string[], nullable — A list of ids of the user's managers.
      - `managerSources` C1ApiUserV1UserAttributeMappingSource[], nullable — A list of objects mapped based on managerId attribute mappings configured in the system.
        - `appId` string — The appId field.
        - `appUserId` string — The appUserId field.
        - `appUserProfileAttributeKey` string — The appUserProfileAttributeKey field.
        - `userAttributeMappingId` string — The userAttributeMappingId field.
        - `value` string — The value field.
      - `origin` 'USER_ORIGIN_UNSPECIFIED' | 'USER_ORIGIN_DIRECTORY' | 'USER_ORIGIN_LOCAL' | 'USER_ORIGIN_SYSTEM' — The origin of the user, describing who owns the user's lifecycle.
      - `profile` object
      - `roleIds` string[], nullable — A list of unique identifiers that maps to ConductorOne's user roles let you assign users permissions tailored to the work they do in the software.
      - `status` 'UNKNOWN' | 'ENABLED' | 'DISABLED' | 'DELETED' — The status of the user in the system.
      - `type` 'USER_TYPE_UNSPECIFIED' | 'USER_TYPE_SYSTEM' | 'USER_TYPE_HUMAN' | 'USER_TYPE_SERVICE' | 'USER_TYPE_AGENT' — The type of the user.
      - `updatedAt` string, date-time
      - `username` string — This is the user's primary username. Typically sourced from the primary directory.
      - `usernameSources` C1ApiUserV1UserAttributeMappingSource[], nullable — A list of source data for the usernames attribute.
        - `appId` string — The appId field.
        - `appUserId` string — The appUserId field.
        - `appUserProfileAttributeKey` string — The appUserProfileAttributeKey field.
        - `userAttributeMappingId` string — The userAttributeMappingId field.
        - `value` string — The value field.
      - `usernames` string[], nullable — This is a list of all of the user's usernames from app users.
  - `nextPageToken` string — The nextPageToken is shown for the next page if the number of results is larger than the max page size. The server returns one page of results and the nextPageToken until all results are retreived. To retrieve the next page, use the same request and append a pageToken field with the value of nextPageToken shown on the previous page.

---

[API](https://skmtc.net/conductorone/apis/c1-api.md) · [All operations](https://skmtc.net/conductorone/apis/c1-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/conductorone/c1-api/revisions/d391405a35d3/schema)
