콘텐츠로 이동

문자 발송 요청

POST
/v2/api/message
Code sample: Shell / cURL
curl --request POST \
--url https://gateway.checkone.co.kr/v2/api/message \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "uniqueTxnNumber": "TXN-0001", "messageType": "SMS", "callbackNumber": "15440000", "receiveNumbers": "01000000000,", "contents": "[테스트] 인증번호 000000" }'

Authorization: Bearer {access_token} 헤더가 필요합니다. 서비스 이용 설정이 없으면 HTTP 200에 code 9999(시스템 일시장애)로 응답합니다. 본문 검증에 실패하면 HTTP 400입니다.

Media typeapplication/json
object
uniqueTxnNumber
required

가맹점 거래번호. 비어 있으면 안 됩니다.

string
messageType
required

SMS_AUTH, LMS_AUTH는 각각 SMS, LMS와 같은 방식으로 처리됩니다.

string
Allowed values: SMS SMS_AUTH LMS LMS_AUTH
callbackNumber
required

발신번호

string
/^\d{4,13}$/
receiveNumbers
required

수신번호 목록. 쉼표로 구분하며 마지막에도 쉼표가 필요합니다. 최대 50건

string
/^(01\d{8,9},){1,50}$/
subject

LMS 제목

string
contents
required

본문. SMS는 90바이트 이하, LMS는 2000바이트 이하. SMS_AUTH, LMS_AUTH에는 길이 검증이 적용되지 않습니다.

string

Example

{
"uniqueTxnNumber": "TXN-0001",
"messageType": "SMS",
"callbackNumber": "15440000",
"receiveNumbers": "01000000000,",
"contents": "[테스트] 인증번호 000000"
}

요청 처리 결과

Media typeapplication/json
object
flag
string
Allowed values: Y N
transactionId

요청한 uniqueTxnNumber

string
code

결과 코드. 성공은 0, 서비스 이용 불가는 9999

string
message
string

Examples

대기열 적재 완료

{
"flag": "Y",
"transactionId": "TXN-0001",
"code": "0",
"message": "요청처리 완료"
}

요청 본문 검증 실패

토큰 서명 또는 만료 오류. 본문 없음