# 문자전송

## 1. SendSMS - 단문 전송

최대 90byte의 단문(SMS) 메시지 1건 전송을 팝빌에 접수합니다.

- 팝빌 서비스의 안정적인 제공을 위하여 동시호출이 제한될 수 있습니다.\
  동시에 1,000건 이상 요청하는 경우 동보전송 또는 대량전송 API를 이용하시는 것을 권장합니다.

```ruby
def sendSMS(corpNum, sender, senderName, receiver, receiverName, contents, reserveDT = '', adsYN = false, userID = '', requestNum = '')
```

> 발신번호는 사전에 팝빌에 등록된 번호만 사용할 수 있습니다. [\[참고\] 발신번호 사전등록](https://developers.popbill.com/guide/sms/introduction/sender-number)\
> [\[GetSenderNumberMgtURL-발신번호 등록 팝업 URL\]](https://developers.popbill.com/reference/sms/ruby/api/sendnum#GetSenderNumberMgtURL) 또는 [\[GetSenderNumberList-발신번호 목록 확인\]](https://developers.popbill.com/reference/sms/ruby/api/sendnum#GetSenderNumberList) 를 호출하여 발신번호 등록 내역을 확인할 수 있습니다.\
> 팝빌에 등록되지 않은 발신번호를 입력하는 경우 오류가 반환됩니다.

### 요청

**Parameters**

- corpNum `type: String` `length: 10` `required: Y` `description: 팝빌회원 사업자번호 ('-' 제외)`
- sender `type: String` `length: 20` `required: Y` `description: 발신번호`
- senderName `type: String` `length: 70` `required: N` `description: 발신자명`
- receiver `type: String` `length: 20` `required: Y` `description: 수신번호`
- receiverName `type: String` `length: 70` `required: N` `description: 수신자명`
- contents `type: String` `length: 90` `required: Y` `description: 메시지 내용 (단위 : byte)`
  - 2byte : 한글, 한자, 특수문자 / 1byte : 영문, 숫자, 공백
- reserveDT `type: String` `length: 14` `required: N` `description: 전송 예약일시`
  - 형식 : yyyyMMddHHmmss
  - 기본값 : 즉시전송
- adsYN `type: Boolean` `length: -` `required: N` `description: 광고메시지 전송 여부`
  - `true`: 광고
  - `false`: 일반 : 기본값
  - [\[참고\] 광고메시지 전송방법 안내](https://developers.popbill.com/guide/sms/introduction/ads-duty)
- userID `type: String` `length: 50` `required: N` `description: 팝빌회원 아이디`
- requestNum `type: String` `length: 36` `required: N` `description: 요청번호`
  - 파트너가 접수 단위를 식별하기 위해 할당하는 관리번호
  - 영문 대소문자, 숫자, 특수문자('-','\_')만 이용 가능

### 응답

String - 요청에 대한 접수번호(receiptNum)

### 예외

**PopbillException**

- code `type: Integer` `length: -` `description: API 처리 실패에 대한 오류코드`
  - 음의 정수 8자리 숫자값 [\[참고\] 오류코드](https://developers.popbill.com/error-code)
- message `type: String` `length: -` `description: API 처리 실패에 대한 오류메시지`

## 2. SendSMS\_multi - 단문 전송 (동보/대량전송)

최대 90byte의 단문(SMS) 메시지 다수건 전송을 팝빌에 접수합니다. (최대 1,000건)

- 모든 수신자에게 동일한 내용을 전송하거나(동보전송), 수신자마다 개별 내용을 전송할 수 있습니다(대량전송).

```ruby
def sendSMS_multi(corpNum, sender, senderName, contents, messages, reserveDT = '', adsYN = false, userID = '', requestNum = '')
```

> 발신번호는 사전에 팝빌에 등록된 번호만 사용할 수 있습니다. [\[참고\] 발신번호 사전등록](https://developers.popbill.com/guide/sms/introduction/sender-number)\
> [\[GetSenderNumberMgtURL-발신번호 등록 팝업 URL\]](https://developers.popbill.com/reference/sms/ruby/api/sendnum#GetSenderNumberMgtURL) 또는 [\[GetSenderNumberList-발신번호 목록 확인\]](https://developers.popbill.com/reference/sms/ruby/api/sendnum#GetSenderNumberList) 를 호출하여 발신번호 등록 내역을 확인할 수 있습니다.\
> 팝빌에 등록되지 않은 발신번호를 입력하는 경우 오류가 반환됩니다.

### 요청

**Parameters**

- corpNum `type: String` `length: 10` `required: Y` `description: 팝빌회원 사업자번호 ('-' 제외)`
- sender `type: String` `length: 20` `required: N` `description: 발신번호`
  - 동보전송 경우 사용
- contents `type: String` `length: 90` `required: 조건부` `description: 메시지 내용 (단위 : byte)`
  - 동보전송 경우 필수
  - 2byte : 한글, 한자, 특수문자 / 1byte : 영문, 숫자, 공백
- messages `type: MessageReceiver[ ]` `length: -` `required: Y` `description: 문자 정보`
  - 최대 : 1,000개
  - rcv `type: String` `length: 20` `required: Y` `description: 수신번호`
  - rcvnm `type: String` `length: 70` `required: N` `description: 수신자명`
  - snd `type: String` `length: 20` `required: Y` `description: 발신번호`
    - 대량전송 경우 사용
  - sndnm `type: String` `length: 70` `required: N` `description: 발신자명`
    - 대량전송 경우 사용
  - msg `type: String` `length: -` `required: 조건부` `description: 메시지 내용 (단위 : byte)`
    - 대량전송 경우 필수
    - 단문 : 90byte 이하 / 장문 : 2,000byte 이하
    - 2byte : 한글, 한자, 특수문자 / 1byte : 영문, 숫자, 공백
  - sjt `type: String` `length: 64` `required: N` `description: 메시지 제목 (단위 : byte)`
    - 대량전송 경우 사용
    - 메시지 길이가 90byte 초과한 경우에만 적용
    - 2byte : 한글, 한자, 특수문자 / 1byte : 영문, 숫자, 공백
- reserveDT `type: String` `length: 14` `required: N` `description: 전송 예약일시`
  - 형식 : yyyyMMddHHmmss
  - 기본값 : 즉시전송
- adsYN `type: Boolean` `length: -` `required: N` `description: 광고메시지 전송 여부`
  - `true`: 광고
  - `false`: 일반 : 기본값
  - [\[참고\] 광고메시지 전송방법 안내](https://developers.popbill.com/guide/sms/introduction/ads-duty)
- userID `type: String` `length: 50` `required: N` `description: 팝빌회원 아이디`
- requestNum `type: String` `length: 36` `required: N` `description: 요청번호`
  - 파트너가 접수 단위를 식별하기 위해 할당하는 관리번호
  - 영문 대소문자, 숫자, 특수문자('-','\_')만 이용 가능

### 응답

String - 요청에 대한 접수번호(receiptNum)

### 예외

**PopbillException**

- code `type: Integer` `length: -` `description: API 처리 실패에 대한 오류코드`
  - 음의 정수 8자리 숫자값 [\[참고\] 오류코드](https://developers.popbill.com/error-code)
- message `type: String` `length: -` `description: API 처리 실패에 대한 오류메시지`

## 3. SendLMS - 장문 전송

최대 2,000byte의 장문(LMS) 메시지 1건 전송을 팝빌에 접수합니다.

- 팝빌 서비스의 안정적인 제공을 위하여 동시호출이 제한될 수 있습니다.\
  동시에 1,000건 이상 요청하는 경우 동보전송 또는 대량전송 API를 이용하시는 것을 권장합니다.

```ruby
def sendLMS(corpNum, sender, senderName, receiver, receiverName, subject, contents, reserveDT = '', adsYN = false, userID = '', requestNum = '')
```

> 발신번호는 사전에 팝빌에 등록된 번호만 사용할 수 있습니다. [\[참고\] 발신번호 사전등록](https://developers.popbill.com/guide/sms/introduction/sender-number)\
> [\[GetSenderNumberMgtURL-발신번호 등록 팝업 URL\]](https://developers.popbill.com/reference/sms/ruby/api/sendnum#GetSenderNumberMgtURL) 또는 [\[GetSenderNumberList-발신번호 목록 확인\]](https://developers.popbill.com/reference/sms/ruby/api/sendnum#GetSenderNumberList) 를 호출하여 발신번호 등록 내역을 확인할 수 있습니다.\
> 팝빌에 등록되지 않은 발신번호를 입력하는 경우 오류가 반환됩니다.

### 요청

**Parameters**

- corpNum `type: String` `length: 10` `required: Y` `description: 팝빌회원 사업자번호 ('-' 제외)`
- sender `type: String` `length: 20` `required: Y` `description: 발신번호`
- senderName `type: String` `length: 70` `required: N` `description: 발신자명`
- receiver `type: String` `length: 20` `required: Y` `description: 수신번호`
- receiverName `type: String` `length: 70` `required: N` `description: 수신자명`
- subject `type: String` `length: 64` `required: N` `description: 메시지 제목 (단위 : byte)`
  - 2byte : 한글, 한자, 특수문자 / 1byte : 영문, 숫자, 공백
- contents `type: String` `length: 2000` `required: Y` `description: 메시지 내용 (단위 : byte)`
  - 2byte : 한글, 한자, 특수문자 / 1byte : 영문, 숫자, 공백
- reserveDT `type: String` `length: 14` `required: N` `description: 전송 예약일시`
  - 형식 : yyyyMMddHHmmss
  - 기본값 : 즉시전송
- adsYN `type: Boolean` `length: -` `required: N` `description: 광고메시지 전송 여부`
  - `true`: 광고
  - `false`: 일반 : 기본값
  - [\[참고\] 광고메시지 전송방법 안내](https://developers.popbill.com/guide/sms/introduction/ads-duty)
- userID `type: String` `length: 50` `required: N` `description: 팝빌회원 아이디`
- requestNum `type: String` `length: 36` `required: N` `description: 요청번호`
  - 파트너가 접수 단위를 식별하기 위해 할당하는 관리번호
  - 영문 대소문자, 숫자, 특수문자('-','\_')만 이용 가능

### 응답

String - 요청에 대한 접수번호(receiptNum)

### 예외

**PopbillException**

- code `type: Integer` `length: -` `description: API 처리 실패에 대한 오류코드`
  - 음의 정수 8자리 숫자값 [\[참고\] 오류코드](https://developers.popbill.com/error-code)
- message `type: String` `length: -` `description: API 처리 실패에 대한 오류메시지`

## 4. SendLMS\_multi - 장문 전송 (동보/대량전송)

최대 2,000byte의 장문(LMS) 메시지 다수건 전송을 팝빌에 접수합니다. (최대 1,000건)

- 모든 수신자에게 동일한 내용을 전송하거나(동보전송), 수신자마다 개별 내용을 전송할 수 있습니다(대량전송).

```ruby
def sendLMS_multi(corpNum, sender, senderName, subject, contents, messages, reserveDT = '', adsYN = false, userID = '', requestNum = '')
```

> 발신번호는 사전에 팝빌에 등록된 번호만 사용할 수 있습니다. [\[참고\] 발신번호 사전등록](https://developers.popbill.com/guide/sms/introduction/sender-number)\
> [\[GetSenderNumberMgtURL-발신번호 등록 팝업 URL\]](https://developers.popbill.com/reference/sms/ruby/api/sendnum#GetSenderNumberMgtURL) 또는 [\[GetSenderNumberList-발신번호 목록 확인\]](https://developers.popbill.com/reference/sms/ruby/api/sendnum#GetSenderNumberList) 를 호출하여 발신번호 등록 내역을 확인할 수 있습니다.\
> 팝빌에 등록되지 않은 발신번호를 입력하는 경우 오류가 반환됩니다.

### 요청

**Parameters**

- corpNum `type: String` `length: 10` `required: Y` `description: 팝빌회원 사업자번호 ('-' 제외)`
- sender `type: String` `length: 20` `required: N` `description: 발신번호`
  - 동보전송 경우 사용
- senderName `type: String` `length: 70` `required: N` `description: 발신자명`
  - 동보전송 경우 사용
- subject `type: String` `length: 64` `required: N` `description: 메시지 제목 (단위 : byte)`
  - 동보전송 경우 사용
  - 2byte : 한글, 한자, 특수문자 / 1byte : 영문, 숫자, 공백
- contents `type: String` `length: 2000` `required: 조건부` `description: 메시지 내용 (단위 : byte)`
  - 동보전송 경우 필수
  - 2byte : 한글, 한자, 특수문자 / 1byte : 영문, 숫자, 공백
- messages `type: MessageReceiver[ ]` `length: -` `required: Y` `description: 문자 정보`
  - 최대 : 1,000개
  - rcv `type: String` `length: 20` `required: Y` `description: 수신번호`
  - rcvnm `type: String` `length: 70` `required: N` `description: 수신자명`
  - snd `type: String` `length: 20` `required: Y` `description: 발신번호`
    - 대량전송 경우 사용
  - sndnm `type: String` `length: 70` `required: N` `description: 발신자명`
    - 대량전송 경우 사용
  - msg `type: String` `length: -` `required: 조건부` `description: 메시지 내용 (단위 : byte)`
    - 대량전송 경우 필수
    - 단문 : 90byte 이하 / 장문 : 2,000byte 이하
    - 2byte : 한글, 한자, 특수문자 / 1byte : 영문, 숫자, 공백
  - sjt `type: String` `length: 64` `required: N` `description: 메시지 제목 (단위 : byte)`
    - 대량전송 경우 사용
    - 메시지 길이가 90byte 초과한 경우에만 적용
    - 2byte : 한글, 한자, 특수문자 / 1byte : 영문, 숫자, 공백
- reserveDT `type: String` `length: 14` `required: N` `description: 전송 예약일시`
  - 형식 : yyyyMMddHHmmss
  - 기본값 : 즉시전송
- adsYN `type: Boolean` `length: -` `required: N` `description: 광고메시지 전송 여부`
  - `true`: 광고
  - `false`: 일반 : 기본값
  - [\[참고\] 광고메시지 전송방법 안내](https://developers.popbill.com/guide/sms/introduction/ads-duty)
- userID `type: String` `length: 50` `required: N` `description: 팝빌회원 아이디`
- requestNum `type: String` `length: 36` `required: N` `description: 요청번호`
  - 파트너가 접수 단위를 식별하기 위해 할당하는 관리번호
  - 영문 대소문자, 숫자, 특수문자('-','\_')만 이용 가능

### 응답

String - 요청에 대한 접수번호(receiptNum)

### 예외

**PopbillException**

- code `type: Integer` `length: -` `description: API 처리 실패에 대한 오류코드`
  - 음의 정수 8자리 숫자값 [\[참고\] 오류코드](https://developers.popbill.com/error-code)
- message `type: String` `length: -` `description: API 처리 실패에 대한 오류메시지`

## 5. SendMMS - 포토문자 전송

최대 2,000byte의 메시지와 이미지로 구성된 포토문자(MMS) 1건 전송을 팝빌에 접수합니다.\
※ 이미지 파일 포맷/규격 : 최대 300Kbyte(JPEG, JPG), 가로/세로 1,000px 이하 권장

- 팝빌 서비스의 안정적인 제공을 위하여 동시호출이 제한될 수 있습니다.\
  동시에 1,000건 이상 요청하는 경우 동보전송 또는 대량전송 API를 이용하시는 것을 권장합니다.

```ruby
def sendMMS(corpNum, sender, senderName, receiver, receiverName, subject, contents, filePath, reserveDT = '', adsYN = false, userID = '', requestNum = '')
```

> 발신번호는 사전에 팝빌에 등록된 번호만 사용할 수 있습니다. [\[참고\] 발신번호 사전등록](https://developers.popbill.com/guide/sms/introduction/sender-number)\
> [\[GetSenderNumberMgtURL-발신번호 등록 팝업 URL\]](https://developers.popbill.com/reference/sms/ruby/api/sendnum#GetSenderNumberMgtURL) 또는 [\[GetSenderNumberList-발신번호 목록 확인\]](https://developers.popbill.com/reference/sms/ruby/api/sendnum#GetSenderNumberList) 를 호출하여 발신번호 등록 내역을 확인할 수 있습니다.\
> 팝빌에 등록되지 않은 발신번호를 입력하는 경우 오류가 반환됩니다.

### 요청

**Parameters**

- corpNum `type: String` `length: 10` `required: Y` `description: 팝빌회원 사업자번호 ('-' 제외)`
- sender `type: String` `length: 20` `required: Y` `description: 발신번호`
- senderName `type: String` `length: 70` `required: N` `description: 발신자명`
- receiver `type: String` `length: 20` `required: Y` `description: 수신번호`
- receiverName `type: String` `length: 70` `required: N` `description: 수신자명`
- subject `type: String` `length: 64` `required: N` `description: 메시지 제목 (단위 : byte)`
  - 2byte : 한글, 한자, 특수문자 / 1byte : 영문, 숫자, 공백
- contents `type: String` `length: 2000` `required: Y` `description: 메시지 내용 (단위 : byte)`
  - 2byte : 한글, 한자, 특수문자 / 1byte : 영문, 숫자, 공백
- filePath `type: String` `length: -` `required: Y` `description: 전송할 이미지 파일 경로`
  - 파일형식 : JPG
  - 파일크기: 최대 300KB
  - 사이즈 : 가로/세로 1,000px 이하
- reserveDT `type: String` `length: 14` `required: N` `description: 전송 예약일시`
  - 형식 : yyyyMMddHHmmss
  - 기본값 : 즉시전송
- adsYN `type: Boolean` `length: -` `required: N` `description: 광고메시지 전송 여부`
  - `true`: 광고
  - `false`: 일반 : 기본값
  - [\[참고\] 광고메시지 전송방법 안내](https://developers.popbill.com/guide/sms/introduction/ads-duty)
- userID `type: String` `length: 50` `required: N` `description: 팝빌회원 아이디`
- requestNum `type: String` `length: 36` `required: N` `description: 요청번호`
  - 파트너가 접수 단위를 식별하기 위해 할당하는 관리번호
  - 영문 대소문자, 숫자, 특수문자('-','\_')만 이용 가능

### 응답

String - 요청에 대한 접수번호(receiptNum)

### 예외

**PopbillException**

- code `type: Integer` `length: -` `description: API 처리 실패에 대한 오류코드`
  - 음의 정수 8자리 숫자값 [\[참고\] 오류코드](https://developers.popbill.com/error-code)
- message `type: String` `length: -` `description: API 처리 실패에 대한 오류메시지`

## 6. SendMMS\_multi - 포토문자 전송 (동보/대량전송)

최대 2,000byte의 메시지와 이미지로 구성된 포토문자(MMS) 다수건 전송을 팝빌에 접수합니다. (최대 1,000건)\
※ 이미지 파일 포맷/규격 : 최대 300Kbyte(JPEG), 가로/세로 1,000px 이하 권장

- 모든 수신자에게 동일한 내용을 전송하거나(동보전송), 수신자마다 개별 내용을 전송할 수 있습니다(대량전송).

```ruby
def sendMMS_multi(corpNum, sender, senderName, subject, contents, messages, filePath, reserveDT = '', adsYN = false, userID = '', requestNum = '')
```

> 발신번호는 사전에 팝빌에 등록된 번호만 사용할 수 있습니다. [\[참고\] 발신번호 사전등록](https://developers.popbill.com/guide/sms/introduction/sender-number)\
> [\[GetSenderNumberMgtURL-발신번호 등록 팝업 URL\]](https://developers.popbill.com/reference/sms/ruby/api/sendnum#GetSenderNumberMgtURL) 또는 [\[GetSenderNumberList-발신번호 목록 확인\]](https://developers.popbill.com/reference/sms/ruby/api/sendnum#GetSenderNumberList) 를 호출하여 발신번호 등록 내역을 확인할 수 있습니다.\
> 팝빌에 등록되지 않은 발신번호를 입력하는 경우 오류가 반환됩니다.

### 요청

**Parameters**

- corpNum `type: String` `length: 10` `required: Y` `description: 팝빌회원 사업자번호 ('-' 제외)`
- sender `type: String` `length: 20` `required: N` `description: 발신번호`
  - 동보전송 경우 사용
- senderName `type: String` `length: 70` `required: N` `description: 발신자명`
  - 동보전송 경우 사용
- subject `type: String` `length: 64` `required: N` `description: 메시지 제목 (단위 : byte)`
  - 동보전송 경우 입력
  - 2byte : 한글, 한자, 특수문자 / 1byte : 영문, 숫자, 공백
- contents `type: String` `length: 2000` `required: 조건부` `description: 메시지 내용 (단위 : byte)`
  - 동보전송 경우 필수
  - 2byte : 한글, 한자, 특수문자 / 1byte : 영문, 숫자, 공백
- messages `type: MessageReceiver[ ]` `length: -` `required: Y` `description: 문자 정보`
  - 최대 : 1,000개
  - rcv `type: String` `length: 20` `required: Y` `description: 수신번호`
  - rcvnm `type: String` `length: 70` `required: N` `description: 수신자명`
  - snd `type: String` `length: 20` `required: Y` `description: 발신번호`
    - 대량전송 경우 사용
  - sndnm `type: String` `length: 70` `required: N` `description: 발신자명`
    - 대량전송 경우 사용
  - msg `type: String` `length: -` `required: 조건부` `description: 메시지 내용 (단위 : byte)`
    - 대량전송 경우 필수
    - 단문 : 90byte 이하 / 장문 : 2,000byte 이하
    - 2byte : 한글, 한자, 특수문자 / 1byte : 영문, 숫자, 공백
  - sjt `type: String` `length: 64` `required: N` `description: 메시지 제목 (단위 : byte)`
    - 대량전송 경우 사용
    - 메시지 길이가 90byte 초과한 경우에만 적용
    - 2byte : 한글, 한자, 특수문자 / 1byte : 영문, 숫자, 공백
- filePath `type: String` `length: -` `required: Y` `description: 전송할 이미지 파일 경로`
  - 파일형식 : JPG
  - 파일크기: 최대 300KB
  - 사이즈 : 가로/세로 1,000px 이하
- reserveDT `type: String` `length: 14` `required: N` `description: 전송 예약일시`
  - 형식 : yyyyMMddHHmmss
  - 기본값 : 즉시전송
- adsYN `type: Boolean` `length: -` `required: N` `description: 광고메시지 전송 여부`
  - `true`: 광고
  - `false`: 일반 : 기본값
  - [\[참고\] 광고메시지 전송방법 안내](https://developers.popbill.com/guide/sms/introduction/ads-duty)
- userID `type: String` `length: 50` `required: N` `description: 팝빌회원 아이디`
- requestNum `type: String` `length: 36` `required: N` `description: 요청번호`
  - 파트너가 접수 단위를 식별하기 위해 할당하는 관리번호
  - 영문 대소문자, 숫자, 특수문자('-','\_')만 이용 가능

### 응답

String - 요청에 대한 접수번호(receiptNum)

### 예외

**PopbillException**

- code `type: Integer` `length: -` `description: API 처리 실패에 대한 오류코드`
  - 음의 정수 8자리 숫자값 [\[참고\] 오류코드](https://developers.popbill.com/error-code)
- message `type: String` `length: -` `description: API 처리 실패에 대한 오류메시지`

## 7. SendXMS - 단문/장문 자동인식 전송

메시지 길이(90byte)에 따라 단문/장문(SMS/LMS)을 자동으로 인식하여 1건의 메시지 전송을 팝빌에 접수합니다.

- 팝빌 서비스의 안정적인 제공을 위하여 동시호출이 제한될 수 있습니다.\
  동시에 1,000건 이상 요청하는 경우 동보전송 또는 대량전송 API를 이용하시는 것을 권장합니다.

```ruby
def sendXMS(corpNum, sender, senderName, receiver, receiverName, subject, contents, reserveDT = '', adsYN = false, userID = '', requestNum = '')
```

> 발신번호는 사전에 팝빌에 등록된 번호만 사용할 수 있습니다. [\[참고\] 발신번호 사전등록](https://developers.popbill.com/guide/sms/introduction/sender-number)\
> [\[GetSenderNumberMgtURL-발신번호 등록 팝업 URL\]](https://developers.popbill.com/reference/sms/ruby/api/sendnum#GetSenderNumberMgtURL) 또는 [\[GetSenderNumberList-발신번호 목록 확인\]](https://developers.popbill.com/reference/sms/ruby/api/sendnum#GetSenderNumberList) 를 호출하여 발신번호 등록 내역을 확인할 수 있습니다.\
> 팝빌에 등록되지 않은 발신번호를 입력하는 경우 오류가 반환됩니다.

### 요청

**Parameters**

- corpNum `type: String` `length: 10` `required: Y` `description: 팝빌회원 사업자번호 ('-' 제외)`
- sender `type: String` `length: 20` `required: Y` `description: 발신번호`
- senderName `type: String` `length: 70` `required: N` `description: 발신자명`
- receiver `type: String` `length: 20` `required: Y` `description: 수신번호`
- receiverName `type: String` `length: 70` `required: N` `description: 수신자명`
- subject `type: String` `length: 64` `required: N` `description: 메시지 제목 (단위 : byte)`
  - 2byte : 한글, 한자, 특수문자 / 1byte : 영문, 숫자, 공백
- contents `type: String` `length: 2000` `required: Y` `description: 메시지 내용 (단위 : byte)`
  - 2byte : 한글, 한자, 특수문자 / 1byte : 영문, 숫자, 공백
- reserveDT `type: String` `length: 14` `required: N` `description: 전송 예약일시`
  - 형식 : yyyyMMddHHmmss
  - 기본값 : 즉시전송
- adsYN `type: Boolean` `length: -` `required: N` `description: 광고메시지 전송 여부`
  - `true`: 광고
  - `false`: 일반 : 기본값
  - [\[참고\] 광고메시지 전송방법 안내](https://developers.popbill.com/guide/sms/introduction/ads-duty)
- userID `type: String` `length: 50` `required: N` `description: 팝빌회원 아이디`
- requestNum `type: String` `length: 36` `required: N` `description: 요청번호`
  - 파트너가 접수 단위를 식별하기 위해 할당하는 관리번호
  - 영문 대소문자, 숫자, 특수문자('-','\_')만 이용 가능

### 응답

String - 요청에 대한 접수번호(receiptNum)

### 예외

**PopbillException**

- code `type: Integer` `length: -` `description: API 처리 실패에 대한 오류코드`
  - 음의 정수 8자리 숫자값 [\[참고\] 오류코드](https://developers.popbill.com/error-code)
- message `type: String` `length: -` `description: API 처리 실패에 대한 오류메시지`

## 8. SendXMS\_multi - 단문/장문 자동인식 전송 (동보/대량전송)

메시지 길이(90byte)에 따라 단문/장문(SMS/LMS)을 자동으로 인식하여 다수건의 메시지 전송을 팝빌에 접수합니다. (최대 1,000건)

- 모든 수신자에게 동일한 내용을 전송하거나(동보전송), 수신자마다 개별 내용을 전송할 수 있습니다(대량전송).

```ruby
def sendXMS_multi(corpNum, sender, senderName, subject, contents, messages, reserveDT = '', adsYN = false, userID = '', requestNum = '')
```

> 발신번호는 사전에 팝빌에 등록된 번호만 사용할 수 있습니다. [\[참고\] 발신번호 사전등록](https://developers.popbill.com/guide/sms/introduction/sender-number)\
> [\[GetSenderNumberMgtURL-발신번호 등록 팝업 URL\]](https://developers.popbill.com/reference/sms/ruby/api/sendnum#GetSenderNumberMgtURL) 또는 [\[GetSenderNumberList-발신번호 목록 확인\]](https://developers.popbill.com/reference/sms/ruby/api/sendnum#GetSenderNumberList) 를 호출하여 발신번호 등록 내역을 확인할 수 있습니다.\
> 팝빌에 등록되지 않은 발신번호를 입력하는 경우 오류가 반환됩니다.

### 요청

**Parameters**

- corpNum `type: String` `length: 10` `required: Y` `description: 팝빌회원 사업자번호 ('-' 제외)`
- sender `type: String` `length: 20` `required: N` `description: 발신번호`
  - 동보전송 경우 사용
- senderName `type: String` `length: 70` `required: N` `description: 발신자명`
  - 동보전송 경우 사용
- subject `type: String` `length: 64` `required: N` `description: 메시지 제목 (단위 : byte)`
  - 동보전송 경우 입력
  - 2byte : 한글, 한자, 특수문자 / 1byte : 영문, 숫자, 공백
- contents `type: String` `length: 2000` `required: 조건부` `description: 메시지 내용 (단위 : byte)`
  - 동보전송 경우 필수
  - 2byte : 한글, 한자, 특수문자 / 1byte : 영문, 숫자, 공백
- messages `type: MessageReceiver[ ]` `length: -` `required: Y` `description: 문자 정보`
  - 최대 : 1,000개
  - rcv `type: String` `length: 20` `required: Y` `description: 수신번호`
  - rcvnm `type: String` `length: 70` `required: N` `description: 수신자명`
  - snd `type: String` `length: 20` `required: Y` `description: 발신번호`
    - 대량전송 경우 사용
  - sndnm `type: String` `length: 70` `required: N` `description: 발신자명`
    - 대량전송 경우 사용
  - msg `type: String` `length: -` `required: 조건부` `description: 메시지 내용 (단위 : byte)`
    - 대량전송 경우 필수
    - 단문 : 90byte 이하 / 장문 : 2,000byte 이하
    - 2byte : 한글, 한자, 특수문자 / 1byte : 영문, 숫자, 공백
  - sjt `type: String` `length: 64` `required: N` `description: 메시지 제목 (단위 : byte)`
    - 대량전송 경우 사용
    - 메시지 길이가 90byte 초과한 경우에만 적용
    - 2byte : 한글, 한자, 특수문자 / 1byte : 영문, 숫자, 공백
- reserveDT `type: String` `length: 14` `required: N` `description: 전송 예약일시`
  - 형식 : yyyyMMddHHmmss
  - 기본값 : 즉시전송
- adsYN `type: Boolean` `length: -` `required: N` `description: 광고메시지 전송 여부`
  - `true`: 광고
  - `false`: 일반 : 기본값
  - [\[참고\] 광고메시지 전송방법 안내](https://developers.popbill.com/guide/sms/introduction/ads-duty)
- userID `type: String` `length: 50` `required: N` `description: 팝빌회원 아이디`
- requestNum `type: String` `length: 36` `required: N` `description: 요청번호`
  - 파트너가 접수 단위를 식별하기 위해 할당하는 관리번호
  - 영문 대소문자, 숫자, 특수문자('-','\_')만 이용 가능

### 응답

String - 요청에 대한 접수번호(receiptNum)

### 예외

**PopbillException**

- code `type: Integer` `length: -` `description: API 처리 실패에 대한 오류코드`
  - 음의 정수 8자리 숫자값 [\[참고\] 오류코드](https://developers.popbill.com/error-code)
- message `type: String` `length: -` `description: API 처리 실패에 대한 오류메시지`

## 9. CancelReserve - 예약전송 취소 (접수번호)

팝빌에서 반환받은 접수번호로 예약된 문자를 전송 취소합니다. (예약시간 10분 전까지 가능)

```ruby
def cancelReserve(corpNum, receiptNum, userID = '')
```

### 요청

**Parameters**

- corpNum `type: String` `length: 10` `required: Y` `description: 팝빌회원 사업자번호 ('-' 제외)`
- receiptNum `type: String` `length: 18` `required: Y` `description: 팝빌에서 할당한 접수번호`
  - 문자 예약전송 요청의 반환값
- userID `type: String` `length: 50` `required: N` `description: 팝빌회원 아이디`

### 응답

**Response**

- code `type: Integer` `length: -` `description: API 처리에 대한 응답코드`
  - `1`: 성공
- message `type: String` `length: -` `description: API 처리에 대한 응답메시지`

### 예외

**PopbillException**

- code `type: Integer` `length: -` `description: API 처리 실패에 대한 오류코드`
  - 음의 정수 8자리 숫자값 [\[참고\] 오류코드](https://developers.popbill.com/error-code)
- message `type: String` `length: -` `description: API 처리 실패에 대한 오류메시지`

## 10. CancelReserveRN - 예약전송 취소 (요청번호)

파트너가 할당한 요청번호로 예약된 문자를 전송 취소합니다. (예약시간 10분 전까지 가능)

```ruby
def cancelReserveRN(corpNum, requestNum, userID = '')
```

### 요청

**Parameters**

- corpNum `type: String` `length: 10` `required: Y` `description: 팝빌회원 사업자번호 ('-' 제외)`
- requestNum `type: String` `length: 36` `required: Y` `description: 파트너가 할당한 요청번호`
- userID `type: String` `length: 50` `required: N` `description: 팝빌회원 아이디`

### 응답

**Response**

- code `type: Integer` `length: -` `description: API 처리에 대한 응답코드`
  - `1`: 성공
- message `type: String` `length: -` `description: API 처리에 대한 응답메시지`

### 예외

**PopbillException**

- code `type: Integer` `length: -` `description: API 처리 실패에 대한 오류코드`
  - 음의 정수 8자리 숫자값 [\[참고\] 오류코드](https://developers.popbill.com/error-code)
- message `type: String` `length: -` `description: API 처리 실패에 대한 오류메시지`
