Enable Box Doc Gen
To use Box Doc Gen, make sure it is enabled by an admin in the Admin Console. If you are a Box Admin, you will find the necessary information in Enterprise Settings: Content & Sharing Tab documentation.Create and upload a Box Doc Gen template
To use Box Doc Gen API to generate documents, a Box Doc Gen template must already exist in Box. You have the following options to create a template:- Install the Box Doc Gen Template Creator add-in for Microsoft Word.
- Create a Box Doc Gen template using a JSON file or manually create template tags.
Create a platform application
First you need to create a platform application you will use to make calls. To create an application, follow the guide on . In the app’s Configuration tab, enable the Manage Doc Gen scope. Requests to the Doc Gen API return a403 insufficient_scope error without it. To create Doc Gen webhooks, also enable the Manage webhooks scope.
Generate a developer token
You need a developer token to authenticate your app when sending requests. To generate a token:- Go to Developer Console > Platform Apps.
- Click the Options menu button (…) on the right.
- Select Generate Developer Token. The token will be automatically generated and saved to clipboard.

A developer token is only valid for one hour.
Use webhooks
You can create webhooks to monitor Doc Gen events and automate your business process or workflow. Follow the instructions for . Your content type is your Doc Gen template file, or a folder that contains Doc Gen templates. A folder webhook fires for templates stored in that folder. The Developer Console only offers Doc Gen triggers for files, so use the API to create a folder webhook. The supported are:DOCGEN_DOCUMENT_GENERATION.STARTEDDOCGEN_DOCUMENT_GENERATION.SUCCEEDEDDOCGEN_DOCUMENT_GENERATION.FAILED

- Trigger name.
- Webhook trigger timestamp.
- Template file ID.
- Template file version ID.
- Template file name.
- Destination folder.
- Generated file ID (if the document generation process succeeds).
- Output type (DOCX or PDF).
- Reason (if the document generation process fails).