Boost a post
curl --request POST \
--url https://api.kavenio.com/v1/ads/boost \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"accountId": "bbbbbbbbbbbbbbbb",
"postId": "cccccccccccccccc",
"adAccountId": "ad_account_example",
"name": "Boosted post",
"goal": "engagement",
"budget": {
"amount": 25,
"type": "daily"
}
}
'import requests
url = "https://api.kavenio.com/v1/ads/boost"
payload = {
"accountId": "bbbbbbbbbbbbbbbb",
"postId": "cccccccccccccccc",
"adAccountId": "ad_account_example",
"name": "Boosted post",
"goal": "engagement",
"budget": {
"amount": 25,
"type": "daily"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
accountId: 'bbbbbbbbbbbbbbbb',
postId: 'cccccccccccccccc',
adAccountId: 'ad_account_example',
name: 'Boosted post',
goal: 'engagement',
budget: {amount: 25, type: 'daily'}
})
};
fetch('https://api.kavenio.com/v1/ads/boost', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.kavenio.com/v1/ads/boost",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'accountId' => 'bbbbbbbbbbbbbbbb',
'postId' => 'cccccccccccccccc',
'adAccountId' => 'ad_account_example',
'name' => 'Boosted post',
'goal' => 'engagement',
'budget' => [
'amount' => 25,
'type' => 'daily'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.kavenio.com/v1/ads/boost"
payload := strings.NewReader("{\n \"accountId\": \"bbbbbbbbbbbbbbbb\",\n \"postId\": \"cccccccccccccccc\",\n \"adAccountId\": \"ad_account_example\",\n \"name\": \"Boosted post\",\n \"goal\": \"engagement\",\n \"budget\": {\n \"amount\": 25,\n \"type\": \"daily\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.kavenio.com/v1/ads/boost")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"accountId\": \"bbbbbbbbbbbbbbbb\",\n \"postId\": \"cccccccccccccccc\",\n \"adAccountId\": \"ad_account_example\",\n \"name\": \"Boosted post\",\n \"goal\": \"engagement\",\n \"budget\": {\n \"amount\": 25,\n \"type\": \"daily\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.kavenio.com/v1/ads/boost")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"accountId\": \"bbbbbbbbbbbbbbbb\",\n \"postId\": \"cccccccccccccccc\",\n \"adAccountId\": \"ad_account_example\",\n \"name\": \"Boosted post\",\n \"goal\": \"engagement\",\n \"budget\": {\n \"amount\": 25,\n \"type\": \"daily\"\n }\n}"
response = http.request(request)
puts response.read_body{
"ok": true,
"data": {
"ad": {
"_id": "<string>",
"name": "<string>",
"adType": "<string>",
"goal": "<string>",
"isExternal": true,
"budget": {
"amount": 123,
"type": "<string>"
},
"metrics": {
"spend": 123,
"impressions": 123,
"reach": 123,
"clicks": 123,
"ctr": 123,
"cpc": 123,
"cpm": 123,
"engagement": 123,
"conversions": 123,
"costPerConversion": 123,
"actions": {},
"actionValues": {},
"purchaseValue": 123,
"roas": 123,
"lastSyncedAt": "<string>"
},
"promotedObject": {},
"creative": {
"thumbnailUrl": "<string>",
"imageUrl": "<string>",
"videoId": "<string>",
"videoUrl": "<string>",
"objectType": "<string>",
"objectStoryId": "<string>",
"effectiveObjectStoryId": "<string>",
"effectiveInstagramMediaId": "<string>",
"instagramUserId": "<string>",
"instagramPermalinkUrl": "<string>",
"mediaUrls": [
"<string>"
],
"body": "<string>",
"googleHeadline": "<string>",
"googleDescription": "<string>",
"linkUrl": "<string>",
"pinterestImageUrl": "<string>",
"pinterestTitle": "<string>",
"pinterestDescription": "<string>"
},
"targeting": {},
"schedule": {
"startDate": "<string>",
"endDate": "<string>"
},
"createdAt": "<string>",
"updatedAt": "<string>",
"platformAdId": "<string>",
"platformAdAccountId": "<string>",
"platformCampaignId": "<string>",
"platformAdSetId": "<string>",
"campaignName": "<string>",
"adSetName": "<string>",
"platformObjective": "<string>",
"optimizationGoal": "<string>",
"platformAdAccountName": "<string>",
"platformCreatedAt": "<string>",
"bidStrategy": "<string>",
"bidAmount": 123,
"roasAverageFloor": 123,
"rejectionReason": "<string>"
}
}
}{
"ok": true,
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"ok": true,
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"ok": true,
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}Ads
Boost a post
Creates a provider-backed ad from an existing post.
POST
/
v1
/
ads
/
boost
Boost a post
curl --request POST \
--url https://api.kavenio.com/v1/ads/boost \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"accountId": "bbbbbbbbbbbbbbbb",
"postId": "cccccccccccccccc",
"adAccountId": "ad_account_example",
"name": "Boosted post",
"goal": "engagement",
"budget": {
"amount": 25,
"type": "daily"
}
}
'import requests
url = "https://api.kavenio.com/v1/ads/boost"
payload = {
"accountId": "bbbbbbbbbbbbbbbb",
"postId": "cccccccccccccccc",
"adAccountId": "ad_account_example",
"name": "Boosted post",
"goal": "engagement",
"budget": {
"amount": 25,
"type": "daily"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
accountId: 'bbbbbbbbbbbbbbbb',
postId: 'cccccccccccccccc',
adAccountId: 'ad_account_example',
name: 'Boosted post',
goal: 'engagement',
budget: {amount: 25, type: 'daily'}
})
};
fetch('https://api.kavenio.com/v1/ads/boost', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.kavenio.com/v1/ads/boost",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'accountId' => 'bbbbbbbbbbbbbbbb',
'postId' => 'cccccccccccccccc',
'adAccountId' => 'ad_account_example',
'name' => 'Boosted post',
'goal' => 'engagement',
'budget' => [
'amount' => 25,
'type' => 'daily'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.kavenio.com/v1/ads/boost"
payload := strings.NewReader("{\n \"accountId\": \"bbbbbbbbbbbbbbbb\",\n \"postId\": \"cccccccccccccccc\",\n \"adAccountId\": \"ad_account_example\",\n \"name\": \"Boosted post\",\n \"goal\": \"engagement\",\n \"budget\": {\n \"amount\": 25,\n \"type\": \"daily\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.kavenio.com/v1/ads/boost")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"accountId\": \"bbbbbbbbbbbbbbbb\",\n \"postId\": \"cccccccccccccccc\",\n \"adAccountId\": \"ad_account_example\",\n \"name\": \"Boosted post\",\n \"goal\": \"engagement\",\n \"budget\": {\n \"amount\": 25,\n \"type\": \"daily\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.kavenio.com/v1/ads/boost")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"accountId\": \"bbbbbbbbbbbbbbbb\",\n \"postId\": \"cccccccccccccccc\",\n \"adAccountId\": \"ad_account_example\",\n \"name\": \"Boosted post\",\n \"goal\": \"engagement\",\n \"budget\": {\n \"amount\": 25,\n \"type\": \"daily\"\n }\n}"
response = http.request(request)
puts response.read_body{
"ok": true,
"data": {
"ad": {
"_id": "<string>",
"name": "<string>",
"adType": "<string>",
"goal": "<string>",
"isExternal": true,
"budget": {
"amount": 123,
"type": "<string>"
},
"metrics": {
"spend": 123,
"impressions": 123,
"reach": 123,
"clicks": 123,
"ctr": 123,
"cpc": 123,
"cpm": 123,
"engagement": 123,
"conversions": 123,
"costPerConversion": 123,
"actions": {},
"actionValues": {},
"purchaseValue": 123,
"roas": 123,
"lastSyncedAt": "<string>"
},
"promotedObject": {},
"creative": {
"thumbnailUrl": "<string>",
"imageUrl": "<string>",
"videoId": "<string>",
"videoUrl": "<string>",
"objectType": "<string>",
"objectStoryId": "<string>",
"effectiveObjectStoryId": "<string>",
"effectiveInstagramMediaId": "<string>",
"instagramUserId": "<string>",
"instagramPermalinkUrl": "<string>",
"mediaUrls": [
"<string>"
],
"body": "<string>",
"googleHeadline": "<string>",
"googleDescription": "<string>",
"linkUrl": "<string>",
"pinterestImageUrl": "<string>",
"pinterestTitle": "<string>",
"pinterestDescription": "<string>"
},
"targeting": {},
"schedule": {
"startDate": "<string>",
"endDate": "<string>"
},
"createdAt": "<string>",
"updatedAt": "<string>",
"platformAdId": "<string>",
"platformAdAccountId": "<string>",
"platformCampaignId": "<string>",
"platformAdSetId": "<string>",
"campaignName": "<string>",
"adSetName": "<string>",
"platformObjective": "<string>",
"optimizationGoal": "<string>",
"platformAdAccountName": "<string>",
"platformCreatedAt": "<string>",
"bidStrategy": "<string>",
"bidAmount": 123,
"roasAverageFloor": 123,
"rejectionReason": "<string>"
}
}
}{
"ok": true,
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"ok": true,
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"ok": true,
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Required string length:
16Pattern:
^[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ]{16}$Minimum string length:
1Required string length:
1 - 255Available options:
engagement, traffic, awareness, video_views, lead_generation, conversions, app_promotion Show child attributes
Show child attributes
Minimum string length:
1Minimum string length:
1Minimum string length:
1Show child attributes
Show child attributes
Show child attributes
Show child attributes
Available options:
LOWEST_COST_WITHOUT_CAP, LOWEST_COST_WITH_BID_CAP, COST_CAP, LOWEST_COST_WITH_MIN_ROAS Show child attributes
Show child attributes
Required string length:
1 - 100Minimum string length:
1Minimum string length:
1Required string length:
1 - 100Required string length:
1 - 100Was this page helpful?
⌘I