Попробуй так:
<?php
header('Content-Type: application/json; charset=UTF-8');
ini_set('error_reporting', E_ALL);
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
$authKey = '********************';
$oauthClientId = '****************';
$requestURL = 'https://api.partner.market.yandex.ru/v2/campaigns/21614343/hidden-offers.json';
$data = array(
'hiddenOffers' => array(
array(
'offerId' => 146688,
'comment' => 'clear markret',
'ttlInHours' => 720
)
),
);
$data_string = json_encode($data);
$result = file_get_contents($requestURL, null, stream_context_create(array(
'http' => array(
'method' => 'POST',
'header' => array(
"Authorization: OAuth oauth_token=$authKey, oauth_client_id=$oauthClientId\r\n" .
"Content-Type: application/json; charset=utf-8\r\n" .
"Content-Length: " . strlen($data_string) . "\r\n" .
"Host: " . parse_url($requestURL)['host']
),
'content' => $data_string
)
)
)
);
echo $result;