Fields API (1.0.0-alpha)

Download OpenAPI specification:Download

The Fields API allows you to manage fields and field values information.

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

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": "string",
  • "is_disabled": true
}
Response samples
application/json
{
  • "brex_id": "string",
  • "name": "string",
  • "remote_id": "string",
  • "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

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": "string",
  • "name": "string",
  • "remote_id": "string",
  • "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

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": "string",
  • "name": "string",
  • "remote_id": "string",
  • "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

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

query Parameters
brex_id[]
Array of strings or null

Field value Brex identifier(s) to filter by

value_id[]
Array of strings or null

Field value identifier(s) to filter by

remote_id[]
Array of strings or null

Field value remote identifier(s) to filter by

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 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

Request Body schema: application/json
required
Array of objects (Field value to update)

The field values to update

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

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

Request Body schema: application/json
required
Array of objects (Field value to delete)

The field values to delete

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

brex_id
required
string

The field value ID (brex_id) to retrieve.

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": "string",
  • "remote_id": "string",
  • "value_id": "string",
  • "value": "string",
  • "field_id": "string",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "is_disabled": true
}
Copyright © Brex 2019–2025. All rights reserved.