Render a persistent document
curl --request POST \
--url https://api.autype.com/api/v1/dev/render/document/{documentId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"variables": {
"name": "Acme Inc",
"date": "2024-01-01"
},
"image": {
"format": "png",
"dpi": 150,
"pages": [
"1-3"
]
},
"pdfProfile": "standard",
"webhook": {
"webhookUrl": "https://example.com/webhook",
"webhookAuth": {
"headerName": "X-API-Key",
"headerValue": "my-secret-key",
"basicAuthUsername": "user",
"basicAuthPassword": "pass"
}
}
}
'import requests
url = "https://api.autype.com/api/v1/dev/render/document/{documentId}"
payload = {
"variables": {
"name": "Acme Inc",
"date": "2024-01-01"
},
"image": {
"format": "png",
"dpi": 150,
"pages": ["1-3"]
},
"pdfProfile": "standard",
"webhook": {
"webhookUrl": "https://example.com/webhook",
"webhookAuth": {
"headerName": "X-API-Key",
"headerValue": "my-secret-key",
"basicAuthUsername": "user",
"basicAuthPassword": "pass"
}
}
}
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({
variables: {name: 'Acme Inc', date: '2024-01-01'},
image: {format: 'png', dpi: 150, pages: ['1-3']},
pdfProfile: 'standard',
webhook: {
webhookUrl: 'https://example.com/webhook',
webhookAuth: {
headerName: 'X-API-Key',
headerValue: 'my-secret-key',
basicAuthUsername: 'user',
basicAuthPassword: 'pass'
}
}
})
};
fetch('https://api.autype.com/api/v1/dev/render/document/{documentId}', 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/render/document/{documentId}",
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([
'variables' => [
'name' => 'Acme Inc',
'date' => '2024-01-01'
],
'image' => [
'format' => 'png',
'dpi' => 150,
'pages' => [
'1-3'
]
],
'pdfProfile' => 'standard',
'webhook' => [
'webhookUrl' => 'https://example.com/webhook',
'webhookAuth' => [
'headerName' => 'X-API-Key',
'headerValue' => 'my-secret-key',
'basicAuthUsername' => 'user',
'basicAuthPassword' => 'pass'
]
]
]),
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/render/document/{documentId}"
payload := strings.NewReader("{\n \"variables\": {\n \"name\": \"Acme Inc\",\n \"date\": \"2024-01-01\"\n },\n \"image\": {\n \"format\": \"png\",\n \"dpi\": 150,\n \"pages\": [\n \"1-3\"\n ]\n },\n \"pdfProfile\": \"standard\",\n \"webhook\": {\n \"webhookUrl\": \"https://example.com/webhook\",\n \"webhookAuth\": {\n \"headerName\": \"X-API-Key\",\n \"headerValue\": \"my-secret-key\",\n \"basicAuthUsername\": \"user\",\n \"basicAuthPassword\": \"pass\"\n }\n }\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/render/document/{documentId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"variables\": {\n \"name\": \"Acme Inc\",\n \"date\": \"2024-01-01\"\n },\n \"image\": {\n \"format\": \"png\",\n \"dpi\": 150,\n \"pages\": [\n \"1-3\"\n ]\n },\n \"pdfProfile\": \"standard\",\n \"webhook\": {\n \"webhookUrl\": \"https://example.com/webhook\",\n \"webhookAuth\": {\n \"headerName\": \"X-API-Key\",\n \"headerValue\": \"my-secret-key\",\n \"basicAuthUsername\": \"user\",\n \"basicAuthPassword\": \"pass\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.autype.com/api/v1/dev/render/document/{documentId}")
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 \"variables\": {\n \"name\": \"Acme Inc\",\n \"date\": \"2024-01-01\"\n },\n \"image\": {\n \"format\": \"png\",\n \"dpi\": 150,\n \"pages\": [\n \"1-3\"\n ]\n },\n \"pdfProfile\": \"standard\",\n \"webhook\": {\n \"webhookUrl\": \"https://example.com/webhook\",\n \"webhookAuth\": {\n \"headerName\": \"X-API-Key\",\n \"headerValue\": \"my-secret-key\",\n \"basicAuthUsername\": \"user\",\n \"basicAuthPassword\": \"pass\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"jobId": "<string>",
"status": "PENDING",
"format": "PDF",
"creditCost": 123,
"createdAt": "2023-11-07T05:31:56Z",
"downloadUrl": "<string>",
"filename": "<string>",
"filloutId": "<string>",
"error": "<string>",
"completedAt": "2023-11-07T05:31:56Z"
}Rendering
Render a persistent document
Render a pre-existing document from your Autype workspace by its ID. The document must belong to a PUBLIC project in your organization. Uses the latest saved document content (snapshot). You can optionally override variables or output format. Images stored in the document are resolved automatically. Returns a job ID for status polling. Credits are charged on successful completion.
POST
/
api
/
v1
/
dev
/
render
/
document
/
{documentId}
Render a persistent document
curl --request POST \
--url https://api.autype.com/api/v1/dev/render/document/{documentId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"variables": {
"name": "Acme Inc",
"date": "2024-01-01"
},
"image": {
"format": "png",
"dpi": 150,
"pages": [
"1-3"
]
},
"pdfProfile": "standard",
"webhook": {
"webhookUrl": "https://example.com/webhook",
"webhookAuth": {
"headerName": "X-API-Key",
"headerValue": "my-secret-key",
"basicAuthUsername": "user",
"basicAuthPassword": "pass"
}
}
}
'import requests
url = "https://api.autype.com/api/v1/dev/render/document/{documentId}"
payload = {
"variables": {
"name": "Acme Inc",
"date": "2024-01-01"
},
"image": {
"format": "png",
"dpi": 150,
"pages": ["1-3"]
},
"pdfProfile": "standard",
"webhook": {
"webhookUrl": "https://example.com/webhook",
"webhookAuth": {
"headerName": "X-API-Key",
"headerValue": "my-secret-key",
"basicAuthUsername": "user",
"basicAuthPassword": "pass"
}
}
}
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({
variables: {name: 'Acme Inc', date: '2024-01-01'},
image: {format: 'png', dpi: 150, pages: ['1-3']},
pdfProfile: 'standard',
webhook: {
webhookUrl: 'https://example.com/webhook',
webhookAuth: {
headerName: 'X-API-Key',
headerValue: 'my-secret-key',
basicAuthUsername: 'user',
basicAuthPassword: 'pass'
}
}
})
};
fetch('https://api.autype.com/api/v1/dev/render/document/{documentId}', 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/render/document/{documentId}",
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([
'variables' => [
'name' => 'Acme Inc',
'date' => '2024-01-01'
],
'image' => [
'format' => 'png',
'dpi' => 150,
'pages' => [
'1-3'
]
],
'pdfProfile' => 'standard',
'webhook' => [
'webhookUrl' => 'https://example.com/webhook',
'webhookAuth' => [
'headerName' => 'X-API-Key',
'headerValue' => 'my-secret-key',
'basicAuthUsername' => 'user',
'basicAuthPassword' => 'pass'
]
]
]),
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/render/document/{documentId}"
payload := strings.NewReader("{\n \"variables\": {\n \"name\": \"Acme Inc\",\n \"date\": \"2024-01-01\"\n },\n \"image\": {\n \"format\": \"png\",\n \"dpi\": 150,\n \"pages\": [\n \"1-3\"\n ]\n },\n \"pdfProfile\": \"standard\",\n \"webhook\": {\n \"webhookUrl\": \"https://example.com/webhook\",\n \"webhookAuth\": {\n \"headerName\": \"X-API-Key\",\n \"headerValue\": \"my-secret-key\",\n \"basicAuthUsername\": \"user\",\n \"basicAuthPassword\": \"pass\"\n }\n }\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/render/document/{documentId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"variables\": {\n \"name\": \"Acme Inc\",\n \"date\": \"2024-01-01\"\n },\n \"image\": {\n \"format\": \"png\",\n \"dpi\": 150,\n \"pages\": [\n \"1-3\"\n ]\n },\n \"pdfProfile\": \"standard\",\n \"webhook\": {\n \"webhookUrl\": \"https://example.com/webhook\",\n \"webhookAuth\": {\n \"headerName\": \"X-API-Key\",\n \"headerValue\": \"my-secret-key\",\n \"basicAuthUsername\": \"user\",\n \"basicAuthPassword\": \"pass\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.autype.com/api/v1/dev/render/document/{documentId}")
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 \"variables\": {\n \"name\": \"Acme Inc\",\n \"date\": \"2024-01-01\"\n },\n \"image\": {\n \"format\": \"png\",\n \"dpi\": 150,\n \"pages\": [\n \"1-3\"\n ]\n },\n \"pdfProfile\": \"standard\",\n \"webhook\": {\n \"webhookUrl\": \"https://example.com/webhook\",\n \"webhookAuth\": {\n \"headerName\": \"X-API-Key\",\n \"headerValue\": \"my-secret-key\",\n \"basicAuthUsername\": \"user\",\n \"basicAuthPassword\": \"pass\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"jobId": "<string>",
"status": "PENDING",
"format": "PDF",
"creditCost": 123,
"createdAt": "2023-11-07T05:31:56Z",
"downloadUrl": "<string>",
"filename": "<string>",
"filloutId": "<string>",
"error": "<string>",
"completedAt": "2023-11-07T05:31:56Z"
}Authorizations
mcp-oauthapi-key
Body
application/json
Response
Render job created
