Rename a table field with the Inbound API

Change a field’s display name, then verify the same field ID and data key.

Use an active test table whose schema the API key’s acting user can manage. Choose an existing custom text field. This workflow changes the label people see in the table. Integrations can continue to use the field’s dataKey.

Prepare the field rename

Read GET /entities/{entityId}. Check that data.tableCapabilities.canManageSchema is true. Find your field in data.fields and note its id, dataKey, and current displayName. Copy data.updatedAt exactly into NIXA_TABLE_UPDATED_AT.

Use the base URL from API Access and load the key from your secret manager. Replace 123 with the table ID and "456" with the exact field id from the schema, as a JSON string.

curl --silent --show-error --fail-with-body \
  --request POST "${NIXA_API_BASE_URL}/schema-changes/proposals" \
  -H "X-API-Key: ${NIXA_API_KEY}" \
  -H 'Content-Type: application/json' \
  --data "{\"operation\":{\"kind\":\"configure_field\",\"entityId\":123,\"expectedSchemaVersion\":\"${NIXA_TABLE_UPDATED_AT}\",\"fieldId\":\"456\",\"changes\":{\"displayName\":\"Reference note\"}}}"

HTTP 201 returns the proposal in data. Check that data.status is ready and review data.issues. In data.operations, check that the field update targets the intended field and changes its display name as expected. If the table version has changed, reread the schema before preparing another proposal.

Apply the change and verify the field

Set NIXA_PROPOSAL_ID and NIXA_PROPOSAL_HASH from data.proposalId and data.proposalHash in the proposal you reviewed. Choose a unique NIXA_APPLICATION_KEY for this change.

curl --silent --show-error --fail-with-body \
  --request POST "${NIXA_API_BASE_URL}/schema-changes/proposals/${NIXA_PROPOSAL_ID}/apply" \
  -H "X-API-Key: ${NIXA_API_KEY}" \
  -H 'Content-Type: application/json' \
  --data "{\"proposalHash\":\"${NIXA_PROPOSAL_HASH}\",\"idempotencyKey\":\"${NIXA_APPLICATION_KEY}\",\"confirmDestructive\":false}"
  1. Save data.application.applicationId. Read GET /schema-changes/applications/{applicationId} until data.status reaches verified. If it reports failed or recovery_required, inspect the result before trying again.
  2. Read GET /entities/{entityId} again. Find the same field ID in data.fields and verify the new displayName and the original dataKey.

If the apply response is interrupted, check the field before preparing another change. Reuse the proposal ID, hash, application key, and confirmation value if you retry the original apply request. You can also rename a table field in Mainbase.

Restore a deleted table 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?