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"
}
}카카오 브랜드 메시지 템플릿
브랜드 메시지 템플릿 생성
카카오 브랜드 메시지 템플릿을 생성합니다.
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"
}
}이미지가 필요한 템플릿 유형은 먼저 이미지 업로드 API로 이미지를 업로드한 뒤, 응답의
data.images[].url 값을 템플릿 본문에 넣어 생성합니다.failoverTextMessage를 함께 보내는 경우 unsubscribeNumber도 반드시 포함해야 합니다. 광고성 대체 문자 발송에는 등록된 080 수신거부 번호가 필요합니다.인증
POST /authenticate로 발급받은 인증 토큰을 Bearer 형식으로 전달합니다.
경로 매개변수
프로젝트 ID
본문
application/json
카카오 브랜드 메시지 발신 프로필 senderKey입니다.
Minimum string length:
1템플릿 이름입니다.
Minimum string length:
1type에 따라 content 구조가 달라집니다. 각 유형별 스키마에서 필수 필드와 중첩 구조를 확인하세요.
- 텍스트형
- 이미지형
- 와이드 이미지형
- 와이드 아이템리스트형
- 캐러셀형
- 프리미엄 동영상형
- 커머스형
- 캐러셀 커머스형
Show child attributes
Show child attributes
브랜드 메시지 실패 시 대체 발송할 문자 메시지입니다. LMS는 title이 필수입니다.
- Option 1
- Option 2
Show child attributes
Show child attributes
대체 발송 문자를 설정할 때 필요한 080 수신거부 번호입니다.
Minimum string length:
1⌘I
