Restore a personal table from Trash with the Inbound API
Review the restore proposal for a personal table and verify its records after it returns.
Use an API key whose acting user owns the personal table in Trash. Have its numeric table ID ready. If you need to locate the table by name, use Table trash in Mainbase. If the table needs a new owner first, reassign it through ownership recovery and have the new owner restore it.
Review the restore proposal
Use the base URL from API Access and load the key from your secret manager. Replace 123 with the ID of a personal test table in Trash.
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":"restore_table","entityId":123}}'
In the HTTP 201 response, verify that data.operations shows restore_table for the intended table ID and name. Apply only once data.status is ready. If the proposal reports a name conflict or a missing schema dependency, review data.issues and resolve it before preparing a new proposal.
Apply the restore and verify the data
Set NIXA_PROPOSAL_ID and NIXA_PROPOSAL_HASH from the reviewed proposal. Choose a unique NIXA_APPLICATION_KEY for this restore.
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.applicationIdand checkGET /schema-changes/applications/{applicationId}. If it isqueued,running, orverifying, check again later. Inspect afailedorrecovery_requiredapplication before preparing another restore. - Once the application is
verified, readGET /entities/{entityId}using the original table ID and check thatdata.trashedAtisnull. Read a known record usingGET /entities/{entityId}/records/{recordId}and verify one of the values you expected to recover. - If the table had Agent triggers, review their execution permissions and actions before turning them back on. The restore leaves the triggers paused.
If the apply response is interrupted, check whether the table is already active before preparing another proposal. Reuse the same proposal ID, hash, application key, and confirmation value if you retry the original apply.
Ask Mainbase AI
Ask about any feature in Mainbase. Find a setting, get step-by-step guidance, or troubleshoot a problem.
Open the AI assistantCopy 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?