Update an Image Creative
curl --request PUT \
--url https://api.hakumedia.ai/v2/creatives/image/{id} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"description": "",
"group": 87,
"name": "Demo Creative"
}
'const options = {
method: 'PUT',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({description: '', group: 87, name: 'Demo Creative'})
};
fetch('https://api.hakumedia.ai/v2/creatives/image/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.hakumedia.ai/v2/creatives/image/{id}"
payload = {
"description": "",
"group": 87,
"name": "Demo Creative"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.hakumedia.ai/v2/creatives/image/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'description' => '',
'group' => 87,
'name' => 'Demo Creative'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"description": "",
"group": 87,
"name": "Demo Creative",
"file_size": 329438,
"uploaded_time": "2019-04-21 13:22:59",
"height": 400,
"width": 650,
"object": "image_creative",
"id": 115260,
"self": "/v2/creatives/image/115260",
"file_name": "creative.png",
"mime_type": "image/png"
}Creatives · Image
Update an Image Creative
PUT
/
creatives
/
image
/
{id}
Update an Image Creative
curl --request PUT \
--url https://api.hakumedia.ai/v2/creatives/image/{id} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"description": "",
"group": 87,
"name": "Demo Creative"
}
'const options = {
method: 'PUT',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({description: '', group: 87, name: 'Demo Creative'})
};
fetch('https://api.hakumedia.ai/v2/creatives/image/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.hakumedia.ai/v2/creatives/image/{id}"
payload = {
"description": "",
"group": 87,
"name": "Demo Creative"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.hakumedia.ai/v2/creatives/image/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'description' => '',
'group' => 87,
'name' => 'Demo Creative'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"description": "",
"group": 87,
"name": "Demo Creative",
"file_size": 329438,
"uploaded_time": "2019-04-21 13:22:59",
"height": 400,
"width": 650,
"object": "image_creative",
"id": 115260,
"self": "/v2/creatives/image/115260",
"file_name": "creative.png",
"mime_type": "image/png"
}Autorizaciones
Cuerpo
application/json
Respuesta
default - application/json
successful operation