Skip to main content
POST
/
v1
/
custom_fields
Create a custom_field
curl --request POST \
  --url https://api.slant.app/v1/custom_fields \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "field_key": "pageport_lead_source",
  "display_name": "Lead Source",
  "entity_type": "Household",
  "field_type": "text",
  "book_id": "abc123xyz",
  "options": {
    "select_options": [
      "Option 1",
      "Option 2",
      "Option 3"
    ],
    "cross_reference_allowed_target_types": [
      "Household",
      "Contact"
    ]
  }
}
'
{
  "id": "abc123xyz",
  "field_key": "pageport_lead_source",
  "display_name": "Lead Source",
  "entity_type": "Household",
  "field_type": "text",
  "options": {
    "select_options": [
      "Option 1",
      "Option 2"
    ],
    "cross_reference_allowed_target_types": [
      "Household",
      "Contact"
    ]
  }
}

Authorizations

Authorization
string
header
required

OAuth 2.0 Bearer Token from Clerk authentication

Headers

Idempotency-Key
string

Unique key to ensure idempotent request handling. If a request with the same key was already processed, the original response will be returned.

Body

application/json
field_key
string
required

Unique field key (lowercase, letters, numbers, underscores only)

Example:

"pageport_lead_source"

display_name
string
required

Human-readable field name

Example:

"Lead Source"

entity_type
enum<string>
required

Entity type this field applies to (Client and Prospect normalize to Household)

Available options:
Household,
Person,
Contact,
Opportunity
Example:

"Household"

field_type
enum<string>
required

Data type of the field

Available options:
text,
number,
date,
boolean,
single_select,
cross_reference
Example:

"text"

book_id
string

Deprecated. Ignored.

Example:

"abc123xyz"

options
object

Field-specific options (required for single_select and cross_reference)

Response

custom_field created

id
string
required

The custom field ID

Example:

"abc123xyz"

field_key
string
required

The unique field key

Example:

"pageport_lead_source"

display_name
string
required

The human-readable field name

Example:

"Lead Source"

entity_type
enum<string>
required

The entity type this field applies to

Available options:
Household,
Person,
Contact,
Opportunity
Example:

"Household"

field_type
enum<string>
required

The field data type

Available options:
text,
number,
date,
boolean,
single_select,
cross_reference
Example:

"text"

options
object

Field-specific options (e.g., select_options for single_select, cross_reference_allowed_target_types for cross_reference)