{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/tokolaku-id/json-schema/tokolaku-id-message-request-schema.json",
  "title": "MessageRequest",
  "x-generated": "2026-11-26",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/tokolaku-id-openapi.yml#/components/schemas/MessageRequest",
  "type": "object",
  "properties": {
    "to": {
      "type": "string",
      "description": "Nomor tujuan (format 62...)"
    },
    "type": {
      "type": "string",
      "enum": [
        "text",
        "template"
      ]
    },
    "text": {
      "type": "string",
      "description": "Wajib jika type=text"
    },
    "channel_id": {
      "type": "string",
      "description": "Wajib jika sub-akun punya > 1 channel resmi"
    },
    "template": {
      "type": "object",
      "description": "Wajib jika type=template",
      "properties": {
        "name": {
          "type": "string"
        },
        "language": {
          "type": "string"
        },
        "category": {
          "type": "string"
        }
      }
    }
  },
  "required": [
    "to",
    "type"
  ]
}