Available in Classic and VPC
Request an email delivery. Each delivery request is created as a single resource (requestId), and since delivery is handled asynchronously, this API returns only the receipt result.
Request
This section describes the request format. The method and URI are as follows:
| Method | URI |
|---|---|
| POST | /mail/v2/services/{serviceId}/requests |
Request headers
For information about the request headers common to all Simple & Easy Notification Service APIs, see Simple & Easy Notification Service request headers.
| Field | Required | Description |
|---|---|---|
x-ncp-lang |
Optional | Response message language
|
Request path parameters
You can use the following path parameters with your request:
| Field | Type | Required | Description |
|---|---|---|---|
serviceId |
String | Required | Email service ID
|
Request body
You can include the following data in the body of your request:
| Field | Type | Required | Description |
|---|---|---|---|
senderAddress |
String | Conditional | Sender email address:
|
senderName |
String | Optional | Sender name
|
templateNo |
Integer | Conditional | Template number
|
title |
String | Conditional | Email subject
|
body |
String | Conditional | Email body
|
individual |
Boolean | Optional | Whether to send individually
|
confirmAndSend |
Boolean | Optional | Whether to send after confirmation
|
advertising |
Boolean | Optional | Indicates whether the email is an advertisement.
|
parameters |
Object | Optional | Placeholders applied uniformly to all recipients
|
reservationDateTime |
String | Optional | Scheduled delivery date and time
|
attachFileIds |
Array | Optional | Lists attachment IDs.
|
recipients |
Array | Conditional | Recipient list: recipients
|
recipientGroupFilter |
Object | Conditional | Specify recipients based on contacts groups: recipientGroupFilter
|
useBasicUnsubscribeMessage |
Boolean | Optional | Whether to use the default opt-out message
|
unsubscribeMessage |
String | Optional | Custom opt-out message
|
- If you enter both
recipientsandrecipientGroupFilter, the two lists will be concatenated for processing, and duplicates will not be removed even if the same address appears in both lists. In this case, two emails will be sent to that address, and two messages will be deducted from your monthly sending limit. - If you specify recipients using
recipientGroupFilter, the 100,000-recipient limit does not apply; only the monthly sending limit applies. - Each of
CCandBCCcan have up to 30 recipients. - If the monthly sending limit is exceeded, a
429 ResourceQuotaExceedederror is returned. - The receipt response does not include the delivery status. Immediately after submission, the status is
READYfor immediate delivery orRESERVEDfor scheduled delivery; subsequent statuses can be checked by polling the Get delivery request API. The polling interval follows theretry-afterresponse header of that API.
recipients
The following describes recipients.
| Field | Type | Required | Description |
|---|---|---|---|
address |
String | Required | Recipient email address
|
name |
String | Optional | Recipient name
|
type |
String | Optional | Recipient type
|
parameters |
Object | Optional | Placeholder variable applicable only to the specified recipient
|
recipientGroupFilter
The following describes recipientGroupFilter.
| Field | Type | Required | Description |
|---|---|---|---|
operator |
String | Optional | Group condition combination operator
|
groups |
Array | Required | Lists contacts group names. |
Request example
The request example is as follows:
curl --location --request POST 'https://sens.apigw.ntruss.com/mail/v2/services/ncp:mail:kr:1********2:main/requests' \
--header 'x-ncp-apigw-timestamp: {Timestamp}' \
--header 'x-ncp-iam-access-key: {Access Key}' \
--header 'x-ncp-apigw-signature-v2: {API Gateway Signature}' \
--header 'x-ncp-lang: ko-KR' \
--header 'Content-Type: application/json' \
--data '{
"senderAddress": "no_reply@company.com",
"senderName": "Customer center",
"title": "Hello, ${customer_name}.",
"body": "Your grade has been changed from ${BEFORE_GRADE} to ${AFTER_GRADE}.",
"individual": true,
"advertising": false,
"recipients": [
{
"address": "hongildong@example.com",
"name": "Gildong Hong",
"type": "TO",
"parameters": {
"customer_name": "Gildong Hong",
"BEFORE_GRADE": "SILVER",
"AFTER_GRADE": "GOLD"
}
}
],
"useBasicUnsubscribeMessage": true
}'
Response
This section describes the response format.
Response body
The response body includes the following data:
| Field | Type | Required | Description |
|---|---|---|---|
requestId |
String | - | Delivery request ID
|
requestCount |
Integer | - | Number of emails to be sent
|
createDateTime |
String | - | Delivery request acceptance date and time
|
Response status codes
The following describes the response status codes:
| HTTP status code | Code | Message | Description |
|---|---|---|---|
| 202 | - | Accepted | Delivery request receipt successful |
| 400 | InvalidParameter | Bad Request | Request parameter error
|
| 401 | Unauthorized | Unauthorized | Authentication failed |
| 403 | Forbidden | Forbidden | No permission for the serviceId in the path. |
| 404 | NotFound | Not Found | Resource does not exist at the path. |
| 413 | ContentTooLarge | Content Too Large | Request body size exceeded. |
| 429 | ResourceQuotaExceeded | Too Many Requests | Monthly delivery quota exceeded. |
| 429 | ThrottlingExceeded | Too Many Requests | Call frequency limit exceeded. |
| 500 | InternalServerError | Internal Server Error | Internal server error |
Unlike other APIs in the Simple & Easy Notification Service, the Mail v2 API returns errors in the NCP API standard error format. Instead of the status and error (string) fields in the response body, the error object shown below is returned.
Error response body
The response body includes the following data if the call fails.
| Field | Type | Required | Description |
|---|---|---|---|
error |
Object | - | Error information |
error.errorCode |
String | - | Error code
|
error.message |
String | - | Predefined message for each error code
|
error.detail |
String | - | Detailed reason for each request
|
error.fieldErrors |
Array | - | List of errors by parameter
|
Error response example
The following is a sample response upon a failed call.
{
"error": {
"errorCode": "InvalidParameter",
"message": "The request contains an invalid parameter."
}
}
Response example
The response example is as follows:
{
"requestId": "20260702-R-01K0ZQ8YV3M4N5P6R7S8T9VAWX-777",
"requestCount": 1,
"createDateTime": "2026-07-02T10:00:00+09:00"
}