Restrict Post for View-Based API

Control whether view-based APIs can create new records through views that are only meant for editing existing ones.

What you'll learn:

  • What the "Restrict POST for View-Based API" setting does and why it matters
  • How default behavior differs depending on when your account and app were created
  • How to enable or disable the restriction in your app settings

Understanding View-Based API POST Requests

Every view in your Live App — forms, tables, search views, and more — can be accessed through Knack's view-based API. By default, some views that are designed for editing records, such as Edit Record forms or search views with inline editing enabled, will also accept POST requests. A POST request to one of these views creates a new record rather than updating an existing one, even though the view itself is intended to support record editing.

This can lead to unexpected records being created in your app if a POST request is sent to a view that wasn't built for that purpose.

Note: This setting affects view-based API requests and Live App JavaScript events. It does not affect record inserts made directly through Knack's POST API endpoints — those endpoints always allow record creation and always return all fields in their response payloads, regardless of this setting.

Why This Matters

Unlike display rules or page rules — which are UX tools that control what users see and can't be relied on for data security — this setting is an enforced, server-side control over what the view-based API will actually do.

Default Behavior by Account Type

Whether this restriction is on or off by default — and whether you can change it — depends on when your account and app were created.

Existing Apps in Accounts Created Before This Feature

  • The restriction is off by default.
  • You can opt in from your app's settings page at any time.

Newly Created Apps in Accounts Created Before This Feature

  • The restriction is on by default.
  • You can opt out from your app's settings page if your workflow depends on the previous behavior.

Tip: Apps default to the restriction being on so that copying an app within your account doesn't silently change its behavior — the new copy still opts out the same way an existing app would.

Apps in Newly Created Accounts

  • The restriction is on by default for every app.
  • This cannot be turned off. The setting doesn't appear in the app settings UI at all for these accounts.

Note: If your account was created after this feature was deployed, you will not see this toggle in your settings. Any workflow that relies on POST requests creating records through an edit-only view will need to be redesigned to use a view that supports record creation instead.

Enabling or Disabling the Restriction

If the setting is available for your app (see account types above), you can change it from your app settings:

  1. Go to your app's Settings.
  2. Locate the Restrict POST for View-based API section.
  3. Toggle Do not allow POST method on views that cannot create records:
    • On — POST requests to views that can't create records (such as Edit Record forms or inline-edit search views) are rejected.
    • Off — POST requests to these views are allowed and will create new records.
  4. Click Save Settings.



Did this page help you?