Publish a CPL offer.
curl --request POST \
--url https://studio-api.onlytraffic.com/api/external/v1/cpl/my-offers \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"of_account_id": 123,
"max_per_day": 2,
"total_budget": 1001,
"content_channels": [],
"approved_cpl_terms": true,
"per_subscription": 2.65,
"per_messages": 8,
"per_first_purchase": 32.5,
"per_paid_subscription": 51,
"free_trial_enabled": true,
"free_trial_days": 2,
"trial_order_enabled": true,
"trial_fan_count": 2,
"blocked_sources": [],
"description": "<string>"
}
'import requests
url = "https://studio-api.onlytraffic.com/api/external/v1/cpl/my-offers"
payload = {
"of_account_id": 123,
"max_per_day": 2,
"total_budget": 1001,
"content_channels": [],
"approved_cpl_terms": True,
"per_subscription": 2.65,
"per_messages": 8,
"per_first_purchase": 32.5,
"per_paid_subscription": 51,
"free_trial_enabled": True,
"free_trial_days": 2,
"trial_order_enabled": True,
"trial_fan_count": 2,
"blocked_sources": [],
"description": "<string>"
}
headers = {
"X-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-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
of_account_id: 123,
max_per_day: 2,
total_budget: 1001,
content_channels: [],
approved_cpl_terms: true,
per_subscription: 2.65,
per_messages: 8,
per_first_purchase: 32.5,
per_paid_subscription: 51,
free_trial_enabled: true,
free_trial_days: 2,
trial_order_enabled: true,
trial_fan_count: 2,
blocked_sources: [],
description: '<string>'
})
};
fetch('https://studio-api.onlytraffic.com/api/external/v1/cpl/my-offers', 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://studio-api.onlytraffic.com/api/external/v1/cpl/my-offers",
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([
'of_account_id' => 123,
'max_per_day' => 2,
'total_budget' => 1001,
'content_channels' => [
],
'approved_cpl_terms' => true,
'per_subscription' => 2.65,
'per_messages' => 8,
'per_first_purchase' => 32.5,
'per_paid_subscription' => 51,
'free_trial_enabled' => true,
'free_trial_days' => 2,
'trial_order_enabled' => true,
'trial_fan_count' => 2,
'blocked_sources' => [
],
'description' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-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://studio-api.onlytraffic.com/api/external/v1/cpl/my-offers"
payload := strings.NewReader("{\n \"of_account_id\": 123,\n \"max_per_day\": 2,\n \"total_budget\": 1001,\n \"content_channels\": [],\n \"approved_cpl_terms\": true,\n \"per_subscription\": 2.65,\n \"per_messages\": 8,\n \"per_first_purchase\": 32.5,\n \"per_paid_subscription\": 51,\n \"free_trial_enabled\": true,\n \"free_trial_days\": 2,\n \"trial_order_enabled\": true,\n \"trial_fan_count\": 2,\n \"blocked_sources\": [],\n \"description\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-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://studio-api.onlytraffic.com/api/external/v1/cpl/my-offers")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"of_account_id\": 123,\n \"max_per_day\": 2,\n \"total_budget\": 1001,\n \"content_channels\": [],\n \"approved_cpl_terms\": true,\n \"per_subscription\": 2.65,\n \"per_messages\": 8,\n \"per_first_purchase\": 32.5,\n \"per_paid_subscription\": 51,\n \"free_trial_enabled\": true,\n \"free_trial_days\": 2,\n \"trial_order_enabled\": true,\n \"trial_fan_count\": 2,\n \"blocked_sources\": [],\n \"description\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://studio-api.onlytraffic.com/api/external/v1/cpl/my-offers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"of_account_id\": 123,\n \"max_per_day\": 2,\n \"total_budget\": 1001,\n \"content_channels\": [],\n \"approved_cpl_terms\": true,\n \"per_subscription\": 2.65,\n \"per_messages\": 8,\n \"per_first_purchase\": 32.5,\n \"per_paid_subscription\": 51,\n \"free_trial_enabled\": true,\n \"free_trial_days\": 2,\n \"trial_order_enabled\": true,\n \"trial_fan_count\": 2,\n \"blocked_sources\": [],\n \"description\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"offer_id": 123
}
}{
"success": false,
"error": "validation_failed",
"message": "<string>",
"details": {},
"retry_after": 123
}{
"success": false,
"error": "validation_failed",
"message": "<string>",
"details": {},
"retry_after": 123
}{
"success": false,
"error": "validation_failed",
"message": "<string>",
"details": {},
"retry_after": 123
}{
"success": false,
"error": "validation_failed",
"message": "<string>",
"details": {},
"retry_after": 123
}CPL
Publish Offer
Publish a CPL offer.
POST
/
cpl
/
my-offers
Publish a CPL offer.
curl --request POST \
--url https://studio-api.onlytraffic.com/api/external/v1/cpl/my-offers \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"of_account_id": 123,
"max_per_day": 2,
"total_budget": 1001,
"content_channels": [],
"approved_cpl_terms": true,
"per_subscription": 2.65,
"per_messages": 8,
"per_first_purchase": 32.5,
"per_paid_subscription": 51,
"free_trial_enabled": true,
"free_trial_days": 2,
"trial_order_enabled": true,
"trial_fan_count": 2,
"blocked_sources": [],
"description": "<string>"
}
'import requests
url = "https://studio-api.onlytraffic.com/api/external/v1/cpl/my-offers"
payload = {
"of_account_id": 123,
"max_per_day": 2,
"total_budget": 1001,
"content_channels": [],
"approved_cpl_terms": True,
"per_subscription": 2.65,
"per_messages": 8,
"per_first_purchase": 32.5,
"per_paid_subscription": 51,
"free_trial_enabled": True,
"free_trial_days": 2,
"trial_order_enabled": True,
"trial_fan_count": 2,
"blocked_sources": [],
"description": "<string>"
}
headers = {
"X-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-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
of_account_id: 123,
max_per_day: 2,
total_budget: 1001,
content_channels: [],
approved_cpl_terms: true,
per_subscription: 2.65,
per_messages: 8,
per_first_purchase: 32.5,
per_paid_subscription: 51,
free_trial_enabled: true,
free_trial_days: 2,
trial_order_enabled: true,
trial_fan_count: 2,
blocked_sources: [],
description: '<string>'
})
};
fetch('https://studio-api.onlytraffic.com/api/external/v1/cpl/my-offers', 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://studio-api.onlytraffic.com/api/external/v1/cpl/my-offers",
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([
'of_account_id' => 123,
'max_per_day' => 2,
'total_budget' => 1001,
'content_channels' => [
],
'approved_cpl_terms' => true,
'per_subscription' => 2.65,
'per_messages' => 8,
'per_first_purchase' => 32.5,
'per_paid_subscription' => 51,
'free_trial_enabled' => true,
'free_trial_days' => 2,
'trial_order_enabled' => true,
'trial_fan_count' => 2,
'blocked_sources' => [
],
'description' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-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://studio-api.onlytraffic.com/api/external/v1/cpl/my-offers"
payload := strings.NewReader("{\n \"of_account_id\": 123,\n \"max_per_day\": 2,\n \"total_budget\": 1001,\n \"content_channels\": [],\n \"approved_cpl_terms\": true,\n \"per_subscription\": 2.65,\n \"per_messages\": 8,\n \"per_first_purchase\": 32.5,\n \"per_paid_subscription\": 51,\n \"free_trial_enabled\": true,\n \"free_trial_days\": 2,\n \"trial_order_enabled\": true,\n \"trial_fan_count\": 2,\n \"blocked_sources\": [],\n \"description\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-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://studio-api.onlytraffic.com/api/external/v1/cpl/my-offers")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"of_account_id\": 123,\n \"max_per_day\": 2,\n \"total_budget\": 1001,\n \"content_channels\": [],\n \"approved_cpl_terms\": true,\n \"per_subscription\": 2.65,\n \"per_messages\": 8,\n \"per_first_purchase\": 32.5,\n \"per_paid_subscription\": 51,\n \"free_trial_enabled\": true,\n \"free_trial_days\": 2,\n \"trial_order_enabled\": true,\n \"trial_fan_count\": 2,\n \"blocked_sources\": [],\n \"description\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://studio-api.onlytraffic.com/api/external/v1/cpl/my-offers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"of_account_id\": 123,\n \"max_per_day\": 2,\n \"total_budget\": 1001,\n \"content_channels\": [],\n \"approved_cpl_terms\": true,\n \"per_subscription\": 2.65,\n \"per_messages\": 8,\n \"per_first_purchase\": 32.5,\n \"per_paid_subscription\": 51,\n \"free_trial_enabled\": true,\n \"free_trial_days\": 2,\n \"trial_order_enabled\": true,\n \"trial_fan_count\": 2,\n \"blocked_sources\": [],\n \"description\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"offer_id": 123
}
}{
"success": false,
"error": "validation_failed",
"message": "<string>",
"details": {},
"retry_after": 123
}{
"success": false,
"error": "validation_failed",
"message": "<string>",
"details": {},
"retry_after": 123
}{
"success": false,
"error": "validation_failed",
"message": "<string>",
"details": {},
"retry_after": 123
}{
"success": false,
"error": "validation_failed",
"message": "<string>",
"details": {},
"retry_after": 123
}Publishing CPL offers requires an account
tier of platinum or diamond. Other tiers receive a 403.
New offers go through moderation. They become visible to partners after our team approves them.Authorizations
Your API key from the Studio Dashboard
Body
application/json
One of your linked OF accounts.
Required range:
x >= 1Required range:
x >= 1000Minimum array length:
1Available options:
lifestyle, tiktok, lingerie, light_nudes, nudes Must be true.
Available options:
true Required range:
0.3 <= x <= 5Required range:
1 <= x <= 15Required range:
5 <= x <= 60Paid-model only.
Required range:
3 <= x <= 99Paid-model only.
Required when free_trial_enabled=true. Number of free trial days.
Required range:
x >= 1Required when trial_order_enabled=true. Number of trial fans for first-touch experiments.
Required range:
x >= 1Available options:
instagram, tiktok, twitter, reddit, google, telegram, tinder, facebook, youtube, onlyfans Maximum string length:
5000Was this page helpful?
⌘I