メインコンテンツへスキップ
POST
/
crm
/
v3
/
properties
/
{objectType}
プロパティーを作成
curl --request POST \
  --url https://api.hubapi.com/crm/v3/properties/{objectType} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "displayOrder": 2,
  "fieldType": "select",
  "formField": true,
  "groupName": "contactinformation",
  "hasUniqueValue": false,
  "hidden": false,
  "label": "My Contact Property",
  "name": "my_contact_property",
  "options": [
    {
      "description": "Choice number one",
      "displayOrder": 1,
      "hidden": false,
      "label": "Option A",
      "value": "A"
    },
    {
      "description": "Choice number two",
      "displayOrder": 2,
      "hidden": false,
      "label": "Option B",
      "value": "B"
    }
  ],
  "type": "enumeration"
}
'
import requests

url = "https://api.hubapi.com/crm/v3/properties/{objectType}"

payload = {
"displayOrder": 2,
"fieldType": "select",
"formField": True,
"groupName": "contactinformation",
"hasUniqueValue": False,
"hidden": False,
"label": "My Contact Property",
"name": "my_contact_property",
"options": [
{
"description": "Choice number one",
"displayOrder": 1,
"hidden": False,
"label": "Option A",
"value": "A"
},
{
"description": "Choice number two",
"displayOrder": 2,
"hidden": False,
"label": "Option B",
"value": "B"
}
],
"type": "enumeration"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
displayOrder: 2,
fieldType: 'select',
formField: true,
groupName: 'contactinformation',
hasUniqueValue: false,
hidden: false,
label: 'My Contact Property',
name: 'my_contact_property',
options: [
{
description: 'Choice number one',
displayOrder: 1,
hidden: false,
label: 'Option A',
value: 'A'
},
{
description: 'Choice number two',
displayOrder: 2,
hidden: false,
label: 'Option B',
value: 'B'
}
],
type: 'enumeration'
})
};

fetch('https://api.hubapi.com/crm/v3/properties/{objectType}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.hubapi.com/crm/v3/properties/{objectType}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'displayOrder' => 2,
'fieldType' => 'select',
'formField' => true,
'groupName' => 'contactinformation',
'hasUniqueValue' => false,
'hidden' => false,
'label' => 'My Contact Property',
'name' => 'my_contact_property',
'options' => [
[
'description' => 'Choice number one',
'displayOrder' => 1,
'hidden' => false,
'label' => 'Option A',
'value' => 'A'
],
[
'description' => 'Choice number two',
'displayOrder' => 2,
'hidden' => false,
'label' => 'Option B',
'value' => 'B'
]
],
'type' => 'enumeration'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://api.hubapi.com/crm/v3/properties/{objectType}"

payload := strings.NewReader("{\n \"displayOrder\": 2,\n \"fieldType\": \"select\",\n \"formField\": true,\n \"groupName\": \"contactinformation\",\n \"hasUniqueValue\": false,\n \"hidden\": false,\n \"label\": \"My Contact Property\",\n \"name\": \"my_contact_property\",\n \"options\": [\n {\n \"description\": \"Choice number one\",\n \"displayOrder\": 1,\n \"hidden\": false,\n \"label\": \"Option A\",\n \"value\": \"A\"\n },\n {\n \"description\": \"Choice number two\",\n \"displayOrder\": 2,\n \"hidden\": false,\n \"label\": \"Option B\",\n \"value\": \"B\"\n }\n ],\n \"type\": \"enumeration\"\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://api.hubapi.com/crm/v3/properties/{objectType}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"displayOrder\": 2,\n \"fieldType\": \"select\",\n \"formField\": true,\n \"groupName\": \"contactinformation\",\n \"hasUniqueValue\": false,\n \"hidden\": false,\n \"label\": \"My Contact Property\",\n \"name\": \"my_contact_property\",\n \"options\": [\n {\n \"description\": \"Choice number one\",\n \"displayOrder\": 1,\n \"hidden\": false,\n \"label\": \"Option A\",\n \"value\": \"A\"\n },\n {\n \"description\": \"Choice number two\",\n \"displayOrder\": 2,\n \"hidden\": false,\n \"label\": \"Option B\",\n \"value\": \"B\"\n }\n ],\n \"type\": \"enumeration\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.hubapi.com/crm/v3/properties/{objectType}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"displayOrder\": 2,\n \"fieldType\": \"select\",\n \"formField\": true,\n \"groupName\": \"contactinformation\",\n \"hasUniqueValue\": false,\n \"hidden\": false,\n \"label\": \"My Contact Property\",\n \"name\": \"my_contact_property\",\n \"options\": [\n {\n \"description\": \"Choice number one\",\n \"displayOrder\": 1,\n \"hidden\": false,\n \"label\": \"Option A\",\n \"value\": \"A\"\n },\n {\n \"description\": \"Choice number two\",\n \"displayOrder\": 2,\n \"hidden\": false,\n \"label\": \"Option B\",\n \"value\": \"B\"\n }\n ],\n \"type\": \"enumeration\"\n}"

response = http.request(request)
puts response.read_body
{
  "displayOrder": 2,
  "fieldType": "select",
  "formField": true,
  "groupName": "contactinformation",
  "hasUniqueValue": false,
  "hidden": false,
  "label": "My Contact Property",
  "modificationMetadata": {
    "archivable": true,
    "readOnlyDefinition": false,
    "readOnlyOptions": false,
    "readOnlyValue": false
  },
  "name": "my_contact_property",
  "options": [
    {
      "description": "Choice number one",
      "displayOrder": 1,
      "hidden": false,
      "label": "Option A",
      "value": "A"
    },
    {
      "description": "Choice number two",
      "displayOrder": 2,
      "hidden": false,
      "label": "Option B",
      "value": "B"
    }
  ],
  "type": "enumeration"
}
{
"message": "Invalid input (details will vary based on the error)",
"correlationId": "aeb5f871-7f07-4993-9211-075dc63e7cbf",
"category": "VALIDATION_ERROR",
"links": {
"knowledge-base": "https://www.hubspot.com/products/service/knowledge-base"
}
}

Supported products

承認

Authorization
string
header
必須

The access token received from the authorization server in the OAuth 2.0 flow.

パスパラメータ

objectType
string
必須

ボディ

application/json
fieldType
enum<string>
必須

HubSpotでのプロパティーの表示が制御されます。

利用可能なオプション:
booleancheckbox,
calculation_equation,
checkbox,
date,
file,
html,
number,
phonenumber,
radio,
select,
text,
textarea
groupName
string
必須

プロパティーが含まれているプロパティーグループの名前。

label
string
必須

HubSpotに表示される、人間が読めるプロパティーラベル。

name
string
必須

このAPIを使用してプロパティーを参照する際に使用する必要がある内部プロパティー名。

type
enum<string>
必須

プロパティーのデータ型。

利用可能なオプション:
bool,
date,
datetime,
enumeration,
number,
phone_number,
string
calculationFormula
string

計算プロパティーの計算に使用される式を表します。

currencyPropertyName
string
dataSensitivity
enum<string>

プロパティーのセンシティブ(慎重に扱うべき)レベルを示します。オプションにはhighly_sensitive、non_sensitive、sensitiveがあります。

利用可能なオプション:
highly_sensitive,
non_sensitive,
sensitive
description
string

HubSpotにヘルプテキストとして表示されるプロパティーの説明。

displayOrder
integer<int32>

プロパティーは、最も小さい正の整数値を先頭に表示されます。「-1」という値にすると、そのプロパティーは全ての正の値よりも後に表示されます。

externalOptions
boolean

「列挙」タイプのプロパティーにのみ適用されます。「referencedObjectType」が「OWNER」の場合はtrueに設定する必要があります。それ以外の場合はfalseに設定します。

formField
boolean

HubSpotフォームにプロパティーを使用できるかどうか。

hasUniqueValue
boolean

プロパティーの値が固有である必要があるかどうか。設定すると、変更はできません。

hidden
boolean

trueの場合、HubSpotにプロパティーは表示されず、使用できません。

numberDisplayHint
enum<string>
利用可能なオプション:
currency,
duration,
formatted,
percentage,
probability,
unformatted
options
object[]

プロパティーの有効なオプションのリスト。このフィールドは列挙型のプロパティーに必要です。

referencedObjectType
string

「externalOptions」がtrueの場合、「OWNER」に設定する必要があります。これにより、現在のHubSpotユーザーのオプション値が動的にプロパティーに取り込まれます。

showCurrencySymbol
boolean
textDisplayHint
enum<string>
利用可能なオプション:
domain_name,
email,
ip_address,
multi_line,
phone_number,
physical_address,
postal_code,
unformatted_single_line

レスポンス

successful operation

HubSpotプロパティー

description
string
必須

HubSpotにヘルプテキストとして表示されるプロパティーの説明。

fieldType
string
必須

HubSpotでのプロパティーの表示が制御されます。

groupName
string
必須

プロパティーが含まれているプロパティーグループの名前。

label
string
必須

HubSpotに表示される、人間が読めるプロパティーラベル。

name
string
必須

このAPIを使用してプロパティーを参照する際に使用する必要がある内部プロパティー名。

options
object[]
必須

プロパティーに有効なオプションのリスト。このフィールドは列挙型のプロパティーに必要ですが、他のプロパティータイプでは空になります。

type
string
必須

プロパティーのデータ型。

archived
boolean

プロパティーがアーカイブされているかどうか。

archivedAt
string<date-time>

プロパティーがアーカイブされた日時

calculated
boolean

デフォルトのプロパティーの場合、trueはプロパティーがHubSpotプロセスによって計算されることを示します。カスタムプロパティーの場合は効果がありません。

calculationFormula
string

計算プロパティーの計算に使用される式を表します。

createdAt
string<date-time>

プロパティーが作成された時刻のタイムスタンプ(ISO 8601形式)。

createdUserId
string

HubSpotでプロパティーを作成したユーザーの内部ユーザーID。プロパティーがHubSpot外で作成された場合、このフィールドは存在しない場合があります。

currencyPropertyName
string

関連する通貨プロパティーの名前。

dataSensitivity
enum<string>

「non_sensitive」、「sensitive」、「highly_sensitive」など、プロパティーのセンシティブ(慎重に扱うべき)レベルを示します。

利用可能なオプション:
highly_sensitive,
non_sensitive,
sensitive
dateDisplayHint
enum<string>

日付値を表示する方法を示します。「absolute」、「absolute_with_relative」、「time_since」、「time_until」などのオプションがあります。

利用可能なオプション:
absolute,
absolute_with_relative,
time_since,
time_until
displayOrder
integer<int32>

プロパティーは、正の整数値の低い順に表示されます。

externalOptions
boolean

デフォルトのプロパティーの場合、trueはオプションがプロパティー設定外に格納されていることを示します。

formField
boolean

HubSpotフォームにプロパティーを使用できるかどうか。

hasUniqueValue
boolean

プロパティーの値が固有である必要があるかどうか。設定すると、変更はできません。

hidden
boolean

HubSpot UIでプロパティーが非表示になるかどうか。カスタムプロパティーの場合、これをfalseに設定することをお勧めします。

:

false

hubspotDefined
boolean

HubSpotに組み込まれているデフォルトのオブジェクトプロパティーではtrueになります。

modificationMetadata
object
numberDisplayHint
enum<string>

HubSpotのUIでの数値プロパティーの表示方法と検証方法に関するヒント。「unformatted」、「formatted」、「currency」、「percentage」、「duration」、「probability」のいずれかにできます。

利用可能なオプション:
currency,
duration,
formatted,
percentage,
probability,
unformatted
referencedObjectType
string

このプロパティーが他のオブジェクトに関連している場合、ここに一覧で表示されます。

sensitiveDataCategories
string[]

sensitiveDataがtrueの場合、プロパティーに含まれるセンシティブデータのタイプを示します(例:「HIPAA」)。

showCurrencySymbol
boolean

プロパティーによってアカウント設定で定義された通貨記号が表示されるかどうか。

textDisplayHint
enum<string>

HubSpotのUIでのテキストの表示方法と検証方法に関するヒント。「unformatted_single_line」、「multi_line」、「email」、「phone_number」、「domain_name」、「ip_address」、「physical_address」、「postal_code」のいずれかにできます。

利用可能なオプション:
domain_name,
email,
ip_address,
multi_line,
phone_number,
physical_address,
postal_code,
unformatted_single_line
updatedAt
string<date-time>

プロパティーが最後に更新されたタイムスタンプ(ISO 8601形式)。

updatedUserId
string

HubSpotでプロパティーを更新したユーザーの内部ユーザーID。プロパティーがHubSpot外で更新された場合、このフィールドは存在しない場合があります。

最終更新日 2026年4月10日