{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/autodesk/json-schema/autodesk-hook-payload-schema.json",
  "title": "HookPayload",
  "description": "Specifies the details of a webhook to be created. ",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/autodesk-aps-webhooks-openapi.yml#/components/schemas/HookPayload",
  "type": "object",
  "required": [
    "callbackUrl",
    "scope"
  ],
  "properties": {
    "callbackUrl": {
      "type": "string",
      "minLength": 1,
      "description": "The URL to send notifications to when the\nevent is triggered."
    },
    "autoReactivateHook": {
      "type": "boolean",
      "description": "``true`` - Automatically reactivate the webhook if it becomes ``inactive``.\n\n``false`` - (Default) Do not reactivate the webhook if it becomes ``inactive``.\n\nSee [Event Delivery Guarantees](/en/docs/webhooks/v1/developers_guide/event-delivery-guarantees/) for more information on how the webhooks service handles reactivation."
    },
    "hookAttribute": {
      "type": "object",
      "description": "A JSON object for storing user-defined custom information. The maximum size of this object must be less than 1KB.",
      "additionalProperties": true
    },
    "scope": {
      "type": "object",
      "description": "Specifies the extent to which the event is monitored. For example, if the scope is set to ``folder``, the webhooks service will generate notifications for the specified event occurring in that folder and any subfolders or contained items.",
      "properties": {
        "folder": {
          "type": "string",
          "description": "The URN of the folder to set the scope to. By setting the scope to this URN, you are limiting the webhook to generate notifications for events only for that specific folder and its subfolders. This option is valid only for webhooks for the Data Management service.\n\nSee [Creating a Webhook and Listening to Data Management Events](/en/docs/webhooks/v1/tutorials/create-a-hook-data-management/) for more information."
        },
        "workflow": {
          "type": "string",
          "description": "The ID of a Model Derivative workflow to set the scope to. By setting the scope to this workflow you are limiting the webhook to generate notification only for events with that workflow ID. This option is valid only for webhooks for the Model Derivative service.\n\nSee [Creating a Webhook and Listening to Model Derivative Events](/en/docs/webhooks/v1/tutorials/create-a-hook-model-derivative/) for more information."
        }
      }
    },
    "token": {
      "type": "string",
      "description": "A secret token that is used to generate a hash signature, which is passed along with notification requests to the callback URL.\n\nSee the [Secret Token](/en/docs/webhooks/v1/developers_guide/basics/#secret-token) section in API Basics for more information."
    },
    "hookExpiry": {
      "type": [
        "string",
        "null"
      ],
      "description": "The date and time the webhook will expire, formatted as an ISO 8601 date/time string. If you do not specify this attribute or set it to null, the webhook will never expire."
    },
    "filter": {
      "type": "string",
      "description": "A Jsonpath expression that you can use to filter the callbacks you receive.\n\nSee [Callback Filtering](/en/docs/webhooks/v1/developers_guide/callback-filtering/) for more information."
    },
    "hubId": {
      "type": "string",
      "description": "The ID of the hub that contains the entity that you want to monitor. Specify this attribute if the user calling this operation is a member of a large number of projects.\n\nFor BIM 360, a Data Management Hub ID corresponds to an Account ID. For Forma, a Data Management Hub ID corresponds to a Forma Hub ID. To convert either to a Data Management Hub ID, prefix the ID with ``b.`` For example, a BIM 360 Account ID or Forma Hub ID of ``c8b0c73d-3ae9`` translates to a Data Management Hub ID of ``b.c8b0c73d-3ae9``."
    },
    "projectId": {
      "type": "string",
      "description": "The ID of the project that contains the entity that you want to monitor. Specify this attribute if the user calling this operation is a member of a large number of projects.\n\nBIM 360 and Forma project IDs are different from Data Management project IDs. To convert BIM 360 or Forma Project IDs to Data Management Project IDs, prefix them with ``b.`` For example, a Project ID of ``c8b0c73d-3ae9`` becomes ``b.c8b0c73d-3ae9``."
    },
    "tenant": {
      "type": "string",
      "description": "The tenant associated with the event. If a tenant is specified on the webhook, either the event's tenant must match the webhook's tenant, or the ``scopeValue`` of the event must match the webhook's tenant."
    }
  }
}