View-Based POST for Inserting a Connected Record

In this example, the page we will be working with has a detail view of a Company, but also contains a form view to insert a connected Employee record. The form data source is configured as "This form inserts a Employee record connected to this page's Business record."

Identify the scene URL and parent Company record id for which children records you want to retrieve. Viewing the page in the Live App will give you this data in the URL. Example:
Following the View-Based POST examples we can construct a URL to insert this new Employee record connected to this page's Company record. The POST URL will be a regular view-based request to this view:



scene_xxscene keyscene_3
view_yyview keyview_5


X-Knack-Application-IdYour application ID
AuthorizationA user token valid for the view (if view is nested under a login)

Example Request

curl -X POST "" \
  -H "X-Knack-Application-Id: YOUR-APP-ID" \
  -H "X-Knack-REST-API-Key: knack" \
  -H "Content-Type: application/json" \
  --data-raw '{
  "field_1": "5d65bad5614e4d001047b585"


Note: this connection field value between the Employee and Company object is automatically set when using this form in the Live App but needs to be manually included when using the form for an API call.

Whatโ€™s Next