Fields API (1.0.0-alpha)

Download OpenAPI specification:Download

The Fields API allows you to manage fields and field values information. The Fields API is currently in Alpha. To access the Fields Alpha API, please email developer-support@brex.com to express your interest. Please note that participation is determined by Brex based on program needs. For more details, please refer to https://developer.brex.com/docs/api-launch-stages/.

Fields

View and manage fields data.

List custom fields

List custom fields under the same account

SecurityOAuth2
Request
query Parameters
field_id[]
Array of strings or null

The Brex identifiers of the field to filter by

Example: field_id[]=extended_field_foobar
cursor
string or null

The cursor to use for pagination. This is the next_cursor value returned from the previous response.

limit
integer or null <int32>

Controls the maximum number of field values returned in the response. It can't be greater than 1000.

Responses
200

List custom fields response

400

Bad request

401

Unauthorized

403

Forbidden

500

Internal server error

get/v1/fields
Request samples
Response samples
application/json
{
  • "next_cursor": "string",
  • "items": [
    ]
}

Create a custom field

Create a custom field

SecurityOAuth2
Request
header Parameters
Idempotency-Key
required
string

Idempotency key for this request.

Request Body schema: application/json
name
required
string

The name of the field

group
required
string

The category of the field, indicating its purpose or context. For example, it could belong to accounting-related fields or user-related fields.

Value: "ACCOUNTING"
remote_id
string or null

Remote/external ID of custom field from external system (e.g. ERP or HRIS system)

is_disabled
boolean or null

Indicates if the field is disabled

Responses
200

Create custom field response

400

Bad request

401

Unauthorized

403

Forbidden

404

Not found

500

Internal server error

post/v1/fields
Request samples
application/json
{
  • "name": "string",
  • "group": "ACCOUNTING",
  • "remote_id": "foo_bar",
  • "is_disabled": true
}
Response samples
application/json
{
  • "brex_id": "extended_field_foobar",
  • "name": "string",
  • "remote_id": "foo_bar",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "is_disabled": true,
  • "group": "ACCOUNTING"
}

Get custom field

Get a custom field by Brex ID

SecurityOAuth2
Request
path Parameters
id
required
string

The Brex identifier of the field to retrieve

Example: extended_field_foobar
Responses
200

Get custom field response

400

Bad request

401

Unauthorized

403

Forbidden

404

Not found

500

Internal server error

get/v1/fields/{id}
Request samples
Response samples
application/json
{
  • "brex_id": "extended_field_foobar",
  • "name": "string",
  • "remote_id": "foo_bar",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "is_disabled": true,
  • "group": "ACCOUNTING"
}

Update a custom field

Update a field by ID

SecurityOAuth2
Request
path Parameters
id
required
string

The Brex identifier of the field to update

Example: extended_field_foobar
Request Body schema: application/json
name
string or null

The name of the field

is_disabled
boolean or null

Indicates if the field is disabled

Responses
200

Update custom field response

400

Bad request

401

Unauthorized

403

Forbidden

404

Not found

500

Internal server error

put/v1/fields/{id}
Request samples
application/json
{
  • "name": "string",
  • "is_disabled": true
}
Response samples
application/json
{
  • "brex_id": "extended_field_foobar",
  • "name": "string",
  • "remote_id": "foo_bar",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "is_disabled": true,
  • "group": "ACCOUNTING"
}

Delete a custom field

Delete a custom field by Brex ID

SecurityOAuth2
Request
path Parameters
id
required
string

The Brex identifier of the field to delete

Example: extended_field_foobar
Responses
200

Delete custom field response

400

Bad request

401

Unauthorized

403

Forbidden

404

Not found

500

Internal server error

delete/v1/fields/{id}
Request samples

Field Values

List custom field values

List values under the same custom field

SecurityOAuth2
Request
path Parameters
field_id
required
string

The Field Brex identifier

Example: extended_field_foobar
query Parameters
brex_id[]
Array of strings or null

Field value Brex identifier(s) to filter by

Example: brex_id[]=efo_foobar
value_id[]
Array of strings or null

Field value identifier(s) to filter by

Example: value_id[]=FooBar
remote_id[]
Array of strings or null

Field value remote identifier(s) to filter by

Example: remote_id[]=foo_bar
cursor
string or null

The cursor to use for pagination. This is the next_cursor value returned from the previous response.

limit
integer or null <int32>

Controls the maximum number of field values returned in the response. It can't be greater than 1000.

value
string or null

Field value's value to filter by

Example: value=Foobar
Responses
200

List custom field values response

400

Bad request

401

Unauthorized

403

Forbidden

500

Internal server error

get/v1/fields/{field_id}/values
Request samples
Response samples
application/json
{
  • "next_cursor": "string",
  • "items": [
    ]
}

Update custom field values

Update custom field values (up to 1000 values at once) for a specific field

SecurityOAuth2
Request
path Parameters
field_id
required
string

The Field Brex identifier

Example: extended_field_foobar
Request Body schema: application/json
required
Array of by `brex_id` (object) or by `value_id` (object) or by `remote_id` (object) (Field value to update) [ 1 .. 1000 ] items
Responses
200

Update custom field value list response

400

Bad request

401

Unauthorized

403

Forbidden

404

Not found

500

Internal server error

put/v1/fields/{field_id}/values
Request samples
application/json
{
  • "items": [
    ]
}
Response samples
application/json
{
  • "items": [
    ]
}

Create custom field values

Create custom field values (up to 1000 values at once) for a specific field

SecurityOAuth2
Request
path Parameters
field_id
required
string

The Field Brex identifier

Example: extended_field_foobar
header Parameters
Idempotency-Key
required
string

Idempotency key for this request.

Request Body schema: application/json
required
Array of objects (Field value creation) non-empty

The list of field values to be created

Responses
200

Create custom field values response

400

Bad request

401

Unauthorized

403

Forbidden

404

Not found

500

Internal server error

post/v1/fields/{field_id}/values
Request samples
application/json
{
  • "items": [
    ]
}
Response samples
application/json
{
  • "items": [
    ]
}

Delete custom field values

Delete custom field values (up to 1000 values at once) for a specific field

SecurityOAuth2
Request
path Parameters
field_id
required
string

The Field Brex identifier

Example: extended_field_foobar
Request Body schema: application/json
required
Array of by `brex_id` (object) or by `value_id` (object) or by `remote_id` (object) (Field value to delete) [ 1 .. 1000 ] items
Responses
200

Delete custom field value list response

400

Bad request

401

Unauthorized

403

Forbidden

404

Not found

500

Internal server error

delete/v1/fields/{field_id}/values
Request samples
application/json
{
  • "items": [
    ]
}
Response samples
application/json
{ }

Get a field value

Get a field value by field ID and field value ID

SecurityOAuth2
Request
path Parameters
field_id
required
string

The Field Brex identifier

Example: extended_field_foobar
brex_id
required
string

The field value ID (brex_id) to retrieve.

Example: efo_foobar
Responses
200

Get a field value response

400

Bad request

401

Unauthorized

403

Forbidden

404

Not found

500

Internal server error

get/v1/fields/{field_id}/values/{brex_id}
Request samples
Response samples
application/json
{
  • "brex_id": "efo_foobar",
  • "remote_id": "foo_bar",
  • "value_id": "foo_bar",
  • "value": "string",
  • "field_id": "extended_field_foobar",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "is_disabled": true
}
Copyright © Brex 2019–2025. All rights reserved.