SMS API Reference
  • PDF

SMS API Reference

  • PDF

The latest service changes have not yet been reflected in this content. We will update the content as soon as possible. Please refer to the Korean version for information on the latest updates.

Basic info

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 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 This is the signature that encrypted the body of the example above as SecretKey, which is mapped with the access key ID
HmacSHA256 is used as the HMAC encryption algorithm

Go to Guide for how to generate NAVER Cloud Platform authentication key and signature


Message

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 Note
serviceId Mandatory String Service ID Service ID issued when registering the project

Headers

Go to API header

Request 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 Note
type Madantory String SMS Type SMS, LMS, MMS (lowercase)
contentType Optional String Message type COMM: Regular message
AD: Ad message
(default: COMM)
countryCode Optional String Country code Sending is available to `countries that are supported by SENS
(default: 82)
International SMS List
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
content Mandatory String Content of default message SMS: Up to 80 bytes
LMS, MMS: Up to 2000 bytes
messages Mandatory Object Message info See the items below (messages.XXX)
Up to 100 units
messages.to Mandatory String Called number Only numbers can be entered, without -
messages.subject Optional String Title of individual message Only available in LMS and MMS
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 can't be used
File name with JPG and JPEG extension
Up to 40 characters
files.body Optional String File body Only available in MMS
Space can't 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 time and date (Default: Asia/Seoul)
* List of supported time zones
* Use the TZ database name value
scheduleCode Optional String Schedule code Schedule code to be registered
  • If the subject and content are not specified in the messages, then the values designated as the default subject and content are sent.
  • The subject and content in the messages have priority over the default subject and content.
  • If the type is MMS and there is no file to attach, then it will be sent as LMS.
  • If you request both reserveTime and scheduleCode, then it will be 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 Note
requestId Mandatory String Request ID
requestTime Mandatory DateTime Request time
statusCode Mandatory String Request status code 202 - Success
Others - Fail
* Follows the HTTP status specification
statusName Mandatory String Request status name success - Success
fail - Fail

Response statuses

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

Search message delivery request

This searches the message delivery requests.

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 Note
serviceId Mandatory String Service ID Service ID issued when registering the project

Parameters

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

Headers

Go to API header

Request body

None

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 Note
requestId Mandatory String Request ID
statusCode Mandatory String Request status code 202 - Success
Others - Fail
* Follows the HTTP status specification
statusName Mandatory String Request status name success - Success
reserved - Being reserved
scheduled - Being scheduled
fail - Fail
messages.messageId Madantory String Message ID
messages.requestTime Madantory DateTime Delivery request time
messages.contentType Madantory String Message type COMM: Regular message
AD: Ad message
messages.countryCode Madantory String Country code
messages.from Madantory String Caller ID
messages.to Madantory String Called number

Response statuses

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

Search message delivery results

This searches the message delivery results.

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 Note
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 delivery requests

Headers

Go to API header

Request body

None

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 Note
statusCode Madantory String Status of sending a message to the messaging server 200: Success
Others: Fail
statusName Mandatory String Name of the status of sending a message to the messaging server success - Success
fail - Fail
messages.requestTime Madantory DateTime Request time
messages.contentType Madantory String Message type COMM: Regular message
AD: Ad message
messages.content Madantory String Message content The content requested to be sent is searched as it is.
When it is actually sent, it is sent according to the length limit for each type.
messages.countryCode Madantory String Country code
messages.from Madantory String Caller ID
messages.to Madantory String Called number
messages.status Madantory String Status of sending process in the messaging server READY: Ready
PROCESSING: Being processed
COMPLETED: Processing completed
messages.statusCode Madantory String Code of device received status result See Error Code table
messages.statusName Madantory String Name of device received status result
messages.statusMessage Madantory String Message of device received status result
messages.completeTime Madantory DateTime Delivery completion time
messages.telcoCode Madantory String Network operator code
files.name Optional String Name of attached file Searchable only in MMS

Response statuses

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

This searches 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 Note
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

Request body

None

Response body

{
  "reserveId": "string",
  "reserveTimeZone": "string",
  "reserveTime": "string",
  "reserveStatus": "string"
}
Item Mandatory Type Description Note
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 time and date (Default: Asia/Seoul)
* List of supported time zones
* Use the TZ database name value
reserveStatus Mandatory String Reservation status READY - Waiting to be sent
PROCESSING - Requesting to send
CANCELED - Delivery canceled
FAIL - Delivery request failure
DONE - Successful delivery request
STALE - Delivery request failure (timeout)

Response statuses

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

Cancel reserved message

This cancels 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 Note
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

Request body

None

Response body

None

Response statuses

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

This cancels 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 Note
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

Request body

None

Response body

None

Response statuses

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 No.

Search blocked call number

This searches the blocked call numbers.

Request URL

GET https://sens.apigw.ntruss.com/sms/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 Note
serviceId Mandatory String Service ID Service ID issued when registering the project

Parameters

Item Mandatory Type Description Note
clientTelNo Optional String Blocked call number Blocked call numbers registered in 080 service number
pageSize Optional Integer Page size default: 100
Only 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

Request body

None

Response body

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

Response statuses

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

Register blocked call number

This registers the numbers to be blocked.

Request URL

POST https://sens.apigw.ntruss.com/sms/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 Note
serviceId Mandatory String Service ID Service ID issued when registering the project

Parameters

None

Headers

Go to API header

Request body

[
    {
        "clientTelNo":"string"
    }
]
Item Mandatory Type Description Note
clientTelNo Madatory String Blocked call number Up to 1000 requests available per request (List)

Response body

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

Response statuses

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

Delete blocked call number

This deletes the blocked call numbers.

Request URL

DELETE https://sens.apigw.ntruss.com/sms/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 Note
serviceId Mandatory String Service ID Service ID issued when registering the project

Parameters

None

Headers

Go to API header

Request body

[
    {
        "clientTelNo":"string"
    }
]
Item Mandatory Type Description Note
clientTelNo Madatory String Blocked call number Up to 1000 requests available per request (List)

Response body

None

Response statuses

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 sample

SMS message

Regular message

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

Reserved message

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

Scheduled message

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

Ad message

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

LMS message

Regular message

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

Reserved message

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

Scheduled message

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

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) company name content sent only to the number separately from the content above (optional)[Free Call Block]08012345678"
        }
    ]
}

MMS message

Regular message

{
    "type":"MMS",
    "contentType":"COMM",
    "from":"01012345678",
    "subject":"Title",
    "content":"Content",
    "messages":[
        {
            "to":"01012345678",
            "subject":"Title sent only to the number separately from the above content (optional)",
            "content":"Content sent only to the number separately from the above content (optional)"
        }
    ],
    "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":"Content",
    "messages":[
        {
            "to":"01012345678",
            "subject":"Title sent only to the number separately from the above content (optional)",
            "content":"Content sent only to the number separately from the above content (optional)"
        }
    ],
    "files":[
        {
            "name":"test.jpg",
            "body":"/9j/asEfsmk..(Omitted)..siD=="
        }
    ]
}

Scheduled message

{
    "scheduleCode":"every-pm-16",
    "type":"MMS",
    "contentType":"COMM",
    "from":"01012345678",
    "subject":"Title",
    "content":"Content",
    "messages":[
        {
            "to":"01012345678",
            "subject":"Title sent only to the number separately from the above content (optional)",
            "content":"Content sent only to the number separately from the above content (optional)"
        }
    ],
    "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 Block]08012345678",
    "messages":[
        {
            "to":"01012345678",
            "subject":"Title sent only to the number separately from the above content (optional)",
            "content":"(Ad) company name content sent only to the number separately from the content above (optional)[Free Call Block]08012345678"
        }
    ],
    "files":[
        {
            "name":"test.jpg",
            "body":"/9j/asEfsmk..(Omitted)..siD=="
        }
    ]
}

Error codes

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: Error code processed by EMMA for message delivery request

IB G/W Report Code

Code Category 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 can't receive callback URL
3008 Invalid Other device problems
3009 Invalid Message format error
3010 Invalid Device doesn't support MMS
3011 Invalid Server errors
3012 Invalid Spam
3013 Invalid Service denied
3014 Invalid Other
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 Invalid-IB No 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 because there is a delivery time limit
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?

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.