curl --request PUT \
--url https://scribe.skeptrune.com/api/docs/{id}/content \
--header 'Content-Type: text/markdown' \
--cookie scribe_session= \
--data '<string>'import requests
url = "https://scribe.skeptrune.com/api/docs/{id}/content"
payload = "<string>"
headers = {
"cookie": "scribe_session=",
"Content-Type": "text/markdown"
}
response = requests.put(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {cookie: 'scribe_session=', 'Content-Type': 'text/markdown'},
body: '<string>'
};
fetch('https://scribe.skeptrune.com/api/docs/{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://scribe.skeptrune.com/api/docs/{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_COOKIE => "scribe_session=",
CURLOPT_HTTPHEADER => [
"Content-Type: text/markdown"
],
]);
$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://scribe.skeptrune.com/api/docs/{id}/content"
payload := strings.NewReader("<string>")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("cookie", "scribe_session=")
req.Header.Add("Content-Type", "text/markdown")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://scribe.skeptrune.com/api/docs/{id}/content")
.header("cookie", "scribe_session=")
.header("Content-Type", "text/markdown")
.body("<string>")
.asString();require 'uri'
require 'net/http'
url = URI("https://scribe.skeptrune.com/api/docs/{id}/content")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["cookie"] = 'scribe_session='
request["Content-Type"] = 'text/markdown'
request.body = "<string>"
response = http.request(request)
puts response.read_body{
"wordCount": 1280,
"charCount": 8214
}{
"error": {
"code": "not_found",
"message": "No such document."
}
}{
"error": {
"code": "not_found",
"message": "No such document."
}
}{
"error": {
"code": "not_found",
"message": "No such document."
}
}{
"error": {
"code": "not_found",
"message": "No such document."
}
}{
"error": {
"code": "not_found",
"message": "No such document."
}
}{
"error": {
"code": "not_found",
"message": "No such document."
}
}{
"error": {
"code": "not_found",
"message": "No such document."
}
}Replace document content
Replaces the markdown content of the document. Send the raw markdown as a text/markdown request body. The change is applied through the collaborative session, so connected editors update live. Optionally send If-Match (the ETag from GET) or X-Base-Version to make the replace conditional: if the document changed since that version, nothing is written and 412 stale_version is returned — re-GET and retry, or use PATCH to merge instead of replace. Without either header the replace is unconditional. API keys with edit access write as their agent identity; legacy keys without one are recorded as the key itself. Line breaks: a single newline renders as a line break, so stacked lines (a signature, an address) appear on their own lines as written. Use a blank line between blocks to start a new paragraph.
curl --request PUT \
--url https://scribe.skeptrune.com/api/docs/{id}/content \
--header 'Content-Type: text/markdown' \
--cookie scribe_session= \
--data '<string>'import requests
url = "https://scribe.skeptrune.com/api/docs/{id}/content"
payload = "<string>"
headers = {
"cookie": "scribe_session=",
"Content-Type": "text/markdown"
}
response = requests.put(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {cookie: 'scribe_session=', 'Content-Type': 'text/markdown'},
body: '<string>'
};
fetch('https://scribe.skeptrune.com/api/docs/{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://scribe.skeptrune.com/api/docs/{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_COOKIE => "scribe_session=",
CURLOPT_HTTPHEADER => [
"Content-Type: text/markdown"
],
]);
$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://scribe.skeptrune.com/api/docs/{id}/content"
payload := strings.NewReader("<string>")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("cookie", "scribe_session=")
req.Header.Add("Content-Type", "text/markdown")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://scribe.skeptrune.com/api/docs/{id}/content")
.header("cookie", "scribe_session=")
.header("Content-Type", "text/markdown")
.body("<string>")
.asString();require 'uri'
require 'net/http'
url = URI("https://scribe.skeptrune.com/api/docs/{id}/content")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["cookie"] = 'scribe_session='
request["Content-Type"] = 'text/markdown'
request.body = "<string>"
response = http.request(request)
puts response.read_body{
"wordCount": 1280,
"charCount": 8214
}{
"error": {
"code": "not_found",
"message": "No such document."
}
}{
"error": {
"code": "not_found",
"message": "No such document."
}
}{
"error": {
"code": "not_found",
"message": "No such document."
}
}{
"error": {
"code": "not_found",
"message": "No such document."
}
}{
"error": {
"code": "not_found",
"message": "No such document."
}
}{
"error": {
"code": "not_found",
"message": "No such document."
}
}{
"error": {
"code": "not_found",
"message": "No such document."
}
}Authorizations
Browser session cookie set by the WorkOS sign-in flow.
Headers
Conditional replace: the quoted ETag from GET /content. A quoted entity tag, e.g. "verCURRENT01".
"\"Vt3q9ZkpR1aB\""
Conditional replace: the unquoted X-Doc-Version from GET /content. Takes precedence over If-Match. An unquoted version token, e.g. verCURRENT01.
"Vt3q9ZkpR1aB"
Path Parameters
Id of the document whose markdown to replace.
Body
The new markdown source. A single newline renders as a line break (stacked lines stay on their own lines); use a blank line to start a new paragraph.
The full markdown source to store.