There's a new version of the HubSpot API

As of November 30, 2022, HubSpot API keys are no longer a supported authentication method for accessing HubSpot APIs. Instead, you should use a private app access token or OAuth to authenticate API calls. Learn more about this change and how to migrate an API key integration to use a private app instead.

Create a Company Property

Last updated May 15, 2023

POST /properties/v1/companies/properties/

Method Details

HTTP Methods:

POST

Content Type:

application/json

Response Format:

json

Requires Authentication?

Yes

Rate Limited?

Yes

Headers

User-Agent

Products:

Marketing & CRM

Required Scope:

crm.schemas.companies.write

Create a property on every company object to store a specific piece of data. In the example below, we want to store shipping address in a seperate field on companies. This works similarly to the way custom properties work on both the Contacts and Deals objects.

Required Parameters How to use Description
OAuth access token or private app access token Authorization: Bearer {token} header Used to authenticate the request. Please see this page for more details about authentication.
Name "name": {property name}
Used in the request body.
The internal name of the property. The name is used to reference the property within the Company APIs. Each property must have a unique name.
Label "label": {property label}
Used in the request body.
A human readable label for the property. The label is used to display the property inside the HubSpot app.
Property Group "groupName": {property group name}
Used in the request body.
The property group that the property belongs to. Properties are displayed by these groups inside HubSpot. See this page for more details about property groups.
Data Type "type": {type}
Used in the request body.
The data type that the property stores. Must be one of:
  • string - string data
  • number - number value, can be any positive or negative integer or decimal number
  • date - A specific date, stored as a millisecond Unix timestamp. See this page for more details about date and datetime properties
  • datetime - A specific time, stored as a millisecond Unix timestamp. See this page for more details about date and datetime properties
  • enumeration - one of a set of values that are set in the 'options' field. If this type is used, at least one option must be included.
Form field type "fieldType": {field type}
Used in the request body.
Company properties cannot be used in forms, but this controls how the property appears in the HubSpot app. Must be one of:
  • textarea - a <textarea> field, stores data as a string
  • text - a simepl text box, stores a string
  • date - a datepicker field, stores a date type
  • number - a number input field, stores a number value
  • select - a dropdown box, uses the enumeration type
  • radio - a set of radio buttons, used with the enumeration data type.
  • checkbox - a set of checkboxes, used with the enumeration data type
  • booleancheckbox - a single checkbox, stores "true" (as a string) if checked.
Optional Parameters How to use Description
Description "description": {property description}
Used in the request body.
A description of the property. Will be displayed when viewing the property settings in HubSpot.
Enumerated options "options": {list of options}
Used in the request body.
If the property is the enumeration type, you must include a list of options. These options will be the acceptable values for the property. Each option will have a value and a label. The value is the internal value, used to validate the property and used internally by the APIs. The label should be a human readable value, as the label is displayed in the HubSpot app.
Display Order "displayOrder": {number value}
Used in the request body.
Used to control the default order of the property within the property group. Properties will be displayed in ascending order, starting with 0. Defaults to -1; any properties with -1 get displayed in the order they were created, after properties with positive values.