embed form getting error

form is displayed but i am getting an error {
“status”: “error”,
“message”: “You cannot fetch this type of form using this endpoint. Not an Embed version 2 or 3 form”,
“correlationId”: “23600c83-ace9-47d1-8d40-1251817392da”
}

can someone help with this

only trying to show hubspot form inside boostrap modal

the button (link )

<a href=“javascript:void(0)” id=“openModalLink” class=“side-menu-link”>
<i class=“fa fa-info”></i>
<span class=“title”>Knowledge Base</span>
</a>

modal

<div id=“omri” class=“modal fade” tabindex=“-1” role=“dialog” aria-hidden=“true”>
<div class=“modal-dialog modal-lg modal-dialog-centered”>
<div class=“modal-content”>
<div class=“modal-header”>
<h5 class=“modal-title”>Knowledge Base Form</h5>
<button type=“button” class=“close” data-dismiss=“modal”>\×</button>
</div>
<div class=“modal-body”>
<!-- HubSpot form will be injected here -->
<div id=“hubspotFormContainer”>
@*<div class=“hs-form-frame” data-region=“na1” data-form-id=“818c9d7c-437b-45e3-8c6e-443c98e2b274” data-portal-id=“7651601”></div>*@@

</div>
</div>
</div>
</div>
</div>

script

document.addEventListener(“DOMContentLoaded”, function () {
// Make sure HubSpot forms script is loaded
if (typeof hbspt !== “undefined” && hbspt.forms) {
$(“#openModalLink”).on(“click”, function () {
// Clear any previous form instance
// $(“#hubspotFormContainer”).empty();

// Inject HubSpot form
hbspt.forms.create({
region: “na1”, // adjust to your region
portalId: “7651601”, // :key: replace with your HubSpot portal ID
formId: “818c9d7c-437b-45e3-8c6e-443c98e2b274”, // :key: replace with your HubSpot form ID
target: “#hubspotFormContainer”
});

// Show the modal
$(“#omri”).modal(“show”);
});
} else {
console.error(“HubSpot forms script not loaded!”);
}
});

Hi @OKaufman,
Thank you for posting to the Community!
I’d like to tag in some of our Top Contributors to see if they have any suggestions on this.
Hi @WesQ @Bortami and @Gonzalo Have any of you all seen this error before?
Cassie, Community Manager

Hello,

Have you confirmed that your form is not a v1 form? If it is not an embed type form, then you will get that error.

I would verify the form is embeddable:

  • In HubSpot → Marketing → Forms → open the form.
  • Ensure it’s an Embedded form (v2/v3) created in the current editor.
  • If it’s legacy or a KB/Support/Pop-up form, recreate it as an Embedded form (same fields), publish, and use that ID.

Let me know if this helps, or if you have any other questions!


:check_mark: Was I able to help answer your question? Help the community by marking it as a solution.

Brandon Woodruff
Senior Software Developer @ PearagonStill have questions? Reach out at brandon@pearagon.com

Hi, this is what I selected when creating the form

Hi

I created the form like that

it is not the legacy form

This error is still present on the New Form editor. The version is selected by the embled.

Hi @ELopez16

Thanks for adding that — helpful to know you’re seeing the same error even with the new form editor.

I’d like to invite some community members who are subject matter experts in HubSpot Forms (v2/v3), embed behavior, and form endpoints to join this conversation.
@BrandonWoodruff @AGupta58 @kosalaindrasiri — hope you’re all having a great week! Have you seen cases where a form is embeddable / created in the new editor, but the API still returns “Not an Embed version 2 or 3 form”? Any insight into what actually triggers that error (specific form types, endpoints, region/portal mismatches, permissions, cached IDs, etc.) would be hugely appreciated.

Thanks in advance for any guidance you can share.
Best,
Victor

Some things you can look at is confirming that you are using the correct portal id, form id, and region id. Another thing to check is the Embed code type that you see in HubSpot.

Go to Marketing → Forms → (your form) → Embed, and see what the src is, and if it is an js.hsforms.net/forms/embed/v2 or an js.hsforms.net/forms/embed/v3. depending on that we can then confirm what type of form type it is and help you set it up to be to the correct version.

Let me know if this helps, or if you have any other questions!


:check_mark: Was I able to help answer your question? Help the community by marking it as a solution.

Brandon Woodruff
Senior Software Developer @ PearagonStill have questions? Reach out at brandon@pearagon.com