curl --request POST \
--url https://scribe.skeptrune.com/api/docs/{id}/restore \
--cookie scribe_session=import requests
url = "https://scribe.skeptrune.com/api/docs/{id}/restore"
headers = {"cookie": "scribe_session="}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {cookie: 'scribe_session='}};
fetch('https://scribe.skeptrune.com/api/docs/{id}/restore', 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}/restore",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_COOKIE => "scribe_session=",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://scribe.skeptrune.com/api/docs/{id}/restore"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("cookie", "scribe_session=")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://scribe.skeptrune.com/api/docs/{id}/restore")
.header("cookie", "scribe_session=")
.asString();require 'uri'
require 'net/http'
url = URI("https://scribe.skeptrune.com/api/docs/{id}/restore")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["cookie"] = 'scribe_session='
response = http.request(request)
puts response.read_body{
"id": "doc_S9tUvWxYzAbCdEfGh12i",
"title": "Launch plan",
"scope": "workspace",
"folderId": "fld_7qRsTuVwXyZaBcDeFg3h",
"ownerUserId": "usr_V1StGXR8_Z5jdHi6BmyT",
"wordCount": 1280,
"charCount": 8214,
"hasPublicLink": false,
"deletedAt": null,
"createdAt": 1752624000000,
"updatedAt": 1752624000000,
"lastEditedBy": "usr_V1StGXR8_Z5jdHi6BmyT",
"lastEditedAt": 1752624000000
}{
"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."
}
}Restore a document from the trash
Moves a trashed document back to its section. Requires a user session or an API key with edit access; the key acts as its agent identity.
curl --request POST \
--url https://scribe.skeptrune.com/api/docs/{id}/restore \
--cookie scribe_session=import requests
url = "https://scribe.skeptrune.com/api/docs/{id}/restore"
headers = {"cookie": "scribe_session="}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {cookie: 'scribe_session='}};
fetch('https://scribe.skeptrune.com/api/docs/{id}/restore', 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}/restore",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_COOKIE => "scribe_session=",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://scribe.skeptrune.com/api/docs/{id}/restore"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("cookie", "scribe_session=")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://scribe.skeptrune.com/api/docs/{id}/restore")
.header("cookie", "scribe_session=")
.asString();require 'uri'
require 'net/http'
url = URI("https://scribe.skeptrune.com/api/docs/{id}/restore")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["cookie"] = 'scribe_session='
response = http.request(request)
puts response.read_body{
"id": "doc_S9tUvWxYzAbCdEfGh12i",
"title": "Launch plan",
"scope": "workspace",
"folderId": "fld_7qRsTuVwXyZaBcDeFg3h",
"ownerUserId": "usr_V1StGXR8_Z5jdHi6BmyT",
"wordCount": 1280,
"charCount": 8214,
"hasPublicLink": false,
"deletedAt": null,
"createdAt": 1752624000000,
"updatedAt": 1752624000000,
"lastEditedBy": "usr_V1StGXR8_Z5jdHi6BmyT",
"lastEditedAt": 1752624000000
}{
"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.
Path Parameters
Id of the trashed document to restore.
Response
The restored document.
Document metadata (content is served separately).
Document id.
"doc_S9tUvWxYzAbCdEfGh12i"
Document title.
"Launch plan"
Section the document lives in: workspace or private.
workspace, private "workspace"
Containing folder id, or null at the root of its section.
"fld_7qRsTuVwXyZaBcDeFg3h"
User id of the document owner.
"usr_V1StGXR8_Z5jdHi6BmyT"
Word count of the latest snapshot.
1280
Character count of the latest snapshot.
8214
Whether a public read-only link is enabled.
false
When the document was trashed, or null while active.
1752624000000
When the document was created (epoch milliseconds).
1752624000000
When the document metadata or content last changed (epoch milliseconds).
1752624000000
User id of the last editor, or null.
"usr_V1StGXR8_Z5jdHi6BmyT"
When the content was last edited, or null.
1752624000000