“I’m building a third-party app using the legacy Wix CLI for Apps. I’m trying to create forms using auth.elevate(forms.createForm) with SCOPE.FORMS.EDIT-FORMdeclared in Dev Center. I keep getting INVALID_ARGUMENT: form.namespace has size 0. My app’s namespace is my appId. Is the Wix Forms API available to third-party apps? What is the correct namespace for a third-party app?”
The error means the namespace field is arriving empty. Three things to check:
First, the namespace parameter goes in the FORM OBJECT, not the elevate call. Your code should look like this:
const elevatedCreateForm = auth.elevate(forms.createForm);
const result = await elevatedCreateForm({
form: {
name: “My Form”,
namespace: “your.app.namespace”,
formFields: […]
}
});
Second, appId alone isn’t the namespace format. The Wix Forms API examples show namespaces like “wix.form_app.form” and “wix.bookings.v2.bookings” — a dotted reverse-domain pattern. Try “com.yourapp.forms” or similar rather than a bare UUID.
Third, the legacy Wix CLI for Apps is deprecated. If you’re building new functionality, migrate to the current Wix CLI (wix-cli-v2). The auth.elevate() pattern is correct, but the CLI tooling matters for how your app’s namespace is registered.
If the namespace format still fails, call ListFormsProvidersConfigs (GET /form-schema-service/v4/forms/providers-config). It returns every namespace available on the site. That list shows which namespaces the site can create forms in — if yours isn’t there, the app install or namespace declaration didn’t complete.
Verified against: https://dev.wix.com/docs/api-reference/crm/forms/form-schemas/introduction, https://dev.wix.com/docs/api-reference/crm/forms/form-schemas/create-form