Notification > Notification Hub > API v1.0 User Guide > Template
Request
POST /template/v1.0/{messageChannel}/templates
Content-Type: application/json
X-NC-APP-KEY: {appKey}
X-NHN-Authorization: {accessToken}
Request Parameter
Name | In | Type | Required | Description |
---|---|---|---|---|
appKey | Header | String | Y | Appkey |
accessToken | Header | String | Y | Authentication Token |
Request Body
{
"templateName": "Template_Name",
"categoryId": "Template_Category_Id",
"messagePurpose": "NORMAL",
"templateLanguage": "PLAIN_TEXT",
"sender": {
"senderPhoneNumber": "01012341234"
},
"content": {
"messageType": "MMS",
"title": "[NHN Cloud Notification Hub] Announcement",
"body": "Hello. This is NHN Cloud Notification Hub",
"attachmentIds": [
"Attachment_File_Ids"
]
}
}
Name | Type | Required | Description |
---|---|---|---|
templateName | String | Y | Template name |
categoryId | String | Y | Template category ID |
messagePurpose | String | Y | Message purpose |
templateLanguage | String | Y | Template language PLAIN_TEXT, FREE_MARKER |
sender | Object | Y | Sender |
content | Object | Y | Content |
Message channels | Field | Description |
---|---|---|
SMS | sender.senderPhoneNumber | Sender ID |
RCS | sender.brandId | Brand ID |
RCS | sender.chatbotId | Room ID |
sender.senderMailAddress | Sender email address | |
ALIMTALK, FRIENDTALK | sender.senderKey | Sender key |
ALIMTALK | sender.senderProfileType | Sender profile type GROUP, NORMAL |
{
"templateName": "Template name",
"categoryId": "Category_Id",
"messagePurpose": "NORMAL",
"templateLanguage": "PLAIN_TEXT",
"sender": {
"senderKey": "sender_key",
"senderProfileType": "GROUP"
},
"content": {
"templateMessageType": "BA",
"templateEmphasizeType": "NONE",
"templateContent": "#{Name}'s order has been completed",
"templateAd": "Add channel and receive marketing messages from this channel in KakaoTalk",
"templateExtra": "* Due to the real-time nature of reservations, duplicate reservations may occur, and reservations may be canceled if the room is unavailable.\\n* Contact: 1234-1234",
"templateTitle": "123,450won",
"templateSubtitle": "Approval History",
"templateHeader": "Your order has been fulfilled",
"templateItem": {
"list": [],
"summary": {
"title": "string",
"description": "string"
}
},
"templateItemHighlight": {
"title": "string",
"description": "string",
"attachmentId": "YaX2DA4Weab2",
"imageUrl": "string"
},
"templateRepresentLink": {
"linkMo": "string",
"linkPc": "string",
"schemeIos": "string",
"schemeAndroid": "string"
},
"attachmentId": "YaX2DA4Weab2",
"templateImageName": "image.png",
"templateImageUrl": "https://mud-kage.kakao.com/dn/hAtIc/btshc5wAvF0/sA8gjabh4J34IMqCk0hkBK/img_l.jpg",
"securityFlag": false,
"categoryCode": "999999",
"buttons": [],
"quickReplies": []
},
"additionalProperty": {
"templateCode": "templateCode",
"kakaoTemplateCode": "kakaoTemplateCode",
"comments": [],
"status": "APR",
"templateModificationStatus": "APR",
"block": false,
"dormant": false
}
}
Name | Type | Required | Description |
---|---|---|---|
Response Body
{
"header": {
"isSuccessful": true,
"resultCode": 0,
"resultMessage": "SUCCESS"
},
"templateId": "template_id"
}
Request Example
### Create a template
POST {{endpoint}}/template/v1.0/{{messageChannel}}/templates
Content-Type: application/json
X-NC-APP-KEY: {{appKey}}
X-NHN-Authorization: {{authorization}}
{
"templateName": "Template_Name",
"categoryId": "Template_Category_Id",
"messagePurpose": "NORMAL",
"templateLanguage": "PLAIN_TEXT",
"sender": {
"senderPhoneNumber": "01012341234"
},
"content": {
"messageType": "MMS",
"title": "[NHN Cloud Notification Hub] Announcement",
"body": "Hello. This is NHN Cloud Notification Hub",
"attachmentIds": [
"Attachment_File_Ids"
]
}
}
curl -X POST "${ENDPOINT}/template/v1.0/${MESSAGE_CHANNEL}/templates" \
-H "Content-Type: application/json" \
-h "x-nc-app-key: ${app_key}" \
-H "X-NHN-Authorization: ${ACCESS_TOKEN}" \
-d '{
"templateName": "Template_Name",
"categoryId": "Template_Category_Id",
"messagePurpose": "NORMAL",
"templateLanguage": "PLAIN_TEXT",
"sender": {
"senderPhoneNumber": "01012341234"
},
"content": {
"messageType": "MMS",
"title": "[NHN Cloud Notification Hub] Announcement",
"body": "Hello. This is NHN Cloud Notification Hub",
"attachmentIds": [
"Attachment_File_Ids"
]
}
}'
Request
GET /template/v1.0/{messageChannel}/templates
X-NC-APP-KEY: {appKey}
X-NHN-Authorization: {accessToken}
Request Parameter
Name | In | Type | Required | Description |
---|---|---|---|---|
appKey | Header | String | Y | Appkey |
accessToken | Header | String | Y | Authentication Token |
templateName | Query | String | N | Searchable template names and prefixes |
limit | Query | Integer | N | Number of views (default: 20) |
offset | Query | Integer | N | View start location (default: 0) |
Request Body
This API does not require a request body.
Response Body
{
"header": {
"isSuccessful": true,
"resultCode": 0,
"resultMessage": "SUCCESS"
},
"templates": [
{
"templateId": "Template_Id",
"templateName": "Template_Name",
"categoryId": "Template_Category_Id",
"messagePurpose": "NORMAL",
"templateLanguage": "PLAIN_TEXT",
"sender": {
"senderPhoneNumber": "01012341234"
},
"content": {
"messageType": "MMS",
"title": "[NHN Cloud Notification Hub] Announcement",
"body": "Hello. This is NHN Cloud Notification Hub",
"attachmentIds": [
"Attachment_File_Ids"
]
},
"createdDateTime": "2023-01-01T00:00:00Z",
"updatedDateTime": "2023-01-01T00:00:00Z"
}
],
"totalCount": 1
}
Request Example
### View templates
GET {{endpoint}}/template/v1.0/{{messageChannel}}/templates
X-NC-APP-KEY: {{appKey}}
X-NHN-Authorization: {{authorizationToken}}
curl -X GET "${ENDPOINT}/template/v1.0/${MESSAGE_CHANNEL}/templates" \
-H "Content-Type: application/json" \
-H "X-NC-APP-KEY: ${APP_KEY}" \
-H "X-NHN-Authorization: ${ACCESS_TOKEN}"
Request
GET /template/v1.0/{messageChannel}/templates/{templateId}
X-NC-APP-KEY: {appKey}
X-NHN-Authorization: {accessToken}
Request Parameter
Name | In | Type | Required | Description |
---|---|---|---|---|
appKey | Header | String | Y | Appkey |
accessToken | Header | String | Y | Authentication Token |
templateId | Path | String | Y | Template ID |
Request Body
This API does not require a request body.
Response Body
{
"header": {
"isSuccessful": true,
"resultCode": 0,
"resultMessage": "SUCCESS"
},
"template": {
"templateId": "Template_Id",
"templateName": "Template_Name",
"categoryId": "Template_Category_Id",
"messagePurpose": "NORMAL",
"templateLanguage": "PLAIN_TEXT",
"sender": {
"senderPhoneNumber": "01012341234"
},
"content": {
"messageType": "MMS",
"title": "[NHN Cloud Notification Hub] Announcement",
"body": "Hello. This is NHN Cloud Notification Hub",
"attachmentIds": [
"Attachment_File_Ids"
]
},
"createdDateTime": "2023-01-01T00:00:00Z",
"updatedDateTime": "2023-01-01T00:00:00Z"
}
}
Request Example
### View a template
GET {{endpoint}}/template/v1.0/{{messageChannel}}/templates/{templateId}
X-NC-APP-KEY: {{appKey}}
X-NHN-Authorization: {{authorizationToken}}
curl -X GET "${ENDPOINT}/template/v1.0/${MESSAGE_CHANNEL}/templates/${TEMPLATE_ID}" \
-H "Content-Type: application/json" \
-H "X-NC-APP-KEY: ${APP_KEY}" \
-H "X-NHN-Authorization: ${ACCESS_TOKEN}"
Request
PUT /template/v1.0/{messageChannel}/templates/{templateId}
Content-Type: application/json
X-NC-APP-KEY: {appKey}
X-NHN-Authorization: {accessToken}
Request Parameter
Name | In | Type | Required | Description |
---|---|---|---|---|
appKey | Header | String | Y | Appkey |
accessToken | Header | String | Y | Authentication Token |
templateId | Path | String | Y | Template ID |
Request Body
{
"templateName": "Template_Name",
"categoryId": "Template_Category_Id",
"messagePurpose": "NORMAL",
"templateLanguage": "PLAIN_TEXT",
"sender": {
"senderPhoneNumber": "01012341234"
},
"content": {
"messageType": "MMS",
"title": "[NHN Cloud Notification Hub] Announcement",
"body": "Hello. This is NHN Cloud Notification Hub",
"attachmentIds": [
"Attachment_File_Ids"
]
}
}
Response Body
{
"header": {
"isSuccessful": true,
"resultCode": 0,
"resultMessage": "SUCCESS"
}
}
Request Example
### Modify a template
PUT {{endpoint}}/template/v1.0/{{messageChannel}}/templates/{templateId}
Content-Type: application/json
X-NC-APP-KEY: {{appKey}}
X-NHN-Authorization: {{authorization}}
{
"templateName": "Template_Name",
"categoryId": "Template_Category_Id",
"messagePurpose": "NORMAL",
"templateLanguage": "PLAIN_TEXT",
"sender": {
"senderPhoneNumber": "01012341234"
},
"content": {
"messageType": "MMS",
"title": "[NHN Cloud Notification Hub] Announcement",
"body": "Hello. This is NHN Cloud Notification Hub",
"attachmentIds": [
"Attachment_File_Ids"
]
}
}
curl -X PUT "${ENDPOINT}/template/v1.0/${MESSAGE_CHANNEL}/templates/${TEMPLATE_ID}" \
-H "Content-Type: application/json" \
-h "x-nc-app-key: ${app_key}" \
-H "X-NHN-Authorization: ${ACCESS_TOKEN}" \
-d '{
"templateName": "Template_Name",
"categoryId": "Template_Category_Id",
"messagePurpose": "NORMAL",
"templateLanguage": "PLAIN_TEXT",
"sender": {
"senderPhoneNumber": "01012341234"
},
"content": {
"messageType": "MMS",
"title": "[NHN Cloud Notification Hub] Announcement",
"body": "Hello. This is NHN Cloud Notification Hub",
"attachmentIds": [
"Attachment_File_Ids"
]
}
}'
Request
DELETE /template/v1.0/{messageChannel}/templates/{templateId}
X-NC-APP-KEY: {appKey}
X-NHN-Authorization: {accessToken}
Request Parameter
Name | In | Type | Required | Description |
---|---|---|---|---|
appKey | Header | String | Y | Appkey |
accessToken | Header | String | Y | Authentication Token |
templateId | Path | String | Y | Template ID |
Request Body
This API does not require a request body.
Response Body
{
"header": {
"isSuccessful": true,
"resultCode": 0,
"resultMessage": "SUCCESS"
}
}
Request Example
### Delete a template
DELETE {{endpoint}}/template/v1.0/{{messageChannel}}/templates/{templateId}
X-NC-APP-KEY: {{appKey}}
X-NHN-Authorization: {{authorizationToken}}
curl -X DELETE "${ENDPOINT}/template/v1.0/${MESSAGE_CHANNEL}/templates/${TEMPLATE_ID}" \
-H "Content-Type: application/json" \
-H "X-NC-APP-KEY: ${APP_KEY}" \
-H "X-NHN-Authorization: ${ACCESS_TOKEN}"
Request
POST /template/v1.0/ALIMTALK/templates/{templateId}/inquiries
Content-Type: application/json
X-NC-APP-KEY: {appKey}
X-NHN-Authorization: {accessToken}
Request Parameter
Name | In | Type | Required | Description |
---|---|---|---|---|
appKey | Header | String | Y | Appkey |
accessToken | Header | String | Y | Authentication Token |
templateId | Path | String | Y | Template ID |
Request Body
{
"comment": "Your comment"
}
Name | Type | Required | Description |
---|---|---|---|
comment | String | Y | Inquiry content (maximum length: 500) |
Response Body
{
"header": {
"isSuccessful": true,
"resultCode": 0,
"resultMessage": "SUCCESS"
}
}
Request Example
### Inquire About Alimtalk Template
POST {{endpoint}}/template/v1.0/ALIMTALK/templates/{templateId}/inquiries
Content-Type: application/json
X-NC-APP-KEY: {{appKey}}
X-NHN-Authorization: {{authorization}}
{
"comment": "Your inquiry"
}
curl -X POST "${ENDPOINT}/template/v1.0/ALIMTALK/templates/${TEMPLATE_ID}/inquiries" \
-H "Content-Type: application/json" \
-h "x-nc-app-key: ${app_key}" \
-H "X-NHN-Authorization: ${ACCESS_TOKEN}" \
-d '{
"comment": "Your inquiry"
}'
Request
POST /template/v1.0/ALIMTALK/templates/${TEMPLATE_ID}/inquiries/do-with-file
Content-Type: multipart/form-data
X-NC-APP-KEY: {appKey}
X-NHN-Authorization: {accessToken}
Request Parameter
Name | In | Type | Required | Description |
---|---|---|---|---|
appKey | Header | String | Y | Appkey |
accessToken | Header | String | Y | Authentication Token |
templateId | Path | String | Y | Template ID |
comment | Query | String | Y | Inquiry content (maximum length: 500) |
Request Body
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="file"; filename="attachment.xlsx"
Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
<File Data
------WebKitFormBoundary7MA4YWxkTrZu0gW--
Response Body
{
"header": {
"isSuccessful": true,
"resultCode": 0,
"resultMessage": "SUCCESS"
}
}
Request Example
### Alimtalk template file attachment inquiries
POST {{endpoint}}/template/v1.0/ALIMTALK/templates/{templateId}/inquiries/do-with-file?fileName=attachment.xlsx
Content-Type: multipart/form-data
X-NC-APP-KEY: {{appKey}}
X-NHN-Authorization: {{authorization}}
--boundary
Content-Disposition: form-data; name="file"; fileName="attachment.xlsx"
Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
< ./file/attachment.xlsx
--boundary--.
curl -X POST "${ENDPOINT}/template/v1.0/ALIMTALK/templates/${TEMPLATE_ID}/inquiries/do-with-file?fileName=attachment.xlsx" \
-H "Content-Type: multipart/form-data" \
-H "X-NC-APP-KEY: ${APP_KEY}" \
-H "X-NHN-Authorization: ${ACCESS_TOKEN}" \
-F "file=@./file/attachment.xlsx"
Request
GET /template/v1.0/ALIMTALK/templates/{templateId}/modifications
Content-Type: application/json
X-NC-APP-KEY: {appKey}
X-NHN-Authorization: {accessToken}
Request Parameter
Name | In | Type | Required | Description |
---|---|---|---|---|
appKey | Header | String | Y | Appkey |
accessToken | Header | String | Y | Authentication Token |
templateId | Path | String | Y | Template ID |
Request Body
This API does not require a request body.
Response Body
{
"header": {
"isSuccessful": true,
"resultCode": 0,
"resultMessage": "SUCCESS"
},
"templates": [
{
"templateId": "Template_Id",
"templateName": "Template_Name",
"categoryId": "Template_Category_Id",
"messageChannel": "ALIMTALK",
"messagePurpose": "NORMAL",
"templateLanguage": "PLAIN_TEXT",
"sender": {
"senderKey": "Sender_Key",
"senderProfileId": "Sender_Profile_Id",
"senderProfileType": "GROUP"
},
"content": {
"templateMessageType": "BA",
"templateEmphasizeType": "NONE",
"templateContent": "#{Name}'s order has been completed",
"templateAd": "Add channel and receive marketing messages from this channel in KakaoTalk",
"templateExtra": "* Due to the real-time nature of reservations, duplicate reservations may occur, and reservations may be canceled if the room is unavailable.\\n* Contact: 1234-1234",
"templateTitle": "123,450won",
"templateSubtitle": "Approval History",
"templateHeader": "Your order has been fulfilled",
"templateItem": {
"list": [
{
"title": "Title",
"description": "Description"
}
],
"summary": {
"title": "Title",
"description": "Description"
}
},
"templateItemHighlight": {
"title": "Title",
"description": "Description",
"attachmentId": "Highlight_image_attachment_id",
"imageUrl": "highlight_image_link"
},
"templateRepresentLink": {
"linkMo": "Mobile_link",
"linkPc": "PC_link",
"schemeIos": "iOS_link",
"schemeAndroid": "Android_link"
},
"attachmentId": "Attachment_File_Id",
"templateImageName": "Image_File_Name",
"templateImageUrl": "Image_link",
"securityFlag": false,
"categoryCode": "999999",
"buttons": [
{
"ordering": 1,
"type": "WL",
"name": "button_name",
"linkMo": "Mobile_link",
"linkPc": "PC_link",
"schemeIos": "iOS_link",
"schemeAndroid": "Android_link",
"bizFormId": 1
}
],
"quickReplies": [
{
"ordering": 1,
"type": "WL",
"name": "Button_Name",
"linkMo": "Mobile_link",
"linkPc": "PC_link",
"schemeIos": "iOS_link",
"schemeAndroid": "Android_link",
"bizFormId": 1
}
]
},
"createdDateTime": "2023-01-01T00:00:00Z",
"updatedDateTime": "2023-01-01T00:00:00Z"
}
],
"totalCount": 1
}
Name | Type | Description |
---|---|---|
templateCode | String | Template code (up to 20 characters) |
templateName | String | Template name (up to 150 characters) |
templateContent | String | Template body (up to 1000 characters) |
templateMessageType | String | Template message types BA: Basic, EX: Enhanced, AD: Added Channel, MI: Mixed (Default: BA) |
templateEmphasizeType | String | Template highlighting type NONE: Default, TEXT: Highlighted, IMAGE: Image, ITEM_LIST: Itemized (Default: NONE) - When selecting TEXT: templateTitle, templateSubtitle required - When selecting IMAGE: templateImageName, templateImageUrl required - When selecting ITEM_LIST: At least one of image, header, item highlights, or item list. |
templateExtra | String | Additional template information Required if the template message type is Informational or Complex |
templateTitle | String | Template title (up to 50 characters) Android: Word wrap for 2 lines, 23 characters or more iOS: Word wrap for 2 lines, 27 characters or more |
templateSubtitle | String | Template secondary copy (up to 50 characters) Android: Handling word truncation when more than 18 characters iOS: Handling word reduction when more than 21 characters are used |
templateHeader | String | Template header (up to 16 characters) |
templateItem | Object | Item |
templateItem.list | Object Array | List of items (minimum 2, maximum 10) |
templateItem.list.title | String | Title (up to 6 characters) |
templateItem.list.description | String | Description (up to 23 characters) |
templateItem.summary | Object | Item summary information |
templateItem.summary.title | String | Title (up to 6 characters) |
templateItem.summary.description | String | Description (variables and monetary units, numbers, commas, and periods only, up to 14 characters) |
templateItemHighlight | Object | Item highlight |
templateItemHighlight.title | String | Title (up to 30 characters, 21 characters if you have a thumbnail image) |
templateItemHighlight.description | String | Description (up to 19 characters, 13 characters if you have a thumbnail image) |
templateItemHighlight.imageUrl | String | Thumbnail image address |
templateRepresentLink | Object | Representative links |
templateRepresentLink.linkMo | String | Mobile web link (up to 500 characters) |
templateRepresentLink.linkPc | String | PC web link (up to 500 characters) |
templateRepresentLink.schemeIos | String | iOS app link (up to 500 characters) |
templateRepresentLink.schemeAndroid | String | Android app link (up to 500 characters) |
templateImageName | String | Image name (name of uploaded file) |
templateImageUrl | String | Image URL |
securityFlag | Boolean | Whether it is a security template For secure messages, such as OTP, click Settings Do not expose message text to devices other than the primary device at the time of sending (default: false) |
categoryCode | String | Template Category Code (see Template Category Lookup API, default: 999999) Lowest priority review for category Other |
buttons | Object Array | List of buttons (up to 5) |
buttons[].ordering | Integer | Button sequence (1~5) |
buttons[].type | String | Button type WL: Web link, AL: App link, DS: Delivery tracking, BK: Bot keyword, MD: Message delivery, BC: Chat conversion, BT: Bot conversion, AC: Add channel, BF: Business form, P1: Secure image delivery plugin ID, P2: Privacy plugin ID, P3: One-click payment plugin ID |
buttons[].name | String | Button name (required, if there's a button, up to 14 characters) |
buttons[].linkMo | String | Mobile web link (required for the WL type, up to 500 characters) |
buttons[].linkPc | String | PC web link (optional field if WL type, maximum 500 characters) |
buttons[].schemeIos | String | iOS app link (required field if AL type, 500 characters max) |
buttons[].schemeAndroid | String | Android app link (required field if AL type, 500 characters max) |
buttons[].bizFormId | Integer | Business form ID (required for BF type) |
buttons[].pluginId | String | Plugin ID (up to 24 characters) |
quickReplies | Object Array | Quick reply list (up to 5) |
quickReplies[].ordering | Integer | Quick reply order (required when quick reply exists) |
quickReplies[].type | String | Direct Connection Type WL: web link, AL: app link, BK: bot keyword, BC: chat conversion, BT: bot conversion, BF: business form |
quickReplies[].name | String | Quick reply name (required when quick reply exists, up to 14 characters) |
quickReplies[].linkMo | String | Mobile web link (required for the WL type, up to 500 characters) |
quickReplies[].linkPc | String | PC web link (optional field if WL type, maximum 500 characters) |
quickReplies[].schemeIos | String | iOS app link (required field if AL type, 500 characters max) |
quickReplies[].schemeAndroid | String | Android app link (required field if AL type, 500 characters max) |
quickReplies[].bizFormId | Integer | Business form ID (required for BF type) |
Request Example
### View AlimTalk template revision history
GET {{endpoint}}/template/v1.0/ALIMTALK/templates/{templateId}/modifications
Content-Type: application/json
X-NC-APP-KEY: {{appKey}}
X-NHN-Authorization: {{authorization}}
curl -X GET "${ENDPOINT}/template/v1.0/ALIMTALK/templates/${TEMPLATE_ID}/modifications" \
-H "Content-Type: application/json" \
-H "X-NC-APP-KEY: ${APP_KEY}" \
-H "X-NHN-Authorization: ${ACCESS_TOKEN}"
Request
POST /template/v1.0/{messageChannel}/categories
Content-Type: application/json
X-NC-APP-KEY: {appKey}
X-NHN-Authorization: {accessToken}
Request Parameter
Name | In | Type | Required | Description |
---|---|---|---|---|
appKey | Header | String | Y | Appkey |
accessToken | Header | String | Y | Authentication Token |
messageChannel | Path | String | Y | Message channels SMS, RCS, ALIMTALK, FRIENDTALK, EMAIL, PUSH |
Request Body
{
"parentCategoryId": "Parent_Category_Id",
"name": "Category_Name"
}
Name | Type | Required | Description |
---|---|---|---|
parentCategoryId | String | Optional | Parent Category ID |
name | String | Required | Category name (up to 50 characters) |
Response Body
{
"header": {
"isSuccessful": true,
"resultCode": 0,
"resultMessage": "SUCCESS"
},
"categoryId": "Category_Id"
}
Request Example
### Create a category
POST {{endpoint}}/template/v1.0/{{messageChannel}}/categories
Content-Type: application/json
X-NC-APP-KEY: {{appKey}}
X-NHN-Authorization: {{authorization}}
{
"parentCategoryId": "Parent_Category_Id",
"name": "Category_Name"
}
curl -X POST "${ENDPOINT}/template/v1.0/${MESSAGE_CHANNEL}/categories" \
-H "Content-Type: application/json" \
-h "x-nc-app-key: ${app_key}" \
-H "X-NHN-Authorization: ${ACCESS_TOKEN}"
-d '{
"parentCategoryId": "Parent_Category_Id",
"name": "Category_Name"
}'
Request
GET /template/v1.0/{messageChannel}/categories
Content-Type: application/json
X-NC-APP-KEY: {appKey}
X-NHN-Authorization: {accessToken}
Request Parameter
Name | In | Type | Required | Description |
---|---|---|---|---|
appKey | Header | String | Y | Appkey |
accessToken | Header | String | Y | Authentication Token |
messageChannel | Path | String | Y | Message channels SMS, RCS, ALIMTALK, FRIENDTALK, EMAIL, PUSH |
Request Body
This API does not require a request body.
Response Body
{
"header": {
"isSuccessful": true,
"resultCode": 0,
"resultMessage": "SUCCESS"
},
"categories": [
{ "categoryId": "category_id
"categoryId": "Category_Id",
"name": "Category name",
"parentCategoryId": "Parent_Category_Id",
"categoryIds": [
"child_category_id"
],
"templateIds": [
"Template_Ids belonging to category"
]
}
]
}
Request Example
### Get list of categories
GET {{endpoint}}/template/v1.0/{{messageChannel}}/categories
Content-Type: application/json
X-NC-APP-KEY: {{appKey}}
X-NHN-Authorization: {{authorization}}
curl -X GET "${ENDPOINT}/template/v1.0/${MESSAGE_CHANNEL}/categories" \
-H "Content-Type: application/json" \
-H "X-NC-APP-KEY: ${APP_KEY}" \
-H "X-NHN-Authorization: ${ACCESS_TOKEN}"
Request
GET /template/v1.0/{messageChannel}/category-tree
Content-Type: application/json
X-NC-APP-KEY: {appKey}
X-NHN-Authorization: {accessToken}
Request Parameter
Name | In | Type | Required | Description |
---|---|---|---|---|
appKey | Header | String | Y | Appkey |
accessToken | Header | String | Y | Authentication Token |
messageChannel | Path | String | Y | Message channels SMS, RCS, ALIMTALK, FRIENDTALK, EMAIL, PUSH |
categoryTemplateName | Query | String | N | Searchable by category or template name and prefix |
senderProfileType | Query | String | N | Sender profile type (GROUP, USER), Notification Chats and Friend Chats only |
senderKey | Query | String | N | Sender ID, Notification Chats and Friend Chats only |
Request Body
This API does not require a request body.
Response Body
{
"header": {
"isSuccessful": true,
"resultCode": 0,
"resultMessage": "SUCCESS"
},
"categories": [
{
"categoryId": "ROOT",
"categoryName": "Root Category",
"parentCategoryId": null,
"messageChannel": "SMS",
"categories": [
{ "categoryName".
"categoryId": "Category_Id",
"categoryName": "category_name",
"parentCategoryId": "ROOT",
"messageChannel": "SMS",
"categories": [
{ "categoryName".
"categoryId": "Category_Id",
"categoryName": "Category_Name",
"parentCategoryId": "6XAeH2yo",
"messageChannel": "SMS",
"categories": [],
"templates": [
{
"templateId": "Template_Id",
"templateName": "template_name"
},
{
"templateId": "Template_Id",
"templateName": "Template_Name"
}
]
}
],
"templates": []
}
],
"templates": []
}
]
}
Name | Type | Description |
---|---|---|
categories.[]categoryId | String | Category ID |
categories.[]categoryName | String | Category name |
categories.[]parentCategoryId | String | Parent Category ID |
categories.[]messageChannel | String | Message channels SMS, RCS, ALIMTALK, FRIENDTALK, EMAIL, PUSH |
categories.[]categories | Object Array | List of subcategories |
categories.[]templates | Object Array | Template list |
categories.[]templates.[]templateId | String | Template ID |
categories.[]templates.[]templateName | String | Template name |
Request Example
### View category tree
GET {{endpoint}}/template/v1.0/{{messageChannel}}/category-tree
Content-Type: application/json
X-NC-APP-KEY: {{appKey}}
X-NHN-Authorization: {{authorization}}
curl -X GET "${ENDPOINT}/template/v1.0/${MESSAGE_CHANNEL}/category-tree" \
-H "Content-Type: application/json" \
-H "X-NC-APP-KEY: ${APP_KEY}" \
-H "X-NHN-Authorization: ${ACCESS_TOKEN}"
Request
GET /template/v1.0/{messageChannel}/categories/{categoryId}
Content-Type: application/json
X-NC-APP-KEY: {appKey}
X-NHN-Authorization: {accessToken}
Request Parameter
Name | In | Type | Required | Description |
---|---|---|---|---|
appKey | Header | String | Y | Appkey |
accessToken | Header | String | Y | Authentication Token |
messageChannel | Path | String | Y | Message channels SMS, RCS, ALIMTALK, FRIENDTALK, EMAIL, PUSH |
categoryId | Path | String | Y | Category ID |
Request Body
This API does not require a request body.
Response Body
{
"header": {
"isSuccessful": true,
"resultCode": 0,
"resultMessage": "SUCCESS"
},
"category": {
"categoryId": "Category_Id",
"categoryName": "Category_Name",
"parentCategoryId": "Parent_Category_Id",
"messageChannel": "SMS",
"categoryIds": [
"child_category_id"
],
"templateIds": [
"Category_belonging_template_id"
]
}
}
Request Example
### Get categories by message channel
GET {{endpoint}}/template/v1.0/{{messageChannel}}/categories/{{categoryId}}
Content-Type: application/json
X-NC-APP-KEY: {{appKey}}
X-NHN-Authorization: {{authorization}}
curl -X GET "${ENDPOINT}/template/v1.0/${MESSAGE_CHANNEL}/categories/{categoryId}" \
-H "Content-Type: application/json" \
-H "X-NC-APP-KEY: ${APP_KEY}" \
-H "X-NHN-Authorization: ${ACCESS_TOKEN}"
Request
PUT /template/v1.0/{messageChannel}/categories/{categoryId}
Content-Type: application/json
X-NC-APP-KEY: {appKey}
X-NHN-Authorization: {accessToken}
Request Parameter
Name | In | Type | Required | Description |
---|---|---|---|---|
appKey | Header | String | Y | Appkey |
accessToken | Header | String | Y | Authentication Token |
messageChannel | Path | String | Y | Message channels SMS, RCS, ALIMTALK, FRIENDTALK, EMAIL, PUSH |
categoryId | Path | String | Y | Category ID |
Request Body
{
"parentCategoryId": "Parent_Category_Id",
"name": "Category_Name"
}
Name | Type | Required | Description |
---|---|---|---|
parentCategoryId | String | Optional | Parent Category ID |
name | String | Required | Category name (up to 50 characters) |
Response Body
{
"header": {
"isSuccessful": true,
"resultCode": 0,
"resultMessage": "SUCCESS"
}
}
Request Example
### Modify a category
PUT {{endpoint}}/template/v1.0/{{messageChannel}}/categories/{{categoryId}}
Content-Type: application/json
X-NC-APP-KEY: {{appKey}}
X-NHN-Authorization: {{authorization}}
{
"parentCategoryId": "Parent_Category_Id",
"name": "Category_Name"
}
curl -X PUT "${ENDPOINT}/template/v1.0/${MESSAGE_CHANNEL}/categories/{categoryId}" \
-H "Content-Type: application/json" \
-h "x-nc-app-key: ${app_key}" \
-H "X-NHN-Authorization: ${ACCESS_TOKEN}" \
-d '{
"parentCategoryId": "Parent_Category_Id",
"name": "Category_Name"
}'
Request
POST /template/v1.0/${MESSAGE_CHANNEL}/categories/${CATEGORY_ID}/templates
Content-Type: application/json
X-NC-APP-KEY: {appKey}
X-NHN-Authorization: {accessToken}
Request Parameter
Name | In | Type | Required | Description |
---|---|---|---|---|
appKey | Header | String | Y | Appkey |
accessToken | Header | String | Y | Authentication Token |
messageChannel | Path | String | Y | Message channels SMS, RCS, ALIMTALK, FRIENDTALK, EMAIL, PUSH |
Request Body
{
"templateId": "template_id"
}
Name | Type | Required | Description |
---|---|---|---|
templateId | String | Required | Template ID |
Response Body
{
"header": {
"isSuccessful": true,
"resultCode": 0,
"resultMessage": "SUCCESS"
}
}
Request Example
### Add template to template category
POST {{endpoint}}/template/v1.0/{{messageChannel}}/categories/{{categoryId}}/templates
Content-Type: application/json
X-NC-APP-KEY: {{appKey}}
X-NHN-Authorization: {{authorization}}
{
"templateId": "template_id"
}
curl -X POST "${ENDPOINT}/template/v1.0/${MESSAGE_CHANNEL}/categories/${CATEGORY_ID}/templates" \
-H "Content-Type: application/json" \
-h "x-nc-app-key: ${app_key}" \
-H "X-NHN-Authorization: ${ACCESS_TOKEN}" \
-d '{
"templateId": "Template_Id"
}'
Request
DELETE /template/v1.0/{messageChannel}/categories/{categoryId}
Content-Type: application/json
X-NC-APP-KEY: {appKey}
X-NHN-Authorization: {accessToken}
Request Parameter
Name | In | Type | Required | Description |
---|---|---|---|---|
appKey | Header | String | Y | Appkey |
accessToken | Header | String | Y | Authentication Token |
messageChannel | Path | String | Y | Message channels SMS, RCS, ALIMTALK, FRIENDTALK, EMAIL, PUSH |
categoryId | Path | String | Y | Category ID |
Request Body
This API does not require a request body.
Response Body
{
"header": {
"isSuccessful": true,
"resultCode": 0,
"resultMessage": "SUCCESS"
}
}
Request Example
### Delete category
DELETE {{endpoint}}/template/v1.0/{{messageChannel}}/categories/{{categoryId}}
Content-Type: application/json
X-NC-APP-KEY: {{appKey}}
X-NHN-Authorization: {{authorization}}
curl -X DELETE "${ENDPOINT}/template/v1.0/${MESSAGE_CHANNEL}/categories/${CATEGORY_ID}" \
-H "Content-Type: application/json" \
-H "X-NC-APP-KEY: ${APP_KEY}" \
-H "X-NHN-Authorization: ${ACCESS_TOKEN}"