$headers_task = array(
'method' => 'POST',
'header' => "Content-type: application/json\r\n" . "Authorization: Bearer $acc_token\r\n",
'content' => json_encode(
[
[
'text' => 'text',
'complete_till' => 1661578861
]
],
JSON_UNESCAPED_UNICODE
)
);
$ch = curl_init("$domen/api/v4/tasks");
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers_task);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$out = curl_exec($ch);
$res = json_decode($out, true);
curl_close($ch);