{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/agentbookable-com/json-schema/agentbookable-com-consent-create-schema.json",
  "title": "ConsentCreate",
  "x-generated": "2026-11-01",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/agentbookable-com-openapi.json#/components/schemas/ConsentCreate",
  "type": "object",
  "required": [
    "actorRef",
    "draftId",
    "consent"
  ],
  "properties": {
    "actorRef": {
      "type": "string"
    },
    "draftId": {
      "type": "string"
    },
    "consent": {
      "type": "object",
      "required": [
        "consentObtained",
        "draftId"
      ],
      "properties": {
        "consentObtained": {
          "type": "boolean",
          "enum": [
            true
          ],
          "description": "Assert that the user explicitly consented to this exact draft after seeing the final details."
        },
        "draftId": {
          "type": "string",
          "description": "Must equal the draftId field"
        },
        "consentedBy": {
          "type": "string"
        },
        "consentMethod": {
          "type": "string",
          "description": "e.g. 'chat reply: yes, book it'"
        },
        "instruction": {
          "type": "string",
          "description": "The user's exact consenting words (audit context)"
        }
      }
    }
  }
}