1. Docs
  2. API Reference
  3. List identities in Account

List identities in Account

GET/portal/v1/accounts/{accountSlug}/identities

Authentication

  • Bearer Token Authorization

    JWT access token

Query Parameters

Name Required Type Description
pageOptionalnumber Page number (1-based)
takeOptionalnumber Items per page (1-100, default 20)
qOptionalstring Search term
sort_byOptionalstring Column to sort by. Allowed values depend on the endpoint.
orderOptionalenum: "asc" | "desc" Sort direction
statusOptionalenum: "active" | "inactive" Filter by the Account-wide `is_active` flag. Omit to show all.
has_any_assignmentOptionalboolean When true, only identities with at least one role assignment somewhere in the Account. When false, only identities with zero assignments (the orphan filter — surfaces identities that exist in the directory but haven't been given access anywhere). Omit to show all.
not_in_appOptionalstring Exclude identities that already have an active AppMembership for the named App slug. Drives the env-scoped 'Add from directory' picker — the candidate list should only contain identities NOT already in the target App.

Code samples

cURLJavaScriptPythonGo
curl -X GET "https://api.canopy.dev/portal/v1/accounts/{accountSlug}/identities?page=0&take=0&q=value&sort_by=value&order=asc&status=active&has_any_assignment=false&not_in_app=value" \
  -H "Authorization: Bearer $CANOPY_TOKEN"

Responses

200 Paginated list
{
  "items": [
    {
      "id": "string",
      "email": "string",
      "first_name": "string",
      "last_name": "string",
      "avatar_url": "string",
      "external_id": "string",
      "is_active": false,
      "email_verified": false,
      "app_membership_count": 0,
      "total_assignments": 0,
      "created_at": "2026-04-20T12:00:00.000Z"
    }
  ],
  "pagination": {
    "page": 0,
    "take": 0,
    "item_count": 0,
    "page_count": 0,
    "has_previous_page": false,
    "has_next_page": false
  }
}

application/json

  • itemsAccountIdentityRowDto[]*
  • paginationPageMetaDto*
401 Invalid or expired token
403 This token is not authorized for this endpoint (wrong principal type — e.g., admin token on identity-only endpoint, or vice versa)

Pagination

This endpoint returns a paginated collection. Use the query parameters below to page through results.

page
Page number (1-indexed). Defaults to 1.
take
Items per page (1–100). Defaults to 20.

Each response includes an items array alongside a pagination object with item_count, page_count, has_previous_page, and has_next_page fields.

Returned object

On this page

Related endpoints

POSTCreate an Account identity
POSTBulk-create Account identities
GETGet directory counts for the Account
GETGet an Account identity
PATCHUpdate an Account identity profile
PATCHSet Account-wide is_active flag
POSTAdmin-trigger a password reset email
POSTRe-send email verification
GETList audit events for an Account identity
POSTAdd an identity to an Application (create AppMembership)
DELETERemove an identity from an Application (revoke AppMembership)