Create a personal table with the Inbound API

Define an empty personal table with a text field, review the proposal, and verify the new table’s schema.

Use this workflow when an integration needs a new table with a defined structure. Start in a test workspace with an API key whose acting user can create personal tables. That user becomes the owner. To create a table manually, see Create a personal table from the sidebar.

Define the table and review the proposal

Use the base URL from API Access and load the key from your secret manager. The example defines a table named Reading list and one optional text field named Source. Use different fieldKey values for each field you define in the proposal.

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": "create_table",
      "ownershipType": "PERSONAL",
      "name": "api_reading_list",
      "displayName": "Reading list",
      "fields": [
        {"fieldKey":"field:source","name":"source","displayName":"Source","type":"text"}
      ]
    }
  }'

In the HTTP 201 response, check data.status is ready and review data.issues. In data.operations, check the create_table operation’s after value for the name, ownership, and text field. Mainbase can adjust the name to avoid a duplicate. Keep the reviewed name to look up the table later.

Apply and verify the new table

Set NIXA_PROPOSAL_ID and NIXA_PROPOSAL_HASH to the reviewed data.proposalId and data.proposalHash. Set NIXA_APPLICATION_KEY to a unique value for this application.

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. Use GET /schema-changes/applications/{applicationId} to check data.status. If it is queued, running, or verifying, check again later. Inspect failed or recovery_required applications before preparing another table.
  2. Once the application is verified, find the table by its reviewed name in GET /entities. Read GET /entities/{entityId} to confirm that data.ownershipType is PERSONAL and the text field appears in data.fields.
  3. Save the returned table ID and the field’s dataKey for creating records.

If the apply response is interrupted, check for the reviewed table before preparing another proposal. To retry the same apply, reuse the proposal ID, hash, application key, and confirmation value.

Rename a table 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?