import requests
url = "https://api.pdfshift.io/v3/templates"
payload = {
"slug": "<string>",
"name": "<string>",
"content": "<string>"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"template": {
"slug": "test-1",
"created": 1734076868073,
"name": "First test for templates"
}
}Creates a new template stored at PDFShift.
import requests
url = "https://api.pdfshift.io/v3/templates"
payload = {
"slug": "<string>",
"name": "<string>",
"content": "<string>"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"template": {
"slug": "test-1",
"created": 1734076868073,
"name": "First test for templates"
}
}