Update selected record fields with the Inbound API

Patch a field on an existing record and read the same record back to check what changed.

Use PATCH to change selected fields on an existing record. To try this example, create a fictional record in a test table that has no live automations or external actions. The API key’s acting user needs permission to read and update that record.

Check the record and field

  1. Use GET /entities/{entityId} to find the writable field’s dataKey and check its type. Choose a plain text field for this example.
  2. Find the record’s positive numeric ID using a filtered API read, then read that exact record. Replace 123 and 456 in both examples with your table and record IDs. Use the base URL from API Access and load the key from your secret manager.
curl --silent --show-error --fail-with-body \
  "${NIXA_API_BASE_URL}/entities/123/records/456" \
  -H "X-API-Key: ${NIXA_API_KEY}"

Confirm data.id, the field’s current value, and a second field you expect to stay the same.

Send the selected change

Replace FIELD_DATA_KEY with the field key from the schema. Include only the fields you intend to set. Leave the title and other unrelated fields out of the request body.

curl --silent --show-error --fail-with-body --include \
  --request PATCH "${NIXA_API_BASE_URL}/entities/123/records/456" \
  -H "X-API-Key: ${NIXA_API_KEY}" \
  -H 'Content-Type: application/json' \
  --data '{"FIELD_DATA_KEY":"Updated example value"}'

HTTP 200 returns the updated record under data, filtered by what the acting user can read. Rerun the first GET and compare the field with the value you sent. Check the second field as well. A formula that depends on the changed field can recalculate.

Recover after a failed or unclear request

  • Validation error. Read error.message and any returned details. Confirm the field key, value type, and whether the field is required.
  • Access denied. Check the acting user’s permissions for the specific record. Read access and update access are separate.
  • Conflict or interrupted response. Read the same record again before retrying. If the intended value is already saved, use the read result. If a teammate or automation changed the value, decide which value to keep before sending another update.

Add or remove one record link with the Inbound API

Delete a test record through the Inbound API

Add a text field with the Inbound API

Ask Mainbase AI

Ask about any feature in Mainbase. Find a setting, get step-by-step guidance, or troubleshoot a problem.

Open the AI assistant

Copy a question to get started

  • How do I create a Kanban view?
  • How do I invite a teammate?
  • Why is a record missing from this view?