{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://github.com/api-evangelist/ngrok/blob/main/json-schema/endpoint.json",
  "title": "ngrok Endpoint",
  "description": "An Endpoint represents a public URL that routes traffic to a tunnel or edge configuration in the ngrok network.",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Unique identifier for the endpoint."
    },
    "region": {
      "type": "string",
      "description": "The ngrok region where the endpoint is hosted."
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "description": "Timestamp when the endpoint was created."
    },
    "updated_at": {
      "type": "string",
      "format": "date-time",
      "description": "Timestamp when the endpoint was last updated."
    },
    "public_url": {
      "type": "string",
      "description": "The public URL of the endpoint."
    },
    "proto": {
      "type": "string",
      "description": "The protocol of the endpoint (http, https, tcp, tls)."
    },
    "url": {
      "type": "string",
      "description": "The URL of the endpoint."
    },
    "type": {
      "type": "string",
      "description": "The type of the endpoint (ephemeral, edge, cloud)."
    },
    "description": {
      "type": "string",
      "description": "Human-readable description of the endpoint."
    },
    "metadata": {
      "type": "string",
      "description": "Arbitrary user-defined metadata."
    },
    "domain": {
      "type": "object",
      "description": "Reference to the reserved domain, if applicable.",
      "properties": {
        "id": {
          "type": "string"
        },
        "uri": {
          "type": "string"
        }
      }
    },
    "tcp_addr": {
      "type": "object",
      "description": "Reference to the reserved TCP address, if applicable.",
      "properties": {
        "id": {
          "type": "string"
        },
        "uri": {
          "type": "string"
        }
      }
    },
    "tunnel": {
      "type": "object",
      "description": "Reference to the tunnel serving this endpoint.",
      "properties": {
        "id": {
          "type": "string"
        },
        "uri": {
          "type": "string"
        }
      }
    },
    "edge": {
      "type": "object",
      "description": "Reference to the edge serving this endpoint.",
      "properties": {
        "id": {
          "type": "string"
        },
        "uri": {
          "type": "string"
        }
      }
    },
    "bindings": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "The bindings for the endpoint."
    },
    "traffic_policy": {
      "type": "string",
      "description": "The traffic policy attached to this endpoint."
    },
    "uri": {
      "type": "string",
      "description": "URI of the endpoint API resource."
    }
  }
}
