SMS API
  • PDF

SMS API

  • PDF

Basic information

API URL

https://sens.apigw.ntruss.com/sms/v2

Go to SENS SMS API Swagger

API Header

Item Mandatory Description
Content-Type Mandatory Specifies the request body content type as an application/json (POST)
x-ncp-apigw-timestamp Mandatory - This is the number of milliseconds that have elapsed since January 1, 1970 00:00:00 (UTC).
- If the time difference compared to the API Gateway server is more than 5 minutes, then the request is considered invalid.
x-ncp-iam-access-key Mandatory This is the access key ID issued by the portal or Sub Account
x-ncp-apigw-signature-v2 Mandatory - Signature of the body in the previous example encrypted with secretkey mapped to access key id
- HMAC encryption algorithm is HMAC-SHA256

NAVER Cloud Platform authentication key and Signature creation guide

Messages

Send message

This sends SMS/LMS/MMS messages.

Request URL

POST https://sens.apigw.ntruss.com/sms/v2/services/{serviceId}/messages

Content-Type: application/json; charset=utf-8
x-ncp-apigw-timestamp: {Timestamp}
x-ncp-iam-access-key: {Sub Account Access Key}
x-ncp-apigw-signature-v2: {API Gateway Signature}

Path Variables

Item Mandatory Type Description Remarks
serviceId Mandatory String Service ID Service ID issued when registering the project

Headers

Go to API header

Requested body

{
    "type":"(SMS | LMS | MMS)",
    "contentType":"(COMM | AD)",
    "countryCode":"string",
    "from":"string",
    "subject":"string",
    "content":"string",
    "messages":[
        {
            "to":"string",
            "subject":"string",
            "content":"string"
        }
    ],
    "files":[
        {
            "name":"string",
            "body":"string"
        }
    ],
    "reserveTime": "yyyy-MM-dd HH:mm",
    "reserveTimeZone": "string",
    "scheduleCode": "string"
}
Item Mandatory Type Description Remarks
type Mandatory String SMS Type SMS, LMS, MMS (lowercase)
contentType Optional String Message type - COMM: Regular message
- AD: Ad message
- default: COMM
countryCode Optional String Country number - Available to send to countries provided by SENS only
- default: 82
- Country list of international SMS delivery
from Mandatory String Caller ID Only the pre-registered caller ID can be used
subject Optional String Title of default message Only available in LMS and MMS
- LMS, MMS: Up to 40 bytes
content Mandatory String Content of default message - SMS: Up to 80 bytes
- LMS, MMS: Up to 2000 bytes
messages Mandatory Object Message information - Refer to items below (messages.XXX)
- Up to 100
messages.to Mandatory String Called number Only numbers except (-) can be entered
messages.subject Optional String Title of individual message Only available in LMS and MMS
- LMS, MMS: Up to 40 bytes
messages.content Optional String Content of individual message - SMS: Up to 80 bytes
- LMS, MMS: Up to 2000 bytes
files.name Optional String File name - Only available in MMS
- Space cannot be used
-*. File name with jpg and *. jpeg extension
- Up to 40 characters
files.body Optional String File body - Only available in MMS
- Space cannot be used
Values that encoded *. jpg and *. jpeg images as Base64
- Up to 300 KB per original file
- Up to 40 characters for the file name
- Resolution up to 1500 * 1440
reserveTime Optional String Reserved date and time Reserved date and time for message delivery (yyyy-MM-dd HH:mm)
reserveTimeZone Optional String Time zone of reserved date and time - Time zone of reserved date and time (default: Asia/Seoul)
- List of supported time zones
- Use the TZ database name value
scheduleCode Optional String Schedule code Schedule code to be registered
Caution
  • If the maximum supported size is exceeded, some contents will be cut off and sent.
  • A message (subject, content) is encoded based on EUC-KR, and the message will be unable to be sent if it contains unsupported emoji characters.
Note
  • If the subject and content are not specified in the messages, the values designated as default subject and content are sent.
  • The subject and content in the messages have priority over the default subject and content.
  • It is MMS type, but if there is no file to attach, it is sent as LMS.
  • If reserveTime and scheduleCode are both requested, it is processed as a reserved delivery. (Reserved delivery has a higher priority.)

Response body

{
    "requestId":"string",
    "requestTime":"string",
    "statusCode":"string",
    "statusName":"string"
}
Item Mandatory Type Description Remarks
requestId Mandatory String Request ID
requestTime Mandatory DateTime Request time
statusCode Mandatory String Request status code - 202: Success
- Others: failed
- Follows the HTTP status specification.
statusName Mandatory String Request status name - success: Success
- Fail: failed

Response status

HTTP Status Desc
202 Accept (successfully requested)
400 Bad Request
401 Unauthorized
403 Forbidden
404 Not Found
429 Too Many Requests
500 Internal Server Error

Search message delivery request

Search the message delivery request.

Request URL

GET https://sens.apigw.ntruss.com/sms/v2/services/{serviceId}/messages?requestId=

x-ncp-apigw-timestamp: {Timestamp}
x-ncp-iam-access-key: {Sub Account Access Key}
x-ncp-apigw-signature-v2: {API Gateway Signature}

Path Variables

Item Mandatory Type Description Remarks
serviceId Mandatory String Service ID Service ID issued when registering the project

Parameters

Item Mandatory Type Description Remarks
requestId Mandatory String Request ID Delivery request ID

Headers

Go to API header

Requested body

NA

Response body

{
    "requestId":"string",
    "statusCode":"string",
    "statusName":"string",
    "messages":[
        {
            "messageId":"string",
            "requestTime":"string",
            "contentType":"string",
            "countryCode":"string",
            "from":"string",
            "to":"string"
        }
    ]
}
Item Mandatory Type Description Remarks
requestId Mandatory String Request ID
statusCode Mandatory String Request status code - 202: Success
- Others: failed
- Follows the HTTP status specification.
statusName Mandatory String Request status name - success: Success
- reserved: Being reserved
- scheduled: Being scheduled
- Fail: failed
messages.messageId Mandatory String Message ID
messages.requestTime Mandatory DateTime Delivery request time
messages.contentType Mandatory String Message type - COMM: Regular message
- AD: Ad message
messages.countryCode Mandatory String Country number
messages.from Mandatory String Caller ID
messages.to Mandatory String Called number

Response status

HTTP Status Desc
200 OK (successfully requested)
400 Bad Request
401 Unauthorized
403 Forbidden
404 Not Found
500 Internal Server Error

Search message delivery result

Search the message delivery result.

Request URL

GET https://sens.apigw.ntruss.com/sms/v2/services/{serviceId}/messages/{messageId}

x-ncp-apigw-timestamp: {Timestamp}
x-ncp-iam-access-key: {Sub Account Access Key}
x-ncp-apigw-signature-v2: {API Gateway Signature}

Path Variables

Item Mandatory Type Description Remarks
serviceId Mandatory String Service ID Service ID issued when registering the project
messageId Mandatory String Message ID Message identifier that is returned when searching the message sending requests

Headers

Go to API header

Requested body

NA

Response body

{
    "statusCode":"string",
    "statusName":"string",
    "messages":[
        {
            "requestTime":"string",
            "contentType":"string",
            "content":"string",
            "countryCode":"string",
            "from":"string",
            "to":"string",
            "status":"string",
            "statusCode":"string",
            "statusMessage":"string",
            "statusName":"string",
            "completeTime":"string",
            "telcoCode":"string",
            "files":[
                {
                    "name":"string"
                }
            ]
        }
    ]
}
Item Mandatory Type Description Remarks
statusCode Mandatory String Message delivery status to the messaging server - 200: Success
- Others: failed
statusName Mandatory String Name of the status of sending a message to the messaging server - success: Success
- Fail: failed
messages.requestTime Mandatory DateTime Request time
messages.contentType Mandatory String Message type - COMM: Regular message
- AD: Ad message
messages.content Mandatory String Message content It is possible to view the content requested for delivery as it is or to send the actual content according to the length limit for each type of request
messages.countryCode Mandatory String Country number
messages.from Mandatory String Caller ID
messages.to Mandatory String Called number
messages.status Mandatory String Delivery status in the messaging server - READY: ready
- PROCESSING: being processed
- COMPLETED: processing completed
messages.statusCode Mandatory String Code of device reception status result Refer to the Errors table.
messages.statusName Mandatory String Name of device reception status result
messages.statusMessage Mandatory String Message of device reception status result
messages.completeTime Mandatory DateTime Delivery completion time
messages.telcoCode Mandatory String Network operator code
files.name Optional String Name of attached file Only available in MMS

Response status

HTTP Status Desc
200 OK (successfully requested)
400 Bad Request
401 Unauthorized
403 Forbidden
404 Not Found
500 Internal Server Error

Reserved message

Search reserved message status

Search the reservation status of message delivery.

GET https://sens.apigw.ntruss.com/sms/v2/services/{serviceId}/reservations/{reserveId}/reserve-status

x-ncp-apigw-timestamp: {Timestamp}
x-ncp-iam-access-key: {Sub Account Access Key}
x-ncp-apigw-signature-v2: {API Gateway Signature}

Path Variables

Item Mandatory Type Description Remarks
serviceId Mandatory String Service ID Service ID issued when registering the project
reserveId Mandatory String Reserved message ID Message identifier that is returned when searching the reserved delivery requests (requestId)

Headers

Go to API header

Requested body

NA

Response body

{
  "reserveId": "string",
  "reserveTimeZone": "string",
  "reserveTime": "string",
  "reserveStatus": "string"
}
Item Mandatory Type Description Remarks
reserveId Mandatory String Reserved message ID Message identifier that is returned when searching the reserved delivery requests (requestId)
reserveTime Mandatory String Reserved date and time Reserved date and time for message delivery (yyyy-MM-dd HH:mm)
reserveTimeZone Mandatory String Time zone of reserved date and time - Time zone of reserved date and time (default: Asia/Seoul)
- List of supported time zones
- Use the TZ database name value
reserveStatus Mandatory String Reserved status - READY: Waiting to be sent
- PROCESSING: Requesting delivery
- CANCELED: Delivery canceled
- FAIL: Delivery request failure
- DONE: Successful delivery request
- STALE: Delivery request failure (timeout)

Response status

HTTP Status Desc
200 OK (successfully searched)
400 Bad Request
401 Unauthorized
403 Forbidden
404 Not Found
500 Internal Server Error

Cancel reserved message

Cancel the reserved message delivery.

DELETE https://sens.apigw.ntruss.com/sms/v2/services/{serviceId}/reservations/{reserveId}

x-ncp-apigw-timestamp: {Timestamp}
x-ncp-iam-access-key: {Sub Account Access Key}
x-ncp-apigw-signature-v2: {API Gateway Signature}

Path Variables

Item Mandatory Type Description Remarks
serviceId Mandatory String Service ID Service ID issued when registering the project
reserveId Mandatory String Reserved message ID Message identifier that is returned when searching the reserved delivery requests (requestId)

Headers

Go to API header

Requested body

NA

Response body

NA

Response status

HTTP Status Desc
204 No Content (successfully deleted)
400 Bad Request
401 Unauthorized
403 Forbidden
404 Not Found
500 Internal Server Error

Scheduled message

Cancel scheduled message

Cancel the message delivery schedule.

DELETE https://sens.apigw.ntruss.com/sms/v2/services/{serviceId}/schedules/{scheduleCode}/messages/{messageId}

x-ncp-apigw-timestamp: {Timestamp}
x-ncp-iam-access-key: {Sub Account Access Key}
x-ncp-apigw-signature-v2: {API Gateway Signature}

Path Variables

Item Mandatory Type Description Remarks
serviceId Mandatory String Service ID Service ID issued when registering the project
scheduleCode Mandatory String Schedule code The code used for schedule registration
messageId Mandatory String Reserved message ID Message identifier that is returned when searching the scheduled delivery requests (requestId)

Headers

Go to API header

Requested body

NA

Response body

NA

Response status

HTTP Status Desc
204 No Content (successfully deleted)
400 Bad Request
401 Unauthorized
403 Forbidden
404 Not Found
500 Internal Server Error

080 call block number

Search call block number

This searches the call block numbers.

Request URL

GET https://sens.apigw.ntruss.com/sms/v2/services/{serviceId}/unsubscribes

Content-Type: application/json; charset=utf-8
x-ncp-apigw-timestamp: {Timestamp}
x-ncp-iam-access-key: {Sub Account Access Key}
x-ncp-apigw-signature-v2: {API Gateway Signature}

Path Variables

Item Mandatory Type Description Remarks
serviceId Mandatory String Service ID Service ID issued when registering the project

Parameters

Item Mandatory Type Description Remarks
clientTelNo Optional String Call blocked number Call block numbers registered in 080 service number
pageSize Optional Integer Page size - default: 100
- Only the numbers between 0 and 100 can be entered
pageIndex Optional Integer Page index default: 0
startTime Optional Integer Search start time - Standard of call block registration time
- default: all
endTime Optional Integer Search end time - Standard of call block registration time
- default: all

Headers

Go to API header

Requested body

NA

Response body

[
    {
     "clientTelNo": "string",
     "registerTime": "string",
     "registerType": "char"
    }
]
Item Mandatory Type Description Remarks
clientTelNo Mandatory String Call blocked number
registerTime Mandatory String Registered time foramt: LocalDateTime
registerType Mandatory Char Registering method - M(manual): Manual registration
- C(call): Phone registration

Response status

HTTP Status Desc
200 OK
400 Bad Request
401 Unauthorized
403 Forbidden
404 Not Found
429 Too Many Requests
500 Internal Server Error

Register call block number

This registers the numbers to be blocked.

Request URL

POST https://sens.apigw.ntruss.com/sms/v2/services/{serviceId}/unsubscribes

Content-Type: application/json; charset=utf-8
x-ncp-apigw-timestamp: {Timestamp}
x-ncp-iam-access-key: {Sub Account Access Key}
x-ncp-apigw-signature-v2: {API Gateway Signature}

Path Variables

Item Mandatory Type Description Remarks
serviceId Mandatory String Service ID Service ID issued when registering the project

Parameters

NA

Headers

Go to API header

Requested body

[
    {
        "clientTelNo":"string"
    }
]
Item Mandatory Type Description Remarks
clientTelNo Mandatory String Call blocked number Up to 1000 requests available at a time (list)

Response body

[
    {
        "clientTelNo": "string",
        "registerTime": "string",
        "registerType": "char"
    }
]
Item Mandatory Type Description Remarks
clientTelNo Mandatory String Call blocked number
registerTime Mandatory String Registered time foramt: LocalDateTime
registerType Mandatory Char Registering method - M(manual): Manual registration
- C(call): Phone registration

Response status

HTTP Status Desc
200 OK
400 Bad Request
401 Unauthorized
403 Forbidden
404 Not Found
429 Too Many Requests
500 Internal Server Error

Delete call block number

This deletes the call block numbers.

Request URL

DELETE https://sens.apigw.ntruss.com/sms/v2/services/{serviceId}/unsubscribes

Content-Type: application/json; charset=utf-8
x-ncp-apigw-timestamp: {Timestamp}
x-ncp-iam-access-key: {Sub Account Access Key}
x-ncp-apigw-signature-v2: {API Gateway Signature}

Path Variables

Item Mandatory Type Description Remarks
serviceId Mandatory String Service ID Service ID issued when registering the project

Parameters

NA

Headers

Go to API header

Requested body

[
    {
        "clientTelNo":"string"
    }
]
Item Mandatory Type Description Remarks
clientTelNo Mandatory String Call blocked number Up to 1000 requests available at a time (list)

Response body

NA

Response status

HTTP Status Desc
204 No Content (successfully deleted)
400 Bad Request
401 Unauthorized
403 Forbidden
404 Not Found
429 Too Many Requests
500 Internal Server Error

Message sending samples

SMS message

Regular message

{
    "type":"SMS",
    "contentType":"COMM",
    "countryCode":"82",
    "from":"01012345678",
    "content":"Contents",
    "messages":[
        {
            "to":"01012345678",
            "content":"Content sent only to the corresponding number (optional) apart from the above content"
        }
    ]
}

Reserved message

{
    "reserveTime":"2019-07-25 17:09",
    "type":"SMS",
    "contentType":"COMM",
    "countryCode":"82",
    "from":"01012345678",
    "content":"Contents",
    "messages":[
        {
            "to":"01012345678",
            "content":"Content sent only to the corresponding number (optional) apart from the above content"
        }
    ]
}

Scheduled message

{
    "scheduleCode":"every-pm-16",
    "type":"SMS",
    "contentType":"COMM",
    "countryCode":"82",
    "from":"01012345678",
    "content":"Contents",
    "messages":[
        {
            "to":"01012345678",
            "content":"Content sent only to the corresponding number (optional) apart from the above content"
        }
    ]
}

Ad message

{
    "type":"SMS",
    "contentType":"AD",
    "countryCode":"82",
    "from":"01012345678",
    "content":"(Ad) Company name content [$$$ $$$$$]08012345678",
    "messages":[
        {
            "to":"01012345678",
            "content":"(Ad) Content sent only to the corresponding number separately from the content above the company name (optional)[Free call block]08012345678"
        }
    ]
}

LMS message

Regular message

{
    "type":"LMS",
    "contentType":"COMM",
    "from":"01012345678",
    "subject":"Title",
    "content":"Contents",
    "messages":[
        {
            "to":"01012345678",
            "subject":"Title sent only to the number separately from the above content (optional)(optional)",
            "content":"Content sent only to the corresponding number (optional) apart from the above content"
        }
    ]
}

Reserved message

{
    "reserveTime":"2019-07-25 17:09",
    "type":"LMS",
    "contentType":"COMM",
    "from":"01012345678",
    "subject":"Title",
    "content":"Contents",
    "messages":[
        {
            "to":"01012345678",
            "subject":"Content sent only to the corresponding number (optional) apart from the above content",
            "content":"Content sent only to the corresponding number (optional) apart from the above content)"
        }
    ]
}

Scheduled message

{
    "scheduleCode":"every-pm-16",
    "type":"LMS",
    "contentType":"COMM",
    "from":"01012345678",
    "subject":"Title",
    "content":"Contents",
    "messages":[
        {
            "to":"01012345678",
            "subject":"Title sent only to the number separately from the above content (optional)",
            "content":"Content sent only to the corresponding number (optional) apart from the above content"
        }
    ]
}

Ad message

{
    "type":"LMS",
    "contentType":"AD",
    "from":"01012345678",
    "subject":"Title",
    "content":"(Ad) Company name content [Free call block]08012345678",
    "messages":[
        {
            "to":"01012345678",
            "subject":"Title sent only to the number separately from the above content (optional)",
            "content":"(Ad) Content sent only to the corresponding number separately from the content above the company name (optional) [Free call block]08012345678"
        }
    ]
}

MMS message

Regular message

{
    "type":"MMS",
    "contentType":"COMM",
    "from":"01012345678",
    "subject":"Title",
    "content":"Contents",
    "messages":[
        {
            "to":"01012345678",
            "subject":"Title sent only to the number separately from the above content (optional)",
            "content":"Content sent only to the corresponding number (optional) apart from the above content)"
        }
    ],
    "files":[
        {
            "name":"test.jpg",
            "body":"/9j/asEfsmk..(Omitted)..siD=="
        }
    ]
}

Reserved message

{
    "reserveTime":"2019-07-25 17:09",
    "type":"MMS",
    "contentType":"COMM",
    "from":"01012345678",
    "subject":"Title",
    "content":"Contents",
    "messages":[
        {
            "to":"01012345678",
            "subject":"Title sent only to the number separately from the above content (optional)",
            "content":"Content sent only to the corresponding number (optional) apart from the above content"
        }
    ],
    "files":[
        {
            "name":"test.jpg",
            "body":"/9j/asEfsmk..(Omitted)..siD=="
        }
    ]
}

Scheduled message

{
    "scheduleCode":"every-pm-16",
    "type":"MMS",
    "contentType":"COMM",
    "from":"01012345678",
    "subject":"Title",
    "content":"Contents",
    "messages":[
        {
            "to":"01012345678",
            "subject":"Title sent only to the number separately from the above content (optional)",
            "content":"Content sent only to the corresponding number (optional) apart from the above content"
        }
    ],
    "files":[
        {
            "name":"test.jpg",
            "body":"/9j/asEfsmk..(Omitted)..siD=="
        }
    ]
}

Ad message

{
    "type":"MMS",
    "contentType":"COMM",
    "from":"01012345678",
    "subject":"Title",
    "content":"(Ad) Company name content [Free call blcok]08012345678",
    "messages":[
        {
            "to":"01012345678",
            "subject":"Title sent only to the number separately from the above content (optional)",
            "content":"(Ad) Content sent only to the corresponding number separately from the content above the company name (optional) [Free call blcok]08012345678"
        }
    ],
    "files":[
        {
            "name":"test.jpg",
            "body":"/9j/asEfsmk..(Omitted)..siD=="
        }
    ]
}

Errors

EMMA v.3 reception result code

  • EMMA Version: EMMA V3.5.1 and above
  • IB G/W Report Code: Result code received after delivering to the mobile operator
  • IB G/W Response Code: Result code given by Infobank G/W after receiving message
  • IB EMMA: Errors processed by EMMA for message delivery request

IB G/W Report Code

Code Classification Meaning
0 success Success
2000 failure Delivery timeout
2001 failure Delivery failure (wireless network)
2002 failure Delivery failure (wireless network -> device)
2003 failure Device power off
2004 failure Device message buffer full
2005 failure Shadow area
2006 failure Message deleted
2007 failure Temporary device problem
3000 Invalid Delivery unavailable
3001 Invalid No subscriber
3002 Invalid Adult authentication failure
3003 Invalid Called number format error
3004 Invalid Device service temporarily unavailable
3005 Invalid Device call processing status
3006 Invalid Call denied
3007 Invalid Phone cannot receive callback URL
3008 Invalid Other device problems
3009 Invalid Message format error
3010 Invalid Device not supporting MMS
3011 Invalid Server Error
3012 Invalid Spam
3013 Invalid Service denied
3014 Invalid Others
3015 Invalid No delivery path
3016 Invalid Attachment size limitation failure
3017 Invalid Caller ID protection rules violation
3018 Invalid Individual mobile phone subscriber number subscribed to caller ID protection service
3019 Invalid Caller ID requested to be blocked by KISA (Korea Internet & Security Agency) or MSIT for all clients
3022 Invalid Charset Conversion Error
3023 Invalid Numbers not registered by Caller ID pre-registration

IB G/W Response Code

Code Meaning
1001 Server Busy (RS internal queue full)
1002 Called number format error
1003 Callback number error
1004 SPAM
1005 No. of use exceeded
1006 No attachment
1007 Attachment
1008 Attachment saving failure
1009 No CLIENT_MSG_KEY
1010 No CONTENT
1011 No CALLBACK
1012 No RECIPIENT_INFO
1013 No SUBJECT
1014 No attachment KEY
1015 No attachment NAME
1016 No attachment size
1017 No attachment content
1018 No delivery permission
1019 TTL exceeded
1020 charset conversion error

IB EMMA

Code Meaning
E900 No Invalid-IB delivery key
E901 No called number
E902 For broadcast messages) No order of called numbers
E903 No title
E904 No message
E905 No callback number
E906 No message key
E907 No broadcast messages status
E908 No service type
E909 No delivery request time
E910 No TTL time
E911 No attachment extension when the service type is MMS MT
E912 No attachment in the attach_file folder when the service type is MMS MT
E913 Attachment size is 0 when the service type is MMS MT
E914 There are file group keys in the message table but no data in the file table when the service type MMS MT
E915 Duplicate message
E916 Blocked number by auth server
E917 Blocked number by customer DB
E918 USER CALLBACK FAIL
E919 When it is prohibited to re-send the message in the case of delivery limit time
E920 File group keys in the message table when the service type is LMS MT
E921 No file group keys in the message table when the service type is MMS MT
E922 Error in using restricted characters for broadcast message
E999 Other errors

Was this article helpful?

What's Next
Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.