curl --request PATCH \
--url https://api.autype.com/api/v1/dev/documents/{documentId}/markdown \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"content": "# Updated Report\n\nNew content.",
"stylePresetId": "<string>",
"variables": {},
"abbreviations": {},
"defaults": {},
"citations": [
"<string>"
],
"style": {}
}
'import requests
url = "https://api.autype.com/api/v1/dev/documents/{documentId}/markdown"
payload = {
"content": "# Updated Report
New content.",
"stylePresetId": "<string>",
"variables": {},
"abbreviations": {},
"defaults": {},
"citations": ["<string>"],
"style": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
content: '# Updated Report\n\nNew content.',
stylePresetId: '<string>',
variables: {},
abbreviations: {},
defaults: {},
citations: ['<string>'],
style: {}
})
};
fetch('https://api.autype.com/api/v1/dev/documents/{documentId}/markdown', 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://api.autype.com/api/v1/dev/documents/{documentId}/markdown",
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' => '# Updated Report
New content.',
'stylePresetId' => '<string>',
'variables' => [
],
'abbreviations' => [
],
'defaults' => [
],
'citations' => [
'<string>'
],
'style' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://api.autype.com/api/v1/dev/documents/{documentId}/markdown"
payload := strings.NewReader("{\n \"content\": \"# Updated Report\\n\\nNew content.\",\n \"stylePresetId\": \"<string>\",\n \"variables\": {},\n \"abbreviations\": {},\n \"defaults\": {},\n \"citations\": [\n \"<string>\"\n ],\n \"style\": {}\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://api.autype.com/api/v1/dev/documents/{documentId}/markdown")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"content\": \"# Updated Report\\n\\nNew content.\",\n \"stylePresetId\": \"<string>\",\n \"variables\": {},\n \"abbreviations\": {},\n \"defaults\": {},\n \"citations\": [\n \"<string>\"\n ],\n \"style\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.autype.com/api/v1/dev/documents/{documentId}/markdown")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"content\": \"# Updated Report\\n\\nNew content.\",\n \"stylePresetId\": \"<string>\",\n \"variables\": {},\n \"abbreviations\": {},\n \"defaults\": {},\n \"citations\": [\n \"<string>\"\n ],\n \"style\": {}\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"title": "<string>",
"projectId": "<string>",
"content": "<string>",
"document": {},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"stylePresetId": "<string>",
"variables": {},
"abbreviations": {},
"defaults": {},
"citations": [
"<string>"
],
"style": {},
"revision": 123
}Update document from Extended Markdown
Replace the latest document content from Extended Markdown while preserving omitted metadata. This is the preferred persistent edit endpoint for AI agents.
curl --request PATCH \
--url https://api.autype.com/api/v1/dev/documents/{documentId}/markdown \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"content": "# Updated Report\n\nNew content.",
"stylePresetId": "<string>",
"variables": {},
"abbreviations": {},
"defaults": {},
"citations": [
"<string>"
],
"style": {}
}
'import requests
url = "https://api.autype.com/api/v1/dev/documents/{documentId}/markdown"
payload = {
"content": "# Updated Report
New content.",
"stylePresetId": "<string>",
"variables": {},
"abbreviations": {},
"defaults": {},
"citations": ["<string>"],
"style": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
content: '# Updated Report\n\nNew content.',
stylePresetId: '<string>',
variables: {},
abbreviations: {},
defaults: {},
citations: ['<string>'],
style: {}
})
};
fetch('https://api.autype.com/api/v1/dev/documents/{documentId}/markdown', 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://api.autype.com/api/v1/dev/documents/{documentId}/markdown",
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' => '# Updated Report
New content.',
'stylePresetId' => '<string>',
'variables' => [
],
'abbreviations' => [
],
'defaults' => [
],
'citations' => [
'<string>'
],
'style' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://api.autype.com/api/v1/dev/documents/{documentId}/markdown"
payload := strings.NewReader("{\n \"content\": \"# Updated Report\\n\\nNew content.\",\n \"stylePresetId\": \"<string>\",\n \"variables\": {},\n \"abbreviations\": {},\n \"defaults\": {},\n \"citations\": [\n \"<string>\"\n ],\n \"style\": {}\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://api.autype.com/api/v1/dev/documents/{documentId}/markdown")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"content\": \"# Updated Report\\n\\nNew content.\",\n \"stylePresetId\": \"<string>\",\n \"variables\": {},\n \"abbreviations\": {},\n \"defaults\": {},\n \"citations\": [\n \"<string>\"\n ],\n \"style\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.autype.com/api/v1/dev/documents/{documentId}/markdown")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"content\": \"# Updated Report\\n\\nNew content.\",\n \"stylePresetId\": \"<string>\",\n \"variables\": {},\n \"abbreviations\": {},\n \"defaults\": {},\n \"citations\": [\n \"<string>\"\n ],\n \"style\": {}\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"title": "<string>",
"projectId": "<string>",
"content": "<string>",
"document": {},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"stylePresetId": "<string>",
"variables": {},
"abbreviations": {},
"defaults": {},
"citations": [
"<string>"
],
"style": {},
"revision": 123
}Authorizations
Short-lived, Developer-API-audience token obtained by the trusted MCP service through token exchange (mcp_at_...). Raw MCP resource tokens are rejected.
Path Parameters
Document ID
Body
Replacement Extended Markdown content. Omit only when updating metadata such as variables/defaults/stylePresetId.
"# Updated Report\n\nNew content."
Document settings to replace/merge with current settings.
Show child attributes
Show child attributes
Set, replace, or clear the referenced workspace or built-in system style preset.
Replacement variables object
Replacement abbreviation map
Defaults to merge with the current inline defaults
Replacement citations array in CSL-JSON format
Replacement style metadata
Response
Updated document represented as Extended Markdown
Document ID
Document title
Project ID the document belongs to
Extended Markdown representation of the latest snapshot
Document settings
Referenced workspace or built-in system style preset, if any
Variables for template substitution
Abbreviation map
Inline defaults
Citations array
Style metadata
Current content revision
