POST/directory/custom-fields

カスタムフィールドを登録する。
ドメイン単位で最大 5 個まで登録できる。

注意
この API は2026年7月下旬を目処に提供終了を予定しています。今後は ユーザーカスタムプロパティの登録 を使用してください。

Authorization

oauth2

Access Token を指定します。
指定の方法や Access Token の取得方法は 共通仕様 を参照してください。

Scope

directory

HTTP Request

POSThttps://www.worksapis.com/v1.0/directory/custom-fields

Header Parameters

HeadertypeDescription
Authorization string 

Bearer {token}


required 
Content-Type string 

application/json


required
example : application/json 

Request Body

PropertyTypeDescription
domainId integer 

ドメイン ID


required
format : int32 
customFieldExternalKey string 

カスタムフィールドキー (更新不可)
ドメイン内で一意
英数字のみ使用可能 (最初の文字は英字)
大文字小文字は区別しない


maxLength : 100
nullable : true 
customFieldName string 

カスタムフィールド名
ドメイン内で一意。


required
maxLength : 20 
customFieldType string 

カスタムフィールドタイプ (更新不可)

  • STRING : テキスト
  • LINK : URL

required
Allowed values : STRING, LINK 
displayOrder integer 

表示順位 (重複許可)
値を入力しない (NULL) 場合、最後尾に指定される。


format : int32 

Request Example

example

1{2  "domainId": 10000001,3  "customFieldExternalKey": "CUSTOMFIELDEXT01",4  "customFieldName": "custom01",5  "customFieldType": "LINK",6  "displayOrder": 17}

Response

HTTP 201

OK

PropertyTypeDescription
domainId integer 

ドメイン ID


required
format : int32 
customFieldId string 

カスタムフィールド ID

  • カスタムフィールドのリソース ID
  • 登録時に自動発行されるユニーク ID

readOnly : true 
customFieldExternalKey string 

カスタムフィールドキー (更新不可)
ドメイン内で一意
英数字のみ使用可能 (最初の文字は英字)
大文字小文字は区別しない


maxLength : 100
nullable : true 
customFieldName string 

カスタムフィールド名
ドメイン内で一意。


required
maxLength : 20 
customFieldType string 

カスタムフィールドタイプ (更新不可)

  • STRING : テキスト
  • LINK : URL

required
Allowed values : STRING, LINK 
displayOrder integer 

表示順位 (重複許可)
値を入力しない (NULL) 場合、最後尾に指定される。


format : int32 

Response Example

example

1{2  "domainId": 10000001,3  "customFieldId": "customfd-fc09-4a57-ab38-03dc6c425e09",4  "customFieldExternalKey": "CUSTOMFIELDEXT01",5  "customFieldName": "custom01",6  "customFieldType": "LINK",7  "displayOrder": 18}

HTTP 400

Bad Request