Skip to content

Authentication

Use a browser session to manage a workspace and a bearer key to generate documents from a server or automation.

In the workspace, open Settings → API keys, give the key a recognizable name and select Create key. Copy the full value before leaving the screen. DocKiln stores its hash. The key list shows metadata and cannot recover the original value.

Put the value in your application’s secret store as DOCKILN_API_KEY. Keep it out of browser bundles, URLs and request logs. Use the same origin as the workspace for DOCKILN_URL.

Verify a key
curl -fsS "$DOCKILN_URL/v1/usage" \
-H "Authorization: Bearer $DOCKILN_API_KEY"

The response contains used, quota and resetsAt in Unix milliseconds. The request reads usage without creating a document.

On a deployment with Neon Managed Better Auth enabled, open the workspace and choose email and password or one of the displayed social providers. Email registrations require verification. The login screen can resend the verification message or request a password reset. After resetting, sign in with the new password.

For an existing workspace, sign in with a verified identity using the same email, then enter the original DocKiln workspace password when prompted. This connects the existing tenant and keeps its templates, history, usage and API keys. A matching email alone cannot claim a workspace. Until it is connected, the Use original workspace login option accepts the original credentials. If you cannot prove ownership, contact the operator before creating a second workspace.

Automations should continue using their existing workspace API keys. The legacy registration endpoint is disabled when managed sign-up is active, and legacy password login is limited to unlinked workspaces.

A key can work with templates, submit jobs, read history and download files from the workspace that issued it. Signing in creates an expiring HttpOnly cookie. Key management, webhook and storage configuration, AI template assistance and test checkout use the signed-in account session. A bearer key on an account-only route returns 403.

Create a replacement key, update your secret store and verify it with the usage request above. Revoke the old key in Settings. Subsequent requests using the revoked key return 401. A valid key from another workspace cannot retrieve your document or template by ID.

Use the API reference for supported request fields and the PDFShift comparison for migration considerations. Test the supplied examples against your deployment before migrating production documents.