[API Domain]
| Environment | Domain |
|---|---|
| Real | https://email.api.nhncloudservice.com |
[Header]
Content-Type: application/json;charset=UTF-8
[Caution for Curl Example]
[URL]
| Http method | URI |
|---|---|
| POST | /email/v1.5/appKeys/{appKey}/sender/mail |
[Path Parameter]
| Value | Type | Description |
|---|---|---|
| appKey | String | Original appKey |
[Request Body]
| Value | Type | Required | Description |
|---|---|---|---|
| senderAddress | String | O | Sender's mail address |
| senderName | String | X | Sender's name |
| requestDate | String | X | Enter current time when delivery time is missing (yyyy-MM-dd HH:mm:ss) |
| title | String | O | Title |
| body | String | O | Body |
| attachFileIdList | List:String | X | ID of uploaded attachment |
| templateId | String | X | ID of delivery template |
| templateParameter | Object | X | Replacement parameter (to enter mail title/body for replacement) |
| - #key# | String | X | Replacement key (##key##) |
| - #value# | Object | X | Mapped value for replacement key |
| receiverList | List | O | List of recipients Send up to 1,000 persons (including recipients and cc recipients) |
| - receiveMailAddr | String | O | Recipient's email address |
| - receiveName | String | X | Recipient's name |
| - receiveType | String | O | Recipient type (MRT0: recipient , MRT1: Cc, MRT2: Bcc) |
| customHeaders | Map | X | Custom Header |
| senderGroupingKey | String | X | Sender's group key |
| userId | String | X | Delimiter of delivery e.g.) admin, system |
[Caution]
[Example 1]
curl -X POST -H "Content-Type: application/json;charset=UTF-8" https://email.api.nhncloudservice.com/email/v1.5/appKeys/{appKey}/sender/mail -d '{"senderAddress":"support@nhnent.com","senderName":"sender's name","title":"sample title","body":"sample body","receiverList":[{"receiveMailAddr":"customer1@nhnent.com","receiveName":"customer1","receiveType":"MRT0"},{"receiveMailAddr":"customer2@nhnent.com","receiveName":"customer2","receiveType":"MRT1"}],"userId":"USER"}'
[Example 2 - Using Templates]
curl -X POST -H "Content-Type: application/json;charset=UTF-8" https://email.api.nhncloudservice.com/email/v1.5/appKeys/{appKey}/sender/mail -d '{"templateId":"TEMPLATE1","templateParameter":{"key":"value"},"receiverList":[{"receiveMailAddr":"customer1@nhnent.com","receiveName":"customer1","receiveType":"MRT0"},{"receiveMailAddr":"customer2@nhnent.com","receiveName":"customer2","receiveType":"MRT1"}],"userId":"USER"}'
{
"header": {
"isSuccessful": boolean,
"resultCode": Integer,
"resultMessage": String
},
"body": {
"data": {
"requestId": String,
"results": [
{
"receiveMailAddr": String,
"receiveName": String,
"receiveType": String,
"resultCode": Integer,
"resultMessage": String
}
]
}
}
}
| Value | Type | Description |
|---|---|---|
| header | Object | Header area |
| - isSuccessful | Boolean | Successful or not |
| - resultCode | Integer | Failure code |
| - resultMessage | String | Failure message |
| body | Object | Body area |
| - data | Object | Data area |
| -- requestId | String | Request ID |
| -- results | List | Delivery result |
| --- receiveMailAddr | String | Recipient's mail address |
| --- receiveName | String | Recipient's name |
| --- receiveType | String | Recipient type (MRT0: recipients , MRT1: Cc, MRT2: Bcc) |
| --- resultCode | Integer | Result code of recipient delivery request |
| --- resultMessage | String | Result message of recipient delivery request |
[URL]
| Http method | URI |
|---|---|
| POST | /email/v1.5/appKeys/{appKey}/sender/eachMail |
[Path Parameter]
| Value | Type | Description |
|---|---|---|
| appKey | String | Original appKey |
[Request Body]
| Value | Type | Required | Description |
|---|---|---|---|
| senderAddress | String | O | Sender's mail |
| senderName | String | X | Sender's name |
| requestDate | String | X | Enter current time when delivery time is missing (yyyy-MM-dd HH:mm:ss) |
| title | String | O | Title |
| body | String | O | Body |
| attachFileIdList | List:Integer | X | ID for uploaded attached file |
| templateType | String | X | Template type DEFAULT(default), FREEMARKER) |
| templateId | String | X | ID for delivery template |
| receiverList | List | O | List of recipients Send up to 1,000 persons |
| - receiveMailAddr | String | O | Recipient's mail address |
| - receiveName | String | X | Recipient's name |
| - templateParameter | Object | X | Replacement parameter (to enter mail title/body for replacement) |
| -- #key# | String | X | Replacement key (##key##) |
| -- #value# | Object | X | Mapped value for replacement key |
| customHeaders | Map | X | Custom Header |
| senderGroupingKey | String | X | Sender's group key |
| userId | String | X | Delimiter for delivery e.g.) admin,system |
[Caution]
[Example 1]
curl -X POST -H "Content-Type: application/json;charset=UTF-8" https://email.api.nhncloudservice.com/email/v1.5/appKeys/{appKey}/sender/eachMail -d '{"senderAddress":"support@nhnent.com","senderName":"sender's name","title":"sample title","body":"sample body","attachFileIdList":[1, 2],"receiverList":[{"receiveMailAddr":"customer1@nhnent.com","receiveName":"customer1"}],"userId":"USER"}'
[Example 2 - Using Templates]
curl -X POST -H "Content-Type: application/json;charset=UTF-8" https://email.api.nhncloudservice.com/email/v1.5/appKeys/{appKey}/sender/mail -d '{"templateId":"TEMPLATE1","receiverList":[{"receiveMailAddr":"customer1@nhnent.com","receiveName":"customer1","templateParameter":{"key":"value"}}],"userId":"USER"}'
{
"header": {
"isSuccessful": boolean,
"resultCode": Integer,
"resultMessage": String
},
"body": {
"data": {
"requestId": String,
"results": [
{
"receiveMailAddr": String,
"receiveName": String,
"receiveType": String,
"resultCode": Integer,
"resultMessage": String
}
]
}
}
}
| Value | Type | Description |
|---|---|---|
| header | Object | Header area |
| - isSuccessful | Boolean | Successful or not |
| - resultCode | Integer | Failure code |
| - resultMessage | String | Failure message |
| body | Object | Body area |
| - data | Object | Data area |
| -- requestId | String | Request ID |
| -- results | List | Delivery result |
| --- receiveMailAddr | String | Recipient's mail address |
| --- receiveName | String | Recipient's name |
| --- receiveType | String | Recipient type (MRT0: recipients , MRT1: Cc, MRT2: Bcc) |
| --- resultCode | Integer | Result code of recipient delivery request |
| --- resultMessage | String | Result message of recipient delivery request |
[URL]
| Http method | URI |
|---|---|
| POST | /email/v1.5/appKeys/{appKey}/sender/ad-mail |
[Example 1]
curl -X POST -H "Content-Type: application/json;charset=UTF-8" https://email.api.nhncloudservice.com/email/v1.5/appKeys/{appKey}/sender/ad-mail -d '{"senderAddress":"support@nhnent.com","senderName":"sender's name","title":"(AD)sample title","body":"sample body <br /> ##BLOCK_RECEIVER_LINK## <br />##EN_BLOCK_RECEIVER_LINK##","receiverList":[{"receiveMailAddr":"customer1@nhnent.com","receiveName":"customer1","receiveType":"MRT0"},{"receiveMailAddr":"customer2@nhnent.com","receiveName":"customer2","receiveType":"MRT1"}],"userId":"USER"}'
[Example 2 - Using Templates]
curl -X POST -H "Content-Type: application/json;charset=UTF-8" https://email.api.nhncloudservice.com/email/v1.5/appKeys/{appKey}/sender/ad-mail -d '{"templateId":"TEMPLATE1","templateParameter":{"key":"value"},"receiverList":[{"receiveMailAddr":"customer1@nhnent.com","receiveName":"customer1","receiveType":"MRT0"},{"receiveMailAddr":"customer2@nhnent.com","receiveName":"customer2","receiveType":"MRT1"}],"userId":"USER"}'
[URL]
| Http method | URI |
|---|---|
| POST | /email/v1.5/appKeys/{appKey}/sender/ad-eachMail |
[Example 1]
curl -X POST -H "Content-Type: application/json;charset=UTF-8" https://email.api.nhncloudservice.com/email/v1.5/appKeys/{appKey}/sender/ad-eachMail -d '{"senderAddress":"support@nhnent.com","senderName":"sender's name","title":"(AD) sample title","body":"sample body <br /> ##BLOCK_RECEIVER_LINK## <br />##EN_BLOCK_RECEIVER_LINK##","attachFileIdList":[1, 2],"receiverList":[{"receiveMailAddr":"customer1@nhnent.com","receiveName":"customer1"}],"userId":"USER"}'
[Example 2 - Using Templates]
curl -X POST -H "Content-Type: application/json;charset=UTF-8" https://email.api.nhncloudservice.com/email/v1.5/appKeys/{appKey}/sender/ad-eachMail -d '{"templateId":"TEMPLATE1","receiverList":[{"receiveMailAddr":"customer1@nhnent.com","receiveName":"customer1","templateParameter":{"key":"value"}}],"userId":"USER"}'
[URL]
| Http method | URI |
|---|---|
| POST | /email/v1.5/appKeys/{appKey}/sender/auth-mail |
[Path Parameter]
| Value | Type | Description |
|---|---|---|
| appKey | String | Original appKey |
[Request Body]
| Value | Type | Required | Description |
|---|---|---|---|
| senderAddress | String | O | Sender's address |
| senderName | String | X | Sender's name |
| requestDate | String | X | Enter current time when delivery time is missing (yyyy-MM-dd HH:mm:ss) |
| title | String | O | Title |
| body | String | O | Body |
| templateId | String | X | ID for delivery template |
| receiver | Object | O | Recipient |
| - receiveMailAddr | String | O | Recipient's mail address |
| - receiveName | String | X | Recipient's name |
| - templateParameter | Object | X | Replacement parameter (to enter mail title/body for replacement) |
| -- #key# | String | X | Replacement key (##key##) |
| -- #value# | Object | X | Mapped value for replacement key |
| customHeaders | Map | X | Custom Header |
| userId | String | X | Delimiter for delivery e.g.) admin,system |
[Caution]
Features of authenticated mails are as follows:
[Example 1]
curl -X POST -H "Content-Type: application/json;charset=UTF-8" https://email.api.nhncloudservice.com/email/v1.5/appKeys/{appKey}/sender/auth-mail -d '{"senderAddress":"support@nhnent.com","senderName":"sender's name","title":"sample title","body":"sample body","receiver":{"receiveMailAddr":"customer1@nhnent.com","receiveName":"customer1"},"userId":"USER"}'
[Example 2 - Using Templates]
curl -X POST -H "Content-Type: application/json;charset=UTF-8" https://email.api.nhncloudservice.com/email/v1.5/appKeys/{appKey}/sender/auth-mail -d '{"templateId":"TEMPLATE1","receiver":{"receiveMailAddr":"customer1@nhnent.com","receiveName":"customer1","templateParameter":{"key":"value"}},"userId":"USER"}'
{
"header": {
"isSuccessful":boolean,
"resultCode":Integer,
"resultMessage":String
},
"body": {
"data": {
"requestId":String,
"statusCode":String
}
}
}
| Value | Type | Description |
|---|---|---|
| header | Object | Header area |
| - isSuccessful | Boolean | Successful or not |
| - resultCode | Integer | Failure code |
| - resultMessage | String | Failure message |
| body | Object | Body area |
| - data | Object | Data area |
| -- requestId | String | Request ID |
| -- statusCode | String | Request status code (Y: preparing for sending , N: Preparing for sending failed) |
| ### Upload Attached Files |
[URL]
| Http method | URI |
|---|---|
| POST | /email/v1.5/appKeys/{appKey}/attachfile/binaryUpload |
[Path Parameter]
| Value | Type | Description |
|---|---|---|
| appKey | String | Original appKey |
[Request Body]
{
"fileName": String,
"createUser": String,
"fileBody": Byte[]
}
| Value | Type | Required | Description |
|---|---|---|---|
| fileName | String | O | File name |
| fileBody | Byte[] | O | Byte[] of a file |
| createUser | String | X | File uploader information |
[Example]
curl -X POST -H "Content-Type: application/json;charset=UTF-8" https://email.api.nhncloudservice.com/email/v1.5/appKeys/{appKey}/attachfile/binaryUpload -d '{"fileName":"file.csv","createUser":"USER","fileBody":[]}'
{
"header": {
"isSuccessful": Boolean,
"resultCode": Integer,
"resultMessage": String
},
"body": {
"data": {
"fileId": Integer,
"fileName": String
}
}
}
| Value | Type | Description |
|---|---|---|
| header | Object | Header area |
| - isSuccessful | Boolean | Successful or not |
| - resultCode | Integer | Failure code |
| - resultMessage | String | Failure message |
| body | Object | Body area |
| - data | Object | Data area |
| -- fileId | Integer | File ID |
| -- fileName | String | File name |
* title: Hello, ##title_name## !!
* body: We send ##body_content##.
->
* title: Hello, clouc customer1 !!
* body: We send test2.
* title: Hello, ${title_name}!!
* body: We send ${body_content}.
->
* title: Hello, cloud customer1!!
* body: We send test2.
{
"senderAddress" : "support@nhnent.com",
"templateId": "template1",
"templateParameter" : {"title_name": "cloud customer1", "body_content": "test1"},
"receiverList" : [
{
"receiveMailAddr" : "customer1@nhnent.com",
"receiveType" : "MRT0"
}
],
"userId" : "tester"
}
{
"senderAddress" : "support@nhnent.com",
"templateId": "template1",
"receiverList" : [
{
"receiveMailAddr" : "customer1@nhnent.com",
"templateParameter" : {"title_name": "cloud customer1", "body_content": "test1"}
},
{
"receiveMailAddr" : "customer2@nhnent.com",
"templateParameter" : {"title_name": "cloud customer2", "body_content": "test2"}
}
],
"userId" : "tester"
}
[URL]
| Http method | URI |
|---|---|
| GET | /email/v1.5/appKeys/{appKey}/sender/mails |
[Path Parameter]
| Value | Type | Description |
|---|---|---|
| appKey | String | Original appKey |
[Query Parameter]
| Value | Type | Required | Description |
|---|---|---|---|
| requestId | String | O | Request ID |
| startSendDate | String | O | Delivery start date (yyyy-MM-dd HH:mm:ss) |
| endSendDate | String | X | Delivery end date (yyyy-MM-dd HH:mm:ss) |
| startReceiveDate | String | X | Receiving start date (yyyy-MM-dd HH:mm:ss) |
| endReceiveDate | String | X | Receiving end date (yyyy-MM-dd HH:mm:ss) |
| senderAddress | String | X | Sender's mail address |
| senderName | String | X | Sender's name |
| receiveMailAddr | String | X | Recipient's mail address |
| templateId | String | X | Template number |
| mailStatusCode | String | X | Delivery status code SST0: Preparing for sending, SST1: Sending, SST2: Sending completed, SST3: Sending failed, SST7: Not Authenticated |
| isReceived | Boolean | X | Received or Not |
| isOpened | Boolean | X | Opened or Not |
| senderGroupingKey | String | X | Sender's group key |
| pageNum | Integer | X | Page number (default: 1) |
| pageSize | Integer | X | Number of queries (default: 15) |
[Example]
curl -X GET -H "Content-Type: application/json;charset=UTF-8" "https://email.api.nhncloudservice.com/email/v1.5/appKeys/{appKey}/sender/mails?startSendDate=2018-03-01+00%3A00&endSendDate=2018-03-07+23%3A59&pageSize=10"
{
"header": {
"isSuccessful": true,
"resultCode": 0,
"resultMessage": "SUCCESS"
},
"body": {
"pageNum": 1,
"pageSize": 10,
"totalCount": 1,
"data": [
{
"requestId": "20190101000000ABCDEFG0",
"mailSeq": 0,
"requestDate": "2019-01-01 00:00:00",
"templateId": "Template",
"templateName": "Template Name",
"senderName": "Sender",
"senderAddress": "sender@nhn.com",
"title": "Title",
"mailStatusCode": "SST2",
"mailStatusName": "발송완료",
"isReceived": true,
"resultDate": "2019-01-01 00:00:00",
"isOpened": true,
"openedDate": "2019-01-01 00:00:00",
"receiveMailAddr": "receiver@nhn.com",
"receiveType": "MRT0",
"receiveTypeName": "받는사람",
"receiveName": "Receiver",
"senderGroupingKey": "A_GROUP"
}
]
}
}
| Value | Type | Description |
|---|---|---|
| header | Object | Header area |
| - isSuccessful | Boolean | Successful or not |
| - resultCode | Integer | Failure code |
| - resultMessage | String | Failure message |
| body | Object | Body area |
| - pageNum | Integer | Current page number |
| - pageSize | Integer | Number of queried data |
| - totalCount | Integer | Number of total data |
| - data | List | Data area |
| -- requestId | String | Request ID |
| -- mailSeq | String | Mail sequence |
| -- requestDate | String | Date and time of sending |
| -- templateId | String | Template ID |
| -- templateName | String | Template name |
| -- senderName | String | Sender's name |
| -- senderAddress | String | Sender's mail address |
| -- title | String | Title |
| -- mailStatusCode | String | Delivery status code SST0: Preparing Delivery, SST1: Delivering, SST2: Delivery Completed, SST3: Delivery Failed, SST7: Not Authenticated |
| -- mailStatusName | String | Name of delivery status |
| -- isReceived | Boolean | Received or Not |
| -- resultDate | String | Date and Time of Receiving |
| -- isOpened | Boolean | Opened or Not |
| -- openedDate | String | Date and Time of Opening |
| -- receiveMailAddr | String | Recipient's mail address |
| -- receiveType | String | Recipient type (MRT0: recipient, MRT1: cc, MRT2: bcc) |
| -- receiveTypeName | String | Name of recipient type |
| -- receiveName | String | Name of recipient |
| -- senderGroupingKey | String | Sender's group key |
[URL]
| Http method | URI |
|---|---|
| GET | /email/v1.5/appKeys/{appKey}/sender/mail/{requestId}/{mailSeq} |
[Path Parameter]
| Value | Type | Description |
|---|---|---|
| appKey | String | Original appKey |
| requestId | String | Request ID |
| mailSeq | Integer | Mail sequence |
[Example]
curl -X GET -H "Content-Type: application/json;charset=UTF-8" "https://email.api.nhncloudservice.com/email/v1.5/appKeys/{appKey}/sender/mail/{requestId}/{mailSeq}"
{
"header": {
"isSuccessful": true,
"resultCode": 0,
"resultMessage": "SUCCESS"
},
"body": {
"data": {
"requestId": "20190101000000ABCDEFG0",
"mailSeq": 0,
"requestIp": "127.0.0.1",
"requestDate": "2019-01-01 00:00:00",
"mailStatusCode": "SST2",
"mailStatusName": "발송완료",
"templateId": "Template",
"templateName": "Template Name",
"senderName": "Sender",
"senderAddress": "sender@nhn.com",
"resultId": "<20190101000000ABCDEFG0@test>",
"title": "Title",
"body": "Body",
"receiverList": [
{
"requestId": "20190101000000ABCDEFG0",
"mailSeq": 0,
"receiveType": "MRT0",
"receiveTypeName": "받는사람",
"receiveName": "Receiver",
"receiveMailAddr": "receiver@nhn.com",
"isReceived": true,
"resultDate": "2019-01-01 00:00:00",
"isOpened": true,
"openedDate": "2019-01-01 00:00:00"
}
],
"attachFileList": [
{
"fileType": "MAIL",
"fileId": 1,
"fileName": "test.jpg",
"filePath": "file/path",
"fileSize": 1,
"createDate": "2019-01-01 00:00:00"
}
],
"customHeaders": {
"Content-Type": "text/html"
},
"senderGroupingKey": "A_GROUP"
}
}
}
| Value | Type | Description |
|---|---|---|
| header | Object | Header area |
| - isSuccessful | Boolean | Successful or not |
| - resultCode | Integer | Failure code |
| - resultMessage | String | Failure message |
| body | Object | Body area |
| - data | Object | Data area |
| -- requestId | String | Request ID |
| -- mailSeq | Integer | Mail sequence |
| -- requestIp | String | Request IP |
| -- requestDate | String | Date and time of requesting |
| -- mailStatusCode | String | Delivery status |
| -- mailStatusName | String | Name of delivery status |
| -- templateId | String | Template ID |
| -- templateName | String | Template name |
| -- senderName | String | Sender's name |
| -- senderAddress | String | Sender's mail address |
| -- resultId | String | Mail delivery ID |
| -- title | String | Mail title |
| -- body | String | Mail body |
| -- receiverList | List | List of recipients |
| --- requestId | String | Request ID |
| --- mailSeq | Integer | Mail sequence |
| --- receiveType | String | Recipient type MRT0: to , MRT1: cc, MRT2: bcc |
| --- receiveTypeName | String | Name of recipient type |
| --- receiveName | String | Recipient's name |
| --- receiveMailAddr | String | Recipient's mail address |
| --- isReceived | Boolean | Received or Not |
| --- resultDate | String | Date and Time of Receiving |
| --- isOpened | Boolean | Opened or Not |
| --- openedDate | String | Date and Time of Opening |
| -- attachFileList | List | List of attached files |
| --- fileType | String | Type of attached files MAIL: files attached to mail, TEMPLATE: files attached to template |
| --- fileId | Integer | File ID |
| --- fileName | String | Name of attached file |
| --- filePath | String | Path of attached file |
| --- fileSize | Integer | Size of attached file (byte) |
| --- createDate | String | Date and time of creation |
| -- customHeaders | Map | Custom Header |
| -- senderGroupingKey | String | Sender's group key |
[URL]
| Http method | URI |
|---|---|
| GET | /email/v1.5/appKeys/{appKey}/categories |
[Path parameter]
| Value | Type | Description |
|---|---|---|
| appKey | String | Original appKey |
[Query parameter]
| Value | Type | Required | Description |
|---|---|---|---|
| useYn | String | X | Use or Not: Y, N |
| categoryParentId | Integer | X | Parent category ID |
| pageNum | Integer | X | Page number (default: 1) |
| pageSize | Integer | X | Number of queries (default: 15) |
[Example]
curl -X GET -H "Content-Type: application/json;charset=UTF-8" "https://email.api.nhncloudservice.com/email/v1.5/appKeys/{appKey}/categories?useYn=Y&categoryParentId=1&pageNum=1&pageSize=10"
{
"header": {
"isSuccessful": true,
"resultCode": 0,
"resultMessage": "SUCCESS"
},
"body": {
"pageNum": 1,
"pageSize": 15,
"totalCount": 3,
"data": [
{
"categoryId": 12345,
"categoryParentId": 0,
"depth": 0,
"categoryName": "Category",
"categoryDesc": "Top Category",
"useYn": "Y",
"createUser": "user",
"createDate": "2019-07-23 00:00:00.0",
"updateUser": "user",
"updateDate": "2019-07-23 00:00:00.0",
}
]
}
}
| Value | Type | Description |
|---|---|---|
| header | Object | Header area |
| - isSuccessful | Boolean | Successful or not |
| - resultCode | Integer | Failure code |
| - resultMessage | String | Failure message |
| body | Object | Body area |
| - pageNum | Integer | Current page number |
| - pageSize | Integer | Queried data count |
| - totalCount | Integer | Total data count |
| - data | List | Data area |
| -- categoryId | Integer | Category ID |
| -- categoryParentId | Integer | Parent category ID (0, for the highest-level category) |
| -- depth | Integer | Depth (0, for the highest-level category) |
| -- categoryName | String | Category name |
| -- categoryDesc | String | Category description |
| -- useYn | String | Use or not |
| -- createUser | String | Creator |
| -- createDate | String | Date and time of creation |
| -- updateUser | String | Modifier |
| -- updateDate | String | Date and time of modification |
[URL]
| Http method | URI |
|---|---|
| GET | /email/v1.5/appKeys/{appKey}/categories/{categoryId} |
[Path parameter]
| Value | Type | Description |
|---|---|---|
| appKey | String | Original appKey |
| categoryId | String | Category ID |
[Example]
curl -X GET -H "Content-Type: application/json;charset=UTF-8" "https://email.api.nhncloudservice.com/email/v1.5/appKeys/{appKey}/categories/{categoryId}"
{
"header": {
"isSuccessful": true,
"resultCode": 0,
"resultMessage": "SUCCESS"
},
"body": {
"data": {
"categoryId": 12345,
"categoryParentId": 0,
"depth": 0,
"categoryName": "Category",
"categoryDesc": "Top Category",
"useYn": "Y",
"createUser": "user",
"createDate": "2019-07-23 00:00:00.0",
"updateUser": "user",
"updateDate": "2019-07-23 00:00:00.0"
}
}
}
| Value | Type | Description |
|---|---|---|
| header | Object | Header area |
| - isSuccessful | Boolean | Successful or not |
| - resultCode | Integer | Failure code |
| - resultMessage | String | Failure message |
| body | Object | Body area |
| - data | List | Data area |
| -- categoryId | Integer | Category ID |
| -- categoryParentId | Integer | Parent category ID (0, for the highest-level category) |
| -- depth | Integer | Depth (0, for the highest-level category) |
| -- categoryName | String | Category name |
| -- categoryDesc | String | Category description |
| -- useYn | String | Use or not |
| -- createUser | String | Creator |
| -- createDate | String | Date and time of creation |
| -- updateUser | String | Modifier |
| -- updateDate | String | Date and time of modification |
[URL]
| Http method | URI |
|---|---|
| POST | /email/v1.5/appKeys/{appKey}/categories |
[Path parameter]
| Value | Type | Description |
|---|---|---|
| appKey | String | Original appKey |
[Request body]
| Value | Type | Max Length | Required | Description |
|---|---|---|---|---|
| categoryParentId | Integer | - | X | Parent category ID Highest-level category ID (default) |
| categoryName | String | 200 | O | Category name |
| categoryDesc | String | 1000 | X | Category description |
| useYn | String | 1 | X | Use or not: Y (default), N |
| userId | String | 50 | X | User ID |
[Example]
curl -X POST -H "Content-Type: application/json;charset=UTF-8" https://email.api.nhncloudservice.com/email/v1.5/appKeys/{appKey}/categories -d '{"categoryParentId":12345,"categoryName":"Category","categoryDesc":"Top Category","useYn":"Y","userId":"USER"}'
{
"header": {
"isSuccessful": true,
"resultCode": 0,
"resultMessage": "SUCCESS"
},
"body": {
"data": {
"categoryId": 12346
}
}
}
| Value | Type | Description |
|---|---|---|
| header | Object | Header area |
| - isSuccessful | Boolean | Successful or not |
| - resultCode | Integer | Failure code |
| - resultMessage | String | Failure message |
| body | Object | Body area |
| - data | Object | Data area |
| -- categoryId | Integer | Cateogry ID |
[URL]
| Http method | URI |
|---|---|
| PUT | /email/v1.5/appKeys/{appKey}/categories/{categoryId} |
[Path parameter]
| Value | Type | Description |
|---|---|---|
| appKey | String | Original appKey |
| categoryId | Integer | Category ID |
[Request body]
| Value | Type | Max Length | Required | Description |
|---|---|---|---|---|
| categoryName | String | 200 | X | Category name |
| categoryDesc | String | 1000 | X | Category description |
| useYn | String | 1 | X | Use or not: Y, N |
| userId | String | 50 | X | User ID |
[Example]
curl -X PUT -H "Content-Type: application/json;charset=UTF-8" https://email.api.nhncloudservice.com/email/v1.5/appKeys/{appKey}/categories/{categoryId} -d '{"categoryName":"Category","categoryDesc":"Top Category","useYn":"Y","userId":"USER"}'
{
"header": {
"isSuccessful": true,
"resultCode": 0,
"resultMessage": "SUCCESS"
}
| Value | Type | Description |
|---|---|---|
| header | Object | Header area |
| - isSuccessful | Boolean | Successful or not |
| - resultCode | Integer | Failure code |
| - resultMessage | String | Failure message |
[URL]
| Http method | URI |
|---|---|
| DELETE | /email/v1.5/appKeys/{appKey}/categories/{categoryId} |
[Path parameter]
| Value | Type | Description |
|---|---|---|
| appKey | String | Original appKey |
| categoryId | Integer | Category ID |
[Example]
curl -X DELETE -H "Content-Type: application/json;charset=UTF-8" https://email.api.nhncloudservice.com/email/v1.5/appKeys/{appKey}/categories/{categoryId}
{
"header": {
"isSuccessful": true,
"resultCode": 0,
"resultMessage": "SUCCESS"
}
}
| Value | Type | Description |
|---|---|---|
| header | Object | Header area |
| - isSuccessful | Boolean | Successful or not |
| - resultCode | Integer | Failure code |
| - resultMessage | String | Failure message |
[URL]
| Http method | URI |
|---|---|
| GET | /email/v1.5/appKeys/{appKey}/templates |
[Path Parameter]
| Value | Type | Description |
|---|---|---|
| appKey | String | Original appKey |
[Query Parameter]
| Value | Type | Required | Description |
|---|---|---|---|
| categoryId | Integer | X | Category ID |
| useYn | String | X | Use or Not (Y/N) |
| pageNum | Integer | X | Page number (default: 1) |
| pageSize | Integer | X | Number of queries (default: 15) |
| all | Boolean | X | Query list of all templates or not |
[Example]
curl -X GET -H "Content-Type: application/json;charset=UTF-8" "https://email.api.nhncloudservice.com/email/v1.5/appKeys/{appKey}/templates?useYn=Y&pageNum=1&pageSize=10"
{
"header": {
"resultCode": Integer,
"resultMessage": String,
"isSuccessful": Boolean
},
"body": {
"pageNum": Integer,
"pageSize": Integer,
"totalCount": Integer,
"data": [
{
"templateId": String,
"categoryId": Integer,
"categoryName": String,
"templateName": String,
"templateDesc": String,
"useYn": String,
"delYn": String,
"title": String,
"createDate": String,
"updateDate": String
}
]
}
}
| Value | Type | Description |
|---|---|---|
| header | Object | Header area |
| - isSuccessful | Boolean | Successful or not |
| - resultCode | Integer | Failure code |
| - resultMessage | String | Failure message |
| body | Object | Body area |
| - pageNum | Integer | Current page number |
| - pageSize | Integer | Number of queried data |
| - totalCount | Integer | Total number of data |
| - data | List | Data area |
| -- templateId | String | Template ID |
| -- categoryId | Integer | Category ID |
| -- categoryName | String | Category name |
| -- templateName | String | Template name |
| -- templateDesc | String | Template description |
| -- useYn | String | Use or not |
| -- delYn | String | Delete or not |
| -- title | String | Title |
| -- createDate | String | Date and time of creation |
| -- updateDate | String | Date and time of modification |
[URL]
| Http method | URI |
|---|---|
| GET | /email/v1.5/appKeys/{appKey}/templates/{templateId} |
[Path Parameter]
| Value | Type | Description |
|---|---|---|
| appKey | String | Original appKey |
| templateId | String | Template ID |
[Example]
curl -X GET -H "Content-Type: application/json;charset=UTF-8" "https://email.api.nhncloudservice.com/email/v1.5/appKeys/{appKey}/templates/{templateId}"
{
"header": {
"resultCode": Integer,
"resultMessage": String,
"isSuccessful": Boolean
},
"body": {
"data": {
"templateId": String,
"categoryId": Integer,
"categoryName": String,
"templateName": String,
"templateDesc": String,
"useYn": String,
"delYn": String,
"sendMailAddress": String,
"title": String,
"templateType": String,
"body": String,
"createDate": String,
"updateDate": String,
"attachFileList": [
{
"fileType": String,
"fileId": Integer,
"fileName": String,
"filePath": String,
"fileSize": Integer,
"createDate": String
}
]
}
}
}
| Value | Type | Description |
|---|---|---|
| header | Object | Header area |
| - isSuccessful | Boolean | Successful or not |
| - resultCode | Integer | Failure code |
| - resultMessage | String | Failure message |
| body | Object | Body area |
| - data | List | Data area |
| -- templateId | String | Template ID |
| -- categoryId | Integer | Category ID |
| -- categoryName | String | Category name |
| -- templateName | String | Template name |
| -- templateDesc | String | Template description |
| -- useYn | String | Use or not (Y= In use, N= Not in use) |
| -- delYn | String | Delete or not (Y= Delete, N= Not delete) |
| -- sendMailAddress | String | Sender's mail address |
| -- title | String | Mail address |
| -- templateType | String | Template type DEFAULT(default), FREEMARKER) |
| -- body | String | Body |
| -- createDate | String | Date and time of creation |
| -- updateDate | String | Date and time of modification |
| -- attachFileList | List | List of attached files |
| --- fileType | String | Attachment type (MAIL: Files attached to mail, TEMPLATE: Files attached to template) |
| --- fileId | Integer | File ID |
| --- fileName | String | Name of attached file |
| --- filePath | String | Path of attached file |
| --- fileSize | Integer | Size of attached file (byte) |
| --- createDate | String | Date and time of creation |
[URL]
| Http method | URI |
|---|---|
| POST | /email/v1.5/appKeys/{appKey}/templates |
[Path parameter]
| Value | Type | Description |
|---|---|---|
| appKey | String | Original appKey |
[Request body]
| Value | Type | Max Length | Required | Description |
|---|---|---|---|---|
| categoryId | Integer | - | O | Category ID |
| templateId | String | 50 | O | Template ID |
| templateName | String | 200 | O | Template name |
| templateDesc | String | 4000 | X | Template description |
| useYn | String | 1 | X | Use or not: Y (default), N |
| sendMailAddress | String | 300 | O | Sender's mail address |
| title | String | 500 | O | Mail title |
| templateType | String | 10 | X | Template type DEFAULT (default), FREEMARKER |
| body | String | - | O | Mail body |
| attachFileIdList | List |
- | X | Attached file ID (fileId) |
| userId | String | 50 | X | User ID |
[Example]
curl -X POST -H "Content-Type: application/json;charset=UTF-8" https://email.api.nhncloudservice.com/email/v1.5/appKeys/{appKey}/templates -d '{"categoryId":1,"templateId":"TEAMPLTE_ID","templateName":"Template name","templateDesc":"Template description","useYn":"Y","sendMailAddress":"test@nhn.com","title":"Mail title","templateType":"DEFAULT","body":"Mail body","attachFileIdList":[1,2,3],"userId":"USER"}'
{
"header": {
"isSuccessful": true,
"resultCode": 0,
"resultMessage": "SUCCESS"
}
}
| Value | Type | Description |
|---|---|---|
| header | Object | Header area |
| - isSuccessful | Boolean | Successful or not |
| - resultCode | Integer | Failure code |
| - resultMessage | String | Failure message |
[URL]
| Http method | URI |
|---|---|
| POST | /email/v1.5/appKeys/{appKey}/templates/attachfile/binaryUpload |
[Path parameter]
| Value | Type | Description |
|---|---|---|
| appKey | String | Original appKey |
[Request body]
| Value | Type | Max Length | Required | Description |
|---|---|---|---|---|
| fileName | String | - | O | File name |
| fileBody | Byte[] | - | O | Byte [] value |
| userId | String | 50 | X | User ID |
[Example]
curl -X POST -H "Content-Type: application/json;charset=UTF-8" https://email.api.nhncloudservice.com/email/v1.5/appKeys/{appKey}/templates/attachfile/binaryUpload -d '{"fileName":"file.csv","userId":"USER","fileBody":[]}'
{
"header": {
"isSuccessful": true,
"resultCode": 0,
"resultMessage": "SUCCESS"
},
"body": {
"data": {
"fileId": 1,
"fileName": "file.csv"
}
}
}
| Value | Type | Description |
|---|---|---|
| header | Object | Header area |
| - isSuccessful | Boolean | Successful or not |
| - resultCode | Integer | Failure code |
| - resultMessage | String | Failure message |
| body | Object | Body area |
| - data | Object | Data area |
| -- fileId | Integer | File ID |
| -- fileName | String | File name |
[URL]
| Http method | URI |
|---|---|
| PUT | /email/v1.5/appKeys/{appKey}/templates/{templateId} |
[Path parameter]
| Value | Type | Description |
|---|---|---|
| appKey | String | Original appKey |
| templateId | String | Template ID |
[Request body]
| Value | Type | Max Length | Required | Description |
|---|---|---|---|---|
| templateName | String | 200 | X | Template name |
| templateDesc | String | 4000 | X | Template description |
| useYn | String | 1 | X | Use or not: Y, N |
| sendMailAddress | String | 300 | X | Sender's mail address |
| title | String | 500 | X | Mail title |
| templateType | String | 10 | X | Template type DEFAULT (default), FREEMARKER |
| body | String | - | X | Mail body |
| attachFileIdList | List |
- | X | Attached file ID (fileId) |
| userId | String | 50 | X | User ID |
[Example]
curl -X PUT -H "Content-Type: application/json;charset=UTF-8" https://email.api.nhncloudservice.com/email/v1.5/appKeys/{appKey}/templates/{templateId} -d '{"templateName":"template name","templateDesc":"template description","useYn":"Y","sendMailAddress":"test@nhn.com","title":"mail title","templateType":"DEFAULT","body":"mail body","attachFileIdList":[1,2,3],"userId":"USER"}'
{
"header": {
"isSuccessful": true,
"resultCode": 0,
"resultMessage": "SUCCESS"
}
}
| Value | Type | Description |
|---|---|---|
| header | Object | Header area |
| - isSuccessful | Boolean | Successful or not |
| - resultCode | Integer | Failure code |
| - resultMessage | String | Failure message |
[URL]
| Http method | URI |
|---|---|
| DELETE | /email/v1.5/appKeys/{appKey}/templates/{templateId} |
[Path parameter]
| Value | Type | Description |
|---|---|---|
| appKey | String | Original appKey |
| templateId | String | Template ID |
[Example]
curl -X DELETE -H "Content-Type: application/json;charset=UTF-8" https://email.api.nhncloudservice.com/email/v1.5/appKeys/{appKey}/templates/{templateId}
{
"header": {
"isSuccessful": true,
"resultCode": 0,
"resultMessage": "SUCCESS"
}
}
| Value | Type | Description |
|---|---|---|
| header | Object | Header area |
| - isSuccessful | Boolean | Successful or not |
| - resultCode | Integer | Failure code |
| - resultMessage | String | Failure message |
| ## Query Statistics |
[URL]
| Http method | URI |
|---|---|
| GET | /email/v1.5/appKeys/{appKey}/statistics/view |
[Path Parameter]
| Value | Type | Description |
|---|---|---|
| appKey | String | Original appKey |
[Query Parameter]
| Value | Type | Required | Description |
|---|---|---|---|
| from | String | O | Start date of statistical query yyyy-mm-dd HH:mm |
| to | String | O | End date of statistical query yyyy-mm-dd HH:mm |
| searchType | String | O | Statistics Type DATE: By date, TIME: By time, DAY: By day |
| mailTypes | String | X | Mail Type NORMAL: General, MASS: Mass Multiple inputs are available (mailTypes=NORMAL&mailTypes=MASS) |
| adYn | String | X | Ad or not Y: Ad, N: Not an ad All, if left blank |
| templateId | String | X | Template ID |
[Example]
curl -X GET -H "Content-Type: application/json;charset=UTF-8" "https://email.api.nhncloudservice.com/email/v1.5/appKeys/{appKey}/statistics/view?from=2018-03-21+00%3A00&to=2018-03-23+00%3A00&searchType=DATE&mailTypes=NORMAL&adYn=Y&templateId=templateId1"
{
"isSuccessful": Boolean,
"resultCode": Integer,
"resultMessage": String
},
"body" : {
"data" : [
{
"divisionName": String,
"requestedCount": long,
"sentCount": long,
"receivedCount": long,
"openedCount": long,
"sentRate": String,
"receivedRate": String,
"openedRate": String
}
]
}
}
| Value | Type | Description |
|---|---|---|
| header | Object | Header area |
| - isSuccessful | Boolean | Successful or not |
| - resultCode | Integer | Failure code |
| - resultMessage | String | Failure message |
| body | Object | Body area |
| - data | List | Data area |
| -- divisionName | String | Statistical criteria (date/time/day) |
| -- requestedCount | Long | Number of delivery requests |
| -- sentCount | Long | Number of deliveries |
| -- receivedCount | Long | Number of receipts |
| -- openedCount | Long | Number of openings |
| -- sentRate | String | Delivery rate |
| -- receivedRate | String | Receiving rate |
| -- openedRate | String | Opening rate |
[URL]
| Http method | URI |
|---|---|
| GET | /email/v1.5/appKeys/{appKey}/block-receivers |
[Path Parameter]
| Value | Type | Description |
|---|---|---|
| appKey | String | Original appKey |
[Query Parameter]
| Value | Type | Required | Description |
|---|---|---|---|
| mailAddress | String | X | Email address registered on the list of rejections |
| startBlockDate | String | X | Start date of rejection (yyyy-MM-dd HH:mm:ss) |
| endBlockDate | String | X | End date of rejection (yyyy-MM-dd HH:mm:ss) |
| pageNum | Integer | X | Page number (default: 1) |
| pageSize | Integer | X | Number of queries (default: 15) |
[Example]
curl -X GET -H "Content-Type: application/json;charset=UTF-8" "https://email.api.nhncloudservice.com/email/v1.5/appKeys/{appKey}/block-receivers?mailAddress=customer1@nhnent.com&pageNum=1&pageSize=10"
{
"header": {
"isSuccessful": Boolean,
"resultCode": Integer,
"resultMessage": String
},
"body": {
"totalCount": Integer,
"data": [
{
"mailAddress": String,
"blockDate": String
}
]
}
}
| Value | Type | Description |
|---|---|---|
| header | Object | Header area |
| - isSuccessful | Boolean | Successful or not |
| - resultCode | Integer | Failure code |
| - resultMessage | String | Failure message |
| body | Object | Body area |
| - pageNum | Integer | Current page number |
| -pageSize | Integer | Number of queried data |
| - totalCount | Integer | Total number of data |
| - data | List | Data area |
| -- mailAddress | String | Email address to reject |
| -- blockDate | String | Date of rejection (yyyy-MM-dd HH:mm:ss.S) |
[URL]
| Http method | URI |
|---|---|
| POST | /email/v1.5/appKeys/{appKey}/block-receivers |
[Request Body]
| Value | Type | Required | Description |
|---|---|---|---|
| blockReceiverList | ㅣList | O | List of rejections |
| - mailAddress | String | O | Email address to reject |
| - blockDate | String | X | Date of rejection (yyyy-MM-dd HH:mm:ss) |
[Example]
curl -X POST -H "Content-Type: application/json;charset=UTF-8" https://email.api.nhncloudservice.com/email/v1.5/appKeys/{appKey}/block-receivers -d '{"blockReceiverList":[{"mailAddress":"customer1@nhnent.com","blockDate":"2018-03-01 00:00:00"}]}'
{
"header": {
"isSuccessful": Boolean,
"resultCode": Integer,
"resultMessage": String
}
}
| Value | Type | Description |
|---|---|---|
| header | Object | Header area |
| - isSuccessful | Boolean | Successful or not |
| - resultCode | Integer | Failure code |
| - resultMessage | String | Failure message |
[URL]
| Http method | URI |
|---|---|
| PUT | /email/v1.5/appKeys/{appKey}/block-receivers |
[Request Body]
| Value | Type | Required | Description |
|---|---|---|---|
| deleted | Boolean | O | Field specifying rejections are deleted |
| blockReceiverList | ㅣList | O | List of rejections |
| - mailAddress | String | O | Email address rejecting ads |
[Example]
curl -X PUT -H "Content-Type: application/json;charset=UTF-8" https://email.api.nhncloudservice.com/email/v1.5/appKeys/{appKey}/block-receivers -d '{"deleted":true,"blockReceiverList":[{"mailAddress":"customer1@nhnent.com"}]}'
{
"header": {
"isSuccessful": Boolean,
"resultCode": Integer,
"resultMessage": String
}
}
| Value | Type | Description |
|---|---|---|
| header | Object | Header area |
| - isSuccessful | Boolean | Successful or not |
| - resultCode | Integer | Failure code |
| - resultMessage | String | Failure message |