Skip to main content
POST
Create a Company Field

Authorizations

Authorization
string
header
required

A static Affinity API key, presented as a bearer token.

Body

application/json

The properties needed to create a Field.

name
string
required

The field's name. Must be unique among the fields of the same entity type that are available in the same context.

Required string length: 1 - 255
Example:

"Sourced By"

valueType
enum<string>
required

The type of the data in this Field. The -multi variants create a multi-value field. Multi-value number fields are not supported.

Available options:
person,
person-multi,
company,
company-multi,
filterable-text,
filterable-text-multi,
number,
datetime,
location,
location-multi,
text,
ranked-dropdown,
dropdown,
dropdown-multi
Example:

"filterable-text"

description
string | null

A description of the field's purpose.

Maximum string length: 255
Example:

"Where this company is headquartered"

isRequired
boolean
default:false

Whether values for this field are required when creating an entity or List Entry. Defaults to false.

Example:

false

Response

Created

id
string
required

The field's unique identifier

Example:

"affinity-data-location"

name
string
required

The field's name

Example:

"Location"

description
string | null
required

A description of the field's purpose. null if no description was provided.

Example:

"Where this company is headquartered"

type
enum<string>
required

The field's type

Available options:
enriched,
global,
list,
relationship-intelligence
Example:

"enriched"

enrichmentSource
enum<string> | null
required

The source of the data in this Field (if it is enriched)

Available options:
affinity-data,
dealroom,
eventbrite,
mailchimp,
null
Example:

"affinity-data"

valueType
enum<string>
required

The type of the data in this Field

Available options:
person,
person-multi,
company,
company-multi,
filterable-text,
filterable-text-multi,
number,
number-multi,
datetime,
location,
location-multi,
text,
ranked-dropdown,
dropdown,
dropdown-multi,
formula-number,
interaction,
note,
list-multi,
reminder
Example:

"location"

isRequired
boolean
required

Whether a value for this field is required when creating an entity or List Entry.

Example:

false

createdAt
string<date-time> | null
required

The date and time this field was created, or null for built-in fields that Affinity provides automatically and that therefore have no creation time (for example identity, association, interaction, and some enriched fields).

Example:

"2024-03-07T20:21:42Z"

filterability
FieldFilterabilityFieldOnly · object

How this field can be used in filter expressions. Only present on endpoints that support the includes query parameter when filterability is requested. null if the field is not filterable.

sortability
FieldSortabilityFieldOnly · object

How this field can be used in sort expressions. Only present on endpoints that support the includes query parameter when sortability is requested. null if the field is not sortable.