API & Webhook Integration
Generate Documents using Webhooks & APIs
Last updated
Was this helpful?
Generate Documents using Webhooks & APIs
Last updated
Was this helpful?
Docupilot allows you to simplify your document generation process by integrating with other systems through Unauthenticated API endpoints which can also be configured as Webhooks in other applications.
To create an API Endpoint, follow these steps:
Click on the Create tab to access the Create Document view and select API Integrations from the left sidebar.
Click on Create API Endpoint button to create the Url for document generation.
If you want to download the generated document along with triggering deliveries you need to append download=true
query parameter in the URL.
If you want to receive the generated document as a file in response, append download=file
query parameter in the URL. This will include the secure file URL in the Content-Location
response header. If you do not prefer the secure file URL to be created, send an additional query parameter includeUrl=false
. This will not return the Content-Location
header in the response.
The API Endpoint can be configured in various locations – Ex: Configure it as a Webhook in your CRM, or configure it as a Webhook in your the Forms/Survey software you use, or configure this URL inside your custom built application, and send data to it.
For example, if this is your template:
You should send a POST
request to the API Endpoint, with Content-Type
as application/json
and body with JSON payload structured like in the example below:
Sample response when at-least 1 delivery configured:
Sample response with no deliveries configured -or- with download=true
query parameter
Sample response when download=file
query parameter is appended
The API Integration tab shows an example CURL request for the respective template.
To delete the API Endpoint, click the Delete button available on the right side of the API Integrations section.
When data is sent to the API Endpoint, it generates a Document and sends it to configured delivery locations. If no deliveries are configured, then it will return a secure file URL to download the generated document. This secure URL is valid for 24 hours by default which can be customized under .