Available in Classic and VPC
Upload a file for sending an MMS.
Request
This section describes the request format. The method and URI are as follows:
| Method | URI |
|---|---|
| POST | /sms/v2/services/{serviceId}/files |
Request headers
For information about the headers common to all Simple & Easy Notification Service APIs, see Simple & Easy Notification Service request headers.
Request path parameters
You can use the following path parameters with your request:
| Field | Type | Required | Description |
|---|---|---|---|
serviceId |
String | Required | SMS service ID
|
Request body
You can include the following data in the body of your request:
| Field | Type | Required | Description |
|---|---|---|---|
fileName |
String | Required | Attachment name
|
fileBody |
String | Required | Attachment content (kbyte)
|
If a file with the same name and file size as the file you are uploading already exists, the file is recognized as the same file and reused. (Retained for 6 days)
Request example
The request example is as follows:
curl --location --request POST 'https://sens.apigw.ntruss.com/sms/v2/services/ncp:sms:kr:50*********1:sens/files' \
--header 'x-ncp-apigw-timestamp: {Timestamp}' \
--header 'x-ncp-iam-access-key: {Access Key}' \
--header 'x-ncp-apigw-signature-v2: {API Gateway Signature}' \
--header 'Content-Type: application/json' \
--data '{
"fileName": "G0ufjqMy3wBpCucJenTaU.jpg",
"fileBody": "/9j/4QC8RXhpZgAASUkqAAgAAAAGABIBAwABAAA...AAAAAAAAAAAAAAAAAAAAAAAAAAH/9k="
}'
Response
This section describes the response format.
Response body
The response body includes the following data:
| Field | Type | Required | Description |
|---|---|---|---|
fileId |
String | Required | Attachment ID |
createTime |
String | Required | Attachment creation date and time
|
expireTime |
String | Required | Attachment expiration date and time
|
Response status codes
For information about the HTTP status codes common to all Simple & Easy Notification Service APIs, see Simple & Easy Notification Service response status codes.
Response example
The response example is as follows:
{
"fileId": "a136************************74f7",
"createTime": "2025-11-25T10:12:47.520",
"expireTime": "2025-11-27T10:12:47.520"
}