Store an AcroForm template
Stores an AcroForm PDF once and returns { id, title, fields, skipped }. title is the body field, or the filename if omitted. The stored object is the blank template, not a filled output. Owned by the account, not the API key. Rejects a PDF with no /AcroForm, /NeedAppearances, a password, XFA, or a document signature or certification (no_acroform, need_appearances (PdfNeedAppearancesUnsupportedError), encrypted_pdf (PdfEncryptionUnsupportedError), xfa_unsupported (PdfXfaUnsupportedError), or signed_pdf (PdfSignedPdfUnsupportedError)). Does not accept values. Does not spend a unit. Same x-api-key as render. The stored-template object cap is not the persistent filled-PDF cap. A full template cap is 409 template_limit with maxTemplates and current. Upload size is maxTemplateBytes, not render bodyBytes. Oversize store is 413 payload_too_large naming maxTemplateBytes.
curl --request POST \
--url https://api.blinkpdf.io/v1/templates \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"pdf": "<Base64>",
"title": "Intake card"
}
'import requests
url = "https://api.blinkpdf.io/v1/templates"
payload = {
"pdf": "<Base64>",
"title": "Intake card"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({pdf: '<Base64>', title: 'Intake card'})
};
fetch('https://api.blinkpdf.io/v1/templates', 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.blinkpdf.io/v1/templates",
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([
'pdf' => '<Base64>',
'title' => 'Intake card'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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.blinkpdf.io/v1/templates"
payload := strings.NewReader("{\n \"pdf\": \"<Base64>\",\n \"title\": \"Intake card\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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.blinkpdf.io/v1/templates")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"pdf\": \"<Base64>\",\n \"title\": \"Intake card\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.blinkpdf.io/v1/templates")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"pdf\": \"<Base64>\",\n \"title\": \"Intake card\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"title": "<string>",
"fields": "<array>",
"skipped": "<array>"
}{
"error": "unauthorized"
}{
"error": "payload_too_large"
}{
"error": "rate_limited",
"detail": "Tier rate limit exceeded. Retry after the Retry-After interval or upgrade for higher sustained throughput."
}Authorizations
API key issued from your Blink PDF account, prefixed bp_. Send it in the x-api-key header on every request. The documentation and health endpoints are exempt.
Body
AcroForm PDF bytes, Base64-encoded. Stored as the blank template. Does not spend a unit.
Stored title. When omitted, the multipart filename is used. An empty multipart filename is omitted (same 400 as JSON without this field). JSON without a filename must send this field.
curl --request POST \
--url https://api.blinkpdf.io/v1/templates \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"pdf": "<Base64>",
"title": "Intake card"
}
'import requests
url = "https://api.blinkpdf.io/v1/templates"
payload = {
"pdf": "<Base64>",
"title": "Intake card"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({pdf: '<Base64>', title: 'Intake card'})
};
fetch('https://api.blinkpdf.io/v1/templates', 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.blinkpdf.io/v1/templates",
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([
'pdf' => '<Base64>',
'title' => 'Intake card'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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.blinkpdf.io/v1/templates"
payload := strings.NewReader("{\n \"pdf\": \"<Base64>\",\n \"title\": \"Intake card\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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.blinkpdf.io/v1/templates")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"pdf\": \"<Base64>\",\n \"title\": \"Intake card\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.blinkpdf.io/v1/templates")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"pdf\": \"<Base64>\",\n \"title\": \"Intake card\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"title": "<string>",
"fields": "<array>",
"skipped": "<array>"
}{
"error": "unauthorized"
}{
"error": "payload_too_large"
}{
"error": "rate_limited",
"detail": "Tier rate limit exceeded. Retry after the Retry-After interval or upgrade for higher sustained throughput."
}