curl --request POST \
--url https://api.autype.com/api/v1/dev/documents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"projectId": "<string>",
"title": "My Document",
"description": "Document description",
"content": {}
}
'import requests
url = "https://api.autype.com/api/v1/dev/documents"
payload = {
"projectId": "<string>",
"title": "My Document",
"description": "Document description",
"content": {}
}
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 Document',
description: 'Document description',
content: {}
})
};
fetch('https://api.autype.com/api/v1/dev/documents', 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",
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 Document',
'description' => 'Document description',
'content' => [
]
]),
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"
payload := strings.NewReader("{\n \"projectId\": \"<string>\",\n \"title\": \"My Document\",\n \"description\": \"Document description\",\n \"content\": {}\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")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"projectId\": \"<string>\",\n \"title\": \"My Document\",\n \"description\": \"Document description\",\n \"content\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.autype.com/api/v1/dev/documents")
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 Document\",\n \"description\": \"Document description\",\n \"content\": {}\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
Create a new document in a project. The document is attributed to the API key creator. Optionally provide initial document content following the Autype document JSON schema. If no content is provided, a default document with the title as heading is created.
Image handling: If the document content contains /temp-image/{id} references (from temporary image uploads), they are automatically converted to permanent /image/{assetId} assets attached to the new document. This allows you to upload images first via POST /images/upload, then reference them in the document content — the conversion happens transparently on creation.
curl --request POST \
--url https://api.autype.com/api/v1/dev/documents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"projectId": "<string>",
"title": "My Document",
"description": "Document description",
"content": {}
}
'import requests
url = "https://api.autype.com/api/v1/dev/documents"
payload = {
"projectId": "<string>",
"title": "My Document",
"description": "Document description",
"content": {}
}
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 Document',
description: 'Document description',
content: {}
})
};
fetch('https://api.autype.com/api/v1/dev/documents', 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",
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 Document',
'description' => 'Document description',
'content' => [
]
]),
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"
payload := strings.NewReader("{\n \"projectId\": \"<string>\",\n \"title\": \"My Document\",\n \"description\": \"Document description\",\n \"content\": {}\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")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"projectId\": \"<string>\",\n \"title\": \"My Document\",\n \"description\": \"Document description\",\n \"content\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.autype.com/api/v1/dev/documents")
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 Document\",\n \"description\": \"Document description\",\n \"content\": {}\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
Response
Document created
Document ID
Document title
Project ID the document belongs to
Referenced workspace or built-in system style preset, if any
Document description
