Skip to main content
POST
Create a Company

Authorizations

Authorization
string
header
required

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

Body

application/json

Request body for creating a Company.

name
string
required

The company's name.

Minimum string length: 1
Example:

"Horizon Technologies"

domain
string<hostname>
required

The company's primary domain.

Example:

"horizontech.com"

domains
string<hostname>[]

All of the company's domains.

Maximum array length: 100
Example:
fields
fields.FieldUpdate · object[]

Field-value updates to apply to the newly created Company. Only editable Fields can be set: custom Fields and the persons Field. Read-only Fields, such as created-at, and list-specific Fields are rejected. To link Persons, set the persons Field with a person-multi value. If a Person does not exist in your organization, or is not a confirmed contact, the request fails with a 400 and no Company is created. If any other Field update fails, the request also fails with a 400 and no Company is created. A Field id that appears more than once also fails with a 400.

Maximum array length: 100
Example:

Response

Created

Company model

id
integer<int64>
required

The company's unique identifier

Required range: 1 <= x <= 9007199254740991
Example:

1

name
string
required

The company's name

Example:

"Horizon Technologies"

domain
string<hostname> | null
required

The company's primary domain

Example:

"horizontech.com"

domains
string<hostname>[]
required

All of the company's domains

Example:
isGlobal
boolean
required

Whether or not the company is tenant specific

Example:

true

fields
Field · object[]

The fields associated with the company