I checked the API documentation but there are no examples related to curl php.
Can i get some guide on how to connect with monday.com to create lead or deal in monday.com using curl php?
I have sample code (Token is wrong in this code snippet), but I have no idea on how to pass data to create lead
<?php
$token = 'eyJhbGciOiJIUzI1NiJ9.0Y-0OesftWBt2SamhvuPV5MR-0Oq7iApMt2exFkDNdM';
$apiUrl = 'https://api.monday.com/v2';
$headers = ['Content-Type: application/json', 'Authorization: ' . $token];
$query = '{ boards (limit:1) {id name} }';
$data = @file_get_contents($apiUrl, false, stream_context_create([
'http' => [
'method' => 'POST',
'header' => $headers,
'content' => json_encode(['query' => $query]),
]
]));
$responseContent = json_decode($data, true);
echo json_encode($responseContent);
?>