create-kakao-brand-message-template
curl --request POST \
--url https://api.notifly.tech/v1/projects/{projectId}/messages/kakao-brand-message/templates \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"senderKey": "example_sender_key",
"templateName": "신규 회원 쿠폰 안내",
"template": {
"type": "image",
"content": {
"text": "#{name}님, 신규 쿠폰이 도착했습니다.",
"image": {
"url": "https://mud-kage.kakao.com/example/img_l.jpg",
"link": "https://example.com/coupon"
},
"buttons": [
{
"buttonType": "WL",
"buttonName": "쿠폰 확인",
"linkMo": "https://example.com/coupon"
}
]
}
}
}
'import requests
url = "https://api.notifly.tech/v1/projects/{projectId}/messages/kakao-brand-message/templates"
payload = {
"senderKey": "example_sender_key",
"templateName": "신규 회원 쿠폰 안내",
"template": {
"type": "image",
"content": {
"text": "#{name}님, 신규 쿠폰이 도착했습니다.",
"image": {
"url": "https://mud-kage.kakao.com/example/img_l.jpg",
"link": "https://example.com/coupon"
},
"buttons": [
{
"buttonType": "WL",
"buttonName": "쿠폰 확인",
"linkMo": "https://example.com/coupon"
}
]
}
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
senderKey: 'example_sender_key',
templateName: '신규 회원 쿠폰 안내',
template: {
type: 'image',
content: {
text: '#{name}님, 신규 쿠폰이 도착했습니다.',
image: {
url: 'https://mud-kage.kakao.com/example/img_l.jpg',
link: 'https://example.com/coupon'
},
buttons: [{buttonType: 'WL', buttonName: '쿠폰 확인', linkMo: 'https://example.com/coupon'}]
}
}
})
};
fetch('https://api.notifly.tech/v1/projects/{projectId}/messages/kakao-brand-message/templates', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.notifly.tech/v1/projects/{projectId}/messages/kakao-brand-message/templates",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'senderKey' => 'example_sender_key',
'templateName' => '신규 회원 쿠폰 안내',
'template' => [
'type' => 'image',
'content' => [
'text' => '#{name}님, 신규 쿠폰이 도착했습니다.',
'image' => [
'url' => 'https://mud-kage.kakao.com/example/img_l.jpg',
'link' => 'https://example.com/coupon'
],
'buttons' => [
[
'buttonType' => 'WL',
'buttonName' => '쿠폰 확인',
'linkMo' => 'https://example.com/coupon'
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.notifly.tech/v1/projects/{projectId}/messages/kakao-brand-message/templates"
payload := strings.NewReader("{\n \"senderKey\": \"example_sender_key\",\n \"templateName\": \"신규 회원 쿠폰 안내\",\n \"template\": {\n \"type\": \"image\",\n \"content\": {\n \"text\": \"#{name}님, 신규 쿠폰이 도착했습니다.\",\n \"image\": {\n \"url\": \"https://mud-kage.kakao.com/example/img_l.jpg\",\n \"link\": \"https://example.com/coupon\"\n },\n \"buttons\": [\n {\n \"buttonType\": \"WL\",\n \"buttonName\": \"쿠폰 확인\",\n \"linkMo\": \"https://example.com/coupon\"\n }\n ]\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
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))
}HttpResponse<String> response = Unirest.post("https://api.notifly.tech/v1/projects/{projectId}/messages/kakao-brand-message/templates")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"senderKey\": \"example_sender_key\",\n \"templateName\": \"신규 회원 쿠폰 안내\",\n \"template\": {\n \"type\": \"image\",\n \"content\": {\n \"text\": \"#{name}님, 신규 쿠폰이 도착했습니다.\",\n \"image\": {\n \"url\": \"https://mud-kage.kakao.com/example/img_l.jpg\",\n \"link\": \"https://example.com/coupon\"\n },\n \"buttons\": [\n {\n \"buttonType\": \"WL\",\n \"buttonName\": \"쿠폰 확인\",\n \"linkMo\": \"https://example.com/coupon\"\n }\n ]\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.notifly.tech/v1/projects/{projectId}/messages/kakao-brand-message/templates")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"senderKey\": \"example_sender_key\",\n \"templateName\": \"신규 회원 쿠폰 안내\",\n \"template\": {\n \"type\": \"image\",\n \"content\": {\n \"text\": \"#{name}님, 신규 쿠폰이 도착했습니다.\",\n \"image\": {\n \"url\": \"https://mud-kage.kakao.com/example/img_l.jpg\",\n \"link\": \"https://example.com/coupon\"\n },\n \"buttons\": [\n {\n \"buttonType\": \"WL\",\n \"buttonName\": \"쿠폰 확인\",\n \"linkMo\": \"https://example.com/coupon\"\n }\n ]\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"templateId": "<string>"
},
"error": "<string>"
}{
"data": null,
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid Authorization Token"
}
}{
"data": null,
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid Authorization Token"
}
}{
"data": null,
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid Authorization Token"
}
}{
"data": null,
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid Authorization Token"
}
}Kakao Brand Message templates
Create a Brand Message template
Create a Kakao Brand Message template.
POST
/
v1
/
projects
/
{projectId}
/
messages
/
kakao-brand-message
/
templates
create-kakao-brand-message-template
curl --request POST \
--url https://api.notifly.tech/v1/projects/{projectId}/messages/kakao-brand-message/templates \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"senderKey": "example_sender_key",
"templateName": "신규 회원 쿠폰 안내",
"template": {
"type": "image",
"content": {
"text": "#{name}님, 신규 쿠폰이 도착했습니다.",
"image": {
"url": "https://mud-kage.kakao.com/example/img_l.jpg",
"link": "https://example.com/coupon"
},
"buttons": [
{
"buttonType": "WL",
"buttonName": "쿠폰 확인",
"linkMo": "https://example.com/coupon"
}
]
}
}
}
'import requests
url = "https://api.notifly.tech/v1/projects/{projectId}/messages/kakao-brand-message/templates"
payload = {
"senderKey": "example_sender_key",
"templateName": "신규 회원 쿠폰 안내",
"template": {
"type": "image",
"content": {
"text": "#{name}님, 신규 쿠폰이 도착했습니다.",
"image": {
"url": "https://mud-kage.kakao.com/example/img_l.jpg",
"link": "https://example.com/coupon"
},
"buttons": [
{
"buttonType": "WL",
"buttonName": "쿠폰 확인",
"linkMo": "https://example.com/coupon"
}
]
}
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
senderKey: 'example_sender_key',
templateName: '신규 회원 쿠폰 안내',
template: {
type: 'image',
content: {
text: '#{name}님, 신규 쿠폰이 도착했습니다.',
image: {
url: 'https://mud-kage.kakao.com/example/img_l.jpg',
link: 'https://example.com/coupon'
},
buttons: [{buttonType: 'WL', buttonName: '쿠폰 확인', linkMo: 'https://example.com/coupon'}]
}
}
})
};
fetch('https://api.notifly.tech/v1/projects/{projectId}/messages/kakao-brand-message/templates', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.notifly.tech/v1/projects/{projectId}/messages/kakao-brand-message/templates",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'senderKey' => 'example_sender_key',
'templateName' => '신규 회원 쿠폰 안내',
'template' => [
'type' => 'image',
'content' => [
'text' => '#{name}님, 신규 쿠폰이 도착했습니다.',
'image' => [
'url' => 'https://mud-kage.kakao.com/example/img_l.jpg',
'link' => 'https://example.com/coupon'
],
'buttons' => [
[
'buttonType' => 'WL',
'buttonName' => '쿠폰 확인',
'linkMo' => 'https://example.com/coupon'
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.notifly.tech/v1/projects/{projectId}/messages/kakao-brand-message/templates"
payload := strings.NewReader("{\n \"senderKey\": \"example_sender_key\",\n \"templateName\": \"신규 회원 쿠폰 안내\",\n \"template\": {\n \"type\": \"image\",\n \"content\": {\n \"text\": \"#{name}님, 신규 쿠폰이 도착했습니다.\",\n \"image\": {\n \"url\": \"https://mud-kage.kakao.com/example/img_l.jpg\",\n \"link\": \"https://example.com/coupon\"\n },\n \"buttons\": [\n {\n \"buttonType\": \"WL\",\n \"buttonName\": \"쿠폰 확인\",\n \"linkMo\": \"https://example.com/coupon\"\n }\n ]\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
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))
}HttpResponse<String> response = Unirest.post("https://api.notifly.tech/v1/projects/{projectId}/messages/kakao-brand-message/templates")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"senderKey\": \"example_sender_key\",\n \"templateName\": \"신규 회원 쿠폰 안내\",\n \"template\": {\n \"type\": \"image\",\n \"content\": {\n \"text\": \"#{name}님, 신규 쿠폰이 도착했습니다.\",\n \"image\": {\n \"url\": \"https://mud-kage.kakao.com/example/img_l.jpg\",\n \"link\": \"https://example.com/coupon\"\n },\n \"buttons\": [\n {\n \"buttonType\": \"WL\",\n \"buttonName\": \"쿠폰 확인\",\n \"linkMo\": \"https://example.com/coupon\"\n }\n ]\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.notifly.tech/v1/projects/{projectId}/messages/kakao-brand-message/templates")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"senderKey\": \"example_sender_key\",\n \"templateName\": \"신규 회원 쿠폰 안내\",\n \"template\": {\n \"type\": \"image\",\n \"content\": {\n \"text\": \"#{name}님, 신규 쿠폰이 도착했습니다.\",\n \"image\": {\n \"url\": \"https://mud-kage.kakao.com/example/img_l.jpg\",\n \"link\": \"https://example.com/coupon\"\n },\n \"buttons\": [\n {\n \"buttonType\": \"WL\",\n \"buttonName\": \"쿠폰 확인\",\n \"linkMo\": \"https://example.com/coupon\"\n }\n ]\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"templateId": "<string>"
},
"error": "<string>"
}{
"data": null,
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid Authorization Token"
}
}{
"data": null,
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid Authorization Token"
}
}{
"data": null,
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid Authorization Token"
}
}{
"data": null,
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid Authorization Token"
}
}If the template type requires an image, upload it with the image upload API first. Use the returned
data.images[].url value in the template body.If you include
failoverTextMessage, also include unsubscribeNumber. Promotional fallback SMS requires a registered 080 opt-out number.Authorizations
Body
application/json
