Update SEO Guidelines topics inclusion
curl --request PATCH \
--url https://app.surferseo.com/api/v2/workspaces/{workspace_id}/content_editors/{content_editor_id}/seo_guidelines/topics_and_questions \
--header 'API-KEY: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"topics_and_questions": [
{
"included": true,
"item": "keyword research"
},
{
"included": false,
"item": "backlink strategy"
}
]
}
'import requests
url = "https://app.surferseo.com/api/v2/workspaces/{workspace_id}/content_editors/{content_editor_id}/seo_guidelines/topics_and_questions"
payload = { "topics_and_questions": [
{
"included": True,
"item": "keyword research"
},
{
"included": False,
"item": "backlink strategy"
}
] }
headers = {
"API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
topics_and_questions: [
{included: true, item: 'keyword research'},
{included: false, item: 'backlink strategy'}
]
})
};
fetch('https://app.surferseo.com/api/v2/workspaces/{workspace_id}/content_editors/{content_editor_id}/seo_guidelines/topics_and_questions', 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://app.surferseo.com/api/v2/workspaces/{workspace_id}/content_editors/{content_editor_id}/seo_guidelines/topics_and_questions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'topics_and_questions' => [
[
'included' => true,
'item' => 'keyword research'
],
[
'included' => false,
'item' => 'backlink strategy'
]
]
]),
CURLOPT_HTTPHEADER => [
"API-KEY: <api-key>",
"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://app.surferseo.com/api/v2/workspaces/{workspace_id}/content_editors/{content_editor_id}/seo_guidelines/topics_and_questions"
payload := strings.NewReader("{\n \"topics_and_questions\": [\n {\n \"included\": true,\n \"item\": \"keyword research\"\n },\n {\n \"included\": false,\n \"item\": \"backlink strategy\"\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("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.patch("https://app.surferseo.com/api/v2/workspaces/{workspace_id}/content_editors/{content_editor_id}/seo_guidelines/topics_and_questions")
.header("API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"topics_and_questions\": [\n {\n \"included\": true,\n \"item\": \"keyword research\"\n },\n {\n \"included\": false,\n \"item\": \"backlink strategy\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.surferseo.com/api/v2/workspaces/{workspace_id}/content_editors/{content_editor_id}/seo_guidelines/topics_and_questions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"topics_and_questions\": [\n {\n \"included\": true,\n \"item\": \"keyword research\"\n },\n {\n \"included\": false,\n \"item\": \"backlink strategy\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": [
{
"included": true,
"item": "keyword research",
"type": "surfer"
},
{
"included": true,
"item": "on-page seo",
"type": "people_also_ask"
},
{
"included": false,
"item": "backlink strategy",
"type": "competitors"
},
{
"included": true,
"item": "ai visibility",
"type": "custom"
}
],
"meta": {
"total": 4
}
}{
"error": {
"details": [
{
"field": "keywords",
"reason": "required"
}
],
"reason": "validation_error"
}
}{
"error": {
"details": [],
"reason": "unauthorized"
}
}{
"error": {
"details": [],
"reason": "permission_denied"
}
}{
"error": {
"details": [],
"reason": "not_found"
}
}{
"error": {
"details": [
{
"allowed": [
"application/json"
],
"field": "accept",
"reason": "unsupported"
}
],
"message": "Accept must be one of: application/json",
"reason": "not_acceptable"
}
}{
"error": {
"details": [],
"message": "The request conflicts with the current resource state.",
"reason": "conflict"
}
}{
"error": {
"details": [],
"message": "Set Content-Type: application/json.",
"reason": "unsupported_media_type"
}
}{
"error": {
"details": [],
"message": "The request was understood but could not be processed.",
"reason": "unprocessable_entity"
}
}{
"error": {
"details": [
{
"retry_after": 30
}
],
"reason": "rate_limit_exceeded"
}
}SEO Guidelines
Update SEO Guidelines topics inclusion
Toggles whether each listed topic is included. Unknown item values are created as custom topics
only when included is true; an unknown item with included: false is ignored.
Total topics is capped at 500 after the update. The topics_and_questions array must contain at least one item.
Requires the editor to be in completed state.
Rate limit: 10 requests/sec
PATCH
/
api
/
v2
/
workspaces
/
{workspace_id}
/
content_editors
/
{content_editor_id}
/
seo_guidelines
/
topics_and_questions
Update SEO Guidelines topics inclusion
curl --request PATCH \
--url https://app.surferseo.com/api/v2/workspaces/{workspace_id}/content_editors/{content_editor_id}/seo_guidelines/topics_and_questions \
--header 'API-KEY: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"topics_and_questions": [
{
"included": true,
"item": "keyword research"
},
{
"included": false,
"item": "backlink strategy"
}
]
}
'import requests
url = "https://app.surferseo.com/api/v2/workspaces/{workspace_id}/content_editors/{content_editor_id}/seo_guidelines/topics_and_questions"
payload = { "topics_and_questions": [
{
"included": True,
"item": "keyword research"
},
{
"included": False,
"item": "backlink strategy"
}
] }
headers = {
"API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
topics_and_questions: [
{included: true, item: 'keyword research'},
{included: false, item: 'backlink strategy'}
]
})
};
fetch('https://app.surferseo.com/api/v2/workspaces/{workspace_id}/content_editors/{content_editor_id}/seo_guidelines/topics_and_questions', 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://app.surferseo.com/api/v2/workspaces/{workspace_id}/content_editors/{content_editor_id}/seo_guidelines/topics_and_questions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'topics_and_questions' => [
[
'included' => true,
'item' => 'keyword research'
],
[
'included' => false,
'item' => 'backlink strategy'
]
]
]),
CURLOPT_HTTPHEADER => [
"API-KEY: <api-key>",
"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://app.surferseo.com/api/v2/workspaces/{workspace_id}/content_editors/{content_editor_id}/seo_guidelines/topics_and_questions"
payload := strings.NewReader("{\n \"topics_and_questions\": [\n {\n \"included\": true,\n \"item\": \"keyword research\"\n },\n {\n \"included\": false,\n \"item\": \"backlink strategy\"\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("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.patch("https://app.surferseo.com/api/v2/workspaces/{workspace_id}/content_editors/{content_editor_id}/seo_guidelines/topics_and_questions")
.header("API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"topics_and_questions\": [\n {\n \"included\": true,\n \"item\": \"keyword research\"\n },\n {\n \"included\": false,\n \"item\": \"backlink strategy\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.surferseo.com/api/v2/workspaces/{workspace_id}/content_editors/{content_editor_id}/seo_guidelines/topics_and_questions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"topics_and_questions\": [\n {\n \"included\": true,\n \"item\": \"keyword research\"\n },\n {\n \"included\": false,\n \"item\": \"backlink strategy\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": [
{
"included": true,
"item": "keyword research",
"type": "surfer"
},
{
"included": true,
"item": "on-page seo",
"type": "people_also_ask"
},
{
"included": false,
"item": "backlink strategy",
"type": "competitors"
},
{
"included": true,
"item": "ai visibility",
"type": "custom"
}
],
"meta": {
"total": 4
}
}{
"error": {
"details": [
{
"field": "keywords",
"reason": "required"
}
],
"reason": "validation_error"
}
}{
"error": {
"details": [],
"reason": "unauthorized"
}
}{
"error": {
"details": [],
"reason": "permission_denied"
}
}{
"error": {
"details": [],
"reason": "not_found"
}
}{
"error": {
"details": [
{
"allowed": [
"application/json"
],
"field": "accept",
"reason": "unsupported"
}
],
"message": "Accept must be one of: application/json",
"reason": "not_acceptable"
}
}{
"error": {
"details": [],
"message": "The request conflicts with the current resource state.",
"reason": "conflict"
}
}{
"error": {
"details": [],
"message": "Set Content-Type: application/json.",
"reason": "unsupported_media_type"
}
}{
"error": {
"details": [],
"message": "The request was understood but could not be processed.",
"reason": "unprocessable_entity"
}
}{
"error": {
"details": [
{
"retry_after": 30
}
],
"reason": "rate_limit_exceeded"
}
}Authorizations
Path Parameters
Required range:
x >= 1Example:
123
Required range:
x >= 1Example:
123
Body
application/json
Topic updates
Minimum array length:
1Show child attributes
Show child attributes
Was this page helpful?