createAddressBook
- Print
- PDF
createAddressBook
- Print
- PDF
Article Summary
Share feedback
Thanks for sharing your feedback!
Creates an address book by getting recipient addresses or groups in bulk.
The address book status right before creating an address book is returned as a response, and the creation task is processed asynchronously.
The address book is changed through update or insert. (Add new addresses to the existing recipient group, or create a new recipient group)
POST https://{endpoint}/address-book
Request parameters
Parameter name | Required status | Type | Restrictions | Description |
---|---|---|---|---|
groups | Yes | List<AddressBookRequest> | List of recipient groups including email addresses. |
Response
HTTP status code | Description |
---|---|
201 | Request to create an address book was successful. |
400 | Authentication failed, invalid request. |
500 | Server errors |
Example
Request example
POST https://mail.apigw.ntruss.com/api/v1/address-book
{
"groups":[
{
"groupName":"Teens",
"emailAddresses":[
"xxx@naver.com",
...
]
},
{
"groupName":"Male",
"emailAddresses":[
"xxx@daum.net",
...
]
}
]
}
Response example
{
"totalAddressCount": 4300,
"groups": [
{
"sid": 155,
"groupName": "Teens",
"addressCount": 3900
},
{
"sid": 159,
"groupName": "Male",
"addressCount": 1000
}
]
}
Property
Category | Required status | Type | Restrictions | Description |
---|---|---|---|---|
totalAddressCount | Yes | Integer | Total number of email addresses | |
groups | No | List<AddressBookResponse> | List of recipient groups |
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 permission |
403 | 77202 | No request to subscribe the email product |
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?