Hi,
I’m working with the HubSpot API to programmatically create quotes. I’m able to successfully create a quote in DRAFT status, including all relevant details: line items, template, contact, company, sender, and comments.
Once created, the quote remains in DRAFT status and needs to be approved manually through the HubSpot web interface.
I would like to automate this final step via the API. To that end, I’ve tried updating the quote’s status using the following payload:
const payload = { properties: { hs_status: “APPROVAL_NOT_NEEDED”, // also tried “APPROVED” hs_template: “MODERN” // included as requested by the request } };
And the PATCH request:
UrlFetchApp.fetch(`https://api.hubapi.com/crm/v3/objects/quotes/${quoteId}\`, { method: “patch”, contentType: “application/json”, headers: { Authorization: `Bearer ${token}` }, payload: JSON.stringify(payload), muteHttpExceptions: true });
After this call, the quote status changes to “Publishing Quote”, which displays as yellow in the UI. However:
- The quote remains locked and uneditable.
- No public link is generated, even after waiting more than 8 hours.
- The quote cannot be accessed—only deleted.
- The UI mentions a public link will be generated within 15 minutes, but it never appears.
My goal is to move the quote beyond DRAFT and obtain a public quote URL and PDF download link via the API.
Question:
How can I programmatically move a quote from DRAFT to a fully published state and retrieve the public link and PDF?
Thank you very much for your support.