Recover ownership of a personal table with the Inbound API

Find an eligible table, review the proposed reassignment, and verify the new owner.

Use ownership recovery when an eligible personal table has no active owner in the workspace or is in Trash and needs a new owner. Start with a test table and an API key whose acting user has Recover Personal Tables permission. The recovery list provides table metadata. To inspect records, use a key whose acting user has read access.

Find the table in the recovery list

Use the base URL from API Access and load the key from your secret manager.

curl --silent --show-error --fail-with-body --get \
  "${NIXA_API_BASE_URL}/tables/recovery" \
  -H "X-API-Key: ${NIXA_API_KEY}"

Look in data.tables for the table. If data.nextCursor contains a number, pass it as cursor on the next request. Stop when data.nextCursor is null. Note the target’s entityId, trashedAt, and updatedAt. Save the exact updatedAt value as NIXA_RECOVERY_UPDATED_AT.

Review the new owner

Choose another active member of the same workspace. Replace 123 with the table’s entityId and 456 with the recipient’s numeric Mainbase user ID. Give a reason that explains the reassignment for your workspace’s audit history.

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\":\"recover_table\",\"entityId\":123,\"recipientUserId\":456,\"reason\":\"The former owner left the workspace\",\"expectedUpdatedAt\":\"${NIXA_RECOVERY_UPDATED_AT}\"}}"

In the HTTP 201 response, check that data.status is ready and review data.issues. In data.operations, verify the target table, ownershipTransfer.toUserId, and the reason in ownershipTransfer.recovery. If the table or its owner has changed, fetch the latest recovery list and review the new state.

Apply and verify the reassignment

Set NIXA_PROPOSAL_ID and NIXA_PROPOSAL_HASH from the reviewed proposal. Choose a unique NIXA_APPLICATION_KEY and keep all three values so you can retry the same apply request if the response is interrupted.

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}"

Save data.application.applicationId and use GET /schema-changes/applications/{applicationId} to check data.status. If it reports failed or recovery_required, inspect the application before trying again. Once it reaches verified, check the result with the new owner.

  • Active table. Ask the new owner to open it in Mainbase and verify a record they need. A key with read access can also confirm the new data.ownerId on GET /entities/{entityId}.
  • Table in Trash. Check the table’s entry in the recovery list for the new ownerId and its retained trashedAt. The new owner can restore it separately.

Reassignment pauses Agent triggers attached to the table. Review their execution permissions before enabling them again. You can also reassign ownership in Mainbase.

Restore a personal table from Trash 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?