{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/whatsmcp-com/json-schema/whatsmcp-com-get-plan-output-schema.json",
  "title": "GetPlanOutput",
  "x-generated": "2026-11-28",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/whatsmcp-com-openapi.json#/components/schemas/GetPlanOutput",
  "additionalProperties": false,
  "properties": {
    "accounts_paired": {
      "description": "WhatsApp numbers currently paired",
      "format": "int64",
      "type": "integer"
    },
    "attachments_enabled": {
      "description": "whether this plan includes attachments — both sending media and fetching inbound media with wa_get_media; when false, messaging is text-only and wa_get_media returns a plan_required refusal",
      "type": "boolean"
    },
    "description": {
      "description": "what the plan includes, for a human",
      "type": "string"
    },
    "display_name": {
      "description": "the plan's name as the customer sees it, e.g. Free, Pro",
      "type": "string"
    },
    "excluded_tools": {
      "description": "tools listed on this server that your plan does not include; calling one returns a plan_required refusal",
      "items": {
        "type": "string"
      },
      "type": [
        "array",
        "null"
      ]
    },
    "frozen": {
      "description": "true when this line is on Free limits because its payment is overdue, not because Free is the plan it pays for; pay at pay_url to restore the paid plan",
      "type": "boolean"
    },
    "history_days": {
      "description": "how long messages are retained, in days; 0 means forever",
      "format": "int64",
      "type": "integer"
    },
    "kind": {
      "description": "the plan family of the number named by account_id: personal, business or telegram; omitted for the workspace view, whose lines can differ",
      "type": "string"
    },
    "lines": {
      "additionalProperties": {
        "$ref": "#/$defs/LineView"
      },
      "description": "every line's plan and limits, present only for the workspace view",
      "type": "object"
    },
    "max_attachment_mb": {
      "description": "largest attachment this plan may SEND, in MB; 0 means no size limit. Applies only when attachments_enabled is true — it does not gate fetching, and is never why wa_get_media is refused",
      "format": "int64",
      "type": "integer"
    },
    "messages_1h": {
      "$ref": "#/$defs/MessageMeter",
      "description": "the hourly message-send limit and usage"
    },
    "messages_24h": {
      "$ref": "#/$defs/MessageMeter",
      "description": "the 24-hour message-send limit and usage"
    },
    "pay_url": {
      "description": "when frozen, where the customer pays the overdue invoice to restore full service",
      "type": "string"
    },
    "plan": {
      "description": "the plan's slug, e.g. free, starter, pro — an identifier; show display_name to a person",
      "type": "string"
    },
    "refusal": {
      "$ref": "#/$defs/Refusal",
      "description": "present only when account_id names a line that cannot be used"
    },
    "server_build_date": {
      "description": "when that version was built",
      "type": "string"
    },
    "server_version": {
      "description": "the version of this MCP service",
      "type": "string"
    },
    "tools_prefix": {
      "description": "the tool family of the number named by account_id: wa_ for a WhatsApp number, tg_ for a Telegram account; omitted for the workspace view",
      "type": "string"
    },
    "voice_plan": {
      "$ref": "#/$defs/VoicePlanView",
      "description": "the SIP calls this plan allows, or null when it allows none — or, for a workspace whose numbers are on different plans, null: see each line's calls_inbound/calls_outbound"
    },
    "webhooks_enabled": {
      "description": "whether this plan can register inbound webhooks",
      "type": "boolean"
    }
  },
  "required": [
    "plan",
    "display_name",
    "server_version",
    "server_build_date",
    "accounts_paired",
    "messages_1h",
    "messages_24h",
    "webhooks_enabled",
    "attachments_enabled",
    "max_attachment_mb",
    "history_days",
    "voice_plan"
  ],
  "type": "object",
  "$defs": {
    "AccountCandidate": {
      "additionalProperties": false,
      "properties": {
        "account_id": {
          "description": "the id to retry with as account_id",
          "type": "string"
        },
        "name": {
          "description": "the account's WhatsApp display name",
          "type": "string"
        },
        "phone": {
          "description": "the account's phone number, E.164",
          "type": "string"
        },
        "status": {
          "description": "whether the number works right now — live, connecting, or why not, as wa_list_accounts reports it",
          "type": "string"
        }
      },
      "required": [
        "account_id"
      ],
      "type": "object"
    },
    "LineView": {
      "additionalProperties": false,
      "properties": {
        "attachments_enabled": {
          "description": "whether this number's plan includes attachments — sending media and fetching inbound media with wa_get_media; when false, messaging is text-only",
          "type": "boolean"
        },
        "calls_inbound": {
          "description": "whether an incoming WhatsApp call to this number may ring your SIP PBX",
          "type": "boolean"
        },
        "calls_outbound": {
          "description": "whether your SIP PBX may place WhatsApp calls from this number",
          "type": "boolean"
        },
        "display_name": {
          "description": "the line's plan as the customer sees it",
          "type": "string"
        },
        "excluded_tools": {
          "description": "tools that act on this number (its tg_/wa_ family and the shared tools) that its plan does not include; calling one on this number returns a plan_required refusal",
          "items": {
            "type": "string"
          },
          "type": [
            "array",
            "null"
          ]
        },
        "frozen": {
          "description": "true when this number is on Free limits because its payment is overdue; pay in the console Billing page to restore its paid plan",
          "type": "boolean"
        },
        "history_days": {
          "description": "how long this number's messages are retained, in days; 0 means forever",
          "format": "int64",
          "type": "integer"
        },
        "kind": {
          "description": "the plan family this number is on: personal, business or telegram",
          "type": "string"
        },
        "live": {
          "description": "false when this number is released, locked, unlinked or dormant — its plan then unlocks nothing for the workspace",
          "type": "boolean"
        },
        "max_attachment_mb": {
          "description": "largest attachment this number may SEND, in MB; 0 means no size limit. Applies only when attachments_enabled is true",
          "format": "int64",
          "type": "integer"
        },
        "messages_1h": {
          "description": "messages this number's plan allows per hour; 0 means unlimited",
          "format": "int64",
          "type": "integer"
        },
        "messages_24h": {
          "description": "messages this number's plan allows per 24 hours; 0 means unlimited",
          "format": "int64",
          "type": "integer"
        },
        "phone": {
          "description": "the line's WhatsApp number",
          "type": "string"
        },
        "plan": {
          "description": "the line's plan slug",
          "type": "string"
        },
        "primary_device": {
          "description": "whether this number's plan lets it run as its own main WhatsApp device, with no phone",
          "type": "boolean"
        },
        "rest_api": {
          "description": "whether this number may be reached over the WhatsMCP REST API as well as this MCP server",
          "type": "boolean"
        },
        "secondary_device": {
          "description": "whether this number's plan lets it run as a linked device beside the WhatsApp app on a phone",
          "type": "boolean"
        },
        "tools_prefix": {
          "description": "the tool family to use for this number: wa_ for a WhatsApp number, tg_ for a Telegram account",
          "type": "string"
        },
        "webhooks_enabled": {
          "description": "whether this number's plan includes webhooks",
          "type": "boolean"
        }
      },
      "required": [
        "plan",
        "display_name",
        "phone",
        "kind",
        "tools_prefix",
        "live",
        "messages_1h",
        "messages_24h",
        "attachments_enabled",
        "max_attachment_mb",
        "history_days",
        "webhooks_enabled",
        "calls_inbound",
        "calls_outbound",
        "primary_device",
        "secondary_device",
        "rest_api"
      ],
      "type": "object"
    },
    "MessageMeter": {
      "additionalProperties": false,
      "properties": {
        "limit": {
          "description": "messages allowed in this window; 0 means the plan does not cap it",
          "format": "int64",
          "type": "integer"
        },
        "unlimited": {
          "description": "true when this plan does not cap this window",
          "type": "boolean"
        },
        "used": {
          "description": "messages sent in this window so far",
          "format": "int64",
          "type": "integer"
        }
      },
      "required": [
        "limit",
        "used",
        "unlimited"
      ],
      "type": "object"
    },
    "Refusal": {
      "additionalProperties": false,
      "properties": {
        "account_status": {
          "description": "when the number is not working: its status — starting, not_running, whatsapp_down (telegram_down for a Telegram account), suspended, pairing, unlinked or locked",
          "type": "string"
        },
        "account_status_reason": {
          "description": "the detail of account_status, e.g. no_egress, stopped, no_plan",
          "type": "string"
        },
        "candidates": {
          "description": "on an account_ambiguous refusal: the accounts to choose from — retry with one of these as account_id",
          "items": {
            "$ref": "#/$defs/AccountCandidate"
          },
          "type": [
            "array",
            "null"
          ]
        },
        "message": {
          "description": "a human-readable explanation",
          "type": "string"
        },
        "reason": {
          "description": "why the call was declined",
          "type": "string"
        },
        "refused": {
          "description": "true when the call was declined rather than performed",
          "type": "boolean"
        },
        "retry_after_seconds": {
          "description": "seconds to wait before retrying; absent or 0 means retrying will not help",
          "format": "int64",
          "type": "integer"
        },
        "since": {
          "description": "when the number stopped working, RFC3339, when known",
          "type": "string"
        }
      },
      "required": [
        "refused",
        "reason",
        "message"
      ],
      "type": "object"
    },
    "VoicePlanView": {
      "additionalProperties": false,
      "properties": {
        "calls_ai": {
          "description": "whether your plan allows connecting an AI agent to your calls",
          "type": "boolean"
        },
        "calls_inbound": {
          "description": "whether an incoming WhatsApp call may ring your SIP PBX",
          "type": "boolean"
        },
        "calls_outbound": {
          "description": "whether your SIP PBX may place WhatsApp calls",
          "type": "boolean"
        },
        "label": {
          "description": "the voice plan's name as the customer sees it",
          "type": "string"
        },
        "name": {
          "description": "the voice plan's slug — an identifier; show label to a person",
          "type": "string"
        },
        "sip": {
          "description": "whether your calls may connect to a SIP phone or your own PBX",
          "type": "boolean"
        },
        "webrtc": {
          "description": "whether you may take and place your calls from the browser",
          "type": "boolean"
        }
      },
      "required": [
        "name",
        "label",
        "calls_inbound",
        "calls_outbound",
        "calls_ai",
        "sip",
        "webrtc"
      ],
      "type": "object"
    }
  }
}