curl --request PUT \
--url https://app.surferseo.com/api/v2/workspaces/{workspace_id}/content_editors/{content_editor_id}/content \
--header 'API-KEY: <api-key>' \
--header 'Content-Type: text/html' \
--data '<string>'import requests
url = "https://app.surferseo.com/api/v2/workspaces/{workspace_id}/content_editors/{content_editor_id}/content"
payload = "<string>"
headers = {
"API-KEY": "<api-key>",
"Content-Type": "text/html"
}
response = requests.put(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'API-KEY': '<api-key>', 'Content-Type': 'text/html'},
body: '<string>'
};
fetch('https://app.surferseo.com/api/v2/workspaces/{workspace_id}/content_editors/{content_editor_id}/content', 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}/content",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => "<string>",
CURLOPT_HTTPHEADER => [
"API-KEY: <api-key>",
"Content-Type: text/html"
],
]);
$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}/content"
payload := strings.NewReader("<string>")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("API-KEY", "<api-key>")
req.Header.Add("Content-Type", "text/html")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://app.surferseo.com/api/v2/workspaces/{workspace_id}/content_editors/{content_editor_id}/content")
.header("API-KEY", "<api-key>")
.header("Content-Type", "text/html")
.body("<string>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.surferseo.com/api/v2/workspaces/{workspace_id}/content_editors/{content_editor_id}/content")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["API-KEY"] = '<api-key>'
request["Content-Type"] = 'text/html'
request.body = "<string>"
response = http.request(request)
puts response.read_body{
"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": [],
"reason": "content_too_large"
}
}{
"error": {
"details": [],
"message": "Set Content-Type: application/json.",
"reason": "unsupported_media_type"
}
}{
"error": {
"details": [
{
"retry_after": 30
}
],
"reason": "rate_limit_exceeded"
}
}{
"error": {
"details": [],
"message": "An unexpected error occurred.",
"reason": "internal_error"
}
}Update Content Editor content
Replaces the content of the Content Editor. Requires the editor to be in completed state.
Request body format negotiated via the Content-Type header:
| Content-Type Header | Body Format |
|---|---|
text/html (default) | HTML |
text/markdown | Markdown |
The request body is always treated as UTF-8, regardless of any charset parameter in the Content-Type header.
Triggers an asynchronous recalculation of the Content Score, including both the SEO and AI Search scores. Each fires its own
webhook when its score settles (content_editor.seo_score.calculated/.failed and
content_editor.ai_search_score.calculated/.failed); once both have settled the
content_editor.content_score.recalculated webhook fires with the unified Content Score. As a
fallback, poll each score’s status — the SEO score on GET .../seo_guidelines/score, the AI
Search score on GET .../ai_search_guidelines/score — or read the unified content_score on
GET .../content_editors/:id.
Content sanitization: the body is parsed and re-serialized server-side; the stored content may differ from what was submitted. Markdown bodies go through the same pipeline (parsed, then re-serialized).
Common transformations:
| Transformation | Example |
|---|---|
| HTML tag re-balancing | <p><p></p> becomes <p></p><p></p> |
| Disallowed tags stripped | <iframe>, <script>, and similar are dropped |
| Disallowed attributes stripped | attributes on otherwise-allowed tags may be removed |
The response is 204 No Content regardless of any rewrites — callers cannot infer what was modified from the response. Re-fetch GET /content_editors/:id/content to inspect the canonical stored form.
Rate limit: 10 requests/sec
curl --request PUT \
--url https://app.surferseo.com/api/v2/workspaces/{workspace_id}/content_editors/{content_editor_id}/content \
--header 'API-KEY: <api-key>' \
--header 'Content-Type: text/html' \
--data '<string>'import requests
url = "https://app.surferseo.com/api/v2/workspaces/{workspace_id}/content_editors/{content_editor_id}/content"
payload = "<string>"
headers = {
"API-KEY": "<api-key>",
"Content-Type": "text/html"
}
response = requests.put(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'API-KEY': '<api-key>', 'Content-Type': 'text/html'},
body: '<string>'
};
fetch('https://app.surferseo.com/api/v2/workspaces/{workspace_id}/content_editors/{content_editor_id}/content', 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}/content",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => "<string>",
CURLOPT_HTTPHEADER => [
"API-KEY: <api-key>",
"Content-Type: text/html"
],
]);
$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}/content"
payload := strings.NewReader("<string>")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("API-KEY", "<api-key>")
req.Header.Add("Content-Type", "text/html")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://app.surferseo.com/api/v2/workspaces/{workspace_id}/content_editors/{content_editor_id}/content")
.header("API-KEY", "<api-key>")
.header("Content-Type", "text/html")
.body("<string>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.surferseo.com/api/v2/workspaces/{workspace_id}/content_editors/{content_editor_id}/content")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["API-KEY"] = '<api-key>'
request["Content-Type"] = 'text/html'
request.body = "<string>"
response = http.request(request)
puts response.read_body{
"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": [],
"reason": "content_too_large"
}
}{
"error": {
"details": [],
"message": "Set Content-Type: application/json.",
"reason": "unsupported_media_type"
}
}{
"error": {
"details": [
{
"retry_after": 30
}
],
"reason": "rate_limit_exceeded"
}
}{
"error": {
"details": [],
"message": "An unexpected error occurred.",
"reason": "internal_error"
}
}Authorizations
Path Parameters
x >= 1123
x >= 1123
Body
Raw content (HTML or Markdown)
The body is of type string.
Response
Content updated. Body is sanitized and re-serialized; response does not echo any rewrites — re-fetch to inspect.
Was this page helpful?