--- title: "Upload attachment" slug: "sens-sms-attachment-create" updated: 2026-09-17T09:35:44Z published: 2026-09-17T09:35:44Z canonical: "api.ncloud-docs.com/sens-sms-attachment-create" --- > ## Documentation Index > Fetch the complete documentation index at: https://api.ncloud-docs.com/llms.txt > Use this file to discover all available pages before exploring further. # Upload attachment 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](/docs/en/sens-overview#%EC%9A%94%EC%B2%AD%ED%97%A4%EB%8D%94). ### Request path parameters You can use the following path parameters with your request: | Field | Type | Required | Description | | --- | --- | --- | --- | | `serviceId` | String | Required | SMS service ID - See [Get project list](/docs/en/sens-project-list). | ### Request body You can include the following data in the body of your request: | Field | Type | Required | Description | | --- | --- | --- | --- | | `fileName` | String | Required | Attachment name - 0-40 characters - File name with .jpg and .jpeg extensions | | `fileBody` | String | Required | Attachment content (kbyte) - 0-300 - Base64-encoded value of a JPG or JPEG image. - Maximum resolution of 1500 x 1440 allowed. - If a prefix is present, it must be removed. (Example: `data:image/png;base64,`) | Note 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 | - | Attachment ID | | `createTime` | String | - | Attachment creation date and time - YYYY-MM-DDTHH:mm:ss.sss format | | `expireTime` | String | - | Attachment expiration date and time - YYYY-MM-DDTHH:mm:ss.sss format | ### 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](/docs/en/sens-overview#%EC%9D%91%EB%8B%B5%EC%83%81%ED%83%9C%EC%BD%94%EB%93%9C). ### 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" } ```