단일 메시지

Request

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

하나의 메시지를 발송합니다. 2개 이상의 메시지는 그룹 메시지를 사용하세요.

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

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

Authorization 인증 필요 [?]

Request Structure

{
    "message": "object",
    "strict": "boolean",
    "agent": "object",
    "allowDuplicates": "boolean"
}

Body Params

Body / message

Body / message / kakaoOptions

Body / message / kakaoOptions / variables

Body / message / kakaoOptions / buttons

Body / message / naverOptions

Body / message / naverOptions / variables

Body / message / naverOptions / buttons

Body / message / rcsOptions

Body / message / rcsOptions / variables

Body / message / rcsOptions / additionalBody

Body / message / rcsOptions / additionalBody / buttons

Body / message / rcsOptions / buttons

Body / message / customFields

Body / agent


Response

Response Structure

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

Response Description

Response /


Samples

메시지 발송 (type: Auto Detect)

Sample Request

{
    "message": {
        "to": "01000000001",
        "from": "029302266",
        "text": "내용"
    }
}

Sample Response

{
    "groupId": "G4V20211116140944NLZUCJOCVNOYW9Y",
    "to": "01000000001",
    "from": "029302266",
    "type": "SMS",
    "statusMessage": "정상 접수(이통사로 접수 예정) ",
    "country": "82",
    "messageId": "M4V20211116140944VNOQH1HURYHEWL8",
    "statusCode": "2000",
    "accountId": "12925149"
}

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: {
    message: {
      to: '01000000001',
      from: '029302266',
      text: '내용'
    }
  },
  method: 'POST',
  json: true,
  url: 'http://api.solapi.com/messages/v4/send'
};

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

단문문자(SMS) 발송

Sample Request

{
    "message": {
        "to": "01000000001",
        "from": "029302266",
        "text": "내용",
        "type": "SMS"
    }
}

Sample Response

{
    "groupId": "G4V20211116140944BCLIG9ES8GNDEWD",
    "to": "01000000001",
    "from": "029302266",
    "type": "SMS",
    "statusMessage": "정상 접수(이통사로 접수 예정) ",
    "country": "82",
    "messageId": "M4V20211116140944ZD7XAL8ZZJHXELL",
    "statusCode": "2000",
    "accountId": "12925149"
}

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: {
    message: {
      to: '01000000001',
      from: '029302266',
      text: '내용',
      type: 'SMS'
    }
  },
  method: 'POST',
  json: true,
  url: 'http://api.solapi.com/messages/v4/send'
};

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

장문문자(LMS) 발송

Sample Request

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

Sample Response

{
    "groupId": "G4V20211116140944PEIEQC7SAOFWBAP",
    "to": "01000000001",
    "from": "029302266",
    "type": "LMS",
    "statusMessage": "정상 접수(이통사로 접수 예정) ",
    "country": "82",
    "messageId": "M4V20211116140944XDPZ2G44FRLYEX7",
    "statusCode": "2000",
    "accountId": "12925149"
}

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: {
    message: {
      to: '01000000001',
      from: '029302266',
      subject: '별 헤는 밤',
      text:
        '봄이 어머니, 패, 한 부끄러운 이웃 별 옥 계집애들의 계십니다. 내린 아무 아름다운 나는 이름을 있습니다. 위에도 하나에 못 북간도에 새워 강아지, 말 비둘기, 헤는 듯합니다. 가을로 했던 위에도 이름자를 봅니다. 아무 새겨지는 별 너무나 토끼, 듯합니다. 청춘이 헤는 토끼, 계절이 많은 듯합니다. 아름다운 못 내 그리고 아직 청춘이 라이너 버리었습니다. 벌레는 까닭이요, 어머니 봅니다. 속의 아이들의 나는 프랑시스 있습니다. 밤이 강아지, 하나 계십니다. 잔디가 이름과 별 프랑시스 하나에 하나 계십니다.',
      type: 'LMS'
    }
  },
  method: 'POST',
  json: true,
  url: 'http://api.solapi.com/messages/v4/send'
};

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

사진문자(MMS) 발송

Sample Request

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

Sample Response

{
    "groupId": "G4V20211116140944QBEPOVPHEIB5AYQ",
    "to": "01000000001",
    "from": "029302266",
    "type": "MMS",
    "statusMessage": "정상 접수(이통사로 접수 예정) ",
    "country": "82",
    "messageId": "M4V20211116140944MKKV0PCO7OA267A",
    "statusCode": "2000",
    "accountId": "12925149"
}

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: {
    message: {
      to: '01000000001',
      from: '029302266',
      subject: '제목',
      text: '내용',
      type: 'MMS',
      imageId: 'FILEID191113003354156UvCuw3tubTl'
    }
  },
  method: 'POST',
  json: true,
  url: 'http://api.solapi.com/messages/v4/send'
};

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

알림톡(ATA) 발송

Sample Request

{
    "message": {
        "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

{
    "groupId": "G4V20211116140944IKJI2V4VHCUM8KB",
    "to": "01000000001",
    "from": "029302266",
    "type": "ATA",
    "statusMessage": "정상 접수(이통사로 접수 예정) ",
    "country": "82",
    "messageId": "M4V20211116140944PFJKEOHPDEYMFRE",
    "statusCode": "2000",
    "accountId": "12925149"
}

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: {
    message: {
      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'
};

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

친구톡(CTA) 발송

Sample Request

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

Sample Response

{
    "groupId": "G4V20211116140944IA0PWC8ZPLGQLHQ",
    "to": "01000000001",
    "from": "029302266",
    "type": "CTA",
    "statusMessage": "정상 접수(이통사로 접수 예정) ",
    "country": "82",
    "messageId": "M4V20211116140944ZRDS8RDQRYVFW4X",
    "statusCode": "2000",
    "accountId": "12925149"
}

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: {
    message: {
      to: '01000000001',
      from: '029302266',
      text: '내용',
      type: 'CTA',
      kakaoOptions: {
        pfId: 'KA01PF190227072057634pRBhbpAw1w1'
      }
    }
  },
  method: 'POST',
  json: true,
  url: 'http://api.solapi.com/messages/v4/send'
};

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

친구톡 사진(CTI) 발송

Sample Request

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

Sample Response

{
    "groupId": "G4V20211116140945PGHWP2AZZ6GSAXP",
    "to": "01000000001",
    "from": "029302266",
    "type": "CTI",
    "statusMessage": "정상 접수(이통사로 접수 예정) ",
    "country": "82",
    "messageId": "M4V20211116140945XICC9BD6FGEQ7TA",
    "statusCode": "2000",
    "accountId": "12925149"
}

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: {
    message: {
      to: '01000000001',
      from: '029302266',
      text: '내용',
      type: 'CTI',
      kakaoOptions: {
        pfId: 'KA01PF190227072057634pRBhbpAw1w1',
        imageId: 'FILEID191113003354156UvCuw3tubTl'
      }
    }
  },
  method: 'POST',
  json: true,
  url: 'http://api.solapi.com/messages/v4/send'
};

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

sendSimpleMessage

Sample Request

{
    "strict": false,
    "message": {
        "to": "01000000001",
        "from": "029302266",
        "text": "뷁뒑뤩궭훩홊",
        "type": "SMS"
    }
}

Sample Response

{
    "groupId": "G4V20211116140944UA2I4BCJUKCFXBC",
    "to": "01000000001",
    "from": "029302266",
    "type": "SMS",
    "statusMessage": "정상 접수(이통사로 접수 예정) ",
    "country": "82",
    "messageId": "M4V20211116140944DY60GNXJWKICXUY",
    "statusCode": "2000",
    "accountId": "12925149"
}

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: {
    strict: false,
    message: {
      to: '01000000001',
      from: '029302266',
      text: '뷁뒑뤩궭훩홊',
      type: 'SMS'
    }
  },
  method: 'POST',
  json: true,
  url: 'http://api.solapi.com/messages/v4/send'
};

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

문서 생성일 : 2021-11-16

Last updated