package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/v1/siloc/notifications/config"
payload := strings.NewReader("{\n \"channels\": [\n \"<string>\"\n ],\n \"expectedVersion\": 2,\n \"windowLeadMinutes\": 60\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("X-Idempotency", "<x-idempotency>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}