{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/grubhub/main/json-schema/grubhub-responsewrapperproxyphonenumberresponse-schema.json",
  "title": "ResponseWrapperProxyPhoneNumberResponse",
  "x-generated": "2026-09-17",
  "x-method": "derived",
  "x-source": "openapi/grubhub-connect-endpoints-openapi.yml#/components/schemas/ResponseWrapperProxyPhoneNumberResponse",
  "type": "object",
  "properties": {
    "response": {
      "$ref": "#/$defs/ProxyPhoneNumberResponse"
    },
    "errors": {
      "type": "array",
      "description": "A list of errors returned.",
      "items": {
        "$ref": "#/$defs/PublicApiError"
      }
    }
  },
  "$defs": {
    "PhoneBridge": {
      "required": [
        "caller",
        "courier_phone_proxy",
        "expiration_time"
      ],
      "type": "object",
      "properties": {
        "expiration_time": {
          "type": "string",
          "description": "The expiration time of the proxy phone number. Formatted as an ISO-8601 timestamp.",
          "format": "date-time",
          "example": "2024-03-14T19:22:51.999Z"
        },
        "caller": {
          "$ref": "#/$defs/PhoneContactDetails"
        },
        "courier_phone_proxy": {
          "$ref": "#/$defs/PhoneContactDetails"
        }
      },
      "description": "The phone bridge details used to connect a caller to a courier."
    },
    "PhoneContactDetails": {
      "required": [
        "phone_number"
      ],
      "type": "object",
      "properties": {
        "phone_number": {
          "pattern": "^\\+\\d{11}$",
          "type": "string",
          "description": "A E.164 formatted phone number. Only 11-digits are supported.",
          "example": "+16145552332"
        }
      },
      "description": "The phone contact details."
    },
    "ProxyPhoneNumberResponse": {
      "required": [
        "phone_bridge"
      ],
      "type": "object",
      "properties": {
        "phone_bridge": {
          "$ref": "#/$defs/PhoneBridge"
        }
      },
      "description": "A response containing the phone bridge details used to connect to a courier."
    },
    "PublicApiError": {
      "required": [
        "code",
        "message"
      ],
      "type": "object",
      "properties": {
        "code": {
          "type": "string",
          "description": "A code representing the type of error that occurred."
        },
        "message": {
          "type": "string",
          "description": "A detailed description of the error that occurred."
        }
      },
      "description": "An error returned by the delivery API."
    }
  }
}