Update an Advertiser
curl --request PUT \
--url https://api.hakumedia.ai/v2/advertisers/{id} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"can_change_password": false,
"can_add_ad_items": false,
"email": "advertiser@example.com",
"name": "Example Advertiser",
"metadata": {
"btf": "true",
"mobile_only": "false"
},
"password": "**********"
}
'const options = {
method: 'PUT',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
can_change_password: false,
can_add_ad_items: false,
email: 'advertiser@example.com',
name: 'Example Advertiser',
metadata: {btf: 'true', mobile_only: 'false'},
password: '**********'
})
};
fetch('https://api.hakumedia.ai/v2/advertisers/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.hakumedia.ai/v2/advertisers/{id}"
payload = {
"can_change_password": False,
"can_add_ad_items": False,
"email": "advertiser@example.com",
"name": "Example Advertiser",
"metadata": {
"btf": "true",
"mobile_only": "false"
},
"password": "**********"
}
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/advertisers/{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([
'can_change_password' => false,
'can_add_ad_items' => false,
'email' => 'advertiser@example.com',
'name' => 'Example Advertiser',
'metadata' => [
'btf' => 'true',
'mobile_only' => 'false'
],
'password' => '**********'
]),
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;
}{
"can_change_password": false,
"can_add_ad_items": false,
"email": "advertiser@example.com",
"name": "Example Advertiser",
"metadata": {
"btf": "true",
"mobile_only": "false"
},
"object": "advertiser",
"id": 5195,
"has_password": false,
"self_serve_customer": 100795,
"self": "/v2/advertisers/5195",
"parent": "admin"
}Advertisers
Update an Advertiser
PUT
/
advertisers
/
{id}
Update an Advertiser
curl --request PUT \
--url https://api.hakumedia.ai/v2/advertisers/{id} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"can_change_password": false,
"can_add_ad_items": false,
"email": "advertiser@example.com",
"name": "Example Advertiser",
"metadata": {
"btf": "true",
"mobile_only": "false"
},
"password": "**********"
}
'const options = {
method: 'PUT',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
can_change_password: false,
can_add_ad_items: false,
email: 'advertiser@example.com',
name: 'Example Advertiser',
metadata: {btf: 'true', mobile_only: 'false'},
password: '**********'
})
};
fetch('https://api.hakumedia.ai/v2/advertisers/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.hakumedia.ai/v2/advertisers/{id}"
payload = {
"can_change_password": False,
"can_add_ad_items": False,
"email": "advertiser@example.com",
"name": "Example Advertiser",
"metadata": {
"btf": "true",
"mobile_only": "false"
},
"password": "**********"
}
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/advertisers/{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([
'can_change_password' => false,
'can_add_ad_items' => false,
'email' => 'advertiser@example.com',
'name' => 'Example Advertiser',
'metadata' => [
'btf' => 'true',
'mobile_only' => 'false'
],
'password' => '**********'
]),
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;
}{
"can_change_password": false,
"can_add_ad_items": false,
"email": "advertiser@example.com",
"name": "Example Advertiser",
"metadata": {
"btf": "true",
"mobile_only": "false"
},
"object": "advertiser",
"id": 5195,
"has_password": false,
"self_serve_customer": 100795,
"self": "/v2/advertisers/5195",
"parent": "admin"
}Autorizaciones
Cuerpo
application/json
The password of the optional user account tied to this advertiser. The given password must be 8 or more characters and contain at least one uppercase character, lowercase character, and number. Password managers and special characters are recommended. If left blank on advertiser creation, a random password will be generated. This field will never be returned in any responses.
Ejemplo:
"**********"
Respuesta
default - application/json
successful operation