{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cubi-estate/json-schema/cubi-estate-admin-allowlist-approve-request-schema.json",
  "title": "AdminAllowlistApproveRequest",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cubi-estate-admin-api-openapi.yml#/components/schemas/AdminAllowlistApproveRequest",
  "properties": {
    "channel": {
      "type": "string",
      "enum": [
        "telegram",
        "whatsapp"
      ],
      "title": "Channel",
      "description": "Channel of the id being approved."
    },
    "chat_id": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "string"
        }
      ],
      "title": "Chat Id",
      "description": "Telegram numeric chat id, or WhatsApp wa_id (digits, no +). Stored as text."
    },
    "display_name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Display Name",
      "description": "Optional human label for ops (e.g. the user's name)."
    },
    "note": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Note",
      "description": "Free-text audit note."
    },
    "approved_by": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Approved By",
      "description": "Who approved (admin handle/id) — recorded for audit."
    },
    "send_confirmation": {
      "type": "boolean",
      "title": "Send Confirmation",
      "description": "If true, best-effort DM the user a localized 'you're approved' message.",
      "default": false
    },
    "lang": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Lang",
      "description": "ISO 639-1 for the confirmation DM; one of en/pt/es/fr/de/nl/ru.",
      "default": "en"
    }
  },
  "type": "object",
  "required": [
    "channel",
    "chat_id"
  ]
}