$keyboard = (object)[
'keyboard' => [
//row1
[
(object)['text' => 'button1', ],
(object)['text' => 'button2', ],
(object)['text' => 'button3', ],
],
//row2
[
(object)['text' => 'request location', 'request_location' => true, ],
(object)['text' => 'request contact', 'request_contact' => true, ],
],
],
'one_time_keyboard' => true,
];
делаете json_encode этого объекта и передаете строкой в поле reply_markup