Notification > Notification Hub > API v1.0 User Guide > Template Category
Delete a template category.
Request
DELETE /template/v1.0/{messageChannel}/categories/{categoryId}
X-NC-APP-KEY: {appKey}
X-NHN-Authorization: Bearer {accessToken}
Request Parameter
| Name | Category | Type | Required | Description |
|---|---|---|---|---|
| X-NC-APP-KEY | Header | String | Y | Appkey |
| X-NHN-Authorization | Header | String | Y | Access token |
| messageChannel | Path | String | Y | Message channel [SMS, RCS, ALIMTALK, 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"
}
}
| Path | Type | Description |
|---|---|---|
| header | Object | |
| header.isSuccessful | Boolean | Indicates whether the request was successful. Default: true |
| header.resultCode | Integer | The result of the request. Default: 0 |
| header.resultMessage | String | The result message of the request. Default: SUCCESS |
Request Example
### Delete a Template Category
DELETE {{endpoint}}/template/v1.0/{{messageChannel}}/categories/{{categoryId}}
X-NC-APP-KEY: {appKey}
X-NHN-Authorization: Bearer {accessToken}
curl -X DELETE "${endpoint}/template/v1.0/${messageChannel}/categories/${categoryId}" \
-H "X-NC-APP-KEY: {appKey}" \
-H "X-NHN-Authorization: Bearer {accessToken}"
Retrieve a template category.
Request
GET /template/v1.0/{messageChannel}/categories/{categoryId}
X-NC-APP-KEY: {appKey}
X-NHN-Authorization: Bearer {accessToken}
Request Parameter
| Name | Category | Type | Required | Description |
|---|---|---|---|---|
| X-NC-APP-KEY | Header | String | Y | Appkey |
| X-NHN-Authorization | Header | String | Y | Access token |
| messageChannel | Path | String | Y | Message channel [SMS, RCS, ALIMTALK, 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" : "A9z0A9z0",
"categoryName" : "delivery confirmation",
"parentCategoryId" : "00000000",
"messageChannel" : "SMS",
"categoryIds" : [ "[1,2,3]" ],
"templateIds" : [ "[11111111,22222222]" ]
}
}
| Path | Type | Description |
|---|---|---|
| header | Object | |
| header.isSuccessful | Boolean | Indicates whether the request was successful. Default: true |
| header.resultCode | Integer | The result code of the request. Default: 0 |
| header.resultMessage | String | The result message of the request. Default: SUCCESS |
| category | Object | |
| category.categoryId | String | Category ID |
| category.categoryName | String | Category name |
| category.parentCategoryId | String | Parent category ID |
| category.messageChannel | String | Message channel [SMS, ALIMTALK, EMAIL, RCS, PUSH] |
| category.categoryIds | Array | A list of category IDs belonging to the category |
| category.templateIds | Array | A list of template IDs belonging to the category |
Request Example
### Retrieve Template Category Details
GET {{endpoint}}/template/v1.0/{{messageChannel}}/categories/{{categoryId}}
X-NC-APP-KEY: {appKey}
X-NHN-Authorization: Bearer {accessToken}
curl -X GET "${endpoint}/template/v1.0/${messageChannel}/categories/${categoryId}" \
-H "X-NC-APP-KEY: {appKey}" \
-H "X-NHN-Authorization: Bearer {accessToken}"
Modify a template category.
Request
PUT /template/v1.0/{messageChannel}/categories/{categoryId}
X-NC-APP-KEY: {appKey}
X-NHN-Authorization: Bearer {accessToken}
Request Parameter
| Name | Category | Type | Required | Description |
|---|---|---|---|---|
| X-NC-APP-KEY | Header | String | Y | Appkey |
| X-NHN-Authorization | Header | String | Y | Access token |
| messageChannel | Path | String | Y | Message channel [SMS, RCS, ALIMTALK, EMAIL, PUSH] |
| categoryId | Path | String | Y | Category ID |
Request Body
{
"name" : "delivery confirmation",
"parentCategoryId" : "00000000"
}
| Path | Type | Required | Description |
|---|---|---|---|
| Name | String | Y | Category name |
| ParentCategoryId | String | N | Parent category ID |
Response Body
{
"header" : {
"isSuccessful" : true,
"resultCode" : 0,
"resultMessage" : "SUCCESS"
}
}
| Path | Type | Description |
|---|---|---|
| header | Object | |
| header.isSuccessful | Boolean | Indicates whether the request was successful. Default: true |
| header.resultCode | Integer | The result code of the request. Default: 0 |
| header.resultMessage | String | The result message of the request. Default: SUCCESS |
Request Example
### Modify a Template Category
PUT {{endpoint}}/template/v1.0/{{messageChannel}}/categories/{{categoryId}}
X-NC-APP-KEY: {appKey}
X-NHN-Authorization: Bearer {accessToken}
{
"name" : "delivery confirmation",
"parentCategoryId" : "00000000"
}
curl -X PUT "${endpoint}/template/v1.0/${messageChannel}/categories/${categoryId}" \
-H "X-NC-APP-KEY: {appKey}" \
-H "X-NHN-Authorization: Bearer {accessToken}" \
-d '{
"name" : "delivery confirmation",
"parentCategoryId" : "00000000"
}'
Add a template to a category.
Request
POST /template/v1.0/{messageChannel}/categories/{categoryId}/templates
X-NC-APP-KEY: {appKey}
X-NHN-Authorization: Bearer {accessToken}
Request Parameter
| Name | Category | Type | Required | Description |
|---|---|---|---|---|
| X-NC-APP-KEY | Header | String | Y | Appkey |
| X-NHN-Authorization | Header | String | Y | Access token |
| messageChannel | Path | String | Y | Message channel [SMS, RCS, ALIMTALK, EMAIL, PUSH] |
| categoryId | Path | String | Y | Category ID |
Request Body
{
"templateId" : "11111111"
}
| Path | Type | Required | Description |
|---|---|---|---|
| templateId | String | N | Template ID |
Response Body
{
"header" : {
"isSuccessful" : true,
"resultCode" : 0,
"resultMessage" : "SUCCESS"
}
}
| Path | Type | Description |
|---|---|---|
| header | Object | |
| header.isSuccessful | Boolean | Indicates whether the request was successful. Default: true |
| header.resultCode | Integer | The result code of the request. Default: 0 |
| header.resultMessage | String | The result message of the request. Default: SUCCESS |
요청 예시
### Add a Template to a Category
POST {{endpoint}}/template/v1.0/{{messageChannel}}/categories/{{categoryId}}/templates
X-NC-APP-KEY: {appKey}
X-NHN-Authorization: Bearer {accessToken}
{
"templateId" : "11111111"
}
curl -X POST "${endpoint}/template/v1.0/${messageChannel}/categories/${categoryId}/templates" \
-H "X-NC-APP-KEY: {appKey}" \
-H "X-NHN-Authorization: Bearer {accessToken}" \
-d '{
"templateId" : "11111111"
}'
List template categories.
Request
GET /template/v1.0/{messageChannel}/categories
X-NC-APP-KEY: {appKey}
X-NHN-Authorization: Bearer {accessToken}
Request Parameter
| Name | Category | Type | Required | Description |
|---|---|---|---|---|
| X-NC-APP-KEY | Header | String | Y | Appkey |
| X-NHN-Authorization | Header | String | Y | Access token |
| messageChannel | Path | String | Y | Message channel [SMS, RCS, ALIMTALK, EMAIL, PUSH] |
Request Body
This API does not require a request body.
Response Body
{
"header" : {
"isSuccessful" : true,
"resultCode" : 0,
"resultMessage" : "SUCCESS"
},
"categories" : [ {
"categoryId" : "A9z0A9z0",
"categoryName" : "delivery confirmation",
"parentCategoryId" : "00000000",
"messageChannel" : "SMS",
"categoryIds" : [ "[1,2,3]" ],
"templateIds" : [ "[11111111,22222222]" ]
} ]
}
| Path | Type | Description |
|---|---|---|
| header | Object | |
| header.isSuccessful | Boolean | Indicates whether the request was successful. Default: true |
| header.resultCode | Integer | The result code of the request. Default: 0 |
| header.resultMessage | String | The result message of the request. Default: SUCCESS |
| categories | Array | |
| categories[].categoryId | String | Category ID |
| categories[].categoryName | String | Category name |
| categories[].parentCategoryId | String | Parent category ID |
| categories[].messageChannel | String | Message channel [SMS, ALIMTALK, EMAIL, RCS, PUSH] |
| categories[].categoryIds | Array | A list of category IDs belonging to the category |
| categories[].templateIds | Array | A list of template IDs belonging to the category |
Request Example
### List Template Categories
GET {{endpoint}}/template/v1.0/{{messageChannel}}/categories
X-NC-APP-KEY: {appKey}
X-NHN-Authorization: Bearer {accessToken}
curl -X GET "${endpoint}/template/v1.0/${messageChannel}/categories" \
-H "X-NC-APP-KEY: {appKey}" \
-H "X-NHN-Authorization: Bearer {accessToken}"
Register template categories.
Request
POST /template/v1.0/{messageChannel}/categories
X-NC-APP-KEY: {appKey}
X-NHN-Authorization: Bearer {accessToken}
Request Parameter
| Name | Category | Type | Required | Description |
|---|---|---|---|---|
| X-NC-APP-KEY | Header | String | Y | Appkey |
| X-NHN-Authorization | Header | String | Y | Access token |
| messageChannel | Path | String | Y | Message channel [SMS, RCS, ALIMTALK, EMAIL, PUSH] |
Request Body
{
"parentCategoryId" : "00000000",
"name" : "delivery confirmation"
}
| Path | Type | Required | Description |
|---|---|---|---|
| parentCategoryId | String | N | Parent category ID |
| name | String | Y | Category name |
Response Body
{
"header" : {
"isSuccessful" : true,
"resultCode" : 0,
"resultMessage" : "SUCCESS"
},
"categoryId" : "String - Default and Example is not provided."
}
| Path | Type | Description |
|---|---|---|
| header | Object | |
| header.isSuccessful | Boolean | Indicates whether the request was successful. Default: true |
| header.resultCode | Integer | The result code of the request. Default: 0 |
| header.resultMessage | String | The result message of the request. Default: SUCCESS |
| categoryId | String | No description |
Request Example
### Register Template Categories
POST {{endpoint}}/template/v1.0/{{messageChannel}}/categories
X-NC-APP-KEY: {appKey}
X-NHN-Authorization: Bearer {accessToken}
{
"parentCategoryId" : "00000000",
"name" : "delivery confirmation"
}
curl -X POST "${endpoint}/template/v1.0/${messageChannel}/categories" \
-H "X-NC-APP-KEY: {appKey}" \
-H "X-NHN-Authorization: Bearer {accessToken}" \
-d '{
"parentCategoryId" : "00000000",
"name" : "delivery confirmation"
}'
Retrieve a template category hierarchy.
Request
GET /template/v1.0/{messageChannel}/category-trees
X-NC-APP-KEY: {appKey}
X-NHN-Authorization: Bearer {accessToken}
Request Parameter
| Name | Category | Type | Required | Description |
|---|---|---|---|---|
| X-NC-APP-KEY | Header | String | Y | Appkey |
| X-NHN-Authorization | Header | String | Y | Access token |
| messageChannel | Path | String | Y | Message channel [SMS, RCS, ALIMTALK, EMAIL, PUSH] |
| categoryTemplateName | Query | String | N | Category/template name |
| senderProfileType | Query | String | N | Sender profile type [GROUP, NORMAL] |
| senderKey | Query | String | N | Sender key |
| status | Query | String | N | Template status |
Request Body
This API does not require a request body.
Response Body
{
"header" : {
"isSuccessful" : true,
"resultCode" : 0,
"resultMessage" : "SUCCESS"
},
"categories" : [ {
"categoryId" : "A9z0A9z0",
"categoryName" : "delivery confirmation",
"parentCategoryId" : "00000000",
"messageChannel" : "SMS",
"categories" : null,
"templates" : [ {
"templateId" : "11111111",
"templateName" : "delivery confirmation template"
} ]
} ]
}
| Path | Type | Description |
|---|---|---|
| header | Object | |
| header.isSuccessful | Boolean | Indicates whether the request was successful. Default: true |
| header.resultCode | Integer | The result code of the request. Default: 0 |
| header.resultMessage | String | The result message of the request. Default: SUCCESS |
| categories | Array | |
| categories[].categoryId | String | Category ID, root category |
| categories[].categoryName | String | Category name, root category |
| categories[].parentCategoryId | String | Parent category ID |
| categories[].messageChannel | String | Message channel [SMS, ALIMTALK, EMAIL, RCS, PUSH] |
| categories[].categories | Array | List of categories belonging to a category |
| categories[].templates | Array | List of templates belonging to a category |
Request Example
### Retrieve a Template Category Hierarchy
GET {{endpoint}}/template/v1.0/{{messageChannel}}/category-trees
X-NC-APP-KEY: {appKey}
X-NHN-Authorization: Bearer {accessToken}
curl -X GET "${endpoint}/template/v1.0/${messageChannel}/category-trees" \
-H "X-NC-APP-KEY: {appKey}" \
-H "X-NHN-Authorization: Bearer {accessToken}"