createTemplate
- Print
- PDF
createTemplate
- Print
- PDF
Article Summary
Share feedback
Thanks for sharing your feedback!
Create a template.
POST https://{endpoint}/template
Request
Request Parameters
Parameter | Required | Type | Limitation | Description |
---|---|---|---|---|
categorySid | No | String | Default:-1 (root) | parent category sid |
templateName | Yes | String | Max:100 | template name |
description | No | String | Max:300 | template description |
title | Yes | String | Max:500 | mail title |
body | Yes | String | mail body | |
senderAddress | Yes | String | sender mail address | |
senderName | No | String | Max:69 | sender name |
isUse | No | Boolean | Default:true | whether to use |
Response
HTTP status code | Description |
---|---|
201 | Template creation completed |
400 | Authentication failed, invalid request. |
500 | Server error |
Example
Request Example
POST https://mail.apigw.ntruss.com/api/v1/template
{
"categorySid": 252,
"templateName": "membershipTemplate",
"description": "Example of creating a template",
"title": "[EN] Naver Cloud Platform",
"body": "Congratulations on your membership.",
"senderAddress": "admin@master.com",
"senderName": "Admin",
"isUse": true
}
Response Example
{
"sid": 258,
"createDate": {
"utc": 1589348863431,
"formattedDate": "2020-05-13",
"formattedDateTime": "2020-05-13 14:47:43 431"
},
"name": "membershipTemplate",
"description": "Example of creating a template",
"title": "[EN] Naver Cloud Platform",
"senderAddress": "admin@master.com",
"senderName": "Admin",
"body": "Congratulations on your membership.",
"isUse": true,
"category": {
"sid": 252,
"parentSid": -1,
"name": "testCategory"
}
}
Properties
Property | Required | Type | Limitation | Description |
---|---|---|---|---|
sid | Yes | Integer | sid of the template you created | |
createDate | Yes | NesDateTime | creation date and time | |
name | Yes | String | The name of the template you created | |
description | No | String | Description of the template you created | |
title | Yes | String | mail title | |
senderAddress | Yes | String | sender mail address | |
senderName | No | String | sender name | |
body | Yes | String | mail body | |
isUse | Yes | Boolean | whether to use | |
category | No | Category | Parent category information |
Error Codes
HTTP status code | Return code | Response message |
---|---|---|
400 | 77101 | Error in login information |
400 | 77102 | BAD_REQUEST |
400 | 77103 | Resource not found |
403 | 77201 | No permissions |
403 | 77202 | No subscription |
405 | 77001 | METHOD_NOT_ALLOWED |
415 | 77002 | UNSUPPORTED_MEDIA_TYPE |
500 | 77301 | Default project not found |
500 | 77302 | Error in working with external system API |
500 | 77303 | Other INTERNAL_SERVER_ERROR |
Was this article helpful?