LetsBot 메뉴
시작하기 한국어 언어

Meta 비즈니스 파트너 영국 등록 법인

언어

Messages · API 엔드포인트

POST /api/v1/list/message

Send list message

You can send list message select to phone number.

You can send list message select to phone number. You need to send the body, footer, title(optional), buttonText and sections(array) of the message. Every section array has two index which is title and rows , for every rows has title, rowid and description(optional).You can see the result of the sections in image below. Id of the message in the key of the data of the response. In the Message of the data of the response , You can see listMessage that contain list message info (title, description, buttonText, listType, sections, etc) , messageTimesamp format and status of the message. <img src='https://content.pstmn.io/cd6efe52-5a20-48e2-ae2d-e9b235b089f6/aW1hZ2UucG5n' alt='' height='484' width='436'>

폼 필드

필드예시
phone{{phone}}
bodyBody of message
titleTilte of message
footerFooter of message
buttonTextRequired, text on the button to view the list
sections[0][title]Section 1 Text
sections[0][rows][0][title]Option 1
sections[0][rows][0][rowId]Option1
sections[0][rows][0][description]This is description
sections[0][rows][1][title]Option 2
sections[0][rows][1][rowId]Option2

요청 예시

curl -X POST "https://letsbot.net/api/v1/list/message" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  -F "phone=9665xxxxxxxx" \
  -F "body=Body of message" \
  -F "title=Tilte of message" \
  -F "footer=Footer of message" \
  -F "buttonText=Required, text on the button to view the list" \
  -F "sections[0][title]=Section 1 Text" \
  -F "sections[0][rows][0][title]=Option 1" \
  -F "sections[0][rows][0][rowId]=Option1" \
  -F "sections[0][rows][0][description]=This is description" \
  -F "sections[0][rows][1][title]=Option 2" \
  -F "sections[0][rows][1][rowId]=Option2"
const response = await fetch("https://letsbot.net/api/v1/list/message", {
  method: "POST",
  headers: {
    "Authorization": "Bearer YOUR_LB_API_KEY",
    "Accept": "application/json",
  },
  body: new URLSearchParams({
    "phone": "9665xxxxxxxx",
    "body": "Body of message",
    "title": "Tilte of message",
    "footer": "Footer of message",
    "buttonText": "Required, text on the button to view the list",
    "sections[0][title]": "Section 1 Text",
    "sections[0][rows][0][title]": "Option 1",
    "sections[0][rows][0][rowId]": "Option1",
    "sections[0][rows][0][description]": "This is description",
    "sections[0][rows][1][title]": "Option 2",
    "sections[0][rows][1][rowId]": "Option2",
  }),
});

const data = await response.json();
console.log(data);
<?php

$ch = curl_init('https://letsbot.net/api/v1/list/message');

curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer YOUR_LB_API_KEY',
        'Accept: application/json',
    ],
    CURLOPT_POSTFIELDS => http_build_query([
        'phone' => '9665xxxxxxxx',
        'body' => 'Body of message',
        'title' => 'Tilte of message',
        'footer' => 'Footer of message',
        'buttonText' => 'Required, text on the button to view the list',
        'sections[0][title]' => 'Section 1 Text',
        'sections[0][rows][0][title]' => 'Option 1',
        'sections[0][rows][0][rowId]' => 'Option1',
        'sections[0][rows][0][description]' => 'This is description',
        'sections[0][rows][1][title]' => 'Option 2',
        'sections[0][rows][1][rowId]' => 'Option2',
    ]),
]);

$data = json_decode(curl_exec($ch), true);
curl_close($ch);

print_r($data);
import requests

response = requests.request(
    "POST",
    "https://letsbot.net/api/v1/list/message",
    headers={
        "Authorization": "Bearer YOUR_LB_API_KEY",
        "Accept": "application/json",
    },
    data={
        "phone": "9665xxxxxxxx",
        "body": "Body of message",
        "title": "Tilte of message",
        "footer": "Footer of message",
        "buttonText": "Required, text on the button to view the list",
        "sections[0][title]": "Section 1 Text",
        "sections[0][rows][0][title]": "Option 1",
        "sections[0][rows][0][rowId]": "Option1",
        "sections[0][rows][0][description]": "This is description",
        "sections[0][rows][1][title]": "Option 2",
        "sections[0][rows][1][rowId]": "Option2",
    },
)

print(response.json())

응답

Success Response200
(빈 본문)
Failed Response202
(빈 본문)

준비되면 언제든지

내 번호로 이 엔드포인트 사용해 보기

API는 무료 체험 기간에도 사용할 수 있습니다. 계정을 만들고 WhatsApp 번호를 연결한 뒤 API → 인증 데이터에서 키를 복사하세요.