Manipulating Portal Data via the Data API

Beginner

Create, update, and delete related records through portals using the Data API, including creating child records without first navigating to the parent.

What you'll learn

  • How portal data is structured in Data API responses
  • How to create related records in a single POST request
  • How to update and delete specific portal rows
  • How to use portalData with the correct table occurrence name

The Data API exposes portal rows as nested arrays inside each parent record. You can create related records by including portal data in a POST or PATCH body, and you can delete portal rows directly. This eliminates the need for scripts that navigate across layouts just to manage child records.

1/4
1

Portal data structure in responses

When you fetch a record, portal rows appear under portalData keyed by the table occurrence name on the layout, not the base table name. Each row includes a recordId and modId you need for updates and deletes.

JSON
{
  "fieldData": { "Name": "Acme Corp", "Status": "Active" },
  "portalData": {
    "Contacts_PORTAL": [
      { "recordId": "42", "modId": "3", "Contacts_PORTAL::FirstName": "Jane" },
      { "recordId": "43", "modId": "1", "Contacts_PORTAL::FirstName": "Bob" }
    ]
  }
}

Sign in to track your progress and pick up where you left off.

Sign in to FM Dojo