Skip to content

Brex: List users

Brex team.teamListUsers: arguments, response, policy and SDK examples.

← Team operations · Get started

Operation brex.team_listusers

Provider route: GET /v2/users. Alter supplies the connection’s credentials and routing.

Install @alter-ai/sdk @alter-ai/brex with npm, or alter-sdk-brex with pip. Supply your connected customer’s grant ID and the arguments described below.

import { App } from "@alter-ai/sdk";
import { BrexIntegration } from "@alter-ai/brex";
async function execute(input: Parameters<BrexIntegration["team"]["teamListUsers"]>[0]) {
const app = new App({ apiKey: process.env.ALTER_API_KEY! });
try {
const provider = new BrexIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! });
const call = await provider.team.teamListUsers(input);
const result = await call.wait();
return result.bodyJson();
} finally {
await app.close();
}
}
import os
from alter_sdk import App
from alter_sdk_brex import BrexIntegration
async def execute(arguments):
async with App(api_key=os.environ["ALTER_API_KEY"]) as app:
provider = BrexIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]})
call = await provider.team.team_list_users(arguments)
result = await call.wait()
return result.body_json()
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
queryobjectOptionalAdditional keys: not allowed
query.cursorJSONOptional
query.cursor (anyOf 1)stringAlternative
query.cursor (anyOf 2)nullAlternative
query.limitJSONOptional
query.limit (anyOf 1)integerAlternativeFormat: int32
query.limit (anyOf 2)nullAlternative
query.emailJSONOptional
query.email (anyOf 1)stringAlternativeCurrently only support filtering by a single email or a single remote_display_id.
query.email (anyOf 2)nullAlternative
query.remote_display_idJSONOptional
query.remote_display_id (anyOf 1)stringAlternativeCurrently only support filtering by a single email or a single remote_display_id.
query.remote_display_id (anyOf 2)nullAlternative
query.nameJSONOptional
query.name (anyOf 1)stringAlternative
query.name (anyOf 2)nullAlternative
query.email[]JSONOptional
query.email[] (anyOf 1)arrayAlternative
query.email[] (anyOf 1)[]stringEach item
query.email[] (anyOf 2)nullAlternative
query.status[]JSONOptional
query.status[] (anyOf 1)arrayAlternative
query.status[] (anyOf 1)[]stringEach itemOne of: INVITED, ACTIVE, DISABLED, PENDING_ACTIVATION, INACTIVE, ARCHIVED
query.status[] (anyOf 2)nullAlternative
query.manager_id[]JSONOptional
query.manager_id[] (anyOf 1)arrayAlternative
query.manager_id[] (anyOf 1)[]stringEach item
query.manager_id[] (anyOf 2)nullAlternative
query.department_id[]JSONOptional
query.department_id[] (anyOf 1)arrayAlternative
query.department_id[] (anyOf 1)[]stringEach item
query.department_id[] (anyOf 2)nullAlternative
query.location_id[]JSONOptional
query.location_id[] (anyOf 1)arrayAlternative
query.location_id[] (anyOf 1)[]stringEach item
query.location_id[] (anyOf 2)nullAlternative
query.title_id[]JSONOptional
query.title_id[] (anyOf 1)arrayAlternative
query.title_id[] (anyOf 1)[]stringEach item
query.title_id[] (anyOf 2)nullAlternative
query.cost_center_id[]JSONOptional
query.cost_center_id[] (anyOf 1)arrayAlternative
query.cost_center_id[] (anyOf 1)[]stringEach item
query.cost_center_id[] (anyOf 2)nullAlternative
query.legal_entity_id[]JSONOptional
query.legal_entity_id[] (anyOf 1)arrayAlternative
query.legal_entity_id[] (anyOf 1)[]stringEach item
query.legal_entity_id[] (anyOf 2)nullAlternative
query.load_custom_fieldsJSONOptional
query.load_custom_fields (anyOf 1)booleanAlternative
query.load_custom_fields (anyOf 2)nullAlternative
query.custom_field[]JSONOptional
query.custom_field[] (anyOf 1)arrayAlternative
query.custom_field[] (anyOf 1)[]stringEach item
query.custom_field[] (anyOf 2)nullAlternative

Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.

FieldTypePresenceDescription and constraints
$ModelRootExpand List users — response body

Referenced models: List users — response body

21 more schemas are linked from the tables above, on the schema pages.

List users — response body
FieldTypePresenceDescription and constraints
$objectRoot
itemsarrayRequired within parent
items[]ModelEach itemExpand Get user — response body
next_cursorJSONOptional
next_cursor (anyOf 1)stringAlternative
next_cursor (anyOf 2)nullAlternative

Referenced models: Get user — response body

Get user — response body
FieldTypePresenceDescription and constraints
$objectRoot
cost_center_idJSONOptional
cost_center_id (anyOf 1)stringAlternative
cost_center_id (anyOf 2)nullAlternative
custom_fieldsJSONOptional
custom_fields (anyOf 1)arrayAlternativeA list of custom field values associated with the user.
custom_fields (anyOf 1)[]ModelEach itemExpand Get user — response body — custom fields array item
custom_fields (anyOf 2)nullAlternative
department_idJSONOptional
department_id (anyOf 1)stringAlternative
department_id (anyOf 2)nullAlternative
emailstringRequired within parentEmail address of the user
first_namestringRequired within parentFirst name of the user
idstringRequired within parent
last_namestringRequired within parentLast name of the user
legal_entity_idJSONOptional
legal_entity_id (anyOf 1)stringAlternative
legal_entity_id (anyOf 2)nullAlternative
location_idJSONOptional
location_id (anyOf 1)stringAlternative
location_id (anyOf 2)nullAlternative
manager_idJSONOptional
manager_id (anyOf 1)stringAlternativeThe user id of the manager of this user
manager_id (anyOf 2)nullAlternative
metadataJSONOptional
metadata (anyOf 1)objectAlternativeThe metadata or customized attributes of the user. Maximum number of entries: 100
Additional keys: see wildcard field
metadata (anyOf 1).*stringAdditional keys
metadata (anyOf 2)nullAlternative
remote_display_idJSONOptional
remote_display_id (anyOf 1)stringAlternativeIdentifier that is displayed on the IDP or HR system, eg, if OKTA identifies you as user xyz
remote_display_id (anyOf 2)nullAlternative
role_nameJSONOptional
role_name (anyOf 1)stringAlternativeThe user's role, as shown in the Brex dashboard.
role_name (anyOf 2)nullAlternative
statusJSONOptional
status (anyOf 1)JSONAlternative
status (anyOf 1) (allOf 1)stringAll variants applyStatus of the user
Known values: INVITED, ACTIVE, DISABLED, PENDING_ACTIVATION, INACTIVE, ARCHIVED
status (anyOf 2)nullAlternative
title_idJSONOptional
title_id (anyOf 1)stringAlternative
title_id (anyOf 2)nullAlternative

Referenced models: Get user — response body — custom fields array item

Get user — response body — custom fields array item
FieldTypePresenceDescription and constraints
$objectRoot
display_nameJSONOptional
display_name (anyOf 1)stringAlternativeThe display name of the custom field.
display_name (anyOf 2)nullAlternative
keystringRequired within parentThe key of the custom field.
valueJSONRequired within parent
value (allOf 1)ModelAll variants applyExpand Get user — response body — custom fields array item value Base class for custom field values
value (allOf 2)JSONAll variants applyThe value of the custom field.
value (allOf 2) (anyOf 1)ModelAlternativeExpand Get user — response body — custom fields array item value The value of the custom field String value
value (allOf 2) (anyOf 2)ModelAlternativeExpand Get user — response body — custom fields array item value The value of the custom field Decimal value
value (allOf 2) (anyOf 3)ModelAlternativeExpand Get user — response body — custom fields array item value The value of the custom field Boolean value
value (allOf 2) (anyOf 4)ModelAlternativeExpand Get user — response body — custom fields array item value The value of the custom field Enum value
value (allOf 2) (anyOf 5)ModelAlternativeExpand Get user — response body — custom fields array item value The value of the custom field Timestamp value
value (allOf 2) (anyOf 6)ModelAlternativeExpand Get user — response body — custom fields array item value The value of the custom field Date value
value (allOf 2) (anyOf 7)ModelAlternativeExpand Get user — response body — custom fields array item value The value of the custom field Money value
value (allOf 2) (anyOf 8)ModelAlternativeExpand Get user — response body — custom fields array item value The value of the custom field Option string value
value (allOf 2) (anyOf 9)ModelAlternativeExpand Get user — response body — custom fields array item value The value of the custom field String list value
value (allOf 2) (anyOf 10)ModelAlternativeExpand Get user — response body — custom fields array item value The value of the custom field Decimal list value
value (allOf 2) (anyOf 11)ModelAlternativeExpand Get user — response body — custom fields array item value The value of the custom field Boolean list value
value (allOf 2) (anyOf 12)ModelAlternativeExpand Get user — response body — custom fields array item value The value of the custom field Enum list value
value (allOf 2) (anyOf 13)ModelAlternativeExpand Get user — response body — custom fields array item value The value of the custom field Timestamp list value
value (allOf 2) (anyOf 14)ModelAlternativeExpand Get user — response body — custom fields array item value The value of the custom field Date list value
value (allOf 2) (anyOf 15)ModelAlternativeExpand Get user — response body — custom fields array item value The value of the custom field Money list value
value (allOf 2) (anyOf 16)ModelAlternativeExpand Get user — response body — custom fields array item value The value of the custom field Option string list value

Referenced models: Get user — response body — custom fields array item value The value of the custom field Boolean list value, Get user — response body — custom fields array item value The value of the custom field Boolean value, Get user — response body — custom fields array item value Base class for custom field values, Get user — response body — custom fields array item value The value of the custom field Date list value, Get user — response body — custom fields array item value The value of the custom field Date value, Get user — response body — custom fields array item value The value of the custom field Decimal list value, Get user — response body — custom fields array item value The value of the custom field Decimal value, Get user — response body — custom fields array item value The value of the custom field Enum list value, Get user — response body — custom fields array item value The value of the custom field Enum value, Get user — response body — custom fields array item value The value of the custom field Money list value, Get user — response body — custom fields array item value The value of the custom field Money value, Get user — response body — custom fields array item value The value of the custom field Option string list value, Get user — response body — custom fields array item value The value of the custom field Option string value, Get user — response body — custom fields array item value The value of the custom field String list value, Get user — response body — custom fields array item value The value of the custom field String value, Get user — response body — custom fields array item value The value of the custom field Timestamp list value, Get user — response body — custom fields array item value The value of the custom field Timestamp value

SDK function policy ID: brex.team_listusers. Catalog operation: team:listUsers. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.

Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.

Required provider scopes: ["users", "users.readonly"]

Official provider source

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand which product and documentation features are useful.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

You can change these choices at any time from Cookie settings.