{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://github.com/api-evangelist/finout/blob/main/json-schema/endpoint.json",
  "title": "Finout Endpoint",
  "description": "A notification endpoint configuration in Finout, supporting email, Slack, and Microsoft Teams channels for cost alerts and notifications.",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "The unique identifier of the endpoint."
    },
    "name": {
      "type": "string",
      "description": "The name of the endpoint."
    },
    "type": {
      "type": "string",
      "description": "The type of endpoint.",
      "enum": ["email", "slack", "teams"]
    },
    "configuration": {
      "type": "object",
      "description": "Endpoint-specific configuration.",
      "properties": {
        "to": {
          "type": "string",
          "description": "The destination address. An email address for email endpoints or a webhook URL for Slack/Teams endpoints."
        }
      },
      "required": ["to"]
    }
  },
  "required": ["id", "name", "type", "configuration"]
}
