Category / Section
How to solve the "template not found" error when using template via the BoldSign API?
Published:
The Template Not Found error in the BoldSign API typically occurs when the API cannot locate the specified template ID. Here are the steps to diagnose and resolve this issue:
- Verify Template ID: Ensure the templateId used in your API request is correct. The template ID must correspond to an existing template in your BoldSign account. You can retrieve a list of available templates to confirm the ID using the List Templates API endpoint:
curl -X 'GET' \ 'https://api.boldsign.com/v1/template/list?pageSize=10&page=1' \
-H 'accept: application/json' \
-H 'X-API-KEY: {your API key}'
This returns a list of templates with their IDs. Check if the templateId you’re using exists in the response.
- Validate API Key: Ensure the API key in the
X-API-KEYheader is valid, not expired and associated with the correct BoldSign account. You can verify this through the BoldSign Web App by checking your API key from the API menu.
- Confirm Template Creation Status: Template creation in BoldSign is asynchronous. Even if you receive a templateId upon initiating a template creation request, the template may not be fully processed. Use webhooks to listen for the TemplateCreated or TemplateCreateFailed events to confirm the template’s status. If a TemplateCreateFailed event is received, check the error message and resolve any issues (e.g., invalid file format or missing required fields) before retrying.
- Check Template Accessibility: Ensure the template is accessible within your account and not deleted or restricted. You can use the Template Properties API to retrieve details of the template:
curl -X 'GET' \ 'https://api.boldsign.com/v1/template/properties?templateId=8f59295d-xxxx-xxxx-xxxx-e7dc88cfff2c' \
-H 'accept: application/json' \
-H 'X-API-KEY: {your-api-key}'
Debugging Tips:
- Enable Logging: Log the API response to inspect the error details.
- Test in Sandbox: Use BoldSign’s free developer sandbox account to test template creation and usage, ensuring your implementation works before moving to production.
- Contact Support: If the issue persists, check the BoldSign API documentation for updates or contact BoldSign support with details like the templateId and the full error response.