Skip to main content
POST
/
templates
Create template
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"
  }
}

Authorizations

X-API-Key
string
header
required

Authenticate your account by including your secret key in API requests. You can manage your API keys in the Dashboard.

Authentication to the API is performed by using the HTTP Header X-API-Key.

Body

application/json
slug
string
required

Unique identifier for the template.

name
string
required

Name of the template.

content
string
required

HTML content of the template.

Response

Template created

success
boolean
template
object