Prerequisites
This command installs or updates the CLI globally on your system. If you haven’t already, run the following command to create a new htmldocs project:Authentication
Before publishing, you’ll need to authenticate with the htmldocs cloud platform:- Select your team
- Complete the authentication process
- Store your credentials securely for future use
Publishing Templates
Once authenticated, you can publish your document templates using thepublish
command:
Be sure to run this from the root of your project.
Make sure your template has a unique
documentId
defined before publishing:Generating Documents via API
After publishing, you can generate documents using the REST API. First, obtain an API key from the Dashboard.API Authentication
Include your API key in requests using the Bearer token format:API keys are scoped to your team and provide access only to documents owned by that team.
Making API Requests
To generate a document, send a POST request to the generation endpoint with your document variables:Managing Published Templates
You can view and manage your published templates in the Dashboard, where you can:- View all published templates
- Get document IDs
- Manage API keys
- Monitor usage
- View generation history