{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/whatsapp/json-schema/whatsapp-call-permission-check-response-payload-schema.json",
  "title": "CallPermissionCheckResponsePayload",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/whatsapp-business-messaging-api-openapi.yml#/components/schemas/CallPermissionCheckResponsePayload",
  "type": "object",
  "properties": {
    "messaging_product": {
      "type": "string",
      "description": "Messaging product"
    },
    "permission": {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "enum": [
            "granted",
            "pending",
            "denied",
            "expired"
          ],
          "description": "Current permission status for calling this user"
        },
        "expiration_time": {
          "type": "integer",
          "format": "int64",
          "description": "Unix timestamp when the permission expires (if applicable)"
        }
      },
      "required": [
        "status"
      ],
      "description": "Call permission details"
    },
    "actions": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "action_name": {
            "type": "string",
            "enum": [
              "start_call",
              "send_call_permission_request"
            ],
            "description": "Name of the action"
          },
          "can_perform_action": {
            "type": "boolean",
            "description": "Whether the business can perform this action"
          },
          "limits": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "time_period": {
                  "type": "string",
                  "description": "Time period for the limit"
                },
                "current_usage": {
                  "type": "integer",
                  "description": "Current usage count"
                },
                "max_allowed": {
                  "type": "integer",
                  "description": "Maximum allowed usage"
                },
                "limit_expiration_time": {
                  "type": "integer",
                  "format": "int64",
                  "description": "Unix timestamp when the limit resets"
                }
              },
              "required": [
                "time_period",
                "current_usage",
                "max_allowed"
              ]
            },
            "description": "Rate limits for this action"
          }
        },
        "required": [
          "action_name",
          "can_perform_action"
        ]
      },
      "description": "Available actions and their restrictions"
    }
  },
  "required": [
    "messaging_product",
    "permission"
  ]
}