Developer Documentation
Feedback

Authentication

Authenticate with the API

To authenticate with any Tailrender API, you need to provide a valid API key as the Authorization header as part of your request. You can find your API keys on the environments page.

See the following Javascript example below:

js
const body = {
type: "pdf",
html: "<html><body><h1>Hello World</h1></body></html>"
}
const response = await fetch("https://api.tailrender.com/render", {
method: "POST",
headers: {
Authorization: 'YOUR_API_KEY',
"Content-Type": "application/json"
},
body: JSON.stringify(body)
});
const responseBody = await response.json();

Obtaining your API Keys

Make sure you've signed up for an account and head on over to the organization environments page. Find the specific environment you're looking for and click the "Reveal" button to reveal the API key.

Errors

Once you're ready to go to production, stop using the dev key and replace that key with the production secret key.