{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/tokolaku-id/json-schema/tokolaku-id-webhook-create-request-schema.json",
  "title": "WebhookCreateRequest",
  "x-generated": "2026-11-26",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/tokolaku-id-openapi.yml#/components/schemas/WebhookCreateRequest",
  "type": "object",
  "properties": {
    "url": {
      "type": "string",
      "description": "Harus https, bukan alamat privat/localhost"
    },
    "tenant_id": {
      "type": [
        "string",
        "null"
      ],
      "description": "null = semua sub-akun, atau id sub-akun tertentu"
    },
    "events": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "message.received",
          "message.status"
        ]
      }
    }
  },
  "required": [
    "url"
  ]
}