Users

Returns a paginated list of users in the specified zone.

Use cursor pagination via after/before. Sort: comma-separated field list; prefix with - for descending. Use expand[]=total_count to include the matching row count, expand[]=session_count to include per-user session counts, expand[]=grant_count to include per-user delegated-grant counts, expand[]=role-assignments to include each user's structured role grants (direct grants only by default, each tagged with source; use role_source=all to also include group-inherited), expand[]=groups to include each user's group memberships, expand[]=credentials to include each user's authentication credentials (each with its provider_id), and expand[]=credentials.provider to additionally inline the full identity provider on each federation credential. Filter by exact email via filter[email] and by exact identifier via filter[identifier]; restrict to members of a group via filter[groups] (repeatable, OR'd across values); restrict to users directly granted a role via filter[role] (role identifier, repeatable up to 100, OR'd across values; group-inherited grants do not match); pass filter[external]=false for only users managed in Keycard or filter[external]=true for only users provisioned by an external directory (omit to list both); match exactly on the user's subject and issuer via filter[subject] and filter[issuer] (each repeatable and OR'd across values; AND'd with each other); search via query[email] / query[subject] / query[] (substring match, OR'd across repeated values). query[] matches against email and the user's subject. Pass filter[id] (repeatable, max 100) to restrict results to a known set of users — mutually exclusive with after/before (returns 400 if combined). When filter[id] is set, limit is ignored and the response contains every requested user that exists in the zone, in a single page. IDs not in the zone are silently omitted.

get/zones/{zoneId}/users

Request

  • Base URL
    https://docs.keycard.ai (the document declares no server; this is the origin it was published from)
  • URL
    https://docs.keycard.ai/zones/{zoneId}/users
  • Auth
    • HTTP bearer
    • or OAuth 2
      Client credentials
      Token URL: /service-account-token

Path parameters

zoneIdstring required

Zone ID

Query parameters

afterstring

Cursor for forward pagination

beforestring

Cursor for backward pagination

limitinteger

Maximum number of items to return

'total_count' | 'session_count' | 'grant_count' | 'role-assignments' | 'groups' | 'credentials' | 'credentials.provider'
OR
string[]
role_source'user' | 'group' | 'all'

Selects which grants expand[]=role-assignments returns, tagging each with source: user (direct only, the default), group (group-inherited only), or all (both direct and group-inherited). Requires expand[]=role-assignments.

string email

Filter by exact email address

OR
string[]
string

Restrict results to users with this publicId. Repeatable, max 100. Mutually exclusive with after/before.

OR
string[]
string

Filter by exact user identifier

OR
string[]
string

Restrict to members of this group (by group ID). Repeatable; OR'd across values.

OR
string[]
string

Restrict to users directly granted this role (by role identifier). Repeatable, max 100; OR'd across values. Group-inherited grants do not match.

OR
string[]
filter[external]boolean

Filter by source: false for users managed in Keycard, true for users provisioned by an external directory. Omit to list both.

string

Filter by exact subject. Repeatable; OR'd across values.

OR
string[]
string

Filter by exact issuer. Repeatable; OR'd across values.

OR
string[]
string

Search by email (substring match)

OR
string[]
string

Search by the user's subject (substring match)

OR
string[]
string

Search across email and the user's subject (substring match)

OR
string[]
sortstring

Comma-separated sort fields. Prefix with - for descending. Allowed: created_at, email, authenticated_at

Response

Default Response

Changes

    • warning

      removed the optional property ////////// from the response with the status

    • info

      added the new optional query request parameter filter[external]

    • info

      added the new optional query request parameter filter[issuer]

    • info

      added the new optional query request parameter filter[role]

    • info

      added the new optional query request parameter filter[subject]

    • info

      added the required property // to the response with the status

    • info

      added the required property //// to the response with the status

    • info

      added the required property //// to the response with the status

    • info

      added the new optional query request parameter filter[groups]

    • info

      added the new optional query request parameter filter[identifier]

    • info

      added the new optional query request parameter role_source

    • info

      added the non-success response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property //// to the response with the status

    • info

      the //// response's property pattern ^[a-z0-9]+(?:[-_][a-z0-9]+)*$ was added for the status

    • info

      added the required property //// to the response with the status

    • info

      added the required property //// to the response with the status