V1 and V2Accounts

Search memberships

POST
/api/v1/accounts/memberships/search

Filter memberships by multiple criteria

The filter structure and format are described in the Resources section of this guide. Sorting is not supported. The following fields can be used as attributes and filters. If no attributes are specified, all fields are returned.

FieldDescription
legacy_idUser ID in PIM
roleMembership role: one of ADMIN, OWNER and USER
emailUser’s email address
usernameUnique user identifier (e.g., name)
NameUser's first name
last_nameUser's last name

Authorization

bearerAuth
AuthorizationBearer <token>

Obtain a token via POST /auth/api/get-token (15 minute lifetime), then send it as Authorization: Bearer <token>.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

curl -X POST 'https://example.com/api/v1/accounts/memberships/search' \  -H 'Content-Type: application/json' \  --data-raw '{  "filters": [    [      {        "field": "role",        "operator": "eq",        "value": "ADMIN"      }    ]  ],  "attributes": [    "username",    "role",    "name",    "last_name",    "legacy_id"  ],  "pagination": {    "page": 1,    "page_size": 5  }}'
{  "data": [    {      "legacy_id": "aaaaaaaaaaaaaaaaaaaaaaaa",      "role": "ADMIN",      "username": "alice",      "name": "Alice",      "last_name": "Anderson"    },    {      "legacy_id": "bbbbbbbbbbbbbbbbbbbbbbbb",      "role": "ADMIN",      "username": "bob",      "name": "Bob",      "last_name": "Brown"    }  ],  "pagination": {    "page": 1,    "page_size": 5,    "order": "",    "count": 2,    "total_count": 3  }}