curl --request POST \
--url https://api.autype.com/api/v1/dev/documents/markdown \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"projectId": "<string>",
"title": "My Markdown Document",
"content": "# Report\n\nHello {{companyName}}.\n\n| Name | Amount |\n| --- | ---: |\n| Item | 42 |\n",
"document": {
"type": "pdf",
"size": "A4",
"orientation": "portrait"
},
"description": "Document description",
"stylePresetId": "<string>",
"variables": {},
"abbreviations": {},
"defaults": {},
"citations": [
"<string>"
],
"style": {}
}
'import requests
url = "https://api.autype.com/api/v1/dev/documents/markdown"
payload = {
"projectId": "<string>",
"title": "My Markdown Document",
"content": "# Report
Hello {{companyName}}.
| Name | Amount |
| --- | ---: |
| Item | 42 |
",
"document": {
"type": "pdf",
"size": "A4",
"orientation": "portrait"
},
"description": "Document description",
"stylePresetId": "<string>",
"variables": {},
"abbreviations": {},
"defaults": {},
"citations": ["<string>"],
"style": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
projectId: '<string>',
title: 'My Markdown Document',
content: '# Report\n\nHello {{companyName}}.\n\n| Name | Amount |\n| --- | ---: |\n| Item | 42 |\n',
document: {type: 'pdf', size: 'A4', orientation: 'portrait'},
description: 'Document description',
stylePresetId: '<string>',
variables: {},
abbreviations: {},
defaults: {},
citations: ['<string>'],
style: {}
})
};
fetch('https://api.autype.com/api/v1/dev/documents/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/markdown",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'projectId' => '<string>',
'title' => 'My Markdown Document',
'content' => '# Report
Hello {{companyName}}.
| Name | Amount |
| --- | ---: |
| Item | 42 |
',
'document' => [
'type' => 'pdf',
'size' => 'A4',
'orientation' => 'portrait'
],
'description' => 'Document description',
'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/markdown"
payload := strings.NewReader("{\n \"projectId\": \"<string>\",\n \"title\": \"My Markdown Document\",\n \"content\": \"# Report\\n\\nHello {{companyName}}.\\n\\n| Name | Amount |\\n| --- | ---: |\\n| Item | 42 |\\n\",\n \"document\": {\n \"type\": \"pdf\",\n \"size\": \"A4\",\n \"orientation\": \"portrait\"\n },\n \"description\": \"Document description\",\n \"stylePresetId\": \"<string>\",\n \"variables\": {},\n \"abbreviations\": {},\n \"defaults\": {},\n \"citations\": [\n \"<string>\"\n ],\n \"style\": {}\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.autype.com/api/v1/dev/documents/markdown")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"projectId\": \"<string>\",\n \"title\": \"My Markdown Document\",\n \"content\": \"# Report\\n\\nHello {{companyName}}.\\n\\n| Name | Amount |\\n| --- | ---: |\\n| Item | 42 |\\n\",\n \"document\": {\n \"type\": \"pdf\",\n \"size\": \"A4\",\n \"orientation\": \"portrait\"\n },\n \"description\": \"Document description\",\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/markdown")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"projectId\": \"<string>\",\n \"title\": \"My Markdown Document\",\n \"content\": \"# Report\\n\\nHello {{companyName}}.\\n\\n| Name | Amount |\\n| --- | ---: |\\n| Item | 42 |\\n\",\n \"document\": {\n \"type\": \"pdf\",\n \"size\": \"A4\",\n \"orientation\": \"portrait\"\n },\n \"description\": \"Document description\",\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>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"stylePresetId": "<string>",
"description": {}
}Create document from Extended Markdown
Create a persistent document from Extended Markdown. This is the recommended endpoint for AI agents and automation: send human-readable markdown plus compact JSON metadata (document, variables, stylePresetId, etc.). Autype stores the result as validated document JSON internally, so the full JSON API remains available for advanced clients.
curl --request POST \
--url https://api.autype.com/api/v1/dev/documents/markdown \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"projectId": "<string>",
"title": "My Markdown Document",
"content": "# Report\n\nHello {{companyName}}.\n\n| Name | Amount |\n| --- | ---: |\n| Item | 42 |\n",
"document": {
"type": "pdf",
"size": "A4",
"orientation": "portrait"
},
"description": "Document description",
"stylePresetId": "<string>",
"variables": {},
"abbreviations": {},
"defaults": {},
"citations": [
"<string>"
],
"style": {}
}
'import requests
url = "https://api.autype.com/api/v1/dev/documents/markdown"
payload = {
"projectId": "<string>",
"title": "My Markdown Document",
"content": "# Report
Hello {{companyName}}.
| Name | Amount |
| --- | ---: |
| Item | 42 |
",
"document": {
"type": "pdf",
"size": "A4",
"orientation": "portrait"
},
"description": "Document description",
"stylePresetId": "<string>",
"variables": {},
"abbreviations": {},
"defaults": {},
"citations": ["<string>"],
"style": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
projectId: '<string>',
title: 'My Markdown Document',
content: '# Report\n\nHello {{companyName}}.\n\n| Name | Amount |\n| --- | ---: |\n| Item | 42 |\n',
document: {type: 'pdf', size: 'A4', orientation: 'portrait'},
description: 'Document description',
stylePresetId: '<string>',
variables: {},
abbreviations: {},
defaults: {},
citations: ['<string>'],
style: {}
})
};
fetch('https://api.autype.com/api/v1/dev/documents/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/markdown",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'projectId' => '<string>',
'title' => 'My Markdown Document',
'content' => '# Report
Hello {{companyName}}.
| Name | Amount |
| --- | ---: |
| Item | 42 |
',
'document' => [
'type' => 'pdf',
'size' => 'A4',
'orientation' => 'portrait'
],
'description' => 'Document description',
'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/markdown"
payload := strings.NewReader("{\n \"projectId\": \"<string>\",\n \"title\": \"My Markdown Document\",\n \"content\": \"# Report\\n\\nHello {{companyName}}.\\n\\n| Name | Amount |\\n| --- | ---: |\\n| Item | 42 |\\n\",\n \"document\": {\n \"type\": \"pdf\",\n \"size\": \"A4\",\n \"orientation\": \"portrait\"\n },\n \"description\": \"Document description\",\n \"stylePresetId\": \"<string>\",\n \"variables\": {},\n \"abbreviations\": {},\n \"defaults\": {},\n \"citations\": [\n \"<string>\"\n ],\n \"style\": {}\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.autype.com/api/v1/dev/documents/markdown")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"projectId\": \"<string>\",\n \"title\": \"My Markdown Document\",\n \"content\": \"# Report\\n\\nHello {{companyName}}.\\n\\n| Name | Amount |\\n| --- | ---: |\\n| Item | 42 |\\n\",\n \"document\": {\n \"type\": \"pdf\",\n \"size\": \"A4\",\n \"orientation\": \"portrait\"\n },\n \"description\": \"Document description\",\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/markdown")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"projectId\": \"<string>\",\n \"title\": \"My Markdown Document\",\n \"content\": \"# Report\\n\\nHello {{companyName}}.\\n\\n| Name | Amount |\\n| --- | ---: |\\n| Item | 42 |\\n\",\n \"document\": {\n \"type\": \"pdf\",\n \"size\": \"A4\",\n \"orientation\": \"portrait\"\n },\n \"description\": \"Document description\",\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>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"stylePresetId": "<string>",
"description": {}
}Authorizations
Short-lived, Developer-API-audience token obtained by the trusted MCP service through token exchange (mcp_at_...). Raw MCP resource tokens are rejected.
Body
Project ID to create the document in
Document title
"My Markdown Document"
Extended Markdown content. This is the preferred authoring format for API and MCP agents; Autype stores it as validated document JSON internally.
"# Report\n\nHello {{companyName}}.\n\n| Name | Amount |\n| --- | ---: |\n| Item | 42 |\n"
Document settings. Must include type.
Show child attributes
Show child attributes
{
"type": "pdf",
"size": "A4",
"orientation": "portrait"
}
"Document description"
Optional workspace style UUID or immutable built-in system:. Inline defaults override the referenced preset during rendering.
Variables for template substitution
Abbreviation map
Inline defaults. Prefer stylePresetId for reusable workspace or built-in styles.
Citations array in CSL-JSON format
Additional style metadata
Response
Document created from Markdown
Document ID
Document title
Project ID the document belongs to
Referenced workspace or built-in system style preset, if any
Document description
