package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.courier.com/automations/invoke"
payload := strings.NewReader("{\"brand\":\"W50NC77P524K14M5300PGPEK4JMJ\",\"template\":\"EXAMPLE_NOTIFICATION\",\"recipient\":\"8ec8c99a-c5f7-455b-9f60-8222b8a27056\",\"data\":{\"name\":\"Jane Doe\",\"age\":27},\"profile\":{\"phone_number\":\"2025550125\",\"email\":\"hello@example.com\"}}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Accept", "application/json")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}