POST
/
api
/
documents
/
{documentId}
curl --request POST \
  --url https://htmldocs.com/api/documents/{documentId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "props": {},
  "format": "pdf",
  "size": "<string>",
  "orientation": "portrait"
}'
This response does not have an example.

This endpoint is for generating a document based on a template you’ve published to a team. To publish a document, see the publish command.

You can find the ids of your published documents in the dashboard.

Authorizations

Authorization
string
header
required

API key or authentication token

Path Parameters

documentId
string
required

UUID or custom ID of the document template

Body

application/json

Response

200
application/pdf

Generated document in requested format

Binary PDF file (when format=pdf)