# Update NATS notification channel Update the configuration of an existing NATS notification channel Endpoint: PATCH /notification_channels/nats/{notification_channel_id} Version: 1.0.0 Security: ApiKeyAuth ## Path parameters: - `notification_channel_id` (string, required) Unique identifier (UUID) of the notification channel. Example: "550e8400-e29b-41d4-a716-446655440000" ## Request fields (application/json): - `name` (string) User-defined human-readable name for the notification channel. Used to identify and distinguish between different notification channels. The name should be descriptive and help users understand the purpose or destination of the channel. Example: "Production Alerts Webhook" - `url` (string) NATS server URL for connection. Specifies the NATS server endpoint where notifications will be published. Supports various NATS URL formats: - nats://localhost:4222 - Standard NATS connection - nats://user:pass@nats.example.com:4222 - With authentication Security Note: URLs containing credentials should be handled securely and may be masked in API responses. Example: "nats://nats.example.com:4222" - `subject` (string) NATS subject (topic) where notifications will be published. Subjects are hierarchical and use dot notation (e.g., "notifications.alerts.critical"). Wildcards can be used for subscription patterns: - * matches any single token - > matches any number of tokens at the end Examples: - "notifications.system.alerts" - "events.user.created" - "monitoring.metrics.cpu" Example: "notifications.webhooks.delivery" ## Response 200 fields (application/json): - `id` (string, required) Unique identifier in UUID format Example: "550e8400-e29b-41d4-a716-446655440000" - `kind` (string, required) Defines the type of notification delivery channel. Each kind determines the transport mechanism and configuration structure: - nats — NATS subject-based messaging for internal microservice communication - telegram — Telegram bot message delivery to chats or direct messages - webhook — HTTP POST callbacks to external endpoints Enum: "nats", "telegram", "webhook" - `name` (string, required) User-defined human-readable name for the notification channel. Used to identify and distinguish between different notification channels. The name should be descriptive and help users understand the purpose or destination of the channel. Example: "Production Alerts Webhook" - `config` (object, required) Configuration structure for notification channels. The exact schema depends on the channel kind. Each channel type has specific configuration requirements: - NATS channels require a subject for message routing - Telegram channels require bot token and chat ID for message delivery - Webhook channels require URL and optional headers/authentication - `is_archived` (boolean, required) Indicates whether the notification channel is archived (disabled) - `created_at` (string, required) Timestamp when the resource was created Example: "2024-01-15T10:30:00Z" - `updated_at` (string, required) Timestamp when the resource was last updated Example: "2024-01-15T10:30:00Z" ## Response 400 fields (application/problem+json): - `type` (string, required) A URI reference that identifies the problem type Example: "https://docs.vilna.io/apis/problems/invalid-request" - `title` (string, required) A short, human-readable summary of the problem type Example: "Invalid Request" - `status` (integer, required) The HTTP status code Example: 400 - `detail` (string) A human-readable explanation specific to this occurrence of the problem Example: "Validation error" - `instance` (string) A URI reference that identifies the specific occurrence of the problem Example: "/errors?id=XXXXXX-xxxxx" - `fields` (array) List of invalid fields in the request - `fields.name` (string, required) The name of the invalid field Example: "meta" - `fields.reason` (string, required) Why this field is invalid Example: "Exceeded maximum data size — must not exceed 1000 characters" ## Response 404 fields (application/problem+json): - `type` (string, required) A URI reference that identifies the problem type Example: "https://docs.vilna.io/apis/problems/not-found" - `title` (string, required) A short, human-readable summary of the problem type Example: "Not Found" - `status` (integer, required) The HTTP status code Example: 404 - `detail` (string) A human-readable explanation specific to this occurrence of the problem Example: "The requested resource was not found" - `instance` (string) A URI reference that identifies the specific occurrence of the problem Example: "/errors?id=XXXXXX-xxxxx" ## Response default fields (application/problem+json): - `detail` (string) A human-readable explanation specific to this occurrence of the problem Example: "An unexpected error occurred while processing your request" - `instance` (string) A URI reference that identifies the specific occurrence of the problem Example: "/errors/1234567890" - `status` (integer, required) The HTTP status code Example: 500 - `title` (string, required) A short, human-readable summary of the problem type Example: "Internal Server Error" - `type` (string, required) A URI reference that identifies the problem type Example: "https://api.vilna.io/problems/internal-error"