Count which selected prompts can join a topic cluster
curl --request POST \
--url https://api.snowseo.com/v3/topic-clusters/prompt-assignments/bulk-preview \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"selection": {
"mode": "ids",
"ids": [
"<string>"
]
},
"action": "assign",
"teamId": "<string>",
"topicId": "<string>",
"track": true
}
'import requests
url = "https://api.snowseo.com/v3/topic-clusters/prompt-assignments/bulk-preview"
payload = {
"selection": {
"mode": "ids",
"ids": ["<string>"]
},
"action": "assign",
"teamId": "<string>",
"topicId": "<string>",
"track": True
}
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({
selection: {mode: 'ids', ids: ['<string>']},
action: 'assign',
teamId: '<string>',
topicId: '<string>',
track: true
})
};
fetch('https://api.snowseo.com/v3/topic-clusters/prompt-assignments/bulk-preview', 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.snowseo.com/v3/topic-clusters/prompt-assignments/bulk-preview",
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([
'selection' => [
'mode' => 'ids',
'ids' => [
'<string>'
]
],
'action' => 'assign',
'teamId' => '<string>',
'topicId' => '<string>',
'track' => true
]),
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.snowseo.com/v3/topic-clusters/prompt-assignments/bulk-preview"
payload := strings.NewReader("{\n \"selection\": {\n \"mode\": \"ids\",\n \"ids\": [\n \"<string>\"\n ]\n },\n \"action\": \"assign\",\n \"teamId\": \"<string>\",\n \"topicId\": \"<string>\",\n \"track\": true\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.snowseo.com/v3/topic-clusters/prompt-assignments/bulk-preview")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"selection\": {\n \"mode\": \"ids\",\n \"ids\": [\n \"<string>\"\n ]\n },\n \"action\": \"assign\",\n \"teamId\": \"<string>\",\n \"topicId\": \"<string>\",\n \"track\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.snowseo.com/v3/topic-clusters/prompt-assignments/bulk-preview")
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 \"selection\": {\n \"mode\": \"ids\",\n \"ids\": [\n \"<string>\"\n ]\n },\n \"action\": \"assign\",\n \"teamId\": \"<string>\",\n \"topicId\": \"<string>\",\n \"track\": true\n}"
response = http.request(request)
puts response.read_body{
"eligibility": {
"selected": 123,
"eligible": 123,
"skipped": 123,
"byReason": {}
}
}{
"success": true,
"error": "<string>",
"code": "<string>",
"message": "<string>",
"reference": "<string>"
}Topic Clusters
Bulk assign prompts to a topic
Preview and assign many tracked prompts to a topic cluster at once.
POST
/
v3
/
topic-clusters
/
prompt-assignments
/
bulk-preview
Count which selected prompts can join a topic cluster
curl --request POST \
--url https://api.snowseo.com/v3/topic-clusters/prompt-assignments/bulk-preview \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"selection": {
"mode": "ids",
"ids": [
"<string>"
]
},
"action": "assign",
"teamId": "<string>",
"topicId": "<string>",
"track": true
}
'import requests
url = "https://api.snowseo.com/v3/topic-clusters/prompt-assignments/bulk-preview"
payload = {
"selection": {
"mode": "ids",
"ids": ["<string>"]
},
"action": "assign",
"teamId": "<string>",
"topicId": "<string>",
"track": True
}
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({
selection: {mode: 'ids', ids: ['<string>']},
action: 'assign',
teamId: '<string>',
topicId: '<string>',
track: true
})
};
fetch('https://api.snowseo.com/v3/topic-clusters/prompt-assignments/bulk-preview', 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.snowseo.com/v3/topic-clusters/prompt-assignments/bulk-preview",
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([
'selection' => [
'mode' => 'ids',
'ids' => [
'<string>'
]
],
'action' => 'assign',
'teamId' => '<string>',
'topicId' => '<string>',
'track' => true
]),
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.snowseo.com/v3/topic-clusters/prompt-assignments/bulk-preview"
payload := strings.NewReader("{\n \"selection\": {\n \"mode\": \"ids\",\n \"ids\": [\n \"<string>\"\n ]\n },\n \"action\": \"assign\",\n \"teamId\": \"<string>\",\n \"topicId\": \"<string>\",\n \"track\": true\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.snowseo.com/v3/topic-clusters/prompt-assignments/bulk-preview")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"selection\": {\n \"mode\": \"ids\",\n \"ids\": [\n \"<string>\"\n ]\n },\n \"action\": \"assign\",\n \"teamId\": \"<string>\",\n \"topicId\": \"<string>\",\n \"track\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.snowseo.com/v3/topic-clusters/prompt-assignments/bulk-preview")
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 \"selection\": {\n \"mode\": \"ids\",\n \"ids\": [\n \"<string>\"\n ]\n },\n \"action\": \"assign\",\n \"teamId\": \"<string>\",\n \"topicId\": \"<string>\",\n \"track\": true\n}"
response = http.request(request)
puts response.read_body{
"eligibility": {
"selected": 123,
"eligible": 123,
"skipped": 123,
"byReason": {}
}
}{
"success": true,
"error": "<string>",
"code": "<string>",
"message": "<string>",
"reference": "<string>"
}Assigns tracked prompts to a topic cluster. The
selection is the one the tracked prompts table uses: { mode: "ids", ids: [...] }, or { mode: "all", filters: { platform?, competitor?, country?, startDate?, endDate?, promptBrand?, tracking?, intent?, search? }, excludedIds: [...] }.
- Call
POST /v3/topic-clusters/prompt-assignments/bulk-previewwith theselection,action: "assign"andtopicIdfirst. It changes nothing and returnseligibility:{ selected, eligible, skipped, byReason }. Prompts already in a topic are skipped asalready-in-topic, oralready-in-targetwhen they are intopicId. POST /v3/topic-clusters/prompt-assignments/bulk-assignlinks the eligible prompts, with their regional variants, totopicId(required). Settrack: trueto also turn tracking on, which uses credits. It processes 10 prompts per call.
{ success, succeeded, failed, nextCursor, eligibility, results }. While nextCursor is not null, call again with the same body and afterId set to nextCursor. results has one entry per prompt with id, prompt, success, promptIds (the linked prompt ids), promptsSkipped (left untracked for lack of credits) and error when it failed.
To add prompts by text, or to create new ones, use Topic Prompts.Authorizations
bearerAuthapiKey
Your SnowSEO API key (sk_...).
Body
application/json
Response
Default Response
Show child attributes
Show child attributes
Was this page helpful?

