curl --request PATCH \
--url https://app.surferseo.com/api/v1/content_editors/{id} \
--header 'API-KEY: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"content": "<h1>Title</h1><p>First paragraph</p>",
"included_terms": [
"SEO",
"on-page optimization",
"SERP",
"Google algorithm"
]
}
'import requests
url = "https://app.surferseo.com/api/v1/content_editors/{id}"
payload = {
"content": "<h1>Title</h1><p>First paragraph</p>",
"included_terms": ["SEO", "on-page optimization", "SERP", "Google algorithm"]
}
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({
content: '<h1>Title</h1><p>First paragraph</p>',
included_terms: ['SEO', 'on-page optimization', 'SERP', 'Google algorithm']
})
};
fetch('https://app.surferseo.com/api/v1/content_editors/{id}', 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/v1/content_editors/{id}",
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([
'content' => '<h1>Title</h1><p>First paragraph</p>',
'included_terms' => [
'SEO',
'on-page optimization',
'SERP',
'Google algorithm'
]
]),
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/v1/content_editors/{id}"
payload := strings.NewReader("{\n \"content\": \"<h1>Title</h1><p>First paragraph</p>\",\n \"included_terms\": [\n \"SEO\",\n \"on-page optimization\",\n \"SERP\",\n \"Google algorithm\"\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/v1/content_editors/{id}")
.header("API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"content\": \"<h1>Title</h1><p>First paragraph</p>\",\n \"included_terms\": [\n \"SEO\",\n \"on-page optimization\",\n \"SERP\",\n \"Google algorithm\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.surferseo.com/api/v1/content_editors/{id}")
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 \"content\": \"<h1>Title</h1><p>First paragraph</p>\",\n \"included_terms\": [\n \"SEO\",\n \"on-page optimization\",\n \"SERP\",\n \"Google algorithm\"\n ]\n}"
response = http.request(request)
puts response.read_bodyUpdate Content Editor query
Deprecated. This endpoint has been split in v2. Use PUT /api/v2/workspaces//content_editors//content to update content, or PATCH /api/v2/workspaces//content_editors//seo_guidelines/terms to update included terms.
Updates the content or included terms for the Content Editor.
The editor must be in a completed state. Use the Get Content Editor query endpoint to check its status.
Rate limit: 10 requests/sec
A recalculated Content Score will be sent via webhook. Refer to the Webhooks section for details on how to set it up.
You’ll receive the following payload in the webhook request body:
id- notification id (integer)type-"content_editor.content_score.recalculated"timestamp- ISO8601 extended UTC timestamp (string)payload:draft_id- unique identifier of the Content Editor (integer)permalink_hash- used to share Content Editor with people (string)content_score- updated content score (integer)
curl --request PATCH \
--url https://app.surferseo.com/api/v1/content_editors/{id} \
--header 'API-KEY: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"content": "<h1>Title</h1><p>First paragraph</p>",
"included_terms": [
"SEO",
"on-page optimization",
"SERP",
"Google algorithm"
]
}
'import requests
url = "https://app.surferseo.com/api/v1/content_editors/{id}"
payload = {
"content": "<h1>Title</h1><p>First paragraph</p>",
"included_terms": ["SEO", "on-page optimization", "SERP", "Google algorithm"]
}
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({
content: '<h1>Title</h1><p>First paragraph</p>',
included_terms: ['SEO', 'on-page optimization', 'SERP', 'Google algorithm']
})
};
fetch('https://app.surferseo.com/api/v1/content_editors/{id}', 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/v1/content_editors/{id}",
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([
'content' => '<h1>Title</h1><p>First paragraph</p>',
'included_terms' => [
'SEO',
'on-page optimization',
'SERP',
'Google algorithm'
]
]),
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/v1/content_editors/{id}"
payload := strings.NewReader("{\n \"content\": \"<h1>Title</h1><p>First paragraph</p>\",\n \"included_terms\": [\n \"SEO\",\n \"on-page optimization\",\n \"SERP\",\n \"Google algorithm\"\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/v1/content_editors/{id}")
.header("API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"content\": \"<h1>Title</h1><p>First paragraph</p>\",\n \"included_terms\": [\n \"SEO\",\n \"on-page optimization\",\n \"SERP\",\n \"Google algorithm\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.surferseo.com/api/v1/content_editors/{id}")
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 \"content\": \"<h1>Title</h1><p>First paragraph</p>\",\n \"included_terms\": [\n \"SEO\",\n \"on-page optimization\",\n \"SERP\",\n \"Google algorithm\"\n ]\n}"
response = http.request(request)
puts response.read_bodyAuthorizations
Path Parameters
The unique identifier of the entity
x >= 11
Body
New HTML content of the Content Editor. It will be sanitized and formatted to fit the Content Editor's rules. It will replace the existing content. If the organization has a registered webhook handler, a webhook will be triggered after the Content Score is recalculated.
"<h1>Title</h1><p>First paragraph</p>"
Terms to be used in this Editor. Passing an empty array will result in only the main keyword being displayed in 'Terms to use' section in the Guidelines.
1[
"SEO",
"on-page optimization",
"SERP",
"Google algorithm"
]
Response
OK
Was this page helpful?