メインコンテンツへスキップ
POST
/
automation
/
v4
/
actions
/
{appId}
新しいカスタムアクション定義を作成
curl --request POST \
  --url 'https://api.hubapi.com/automation/v4/actions/{appId}?hapikey=' \
  --header 'Content-Type: application/json' \
  --data '
{
  "actionUrl": "<string>",
  "functions": [
    {
      "functionSource": "<string>",
      "functionType": "POST_ACTION_EXECUTION",
      "id": "<string>"
    }
  ],
  "inputFields": [
    {
      "isRequired": true,
      "typeDefinition": {
        "name": "<string>",
        "options": [
          {
            "label": "<string>",
            "value": "<string>",
            "description": "<string>",
            "displayOrder": 123
          }
        ],
        "type": "bool",
        "description": "<string>",
        "fieldType": "booleancheckbox",
        "helpText": "<string>",
        "label": "<string>",
        "optionsUrl": "<string>",
        "referencedObjectType": "OWNER"
      },
      "supportedValueTypes": [
        "STATIC_VALUE"
      ]
    }
  ],
  "labels": {},
  "objectTypes": [
    "<string>"
  ],
  "published": true,
  "archivedAt": 123,
  "executionRules": [
    {
      "conditions": {},
      "labelName": "<string>"
    }
  ],
  "inputFieldDependencies": [
    {
      "controllingFieldName": "<string>",
      "dependencyType": "SINGLE_FIELD",
      "dependentFieldNames": [
        "<string>"
      ]
    }
  ],
  "outputFields": [
    {
      "typeDefinition": {
        "externalOptions": true,
        "name": "<string>",
        "options": [
          {
            "description": "<string>",
            "displayOrder": 123,
            "doubleData": 123,
            "hidden": true,
            "label": "<string>",
            "readOnly": true,
            "value": "<string>"
          }
        ],
        "schema": {
          "type": "INTEGER",
          "maximum": 123,
          "minimum": 123
        },
        "type": "bool",
        "useChirp": true,
        "description": "<string>",
        "externalOptionsReferenceType": "<string>",
        "fieldType": "booleancheckbox",
        "helpText": "<string>",
        "label": "<string>",
        "optionsUrl": "<string>",
        "referencedObjectType": "ABANDONED_CART"
      }
    }
  ]
}
'
{
  "actionUrl": "<string>",
  "functions": [
    {
      "functionType": "POST_ACTION_EXECUTION",
      "id": "<string>"
    }
  ],
  "id": "<string>",
  "inputFields": [
    {
      "isRequired": true,
      "typeDefinition": {
        "name": "<string>",
        "options": [
          {
            "label": "<string>",
            "value": "<string>",
            "description": "<string>",
            "displayOrder": 123
          }
        ],
        "type": "bool",
        "description": "<string>",
        "fieldType": "booleancheckbox",
        "helpText": "<string>",
        "label": "<string>",
        "optionsUrl": "<string>",
        "referencedObjectType": "OWNER"
      },
      "supportedValueTypes": [
        "STATIC_VALUE"
      ]
    }
  ],
  "labels": {},
  "objectTypes": [
    "<string>"
  ],
  "published": true,
  "revisionId": "<string>",
  "archivedAt": 123,
  "executionRules": [
    {
      "conditions": {},
      "labelName": "<string>"
    }
  ],
  "inputFieldDependencies": [
    {
      "controllingFieldName": "<string>",
      "dependencyType": "SINGLE_FIELD",
      "dependentFieldNames": [
        "<string>"
      ]
    }
  ],
  "outputFields": [
    {
      "typeDefinition": {
        "externalOptions": true,
        "name": "<string>",
        "options": [
          {
            "description": "<string>",
            "displayOrder": 123,
            "doubleData": 123,
            "hidden": true,
            "label": "<string>",
            "readOnly": true,
            "value": "<string>"
          }
        ],
        "schema": {
          "type": "INTEGER",
          "maximum": 123,
          "minimum": 123
        },
        "type": "bool",
        "useChirp": true,
        "description": "<string>",
        "externalOptionsReferenceType": "<string>",
        "fieldType": "booleancheckbox",
        "helpText": "<string>",
        "label": "<string>",
        "optionsUrl": "<string>",
        "referencedObjectType": "ABANDONED_CART"
      }
    }
  ]
}
サポートされる製品
次のいずれかの製品またはそれ以上が必要です。
Marketing HubMarketing HubProfessional
Sales HubSales HubProfessional
Service HubService HubProfessional
Content HubContent Hub無料ツール

承認

hapikey
string
query
必須

パスパラメータ

appId
integer<int32>
必須

ボディ

application/json
actionUrl
string
必須

アクションが実行されるURLエンドポイント。

functions
object[]
必須
inputFields
object[]
必須
labels
object
必須

名前や説明を含む、アクションに関連付けられたさまざまなラベルを保持します。

objectTypes
string[]
必須
published
boolean
必須

アクションが公開され、使用可能であるかどうかを示します。

archivedAt
integer<int64>

アクションがアーカイブされた日時を示すタイムスタンプ。

executionRules
object[]
inputFieldDependencies
(SINGLE_FIELD · object | CONDITIONAL_SINGLE_FIELD · object)[]
objectRequestOptions
object
outputFields
object[]

レスポンス

successful operation

actionUrl
string
必須
functions
object[]
必須
id
string
必須
inputFields
object[]
必須
labels
object
必須
objectTypes
string[]
必須
published
boolean
必須
revisionId
string
必須
archivedAt
integer<int64>
executionRules
object[]
inputFieldDependencies
(SINGLE_FIELD · object | CONDITIONAL_SINGLE_FIELD · object)[]
objectRequestOptions
object
outputFields
object[]
Last modified on January 23, 2026