Get started
Getting started
Create a Doclift account, get an API key, and send your first authenticated request.
What Doclift does
Doclift generates PDF documents from templates you design once and reuse from your server. You send a template id and a set of variables, Doclift renders the document and hands it back through a webhook once it is ready. The layout itself lives outside your codebase, so changing it never requires a deploy.
Create your account
Sign up. A sandbox environment is available immediately. See Environments for what differs between sandbox and production.
Create an API key
Every request authenticates with an API key, called an external application in the dashboard. Create one and choose its environment (sandbox or production).
Copy the key the moment it is generated. Afterward, Doclift only ever shows
it back to you masked (revealable_secret_key, all but its last 8
characters replaced with •). There is no way to retrieve the raw value
again from the dashboard or the API.
Send your first request
GET /api/v1/user needs no other setup and confirms your key works:
curl https://app.doclift.io/api/v1/user \
-H "X-Api-Key: <your-api-key>"
{
"id": 100001,
"firstname": "John",
"lastname": "Doe",
"email": "[email protected]",
"current_external_application": {
"name": "My App",
"environment": "sandbox",
"active": true
}
}
The full field reference, including your organization's limits, is on API basics.
What a failure looks like
Every request answers 403 Forbidden if the key is missing, unknown, or
belongs to a disabled external application. It is always one of these two
bodies, never a generic message:
{ "error": "Please add an 'X-Api-Key' HTTP header." }
{ "error": "Invalid or disabled API Key" }
A disabled key and an unknown key answer identically. You cannot tell them apart from the response. The full status code and error-envelope reference is on API basics.
Pick the right template family before you build
Doclift has three template families (custom, fillable_form, and
workflow) and they do not expose the same API surface. Sending a
fillable_form or workflow id to a template-editing endpoint fails with a
404, identical to an id that does not exist at all. Read
Template types before you create your first template; it
is a five-minute read that saves a wasted afternoon.
Next
Template types
The three template families and what each one lets you do through the API.
API basics
Base URL, authentication, response codes, pagination, and environments.
Templates API
Create, update, publish, and manage variables on a custom template.