여러건 발송

Request

POST https://api.solapi.com/messages/v4/send-many

하나 이상의 메시지를 발송합니다. 대량 발송은 그룹 메시지를 사용하세요.

홈페이지의 문자발송 내역에서 전송결과 내역을 확인하실 수 있습니다. (로그인 필요)

전송 내역(메시지 그룹, 메시지 목록)의 보관기간은 생성일 기준 6개월 입니다. 6개월이 지난 내역은 조회가 불가능합니다.

Authorization 인증 필요 [?]

계정 권한회원 권한계정 상태회원 상태계정 인증

message:write

role-message:write

ACTIVE

ACTIVE

Request Structure

{
    "messages": "Array",
    "strict": "boolean",
    "agent": "object",
    "allowDuplicates": "boolean"
}

Body Params

NameTypeRequiredDescription

messages

Array

O

발송할 메시지 내용

strict

boolean

설명 없음

object

에이전트

allowDuplicates

boolean

설명 없음

Body / agent

NameTypeRequiredDescription

appId

string

앱 아이디

osPlatform

string

OS 플렛폼

sdkVersion

string

SDK 버전


Response

Response Structure

{
    "groupId": "string",
    "messageId": "string",
    "accountId": "string",
    "statusMessage": "string",
    "statusCode": "string",
    "to": "string",
    "from": "string",
    "type": "string",
    "country": "string"
}

Response Description

Response /

NameTypeShould ReturnDescription

groupId

string

O

그룹 아이디

messageId

string

O

메시지 아이디

accountId

string

O

계정 고유 번호

statusMessage

string

O

상태 메시지 참고

statusCode

string

O

상태 코드 참고

to

string

O

수신번호

from

string

O

발신번호 사전 등록된 전화번호만 사용 가능

type

string

O

메시지 타입

country

string

O

국가번호 (기본: 82, 미국(캐나다):1, 중국: 86, 일본: 81)


Samples

메시지 발송 (type: Auto Detect)

Sample Request

{
    "messages": [
        {
            "to": "01000000001",
            "from": "029302266",
            "text": "내용"
        }
    ]
}

Sample Response

{
    "count": {
        "total": 1,
        "sentTotal": 0,
        "sentFailed": 0,
        "sentSuccess": 0,
        "sentPending": 0,
        "sentReplacement": 0,
        "refund": 0,
        "registeredFailed": 0,
        "registeredSuccess": 1
    },
    "countForCharge": {
        "sms": {
            "82": 1
        },
        "lms": {},
        "mms": {},
        "ata": {},
        "cta": {},
        "cti": {},
        "nsa": {},
        "rcs_sms": {},
        "rcs_lms": {},
        "rcs_mms": {},
        "rcs_tpl": {}
    },
    "balance": {
        "requested": 0,
        "replacement": 0,
        "refund": 0,
        "sum": 0
    },
    "point": {
        "requested": 50,
        "replacement": 0,
        "refund": 0,
        "sum": 0
    },
    "app": {
        "profit": {
            "sms": 0,
            "lms": 0,
            "mms": 0,
            "ata": 0,
            "cta": 0,
            "cti": 0,
            "nsa": 0,
            "rcs_sms": 0,
            "rcs_lms": 0,
            "rcs_mms": 0,
            "rcs_tpl": 0
        },
        "appId": null,
        "version": null
    },
    "serviceMethod": "MT",
    "sdkVersion": null,
    "osPlatform": null,
    "log": [
        {
            "createAt": "2021-11-16T05:09:50.838Z",
            "message": "[::ffff:127.0.0.1] 메시지 그룹이 생성되었습니다."
        },
        {
            "createAt": "2021-11-16T05:09:50.864Z",
            "message": "국가코드(82)의 단문문자(SMS) 1 건이 추가되었습니다."
        },
        {
            "createAt": "2021-11-16T05:09:50.889Z",
            "message": "메시지를 발송했습니다.",
            "oldBalance": 100,
            "newBalance": 100,
            "oldPoint": 100,
            "newPoint": 50,
            "totalPrice": 0
        }
    ],
    "status": "SENDING",
    "dateSent": "2021-11-16T05:09:50.889Z",
    "dateCompleted": null,
    "isRefunded": false,
    "flagUpdated": false,
    "prepaid": true,
    "strict": false,
    "masterAccountId": null,
    "allowDuplicates": false,
    "_id": "G4V20211116140950FNBDVHMD64V2SO0",
    "accountId": "12925149",
    "apiVersion": "4",
    "customFields": {},
    "hint": null,
    "groupId": "G4V20211116140950FNBDVHMD64V2SO0",
    "price": {
        "82": []
    },
    "dateCreated": "2021-11-16T05:09:50.841Z",
    "dateUpdated": "2021-11-16T05:09:50.889Z"
}

Sample Code

var request = require('request');

var options = {
  headers: {
    Authorization:
      'HMAC-SHA256 apiKey=NCSAYU7YDBXYORXC, date=2019-07-01T00:41:48Z, salt=jqsba2jxjnrjor, signature=1779eac71a24cbeeadfa7263cb84b7ea0af1714f5c0270aa30ffd34600e363b4',
    'Content-Type': 'application/json'
  },
  body: {
    messages: [
      {
        to: '01000000001',
        from: '029302266',
        text: '내용'
      }
    ]
  },
  method: 'POST',
  json: true,
  url: 'http://api.solapi.com/messages/v4/send-many'
};

request(options, function(error, response, body) {
  if (error) throw error;
  console.log('result :', body);
});

단문문자(SMS) 발송

Sample Request

{
    "messages": [
        {
            "to": "01000000001",
            "from": "029302266",
            "text": "내용",
            "type": "SMS"
        }
    ]
}

Sample Response

{
    "count": {
        "total": 1,
        "sentTotal": 0,
        "sentFailed": 0,
        "sentSuccess": 0,
        "sentPending": 0,
        "sentReplacement": 0,
        "refund": 0,
        "registeredFailed": 0,
        "registeredSuccess": 1
    },
    "countForCharge": {
        "sms": {
            "82": 1
        },
        "lms": {},
        "mms": {},
        "ata": {},
        "cta": {},
        "cti": {},
        "nsa": {},
        "rcs_sms": {},
        "rcs_lms": {},
        "rcs_mms": {},
        "rcs_tpl": {}
    },
    "balance": {
        "requested": 0,
        "replacement": 0,
        "refund": 0,
        "sum": 0
    },
    "point": {
        "requested": 50,
        "replacement": 0,
        "refund": 0,
        "sum": 0
    },
    "app": {
        "profit": {
            "sms": 0,
            "lms": 0,
            "mms": 0,
            "ata": 0,
            "cta": 0,
            "cti": 0,
            "nsa": 0,
            "rcs_sms": 0,
            "rcs_lms": 0,
            "rcs_mms": 0,
            "rcs_tpl": 0
        },
        "appId": null,
        "version": null
    },
    "serviceMethod": "MT",
    "sdkVersion": null,
    "osPlatform": null,
    "log": [
        {
            "createAt": "2021-11-16T05:09:50.950Z",
            "message": "[::ffff:127.0.0.1] 메시지 그룹이 생성되었습니다."
        },
        {
            "createAt": "2021-11-16T05:09:50.980Z",
            "message": "국가코드(82)의 단문문자(SMS) 1 건이 추가되었습니다."
        },
        {
            "createAt": "2021-11-16T05:09:51.005Z",
            "message": "메시지를 발송했습니다.",
            "oldBalance": 100,
            "newBalance": 100,
            "oldPoint": 100,
            "newPoint": 50,
            "totalPrice": 0
        }
    ],
    "status": "SENDING",
    "dateSent": "2021-11-16T05:09:51.005Z",
    "dateCompleted": null,
    "isRefunded": false,
    "flagUpdated": false,
    "prepaid": true,
    "strict": false,
    "masterAccountId": null,
    "allowDuplicates": false,
    "_id": "G4V202111161409508Q0CC8O5TWOQU3D",
    "accountId": "12925149",
    "apiVersion": "4",
    "customFields": {},
    "hint": null,
    "groupId": "G4V202111161409508Q0CC8O5TWOQU3D",
    "price": {
        "82": []
    },
    "dateCreated": "2021-11-16T05:09:50.953Z",
    "dateUpdated": "2021-11-16T05:09:51.005Z"
}

Sample Code

var request = require('request');

var options = {
  headers: {
    Authorization:
      'HMAC-SHA256 apiKey=NCSAYU7YDBXYORXC, date=2019-07-01T00:41:48Z, salt=jqsba2jxjnrjor, signature=1779eac71a24cbeeadfa7263cb84b7ea0af1714f5c0270aa30ffd34600e363b4',
    'Content-Type': 'application/json'
  },
  body: {
    messages: [
      {
        to: '01000000001',
        from: '029302266',
        text: '내용',
        type: 'SMS'
      }
    ]
  },
  method: 'POST',
  json: true,
  url: 'http://api.solapi.com/messages/v4/send-many'
};

request(options, function(error, response, body) {
  if (error) throw error;
  console.log('result :', body);
});

장문문자(LMS) 발송

Sample Request

{
    "messages": [
        {
            "to": "01000000001",
            "from": "029302266",
            "subject": "별 헤는 밤",
            "text": "봄이 어머니, 패, 한 부끄러운 이웃 별 옥 계집애들의 계십니다. 내린 아무 아름다운 나는 이름을 있습니다. 위에도 하나에 못 북간도에 새워 강아지, 말 비둘기, 헤는 듯합니다. 가을로 했던 위에도 이름자를 봅니다. 아무 새겨지는 별 너무나 토끼, 듯합니다. 청춘이 헤는 토끼, 계절이 많은 듯합니다. 아름다운 못 내 그리고 아직 청춘이 라이너 버리었습니다. 벌레는 까닭이요, 어머니 봅니다. 속의 아이들의 나는 프랑시스 있습니다. 밤이 강아지, 하나 계십니다. 잔디가 이름과 별 프랑시스 하나에 하나 계십니다.",
            "type": "LMS"
        }
    ]
}

Sample Response

{
    "count": {
        "total": 1,
        "sentTotal": 0,
        "sentFailed": 0,
        "sentSuccess": 0,
        "sentPending": 0,
        "sentReplacement": 0,
        "refund": 0,
        "registeredFailed": 0,
        "registeredSuccess": 1
    },
    "countForCharge": {
        "sms": {},
        "lms": {
            "82": 1
        },
        "mms": {},
        "ata": {},
        "cta": {},
        "cti": {},
        "nsa": {},
        "rcs_sms": {},
        "rcs_lms": {},
        "rcs_mms": {},
        "rcs_tpl": {}
    },
    "balance": {
        "requested": 0,
        "replacement": 0,
        "refund": 0,
        "sum": 0
    },
    "point": {
        "requested": 50,
        "replacement": 0,
        "refund": 0,
        "sum": 0
    },
    "app": {
        "profit": {
            "sms": 0,
            "lms": 0,
            "mms": 0,
            "ata": 0,
            "cta": 0,
            "cti": 0,
            "nsa": 0,
            "rcs_sms": 0,
            "rcs_lms": 0,
            "rcs_mms": 0,
            "rcs_tpl": 0
        },
        "appId": null,
        "version": null
    },
    "serviceMethod": "MT",
    "sdkVersion": null,
    "osPlatform": null,
    "log": [
        {
            "createAt": "2021-11-16T05:09:51.071Z",
            "message": "[::ffff:127.0.0.1] 메시지 그룹이 생성되었습니다."
        },
        {
            "createAt": "2021-11-16T05:09:51.097Z",
            "message": "국가코드(82)의 장문문자(LMS) 1 건이 추가되었습니다."
        },
        {
            "createAt": "2021-11-16T05:09:51.129Z",
            "message": "메시지를 발송했습니다.",
            "oldBalance": 100,
            "newBalance": 100,
            "oldPoint": 100,
            "newPoint": 50,
            "totalPrice": 0
        }
    ],
    "status": "SENDING",
    "dateSent": "2021-11-16T05:09:51.129Z",
    "dateCompleted": null,
    "isRefunded": false,
    "flagUpdated": false,
    "prepaid": true,
    "strict": false,
    "masterAccountId": null,
    "allowDuplicates": false,
    "_id": "G4V20211116140951SKDYVTDYPNFU4NQ",
    "accountId": "12925149",
    "apiVersion": "4",
    "customFields": {},
    "hint": null,
    "groupId": "G4V20211116140951SKDYVTDYPNFU4NQ",
    "price": {
        "82": []
    },
    "dateCreated": "2021-11-16T05:09:51.073Z",
    "dateUpdated": "2021-11-16T05:09:51.129Z"
}

Sample Code

var request = require('request');

var options = {
  headers: {
    Authorization:
      'HMAC-SHA256 apiKey=NCSAYU7YDBXYORXC, date=2019-07-01T00:41:48Z, salt=jqsba2jxjnrjor, signature=1779eac71a24cbeeadfa7263cb84b7ea0af1714f5c0270aa30ffd34600e363b4',
    'Content-Type': 'application/json'
  },
  body: {
    messages: [
      {
        to: '01000000001',
        from: '029302266',
        subject: '별 헤는 밤',
        text:
          '봄이 어머니, 패, 한 부끄러운 이웃 별 옥 계집애들의 계십니다. 내린 아무 아름다운 나는 이름을 있습니다. 위에도 하나에 못 북간도에 새워 강아지, 말 비둘기, 헤는 듯합니다. 가을로 했던 위에도 이름자를 봅니다. 아무 새겨지는 별 너무나 토끼, 듯합니다. 청춘이 헤는 토끼, 계절이 많은 듯합니다. 아름다운 못 내 그리고 아직 청춘이 라이너 버리었습니다. 벌레는 까닭이요, 어머니 봅니다. 속의 아이들의 나는 프랑시스 있습니다. 밤이 강아지, 하나 계십니다. 잔디가 이름과 별 프랑시스 하나에 하나 계십니다.',
        type: 'LMS'
      }
    ]
  },
  method: 'POST',
  json: true,
  url: 'http://api.solapi.com/messages/v4/send-many'
};

request(options, function(error, response, body) {
  if (error) throw error;
  console.log('result :', body);
});

사진문자(MMS) 발송

Sample Request

{
    "messages": [
        {
            "to": "01000000001",
            "from": "029302266",
            "subject": "제목",
            "text": "내용",
            "type": "MMS",
            "imageId": "FILEID191113003354156UvCuw3tubTl"
        }
    ]
}

Sample Response

{
    "count": {
        "total": 1,
        "sentTotal": 0,
        "sentFailed": 0,
        "sentSuccess": 0,
        "sentPending": 0,
        "sentReplacement": 0,
        "refund": 0,
        "registeredFailed": 0,
        "registeredSuccess": 1
    },
    "countForCharge": {
        "sms": {},
        "lms": {},
        "mms": {
            "82": 1
        },
        "ata": {},
        "cta": {},
        "cti": {},
        "nsa": {},
        "rcs_sms": {},
        "rcs_lms": {},
        "rcs_mms": {},
        "rcs_tpl": {}
    },
    "balance": {
        "requested": 0,
        "replacement": 0,
        "refund": 0,
        "sum": 0
    },
    "point": {
        "requested": 50,
        "replacement": 0,
        "refund": 0,
        "sum": 0
    },
    "app": {
        "profit": {
            "sms": 0,
            "lms": 0,
            "mms": 0,
            "ata": 0,
            "cta": 0,
            "cti": 0,
            "nsa": 0,
            "rcs_sms": 0,
            "rcs_lms": 0,
            "rcs_mms": 0,
            "rcs_tpl": 0
        },
        "appId": null,
        "version": null
    },
    "serviceMethod": "MT",
    "sdkVersion": null,
    "osPlatform": null,
    "log": [
        {
            "createAt": "2021-11-16T05:09:51.186Z",
            "message": "[::ffff:127.0.0.1] 메시지 그룹이 생성되었습니다."
        },
        {
            "createAt": "2021-11-16T05:09:51.222Z",
            "message": "국가코드(82)의 포토문자(MMS) 1 건이 추가되었습니다."
        },
        {
            "createAt": "2021-11-16T05:09:51.246Z",
            "message": "메시지를 발송했습니다.",
            "oldBalance": 100,
            "newBalance": 100,
            "oldPoint": 100,
            "newPoint": 50,
            "totalPrice": 0
        }
    ],
    "status": "SENDING",
    "dateSent": "2021-11-16T05:09:51.246Z",
    "dateCompleted": null,
    "isRefunded": false,
    "flagUpdated": false,
    "prepaid": true,
    "strict": false,
    "masterAccountId": null,
    "allowDuplicates": false,
    "_id": "G4V20211116140951UQAISDJ0JIHWZZP",
    "accountId": "12925149",
    "apiVersion": "4",
    "customFields": {},
    "hint": null,
    "groupId": "G4V20211116140951UQAISDJ0JIHWZZP",
    "price": {
        "82": []
    },
    "dateCreated": "2021-11-16T05:09:51.189Z",
    "dateUpdated": "2021-11-16T05:09:51.246Z"
}

Sample Code

var request = require('request');

var options = {
  headers: {
    Authorization:
      'HMAC-SHA256 apiKey=NCSAYU7YDBXYORXC, date=2019-07-01T00:41:48Z, salt=jqsba2jxjnrjor, signature=1779eac71a24cbeeadfa7263cb84b7ea0af1714f5c0270aa30ffd34600e363b4',
    'Content-Type': 'application/json'
  },
  body: {
    messages: [
      {
        to: '01000000001',
        from: '029302266',
        subject: '제목',
        text: '내용',
        type: 'MMS',
        imageId: 'FILEID191113003354156UvCuw3tubTl'
      }
    ]
  },
  method: 'POST',
  json: true,
  url: 'http://api.solapi.com/messages/v4/send-many'
};

request(options, function(error, response, body) {
  if (error) throw error;
  console.log('result :', body);
});

알림톡(ATA) 발송

Sample Request

{
    "messages": [
        {
            "to": "01000000001",
            "from": "029302266",
            "text": "#{홍길동}님이 요청하신 출금 요청 처리가 완료되어 아래 정보로 입금 처리되었습니다. #{입금정보} 관련하여 문의 있으시다면'1:1문의하기'를이용부탁드립니다. 감사합니다.",
            "type": "ATA",
            "kakaoOptions": {
                "pfId": "KA01PF190227072057634pRBhbpAw1w1",
                "templateId": "test_2019030716320324334488000",
                "buttons": [
                    {
                        "buttonType": "WL",
                        "buttonName": "1:1문의",
                        "linkMo": "https://www.example.com"
                    }
                ]
            }
        }
    ]
}

Sample Response

{
    "count": {
        "total": 1,
        "sentTotal": 0,
        "sentFailed": 0,
        "sentSuccess": 0,
        "sentPending": 0,
        "sentReplacement": 0,
        "refund": 0,
        "registeredFailed": 0,
        "registeredSuccess": 1
    },
    "countForCharge": {
        "sms": {},
        "lms": {},
        "mms": {},
        "ata": {
            "82": 1
        },
        "cta": {},
        "cti": {},
        "nsa": {},
        "rcs_sms": {},
        "rcs_lms": {},
        "rcs_mms": {},
        "rcs_tpl": {}
    },
    "balance": {
        "requested": 0,
        "replacement": 0,
        "refund": 0,
        "sum": 0
    },
    "point": {
        "requested": 50,
        "replacement": 0,
        "refund": 0,
        "sum": 0
    },
    "app": {
        "profit": {
            "sms": 0,
            "lms": 0,
            "mms": 0,
            "ata": 0,
            "cta": 0,
            "cti": 0,
            "nsa": 0,
            "rcs_sms": 0,
            "rcs_lms": 0,
            "rcs_mms": 0,
            "rcs_tpl": 0
        },
        "appId": null,
        "version": null
    },
    "serviceMethod": "MT",
    "sdkVersion": null,
    "osPlatform": null,
    "log": [
        {
            "createAt": "2021-11-16T05:09:51.308Z",
            "message": "[::ffff:127.0.0.1] 메시지 그룹이 생성되었습니다."
        },
        {
            "createAt": "2021-11-16T05:09:51.338Z",
            "message": "국가코드(82)의 알림톡(ATA) 1 건이 추가되었습니다."
        },
        {
            "createAt": "2021-11-16T05:09:51.363Z",
            "message": "메시지를 발송했습니다.",
            "oldBalance": 100,
            "newBalance": 100,
            "oldPoint": 100,
            "newPoint": 50,
            "totalPrice": 0
        }
    ],
    "status": "SENDING",
    "dateSent": "2021-11-16T05:09:51.363Z",
    "dateCompleted": null,
    "isRefunded": false,
    "flagUpdated": false,
    "prepaid": true,
    "strict": false,
    "masterAccountId": null,
    "allowDuplicates": false,
    "_id": "G4V20211116140951LIGVKSAMJSPGJJX",
    "accountId": "12925149",
    "apiVersion": "4",
    "customFields": {},
    "hint": null,
    "groupId": "G4V20211116140951LIGVKSAMJSPGJJX",
    "price": {
        "82": []
    },
    "dateCreated": "2021-11-16T05:09:51.311Z",
    "dateUpdated": "2021-11-16T05:09:51.364Z"
}

Sample Code

var request = require('request');

var options = {
  headers: {
    Authorization:
      'HMAC-SHA256 apiKey=NCSAYU7YDBXYORXC, date=2019-07-01T00:41:48Z, salt=jqsba2jxjnrjor, signature=1779eac71a24cbeeadfa7263cb84b7ea0af1714f5c0270aa30ffd34600e363b4',
    'Content-Type': 'application/json'
  },
  body: {
    messages: [
      {
        to: '01000000001',
        from: '029302266',
        text:
          "#{홍길동}님이 요청하신 출금 요청 처리가 완료되어 아래 정보로 입금 처리되었습니다. #{입금정보} 관련하여 문의 있으시다면'1:1문의하기'를이용부탁드립니다. 감사합니다.",
        type: 'ATA',
        kakaoOptions: {
          pfId: 'KA01PF190227072057634pRBhbpAw1w1',
          templateId: 'test_2019030716320324334488000',
          buttons: [
            {
              buttonType: 'WL',
              buttonName: '1:1문의',
              linkMo: 'https://www.example.com'
            }
          ]
        }
      }
    ]
  },
  method: 'POST',
  json: true,
  url: 'http://api.solapi.com/messages/v4/send-many'
};

request(options, function(error, response, body) {
  if (error) throw error;
  console.log('result :', body);
});

친구톡(CTA) 발송

Sample Request

{
    "messages": [
        {
            "to": "01000000001",
            "from": "029302266",
            "text": "내용",
            "type": "CTA",
            "kakaoOptions": {
                "pfId": "KA01PF190227072057634pRBhbpAw1w1"
            }
        }
    ]
}

Sample Response

{
    "count": {
        "total": 1,
        "sentTotal": 0,
        "sentFailed": 0,
        "sentSuccess": 0,
        "sentPending": 0,
        "sentReplacement": 0,
        "refund": 0,
        "registeredFailed": 0,
        "registeredSuccess": 1
    },
    "countForCharge": {
        "sms": {},
        "lms": {},
        "mms": {},
        "ata": {},
        "cta": {
            "82": 1
        },
        "cti": {},
        "nsa": {},
        "rcs_sms": {},
        "rcs_lms": {},
        "rcs_mms": {},
        "rcs_tpl": {}
    },
    "balance": {
        "requested": 0,
        "replacement": 0,
        "refund": 0,
        "sum": 0
    },
    "point": {
        "requested": 50,
        "replacement": 0,
        "refund": 0,
        "sum": 0
    },
    "app": {
        "profit": {
            "sms": 0,
            "lms": 0,
            "mms": 0,
            "ata": 0,
            "cta": 0,
            "cti": 0,
            "nsa": 0,
            "rcs_sms": 0,
            "rcs_lms": 0,
            "rcs_mms": 0,
            "rcs_tpl": 0
        },
        "appId": null,
        "version": null
    },
    "serviceMethod": "MT",
    "sdkVersion": null,
    "osPlatform": null,
    "log": [
        {
            "createAt": "2021-11-16T05:09:51.424Z",
            "message": "[::ffff:127.0.0.1] 메시지 그룹이 생성되었습니다."
        },
        {
            "createAt": "2021-11-16T05:09:51.464Z",
            "message": "국가코드(82)의 친구톡(CTA) 1 건이 추가되었습니다."
        },
        {
            "createAt": "2021-11-16T05:09:51.491Z",
            "message": "메시지를 발송했습니다.",
            "oldBalance": 100,
            "newBalance": 100,
            "oldPoint": 100,
            "newPoint": 50,
            "totalPrice": 0
        }
    ],
    "status": "SENDING",
    "dateSent": "2021-11-16T05:09:51.491Z",
    "dateCompleted": null,
    "isRefunded": false,
    "flagUpdated": false,
    "prepaid": true,
    "strict": false,
    "masterAccountId": null,
    "allowDuplicates": false,
    "_id": "G4V20211116140951AZFHEKXMWLUUHAL",
    "accountId": "12925149",
    "apiVersion": "4",
    "customFields": {},
    "hint": null,
    "groupId": "G4V20211116140951AZFHEKXMWLUUHAL",
    "price": {
        "82": []
    },
    "dateCreated": "2021-11-16T05:09:51.426Z",
    "dateUpdated": "2021-11-16T05:09:51.491Z"
}

Sample Code

var request = require('request');

var options = {
  headers: {
    Authorization:
      'HMAC-SHA256 apiKey=NCSAYU7YDBXYORXC, date=2019-07-01T00:41:48Z, salt=jqsba2jxjnrjor, signature=1779eac71a24cbeeadfa7263cb84b7ea0af1714f5c0270aa30ffd34600e363b4',
    'Content-Type': 'application/json'
  },
  body: {
    messages: [
      {
        to: '01000000001',
        from: '029302266',
        text: '내용',
        type: 'CTA',
        kakaoOptions: {
          pfId: 'KA01PF190227072057634pRBhbpAw1w1'
        }
      }
    ]
  },
  method: 'POST',
  json: true,
  url: 'http://api.solapi.com/messages/v4/send-many'
};

request(options, function(error, response, body) {
  if (error) throw error;
  console.log('result :', body);
});

친구톡 사진(CTI) 발송

Sample Request

{
    "messages": [
        {
            "to": "01000000001",
            "from": "029302266",
            "text": "내용",
            "type": "CTI",
            "kakaoOptions": {
                "pfId": "KA01PF190227072057634pRBhbpAw1w1",
                "imageId": "FILEID191113003354156UvCuw3tubTl"
            }
        }
    ]
}

Sample Response

{
    "count": {
        "total": 1,
        "sentTotal": 0,
        "sentFailed": 0,
        "sentSuccess": 0,
        "sentPending": 0,
        "sentReplacement": 0,
        "refund": 0,
        "registeredFailed": 0,
        "registeredSuccess": 1
    },
    "countForCharge": {
        "sms": {},
        "lms": {},
        "mms": {},
        "ata": {},
        "cta": {},
        "cti": {
            "82": 1
        },
        "nsa": {},
        "rcs_sms": {},
        "rcs_lms": {},
        "rcs_mms": {},
        "rcs_tpl": {}
    },
    "balance": {
        "requested": 0,
        "replacement": 0,
        "refund": 0,
        "sum": 0
    },
    "point": {
        "requested": 50,
        "replacement": 0,
        "refund": 0,
        "sum": 0
    },
    "app": {
        "profit": {
            "sms": 0,
            "lms": 0,
            "mms": 0,
            "ata": 0,
            "cta": 0,
            "cti": 0,
            "nsa": 0,
            "rcs_sms": 0,
            "rcs_lms": 0,
            "rcs_mms": 0,
            "rcs_tpl": 0
        },
        "appId": null,
        "version": null
    },
    "serviceMethod": "MT",
    "sdkVersion": null,
    "osPlatform": null,
    "log": [
        {
            "createAt": "2021-11-16T05:09:51.556Z",
            "message": "[::ffff:127.0.0.1] 메시지 그룹이 생성되었습니다."
        },
        {
            "createAt": "2021-11-16T05:09:51.590Z",
            "message": "국가코드(82)의 친구톡 이미지(CTI) 1 건이 추가되었습니다."
        },
        {
            "createAt": "2021-11-16T05:09:51.622Z",
            "message": "메시지를 발송했습니다.",
            "oldBalance": 100,
            "newBalance": 100,
            "oldPoint": 100,
            "newPoint": 50,
            "totalPrice": 0
        }
    ],
    "status": "SENDING",
    "dateSent": "2021-11-16T05:09:51.622Z",
    "dateCompleted": null,
    "isRefunded": false,
    "flagUpdated": false,
    "prepaid": true,
    "strict": false,
    "masterAccountId": null,
    "allowDuplicates": false,
    "_id": "G4V20211116140951EJWUFKL7EZQ7WYF",
    "accountId": "12925149",
    "apiVersion": "4",
    "customFields": {},
    "hint": null,
    "groupId": "G4V20211116140951EJWUFKL7EZQ7WYF",
    "price": {
        "82": []
    },
    "dateCreated": "2021-11-16T05:09:51.558Z",
    "dateUpdated": "2021-11-16T05:09:51.622Z"
}

Sample Code

var request = require('request');

var options = {
  headers: {
    Authorization:
      'HMAC-SHA256 apiKey=NCSAYU7YDBXYORXC, date=2019-07-01T00:41:48Z, salt=jqsba2jxjnrjor, signature=1779eac71a24cbeeadfa7263cb84b7ea0af1714f5c0270aa30ffd34600e363b4',
    'Content-Type': 'application/json'
  },
  body: {
    messages: [
      {
        to: '01000000001',
        from: '029302266',
        text: '내용',
        type: 'CTI',
        kakaoOptions: {
          pfId: 'KA01PF190227072057634pRBhbpAw1w1',
          imageId: 'FILEID191113003354156UvCuw3tubTl'
        }
      }
    ]
  },
  method: 'POST',
  json: true,
  url: 'http://api.solapi.com/messages/v4/send-many'
};

request(options, function(error, response, body) {
  if (error) throw error;
  console.log('result :', body);
});

sendMany

Sample Request

{
    "messages": [
        {
            "to": [
                "01000000001",
                "01000000001"
            ],
            "from": "029302266",
            "text": "내용",
            "autoTypeDetect": true
        }
    ]
}

Sample Response

{
    "count": {
        "total": 2,
        "sentTotal": 0,
        "sentFailed": 0,
        "sentSuccess": 0,
        "sentPending": 0,
        "sentReplacement": 0,
        "refund": 0,
        "registeredFailed": 1,
        "registeredSuccess": 1
    },
    "countForCharge": {
        "sms": {
            "82": 1
        },
        "lms": {},
        "mms": {},
        "ata": {},
        "cta": {},
        "cti": {},
        "nsa": {},
        "rcs_sms": {},
        "rcs_lms": {},
        "rcs_mms": {},
        "rcs_tpl": {}
    },
    "balance": {
        "requested": 0,
        "replacement": 0,
        "refund": 0,
        "sum": 0
    },
    "point": {
        "requested": 50,
        "replacement": 0,
        "refund": 0,
        "sum": 0
    },
    "app": {
        "profit": {
            "sms": 0,
            "lms": 0,
            "mms": 0,
            "ata": 0,
            "cta": 0,
            "cti": 0,
            "nsa": 0,
            "rcs_sms": 0,
            "rcs_lms": 0,
            "rcs_mms": 0,
            "rcs_tpl": 0
        },
        "appId": null,
        "version": null
    },
    "serviceMethod": "MT",
    "sdkVersion": null,
    "osPlatform": null,
    "log": [
        {
            "createAt": "2021-11-16T05:09:50.499Z",
            "message": "[::ffff:127.0.0.1] 메시지 그룹이 생성되었습니다."
        },
        {
            "createAt": "2021-11-16T05:09:50.525Z",
            "message": "국가코드(82)의 단문문자(SMS) 1 건이 추가되었습니다."
        },
        {
            "createAt": "2021-11-16T05:09:50.548Z",
            "message": "메시지를 발송했습니다.",
            "oldBalance": 100,
            "newBalance": 100,
            "oldPoint": 100,
            "newPoint": 50,
            "totalPrice": 0
        }
    ],
    "status": "SENDING",
    "dateSent": "2021-11-16T05:09:50.548Z",
    "dateCompleted": null,
    "isRefunded": false,
    "flagUpdated": false,
    "prepaid": true,
    "strict": false,
    "masterAccountId": null,
    "allowDuplicates": false,
    "_id": "G4V20211116140950WPRYM1RZL43EIFE",
    "accountId": "12925149",
    "apiVersion": "4",
    "customFields": {},
    "hint": null,
    "groupId": "G4V20211116140950WPRYM1RZL43EIFE",
    "price": {
        "82": []
    },
    "dateCreated": "2021-11-16T05:09:50.501Z",
    "dateUpdated": "2021-11-16T05:09:50.549Z"
}

Sample Code

var request = require('request');

var options = {
  headers: {
    Authorization:
      'HMAC-SHA256 apiKey=NCSAYU7YDBXYORXC, date=2019-07-01T00:41:48Z, salt=jqsba2jxjnrjor, signature=1779eac71a24cbeeadfa7263cb84b7ea0af1714f5c0270aa30ffd34600e363b4',
    'Content-Type': 'application/json'
  },
  body: {
    messages: [
      {
        to: ['01000000001', '01000000001'],
        from: '029302266',
        text: '내용',
        autoTypeDetect: true
      }
    ]
  },
  method: 'POST',
  json: true,
  url: 'http://api.solapi.com/messages/v4/send-many'
};

request(options, function(error, response, body) {
  if (error) throw error;
  console.log('result :', body);
});

문서 생성일 : 2021-11-16

Last updated