API PLEX Developer Guide
ServiceBlog
English
English
  • API PLEX Developer's Guide
  • Release Note
    • Release Note
  • Service
    • Biz Message
      • SMS
      • LMS
      • MMS
      • MMS Image Upload
      • Message sending result (WebHook)
    • Kakao Message
      • Alim Talk
      • Friend Talk
      • Image Upload API
      • Failback
      • Message sending result (WebHook)
    • Global Message
      • GMS
        • GMS (v2)
        • Message sending result (WebHook)
        • Code References
          • Message status code
          • Service error code
Powered by GitBook
On this page
  • SMS API
  • Requirements
  • Path variable
  • SMS Sending API
  • Request Body Example
  • Response body
  1. Service
  2. Biz Message

SMS

Messaging API that allows sending short messages within 45 characters (90 bytes) in Korean.

Last updated 1 year ago

SMS API

To use the service, you need to register the sender number in [Service Console / Sender Number].

The API can deliver message sending results through a .

Requirements

Character encoding is based on UTF-8 by default.

Since text messages are processed in euc-kr, characters beyond the euc-kr representation range are not supported.

The secret key (secret_key) can be obtained by adding a sub-account in [Service Console / Sub Account] and clicking the [Detailed Inquiry] button.

Path variable

Please refer to the following information to ensure that path variables (enclosed in curly braces {}) within each URI are not omitted when making calls.

code
description

service_id

service id

  • sms-standard : standard SMS

  • sms-bulk : bulk SMS

  • sms-finance : finance SMS

  • sms-verify : verification SMS

SMS Sending API

POST https://0afupd5dlt.apigw.ntruss.com/{service_id}/v2/send

Headers

Name
Type
Description

Authorization*

string

userID;secret_key

Content-Type*

string

application/json;charset=utf-8

Request Body

Name
Type
Description

msg_data*

object array

Detailed data of messages (up to 10 records)

msg_key

string

Unique key for the message managed by the user (automatically assigned if null or blank)

sender_number*

string

Sender's phone number (registered sender number)

origin_cid

string

Initial sender's business code (Enter a 9-digit business code for special types of value-added communication service providers) (Up to 10 bytes)

receiver_number*

string

Recipient's mobile phone number

msg*

string

Transmitted message (After converting the character set to euc-kr, it will be marked as a failure if it exceeds 90 bytes)

echo_to_webhook

string

The string to be received along with the webhook from API PLEX by the user (up to 256 bytes)

Request Body Example

{
    "msg_data": [
        {
            "msg_key": "user_key_1",
            "sender_number": "010xxxxxxxx",
            "receiver_number": "010xxxxxxxx",
            "msg": "test message 1"
        },
        {
            "sender_number": "010xxxxxxxx",
            "receiver_number": "010xxxxxxxx",
            "origin_cid": "0123456789",
            "msg": "test message 2",
            "echo_to_webhook": "echo test"
        }
    ]
}

Response body

Even if the response HTTP status returns as 200, it does not necessarily mean the successful acceptance of all requests. (You can check the acceptance status of each transmission by the response code field.)

Key
Type
Description

results

object array

Received message data

msg_key

string

Unique key for the message

code

string

desc

string

Detailed acceptance result code

Success

{
    "results": [
        {
            "code": "C100",
            "msg_key": "user_key_1",
            "desc": "success"
        },
        {
            "code": "C341",
            "msg_key": "4b68ca16-7aa8-4a17-b74c-2b8e4adb13f8",
            "desc": "success"
        }
    ]
}

Invalid request or error

{
    "code": "C401_1",
    "name": "authorization fail - authorization field error",
    "description": "there is no authorization key or value in http header"
}

Invalid request within the list

{
    "results": [
        {
            "code": "G140",
            "desc": "발신번호 예외",
            "msg_key": "user_key_1"
        },
        {
            "code": "G141",
            "desc": "수신번호 예외",
            "msg_key": "4b68ca16-7aa8-4a17-b74c-2b8e4adb13f8"
        }
    ]
}

API PLEX Response Code

code
HTTP status
content
description

C100

200

Success

C400_1

400

Invalid data type

Refer to the description in the response body

C400_2

400

Invalid request parameter

Refer to the description in the response body

C400_3

400

Missing required parameters

Refer to the description in the response body

C401_1

401

Missing the authorization key in the header

C401_2

401

Error in the authorization value in the header

Unable to separate values with ';'.

C401_3

401

Invalid authorization value in the header

Unable to find valid authorization information

C404_1

404

Unable to find the data

Refer to the description in the response body

C500_1

500

Internal server error

Refer to the description in the response body

G110

200

API UNIQUE ID exception (Invalid URL)

G140

200

Sender number exception

G141

200

Recipient number exception

G142

200

Invalid echo_to_webhook value

Exceed 256 byte or type error

G150

200

Insufficient credit

G160

200

Exceeded the maximum number of transmissions per session

Acceptance result code (Refer to )

WebHook
API PLEX response codes