{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/notifly-io/json-schema/notifly-io-get-channel-endpoint-response-dto-schema.json",
  "title": "GetChannelEndpointResponseDto",
  "x-generated": "2026-11-19",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/notifly-io-openapi.yml#/components/schemas/GetChannelEndpointResponseDto",
  "type": "object",
  "properties": {
    "identifier": {
      "type": "string",
      "description": "The unique identifier of the channel endpoint."
    },
    "channel": {
      "enum": [
        "in_app",
        "email",
        "sms",
        "chat",
        "push",
        "tool"
      ],
      "type": [
        "string",
        "null"
      ],
      "description": "The channel type (email, sms, push, chat, etc.)."
    },
    "providerId": {
      "type": [
        "string",
        "null"
      ],
      "description": "The provider identifier (e.g., sendgrid, twilio, slack, etc.).",
      "enum": [
        "anypost",
        "emailjs",
        "mailgun",
        "mailjet",
        "mandrill",
        "nodemailer",
        "postmark",
        "sendgrid",
        "sendinblue",
        "ses",
        "netcore",
        "infobip-email",
        "resend",
        "sendly",
        "plunk",
        "mailersend",
        "mailtrap",
        "clickatell",
        "outlook365",
        "novu-email",
        "sparkpost",
        "email-webhook",
        "braze",
        "novu-email-agent",
        "agent-email-inbox",
        "nexmo",
        "plivo",
        "sms77",
        "sms-central",
        "sns",
        "telnyx",
        "twilio",
        "gupshup",
        "firetext",
        "infobip-sms",
        "burst-sms",
        "bulk-sms",
        "isend-sms",
        "forty-six-elks",
        "kannel",
        "maqsam",
        "termii",
        "africas-talking",
        "novu-sms",
        "sendchamp",
        "generic-sms",
        "clicksend",
        "bandwidth",
        "messagebird",
        "simpletexting",
        "azure-sms",
        "ring-central",
        "brevo-sms",
        "eazy-sms",
        "mobishastra",
        "afro-message",
        "unifonic",
        "smsmode",
        "imedia",
        "sinch",
        "isendpro-sms",
        "cm-telecom",
        "ruach-sms",
        "fcm",
        "apns",
        "expo",
        "one-signal",
        "pushpad",
        "push-webhook",
        "pusher-beams",
        "appio",
        "web-push",
        "novu",
        "slack",
        "discord",
        "google-chat",
        "msteams",
        "webex-messaging",
        "mattermost",
        "ryver",
        "zulip",
        "grafana-on-call",
        "getstream",
        "rocket-chat",
        "whatsapp-business",
        "line",
        "chat-webhook",
        "novu-slack",
        "telegram",
        "sendblue",
        "photon-imessage",
        "novu-web-chat",
        "anthropic",
        "novu-anthropic",
        "anthropic-aws",
        "pagerduty",
        "opsgenie",
        "grafana",
        "tool-webhook"
      ]
    },
    "integrationIdentifier": {
      "type": [
        "string",
        "null"
      ],
      "description": "The identifier of the integration to use for this channel endpoint."
    },
    "connectionIdentifier": {
      "type": [
        "string",
        "null"
      ],
      "description": "The identifier of the channel connection used for this endpoint."
    },
    "subscriberId": {
      "type": [
        "string",
        "null"
      ],
      "description": "The subscriber ID to which the channel endpoint is linked"
    },
    "contextKeys": {
      "description": "The context of the channel connection",
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "type": {
      "enum": [
        "slack_channel",
        "slack_user",
        "webhook",
        "phone",
        "ms_teams_channel",
        "ms_teams_user",
        "telegram_chat",
        "webex_room",
        "webex_person",
        "line_user",
        "pagerduty_service",
        "opsgenie_integration",
        "grafana_oncall_integration",
        "tool_webhook"
      ],
      "type": "string",
      "description": "Type of channel endpoint"
    },
    "endpoint": {
      "description": "Endpoint data specific to the channel type",
      "oneOf": [
        {
          "$ref": "#/$defs/SlackChannelEndpointDto"
        },
        {
          "$ref": "#/$defs/SlackUserEndpointDto"
        },
        {
          "$ref": "#/$defs/WebhookEndpointDto"
        },
        {
          "$ref": "#/$defs/PhoneEndpointDto"
        },
        {
          "$ref": "#/$defs/MsTeamsChannelEndpointDto"
        },
        {
          "$ref": "#/$defs/MsTeamsUserEndpointDto"
        },
        {
          "$ref": "#/$defs/TelegramChatEndpointDto"
        },
        {
          "$ref": "#/$defs/WebexRoomEndpointDto"
        },
        {
          "$ref": "#/$defs/WebexPersonEndpointDto"
        },
        {
          "$ref": "#/$defs/LineUserEndpointDto"
        },
        {
          "$ref": "#/$defs/PagerDutyServiceEndpointDto"
        },
        {
          "$ref": "#/$defs/OpsgenieIntegrationEndpointDto"
        },
        {
          "$ref": "#/$defs/GrafanaOnCallIntegrationEndpointDto"
        },
        {
          "$ref": "#/$defs/ToolWebhookEndpointDto"
        }
      ]
    },
    "createdAt": {
      "type": "string",
      "description": "The timestamp indicating when the channel endpoint was created, in ISO 8601 format."
    },
    "updatedAt": {
      "type": "string",
      "description": "The timestamp indicating when the channel endpoint was last updated, in ISO 8601 format."
    }
  },
  "required": [
    "identifier",
    "channel",
    "providerId",
    "integrationIdentifier",
    "connectionIdentifier",
    "subscriberId",
    "contextKeys",
    "type",
    "endpoint",
    "createdAt",
    "updatedAt"
  ],
  "$defs": {
    "GrafanaOnCallIntegrationEndpointDto": {
      "type": "object",
      "properties": {
        "url": {
          "type": "string",
          "description": "Grafana IRM/OnCall incoming-webhook (Formatted Webhook) integration URL. The routing secret is embedded in the URL path. Encrypted at rest on the channel endpoint (`endpoint` field)."
        },
        "authToken": {
          "type": "string",
          "description": "Optional Grafana service account bearer token, required when the integration enforces authenticated ingestion. Encrypted at rest on the channel endpoint (`endpoint` field)."
        }
      },
      "required": [
        "url"
      ]
    },
    "LineUserEndpointDto": {
      "type": "object",
      "properties": {
        "userId": {
          "type": "string",
          "description": "LINE user ID"
        }
      },
      "required": [
        "userId"
      ]
    },
    "MsTeamsChannelEndpointDto": {
      "type": "object",
      "properties": {
        "teamId": {
          "type": "string",
          "description": "MS Teams team ID"
        },
        "channelId": {
          "type": "string",
          "description": "MS Teams channel ID"
        }
      },
      "required": [
        "teamId",
        "channelId"
      ]
    },
    "MsTeamsUserEndpointDto": {
      "type": "object",
      "properties": {
        "userId": {
          "type": "string",
          "description": "MS Teams user ID"
        }
      },
      "required": [
        "userId"
      ]
    },
    "OpsgenieIntegrationEndpointDto": {
      "type": "object",
      "properties": {
        "apiKey": {
          "type": "string",
          "description": "Opsgenie API integration key (GenieKey) in UUID format. Encrypted at rest on the channel endpoint (`endpoint` field)."
        },
        "region": {
          "enum": [
            "us",
            "eu"
          ],
          "type": "string",
          "description": "Opsgenie account region that determines the alert API data-center endpoint."
        }
      },
      "required": [
        "apiKey",
        "region"
      ]
    },
    "PagerDutyServiceEndpointDto": {
      "type": "object",
      "properties": {
        "routingKey": {
          "type": "string",
          "pattern": "^[a-zA-Z0-9]{32}$",
          "description": "PagerDuty Events API v2 integration key (32-character alphanumeric string). Encrypted at rest on the channel endpoint (`endpoint` field).",
          "minLength": 32,
          "maxLength": 32
        },
        "region": {
          "enum": [
            "us",
            "eu"
          ],
          "type": "string",
          "description": "PagerDuty account region — determines the events API data-center endpoint."
        }
      },
      "required": [
        "routingKey",
        "region"
      ]
    },
    "PhoneEndpointDto": {
      "type": "object",
      "properties": {
        "phoneNumber": {
          "type": "string",
          "description": "Phone number in E.164 format"
        }
      },
      "required": [
        "phoneNumber"
      ]
    },
    "SlackChannelEndpointDto": {
      "type": "object",
      "properties": {
        "channelId": {
          "type": "string",
          "description": "Slack channel ID"
        }
      },
      "required": [
        "channelId"
      ]
    },
    "SlackUserEndpointDto": {
      "type": "object",
      "properties": {
        "userId": {
          "type": "string",
          "description": "Slack user ID"
        }
      },
      "required": [
        "userId"
      ]
    },
    "TelegramChatEndpointDto": {
      "type": "object",
      "properties": {
        "chatId": {
          "type": "string",
          "description": "Telegram chat ID"
        }
      },
      "required": [
        "chatId"
      ]
    },
    "ToolWebhookEndpointDto": {
      "type": "object",
      "properties": {
        "url": {
          "type": "string",
          "description": "Destination webhook URL (often a per-subscriber capability URL). Encrypted at rest on the channel endpoint (`endpoint` field)."
        },
        "headers": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "Optional headers (e.g. auth tokens) sent with every request to this webhook. Header values are encrypted at rest on the channel endpoint (`endpoint` field)."
        },
        "method": {
          "enum": [
            "POST",
            "PUT",
            "PATCH"
          ],
          "type": "string",
          "description": "Optional HTTP method override for this webhook. Defaults to the integration-level method."
        }
      },
      "required": [
        "url"
      ]
    },
    "WebexPersonEndpointDto": {
      "type": "object",
      "properties": {
        "personId": {
          "type": "string",
          "description": "Webex person ID. Provide exactly one of personId or personEmail."
        },
        "personEmail": {
          "type": "string",
          "description": "Webex person email. Provide exactly one of personId or personEmail."
        }
      }
    },
    "WebexRoomEndpointDto": {
      "type": "object",
      "properties": {
        "roomId": {
          "type": "string",
          "description": "Webex room ID"
        },
        "parentId": {
          "type": "string",
          "description": "Optional Webex parent message ID for threaded replies"
        }
      },
      "required": [
        "roomId"
      ]
    },
    "WebhookEndpointDto": {
      "type": "object",
      "properties": {
        "url": {
          "type": "string",
          "description": "Webhook URL"
        },
        "channel": {
          "type": "string",
          "description": "Optional channel identifier"
        }
      },
      "required": [
        "url"
      ]
    }
  }
}