<?php
$nodeurl = '#nodeurl/send';
 
$data = [
    'receiver' => '#receiver',
    'msgtext'  => 'poll',
    'token'    => '#token',
    'poll'     => [
        'name'            => 'hello there!',
        'values'          => ['test123', 'test231'],
        'selectableCount' => 1, // 0 for multi selectable
    ]
];
 
$ch = curl_init();
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/x-www-form-urlencoded']);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data));
curl_setopt($ch, CURLOPT_URL, $nodeurl);
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
$response = curl_exec($ch);
curl_close($ch);
 
echo $response; // output {success:true} or {success:false}
?>