Share a personal table with the Inbound API
Grant a teammate read access to a personal test table, verify the direct share, and remove it when the test is done.
Use an active personal table created for testing and a teammate with an active account in the same workspace. Your Inbound API key must act as someone who can manage sharing for the table. For sharing from the app, see Share a personal table.
Check existing shares
Replace 123 with the personal table ID. Use the base URL shown under API Access and load the key from your secret manager.
curl --silent --show-error --fail-with-body \
"${NIXA_API_BASE_URL}/tables/123/shares" \
-H "X-API-Key: ${NIXA_API_KEY}"
The response lists direct shares in the data array. Check sharedWithType and sharedWithId before adding access. Choose a teammate who does not already have a direct share on this table. Submitting a grant for the same recipient can update their existing permission.
Grant and verify read access
Replace "456" with the teammate’s Mainbase user ID as a JSON string.
curl --silent --show-error --fail-with-body \
--request POST "${NIXA_API_BASE_URL}/tables/123/shares" \
-H "X-API-Key: ${NIXA_API_KEY}" \
-H 'Content-Type: application/json' \
--data '{"sharedWithType":"user","sharedWithId":"456","accessLevel":"read"}'
Mainbase returns HTTP 201 with the current direct shares in data. Find the entry with the teammate’s sharedWithId and sharedWithType of user. Confirm that accessLevel is read, then save the entry’s id for cleanup. If the request times out, list the shares again before retrying.
Remove the test share
Replace 789 with the permission entry’s id.
curl --silent --show-error --fail-with-body \
--request DELETE "${NIXA_API_BASE_URL}/tables/123/shares/789" \
-H "X-API-Key: ${NIXA_API_KEY}"
Mainbase returns HTTP 204 with an empty body. List the direct shares again and confirm that this permission ID is gone. The teammate may still have access through a group share.
Preview a personal table’s workspace access 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 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?