Skip to main content
POST
/
api
/
v2
/
identities
/
search
cURL
curl --request POST \
  --url https://us.infisical.com/api/v2/identities/search \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "scope": [
    "organization"
  ],
  "orderBy": "name",
  "orderDirection": "asc",
  "limit": 50,
  "offset": 0,
  "search": {
    "name": "<string>",
    "role": "<string>",
    "$or": [
      {
        "name": "<string>",
        "role": "<string>"
      }
    ]
  }
}
'
{
  "identities": [
    {
      "id": "<string>",
      "identityId": "<string>",
      "orgId": "<string>",
      "createdAt": "2023-11-07T05:31:56Z",
      "updatedAt": "2023-11-07T05:31:56Z",
      "roles": [
        {
          "id": "<string>",
          "role": "<string>",
          "isTemporary": true,
          "customRoleId": "<string>",
          "customRoleName": "<string>",
          "customRoleSlug": "<string>",
          "customRoleDescription": "<string>",
          "temporaryMode": "<string>",
          "temporaryRange": "<string>",
          "temporaryAccessStartTime": "2023-11-07T05:31:56Z",
          "temporaryAccessEndTime": "2023-11-07T05:31:56Z"
        }
      ],
      "identity": {
        "name": "<string>",
        "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "orgId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "authMethods": [
          "<string>"
        ],
        "activeLockoutAuthMethods": [
          "<string>"
        ],
        "hasDeleteProtection": false
      },
      "projectId": "<string>",
      "project": {
        "id": "<string>",
        "name": "<string>",
        "slug": "<string>",
        "type": "<string>"
      },
      "lastLoginAuthMethod": "<string>",
      "lastLoginTime": "2023-11-07T05:31:56Z"
    }
  ],
  "totalCount": 123
}

Authorizations

Authorization
string
header
required

An access token in Infisical

Body

application/json
scope
enum<string>[]

Array of scopes to search across. Accepts 'organization' to include organization-level identities and/or 'project' to include identities from projects the caller has access to. Defaults to ['organization'].

Minimum array length: 1
Available options:
organization,
project
orderBy
enum<string>
default:name

The column to order identities by.

Available options:
name,
role,
lastLogin
orderDirection
enum<string>
default:asc

The direction to order identities in.

Available options:
asc,
desc
limit
integer
default:50

The number of identities to return.

Required range: 1 <= x <= 100
offset
integer
default:0

The offset to start from. If you enter 10, it will start from the 10th identity.

Required range: x >= 0

The filters to apply to the search.

Response

Default Response

identities
object[]
required
totalCount
number
required