Skip to main content
PUT
/
templates
/
{slug}
Update template
import requests

url = "https://api.pdfshift.io/v3/templates/{slug}"

payload = { "content": "<string>" }
headers = {
    "X-API-Key": "<api-key>",
    "Content-Type": "application/json"
}

response = requests.put(url, json=payload, headers=headers)

print(response.text)
{
  "success": true,
  "template": {
    "slug": "test-1",
    "created": 1734076868000,
    "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.

Path Parameters

slug
string
required

Body

application/json
content
string
required

HTML content of the template.

name
string

Name of the template.

Response

Template updated

success
boolean
template
object