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
fieldIds[]
Array of strings or null

Get custom fields by Brex ID(s)

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 fields returned in the response, 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

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,
  • "field_group": "ACCOUNTING"
}

Get a field

Get a field by ID

SecurityOAuth2
Request
path Parameters
id
required
string

The Brex field ID

Responses
200

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,
  • "field_group": "ACCOUNTING"
}

Update a custom field

Update a custom field by Brex ID

SecurityOAuth2
Request
path Parameters
id
required
string
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

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,
  • "field_group": "ACCOUNTING"
}

Delete a custom field

Delete a custom field by Brex ID

SecurityOAuth2
Request
path Parameters
id
required
string

The Brex field ID to delete

Responses
200

deleteField 200 response

delete/v1/fields/{id}
Request samples

Field Values

List custom field values

List values under the same custom field

SecurityOAuth2
Request
path Parameters
fieldId
required
string

The Brex field ID

query Parameters
brexIds[]
Array of strings or null

Comma-separated list of Brex field value IDs to filter by

valueIds[]
Array of strings or null

Comma-separated list of value IDs to filter by

remoteIds[]
Array of strings or null

Comma-separated list of remote IDs 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, 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/{fieldId}/fieldValues
Request samples
Response samples
application/json
{
  • "next_cursor": "string",
  • "items": [
    ]
}

Create a custom field value

Create a custom field value for a specific field

SecurityOAuth2
Request
path Parameters
fieldId
required
string

The Brex field ID

header Parameters
Idempotency-Key
required
string

Idempotency key for this request.

Request Body schema: application/json
value
required
string

The display name of the field value.

value_id
string or null

The value ID or code of the field value; Usually it is a unique identifier for the custom field value in the remote system.

remote_id
string or null

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

is_disabled
boolean or null

Indicates if the field value is disabled.

Responses
200

Custom field value response

400

Bad request

401

Unauthorized

403

Forbidden

404

Not found

500

Internal server error

post/v1/fields/{fieldId}/fieldValues
Request samples
application/json
{
  • "value": "string",
  • "value_id": "string",
  • "remote_id": "string",
  • "is_disabled": true
}
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
}

Get a field value

Get a field value by field ID and field value ID

SecurityOAuth2
Request
path Parameters
fieldId
required
string

The Brex field ID

valueIdentifier
required
string

The value identifier can be either a Brex-generated ID or value ID or remote ID

Responses
200

Custom field value response

400

Bad request

401

Unauthorized

403

Forbidden

404

Not found

500

Internal server error

get/v1/fields/{fieldId}/fieldValues/{valueIdentifier}
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
}

Update a custom field value

Update a custom field value by ID

SecurityOAuth2
Request
path Parameters
fieldId
required
string

The Brex field ID

valueIdentifier
required
string

The value identifier can be either a Brex-generated ID or value ID or remote ID

Request Body schema: application/json
value
string or null

The display name of the field value.

is_disabled
boolean or null

Indicates if the field value is disabled.

Responses
200

Custom field value response

400

Bad request

401

Unauthorized

403

Forbidden

404

Not found

500

Internal server error

put/v1/fields/{fieldId}/fieldValues/{valueIdentifier}
Request samples
application/json
{
  • "value": "string",
  • "is_disabled": true
}
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
}

Delete a custom field value

Delete a custom field value by ID

SecurityOAuth2
Request
path Parameters
fieldId
required
string

The Brex field ID

valueIdentifier
required
string

The value identifier can be either a Brex-generated ID or value ID or remote ID

Responses
200

deleteFieldValue 200 response

delete/v1/fields/{fieldId}/fieldValues/{valueIdentifier}
Request samples
Copyright © Brex 2019–2025. All rights reserved.