<?php
$query = http_build_query([
'phone' => $recipientPhone,
'sender_phone' => $senderPhone,
]);
$response = file_get_contents('https://{tenant}.sinjapp.org/api/v1/contacts/lookup?' . $query, false, stream_context_create([
'http' => [
'method' => 'GET',
'header' => [
'X-Api-Key: ' . $tenantApiKey,
'Accept: application/json',
],
'timeout' => 30,
],
]));
$lookup = json_decode($response, true);