Update Pool
curl --request POST \
--url https://studio-api.onlytraffic.com/api/external/v1/shoutouts/pools/{uuid} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"name": "<string>",
"formats": [],
"start_date": "2023-12-25",
"end_date": "2023-12-25",
"daily_limits": {},
"same_target_cooldown_days": 45,
"publish_settings": {
"pin_posts": true,
"vault_cleanup": true,
"vault_folder": true,
"mass_dm": {
"send_to": [
"Fans"
],
"exclude_lists": [
"Alt*"
],
"unsend_previous": true
}
},
"hosts": [
123
],
"targets": [
123
],
"target_weights": {}
}
'import requests
url = "https://studio-api.onlytraffic.com/api/external/v1/shoutouts/pools/{uuid}"
payload = {
"name": "<string>",
"formats": [],
"start_date": "2023-12-25",
"end_date": "2023-12-25",
"daily_limits": {},
"same_target_cooldown_days": 45,
"publish_settings": {
"pin_posts": True,
"vault_cleanup": True,
"vault_folder": True,
"mass_dm": {
"send_to": ["Fans"],
"exclude_lists": ["Alt*"],
"unsend_previous": True
}
},
"hosts": [123],
"targets": [123],
"target_weights": {}
}
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({
name: '<string>',
formats: [],
start_date: '2023-12-25',
end_date: '2023-12-25',
daily_limits: {},
same_target_cooldown_days: 45,
publish_settings: {
pin_posts: true,
vault_cleanup: true,
vault_folder: true,
mass_dm: {send_to: ['Fans'], exclude_lists: ['Alt*'], unsend_previous: true}
},
hosts: [123],
targets: [123],
target_weights: {}
})
};
fetch('https://studio-api.onlytraffic.com/api/external/v1/shoutouts/pools/{uuid}', 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/shoutouts/pools/{uuid}",
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([
'name' => '<string>',
'formats' => [
],
'start_date' => '2023-12-25',
'end_date' => '2023-12-25',
'daily_limits' => [
],
'same_target_cooldown_days' => 45,
'publish_settings' => [
'pin_posts' => true,
'vault_cleanup' => true,
'vault_folder' => true,
'mass_dm' => [
'send_to' => [
'Fans'
],
'exclude_lists' => [
'Alt*'
],
'unsend_previous' => true
]
],
'hosts' => [
123
],
'targets' => [
123
],
'target_weights' => [
]
]),
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/shoutouts/pools/{uuid}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"formats\": [],\n \"start_date\": \"2023-12-25\",\n \"end_date\": \"2023-12-25\",\n \"daily_limits\": {},\n \"same_target_cooldown_days\": 45,\n \"publish_settings\": {\n \"pin_posts\": true,\n \"vault_cleanup\": true,\n \"vault_folder\": true,\n \"mass_dm\": {\n \"send_to\": [\n \"Fans\"\n ],\n \"exclude_lists\": [\n \"Alt*\"\n ],\n \"unsend_previous\": true\n }\n },\n \"hosts\": [\n 123\n ],\n \"targets\": [\n 123\n ],\n \"target_weights\": {}\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/shoutouts/pools/{uuid}")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"formats\": [],\n \"start_date\": \"2023-12-25\",\n \"end_date\": \"2023-12-25\",\n \"daily_limits\": {},\n \"same_target_cooldown_days\": 45,\n \"publish_settings\": {\n \"pin_posts\": true,\n \"vault_cleanup\": true,\n \"vault_folder\": true,\n \"mass_dm\": {\n \"send_to\": [\n \"Fans\"\n ],\n \"exclude_lists\": [\n \"Alt*\"\n ],\n \"unsend_previous\": true\n }\n },\n \"hosts\": [\n 123\n ],\n \"targets\": [\n 123\n ],\n \"target_weights\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://studio-api.onlytraffic.com/api/external/v1/shoutouts/pools/{uuid}")
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 \"name\": \"<string>\",\n \"formats\": [],\n \"start_date\": \"2023-12-25\",\n \"end_date\": \"2023-12-25\",\n \"daily_limits\": {},\n \"same_target_cooldown_days\": 45,\n \"publish_settings\": {\n \"pin_posts\": true,\n \"vault_cleanup\": true,\n \"vault_folder\": true,\n \"mass_dm\": {\n \"send_to\": [\n \"Fans\"\n ],\n \"exclude_lists\": [\n \"Alt*\"\n ],\n \"unsend_previous\": true\n }\n },\n \"hosts\": [\n 123\n ],\n \"targets\": [\n 123\n ],\n \"target_weights\": {}\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"pool_id": "550e8400-e29b-41d4-a716-446655440000"
}
}{
"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
}{
"success": false,
"error": "validation_failed",
"message": "<string>",
"details": {},
"retry_after": 123
}Shoutouts
Изменить пул
Change pool settings.
POST
/
shoutouts
/
pools
/
{uuid}
Update Pool
curl --request POST \
--url https://studio-api.onlytraffic.com/api/external/v1/shoutouts/pools/{uuid} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"name": "<string>",
"formats": [],
"start_date": "2023-12-25",
"end_date": "2023-12-25",
"daily_limits": {},
"same_target_cooldown_days": 45,
"publish_settings": {
"pin_posts": true,
"vault_cleanup": true,
"vault_folder": true,
"mass_dm": {
"send_to": [
"Fans"
],
"exclude_lists": [
"Alt*"
],
"unsend_previous": true
}
},
"hosts": [
123
],
"targets": [
123
],
"target_weights": {}
}
'import requests
url = "https://studio-api.onlytraffic.com/api/external/v1/shoutouts/pools/{uuid}"
payload = {
"name": "<string>",
"formats": [],
"start_date": "2023-12-25",
"end_date": "2023-12-25",
"daily_limits": {},
"same_target_cooldown_days": 45,
"publish_settings": {
"pin_posts": True,
"vault_cleanup": True,
"vault_folder": True,
"mass_dm": {
"send_to": ["Fans"],
"exclude_lists": ["Alt*"],
"unsend_previous": True
}
},
"hosts": [123],
"targets": [123],
"target_weights": {}
}
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({
name: '<string>',
formats: [],
start_date: '2023-12-25',
end_date: '2023-12-25',
daily_limits: {},
same_target_cooldown_days: 45,
publish_settings: {
pin_posts: true,
vault_cleanup: true,
vault_folder: true,
mass_dm: {send_to: ['Fans'], exclude_lists: ['Alt*'], unsend_previous: true}
},
hosts: [123],
targets: [123],
target_weights: {}
})
};
fetch('https://studio-api.onlytraffic.com/api/external/v1/shoutouts/pools/{uuid}', 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/shoutouts/pools/{uuid}",
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([
'name' => '<string>',
'formats' => [
],
'start_date' => '2023-12-25',
'end_date' => '2023-12-25',
'daily_limits' => [
],
'same_target_cooldown_days' => 45,
'publish_settings' => [
'pin_posts' => true,
'vault_cleanup' => true,
'vault_folder' => true,
'mass_dm' => [
'send_to' => [
'Fans'
],
'exclude_lists' => [
'Alt*'
],
'unsend_previous' => true
]
],
'hosts' => [
123
],
'targets' => [
123
],
'target_weights' => [
]
]),
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/shoutouts/pools/{uuid}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"formats\": [],\n \"start_date\": \"2023-12-25\",\n \"end_date\": \"2023-12-25\",\n \"daily_limits\": {},\n \"same_target_cooldown_days\": 45,\n \"publish_settings\": {\n \"pin_posts\": true,\n \"vault_cleanup\": true,\n \"vault_folder\": true,\n \"mass_dm\": {\n \"send_to\": [\n \"Fans\"\n ],\n \"exclude_lists\": [\n \"Alt*\"\n ],\n \"unsend_previous\": true\n }\n },\n \"hosts\": [\n 123\n ],\n \"targets\": [\n 123\n ],\n \"target_weights\": {}\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/shoutouts/pools/{uuid}")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"formats\": [],\n \"start_date\": \"2023-12-25\",\n \"end_date\": \"2023-12-25\",\n \"daily_limits\": {},\n \"same_target_cooldown_days\": 45,\n \"publish_settings\": {\n \"pin_posts\": true,\n \"vault_cleanup\": true,\n \"vault_folder\": true,\n \"mass_dm\": {\n \"send_to\": [\n \"Fans\"\n ],\n \"exclude_lists\": [\n \"Alt*\"\n ],\n \"unsend_previous\": true\n }\n },\n \"hosts\": [\n 123\n ],\n \"targets\": [\n 123\n ],\n \"target_weights\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://studio-api.onlytraffic.com/api/external/v1/shoutouts/pools/{uuid}")
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 \"name\": \"<string>\",\n \"formats\": [],\n \"start_date\": \"2023-12-25\",\n \"end_date\": \"2023-12-25\",\n \"daily_limits\": {},\n \"same_target_cooldown_days\": 45,\n \"publish_settings\": {\n \"pin_posts\": true,\n \"vault_cleanup\": true,\n \"vault_folder\": true,\n \"mass_dm\": {\n \"send_to\": [\n \"Fans\"\n ],\n \"exclude_lists\": [\n \"Alt*\"\n ],\n \"unsend_previous\": true\n }\n },\n \"hosts\": [\n 123\n ],\n \"targets\": [\n 123\n ],\n \"target_weights\": {}\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"pool_id": "550e8400-e29b-41d4-a716-446655440000"
}
}{
"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
}{
"success": false,
"error": "validation_failed",
"message": "<string>",
"details": {},
"retry_after": 123
}Отправляйте только то, что меняется:
daily_limits, publish_settings и target_weights сливаются по ключам, hosts и targets заменяют списки целиком, если переданы. К результату применяются те же проверки, что при создании. Статус здесь не меняется: пауза, возобновление и архив идут через POST /shoutouts/pools/{uuid}/status. Архивный пул отвечает 422 pool_not_editable.Авторизации
Your API key from the Studio Dashboard
Параметры пути
Pool id: the pool_id value from the pools list.
Тело
application/json
Only the fields sent change. daily_limits, publish_settings and target_weights merge key by key; hosts and targets replace the lists.
Maximum string length:
100Доступные опции:
story, post, bio, friends, mass_dm Доступные опции:
equal, priority, weighted Show child attributes
Show child attributes
Требуемый диапазон:
1 <= x <= 90Доступные опции:
3, 5, 7, 14, 30 Доступные опции:
3, 5, 7, 14, 30 Доступные опции:
1, 3, 5, 7 How publications go out.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Была ли эта страница полезной?