Tombol aksi interaktif
Kartu dengan tombol reply, URL, atau salin kode.
1 min read
Kirim kartu button
curl -sS -X POST "$BASE/v1/messages/send"
-H "Authorization: Bearer $KEY"
-H "Idempotency-Key: appt-card-tue10"
-H "Content-Type: application/json"
-d '{
"to": "peer_username",
"type": "button",
"name": "appt_confirm:tue10",
"schema_version": 1,
"text": "Confirm appointment for Tuesday 10:00?",
"actions": [
{ "id": "yes", "type": "reply", "label": "Yes", "write": true },
{ "id": "no", "type": "reply", "label": "No", "write": false },
{ "id": "details", "type": "url", "label": "Details", "url": "https://example.com/booking/tue10" },
{ "id": "code", "type": "copy", "label": "Copy code", "value": "BK-2048" }
],
"expires_at": "2026-08-26T10:00:00.000Z"
}' Tipe aksi
type | Hasil |
|---|---|
reply | Webhook interactive.postback |
url | Membuka link |
copy | Menyalin value |
Button dan list wajib punya name (form memakai form_id, bukan name).
Saat user mengetuk
Subscribe event postback — lihat Contoh event.