Create Creative
curl --request POST \
--url https://api.eflow.team/v1/networks/creatives \
--header 'Content-Type: application/json' \
--header 'X-Eflow-Api-Key: <api-key>' \
--data '
{
"network_offer_id": 1,
"name": "Banner Ad 300x250",
"creative_type": "html",
"html_code": "<div>Ad content</div>",
"creative_status": "active",
"width": 300,
"height": 250
}
'import requests
url = "https://api.eflow.team/v1/networks/creatives"
payload = {
"network_offer_id": 1,
"name": "Banner Ad 300x250",
"creative_type": "html",
"html_code": "<div>Ad content</div>",
"creative_status": "active",
"width": 300,
"height": 250
}
headers = {
"X-Eflow-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Eflow-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
network_offer_id: 1,
name: 'Banner Ad 300x250',
creative_type: 'html',
html_code: '<div>Ad content</div>',
creative_status: 'active',
width: 300,
height: 250
})
};
fetch('https://api.eflow.team/v1/networks/creatives', 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.eflow.team/v1/networks/creatives",
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([
'network_offer_id' => 1,
'name' => 'Banner Ad 300x250',
'creative_type' => 'html',
'html_code' => '<div>Ad content</div>',
'creative_status' => 'active',
'width' => 300,
'height' => 250
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Eflow-Api-Key: <api-key>"
],
]);
$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.eflow.team/v1/networks/creatives"
payload := strings.NewReader("{\n \"network_offer_id\": 1,\n \"name\": \"Banner Ad 300x250\",\n \"creative_type\": \"html\",\n \"html_code\": \"<div>Ad content</div>\",\n \"creative_status\": \"active\",\n \"width\": 300,\n \"height\": 250\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Eflow-Api-Key", "<api-key>")
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.eflow.team/v1/networks/creatives")
.header("X-Eflow-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"network_offer_id\": 1,\n \"name\": \"Banner Ad 300x250\",\n \"creative_type\": \"html\",\n \"html_code\": \"<div>Ad content</div>\",\n \"creative_status\": \"active\",\n \"width\": 300,\n \"height\": 250\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eflow.team/v1/networks/creatives")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Eflow-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"network_offer_id\": 1,\n \"name\": \"Banner Ad 300x250\",\n \"creative_type\": \"html\",\n \"html_code\": \"<div>Ad content</div>\",\n \"creative_status\": \"active\",\n \"width\": 300,\n \"height\": 250\n}"
response = http.request(request)
puts response.read_body{
"network_offer_creative_id": 123,
"network_id": 123,
"network_offer_id": 123,
"name": "<string>",
"creative_type": "image",
"is_private": true,
"creative_status": "active",
"resource_url": "<string>",
"html_code": "<string>",
"width": 123,
"height": 123,
"email_from": "<string>",
"email_subject": "<string>",
"time_created": 1734455015,
"time_saved": 1734455015,
"additional_offer_ids": [
123
],
"is_apply_specific_affiliates": true,
"email_subject_lines": "<string>",
"email_from_lines": "<string>",
"relationship": {
"offer": {
"network_offer_id": 123,
"network_id": 123,
"network_advertiser_id": 123,
"network_offer_group_id": 123,
"name": "<string>",
"offer_status": "<string>",
"network_tracking_domain_id": 123,
"visibility": "<string>",
"currency_id": "<string>"
},
"resource_asset": {
"network_asset_id": 123,
"content_type": "<string>",
"filename": "<string>",
"url": "<string>",
"file_size": 123,
"image_width": 123,
"image_height": 123
}
}
}Creatives
Create Creative
POST
/
networks
/
creatives
Create Creative
curl --request POST \
--url https://api.eflow.team/v1/networks/creatives \
--header 'Content-Type: application/json' \
--header 'X-Eflow-Api-Key: <api-key>' \
--data '
{
"network_offer_id": 1,
"name": "Banner Ad 300x250",
"creative_type": "html",
"html_code": "<div>Ad content</div>",
"creative_status": "active",
"width": 300,
"height": 250
}
'import requests
url = "https://api.eflow.team/v1/networks/creatives"
payload = {
"network_offer_id": 1,
"name": "Banner Ad 300x250",
"creative_type": "html",
"html_code": "<div>Ad content</div>",
"creative_status": "active",
"width": 300,
"height": 250
}
headers = {
"X-Eflow-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Eflow-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
network_offer_id: 1,
name: 'Banner Ad 300x250',
creative_type: 'html',
html_code: '<div>Ad content</div>',
creative_status: 'active',
width: 300,
height: 250
})
};
fetch('https://api.eflow.team/v1/networks/creatives', 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.eflow.team/v1/networks/creatives",
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([
'network_offer_id' => 1,
'name' => 'Banner Ad 300x250',
'creative_type' => 'html',
'html_code' => '<div>Ad content</div>',
'creative_status' => 'active',
'width' => 300,
'height' => 250
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Eflow-Api-Key: <api-key>"
],
]);
$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.eflow.team/v1/networks/creatives"
payload := strings.NewReader("{\n \"network_offer_id\": 1,\n \"name\": \"Banner Ad 300x250\",\n \"creative_type\": \"html\",\n \"html_code\": \"<div>Ad content</div>\",\n \"creative_status\": \"active\",\n \"width\": 300,\n \"height\": 250\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Eflow-Api-Key", "<api-key>")
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.eflow.team/v1/networks/creatives")
.header("X-Eflow-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"network_offer_id\": 1,\n \"name\": \"Banner Ad 300x250\",\n \"creative_type\": \"html\",\n \"html_code\": \"<div>Ad content</div>\",\n \"creative_status\": \"active\",\n \"width\": 300,\n \"height\": 250\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eflow.team/v1/networks/creatives")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Eflow-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"network_offer_id\": 1,\n \"name\": \"Banner Ad 300x250\",\n \"creative_type\": \"html\",\n \"html_code\": \"<div>Ad content</div>\",\n \"creative_status\": \"active\",\n \"width\": 300,\n \"height\": 250\n}"
response = http.request(request)
puts response.read_body{
"network_offer_creative_id": 123,
"network_id": 123,
"network_offer_id": 123,
"name": "<string>",
"creative_type": "image",
"is_private": true,
"creative_status": "active",
"resource_url": "<string>",
"html_code": "<string>",
"width": 123,
"height": 123,
"email_from": "<string>",
"email_subject": "<string>",
"time_created": 1734455015,
"time_saved": 1734455015,
"additional_offer_ids": [
123
],
"is_apply_specific_affiliates": true,
"email_subject_lines": "<string>",
"email_from_lines": "<string>",
"relationship": {
"offer": {
"network_offer_id": 123,
"network_id": 123,
"network_advertiser_id": 123,
"network_offer_group_id": 123,
"name": "<string>",
"offer_status": "<string>",
"network_tracking_domain_id": 123,
"visibility": "<string>",
"currency_id": "<string>"
},
"resource_asset": {
"network_asset_id": 123,
"content_type": "<string>",
"filename": "<string>",
"url": "<string>",
"file_size": 123,
"image_width": 123,
"image_height": 123
}
}
}Create a new creative. Required fields are
network_offer_id, name, creative_type, creative_status, is_private, additional_offer_ids, and is_apply_specific_affiliates. Depending on the type, additional fields are required such as html_code for HTML creatives, email_from and email_subject for email creatives, or resource_file for image, thumbnail, archive, and video creatives.Authorizations
Body
application/json
Response
200 - application/json
Was this page helpful?
