Create a website
Create a website under your account
Creating a website in Targetvideo
Using the following API call you can create a website under your Targetvideo account. All your video content, players, ad tags and everything else will be organised under a specific website (domain) in Targetvideo so this would be the first step after you created an account with us.
POST https://<<brid_api_url>>/apiv3/partner/add.json
Parameter name | Description | Required |
---|---|---|
domain (string) | Domain name. It is just used in Targetvideo to CMS and reporting so if it is already taken you can use it with prefix e.g. video.domain.com |
Example
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://<<brid_api_url>>/apiv3/partner/add.json",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => array('domain' => 'www.test-add.com'),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = new MultipartBody.Builder().setType(MultipartBody.FORM)
.addFormDataPart("domain", "www.test-add.com")
.build();
Request request = new Request.Builder()
.url("https://api.brid.tv/apiv3/partner/add.json")
.method("POST", body)
.build();
Response response = client.newCall(request).execute();
var https = require('follow-redirects').https;
var fs = require('fs');
var options = {
'method': 'POST',
'hostname': 'api.brid.tv',
'path': '/apiv3/partner/add.json',
'headers': {
},
'maxRedirects': 20
};
var req = https.request(options, function (res) {
var chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function (chunk) {
var body = Buffer.concat(chunks);
console.log(body.toString());
});
res.on("error", function (error) {
console.error(error);
});
});
var postData = "------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"domain\"\r\n\r\nwww.test-add.com\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW--";
req.setHeader('content-type', 'multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW');
req.write(postData);
req.end();
require "uri"
require "net/http"
url = URI("https://api.brid.tv/apiv3/partner/add.json")
https = Net::HTTP.new(url.host, url.port);
https.use_ssl = true
request = Net::HTTP::Post.new(url)
form_data = [['domain', 'www.test-add.com']]
request.set_form form_data, 'multipart/form-data'
response = https.request(request)
puts response.read_body
Updated over 2 years ago