{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/adobe/json-schema/adobe-callback-schema.json",
  "title": "Callback",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/adobe-aem-forms-openapi.yml#/components/schemas/Callback",
  "type": "object",
  "properties": {
    "title": {
      "type": "string",
      "description": "A friendly name or title for the callback endpoint or URL"
    },
    "description": {
      "type": "string",
      "description": "A description of the callback endpoint or URL"
    },
    "callbackUrl": {
      "type": "string",
      "format": "url",
      "description": "The URL that needs to be invoked on the action for which it is registered."
    },
    "status": {
      "type": "string",
      "enum": [
        "ACTIVE",
        "INACTIVE"
      ],
      "description": "Status of the callback endpoint"
    },
    "source": {
      "type": "string",
      "enum": [
        "WORKFRONT_FUSION"
      ],
      "description": "An identifier for the service that registers the callback endpoint"
    },
    "callbackOn": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "AF_SUBMISSION"
        ],
        "description": "The action on which the callback endpoint needs to be invoked"
      }
    },
    "additionalData": {
      "$ref": "#/$defs/AdditionalData"
    },
    "lastModifiedBy": {
      "type": "string",
      "description": "Email or user id of the user in external service who initiates the callback registration"
    },
    "targetServiceId": {
      "type": "string",
      "description": "AEM Service ID against which the callback is being registered."
    }
  },
  "required": [
    "callbackUrl",
    "status",
    "source",
    "callbackOn",
    "targetServiceId"
  ],
  "$defs": {
    "AdditionalData": {
      "type": "object",
      "description": "Additional properties or metadata of the endpoint that needs to be part of the registration.",
      "properties": {
        "workflowName": {
          "type": "string",
          "description": "The title or name of the workflow"
        }
      },
      "additionalProperties": true
    }
  }
}