Unshare a user from all enterprise workspaces, bases, interfaces, and user groups. If applicable, the user will also have their admin access revoked.
Returns lists of unsharing and sharing actions performed as part of the user removal.
Press shift + S to search API reference.
https://api.airtable.com/v0/meta/enterpriseAccounts/{enterpriseAccountId}/users/{userId}/remove
Unshare a user from all enterprise workspaces, bases, interfaces, and user groups. If applicable, the user will also have their admin access revoked.
Returns lists of unsharing and sharing actions performed as part of the user removal.
Authentication | Personal access token, OAuth integration |
Scope | enterprise.user:write |
User role | Enterprise admin |
Billing plans | Enterprise (pre-2023.08 legacy plan), Enterprise Scale |
optional< boolean > If true, removes the user from descendant enterprise accounts as well. Only enterprise accounts with the Enterprise Hub feature enabled have descendant enterprise accounts. | |
optional< string > If the user is the sole owner of any workspaces, you must specify a replacementOwnerId to be added as the new owner of such workspaces. If the user is not the sole owner of any workspaces, replacementOwnerId is optional and will be ignored if provided. | |
optional< boolean > |
boolean If removeFromDescendants is true, this field represents whether the user was removed as an admin of this enterprise account or its descendants. | |||||||||||||||||||||||||||||||||||||||||||||
object A list of JSON objects representing workspaces that replacementOwnerId was shared to.
| |||||||||||||||||||||||||||||||||||||||||||||
object A list of JSON objects representing workspaces, bases, and interfaces the user was unshared from.
|
{"error": {"message": "You are not permitted to perform this operation on yourself","type": "INVALID_PERMISSIONS"}}
{"error": {"message": "Replacement owner must have verified email","type": "INVALID_PERMISSIONS"}}
{"error": {"message": "You cannot use that replacementOwnerId because of this enterprise account's invite restrictions","type": "INVALID_PERMISSIONS"}}
{"error": {"message": "Replacement owner must be different from the users being removed","type": "INVALID_PERMISSIONS"}}
{"error": {"message": "Replacement owner is required if to-be-removed users are the sole owners on workspace(s)","type": "INVALID_PERMISSIONS"}}
{"error": {"message": "No user with that replacementOwnerId could be found","type": "INVALID_PERMISSIONS"}}
$curl -X POST "https://api.airtable.com/v0/meta/enterpriseAccounts/{enterpriseAccountId}/users/{userId}/remove" \-H "Authorization: Bearer YOUR_TOKEN" \-H "Content-Type: application/json" \--data '{"replacementOwnerId": "usrL2PNC5o3H4lBEi"}'
{"shared": {"workspaces": [{"deletedTime": null,"permissionLevel": "owner","userId": "usrL2PNC5o3H4lBEi","workspaceId": "wsp00000000000000","workspaceName": "Workspace name"}]},"unshared": {"bases": [{"baseId": "app00000000000000","baseName": "Base name","deletedTime": null,"formerPermissionLevel": "create","userId": "usr00000000000000"}],"interfaces": [{"baseId": "app00000000000000","deletedTime": null,"formerPermissionLevel": "create","interfaceId": "pgb00000000000000","interfaceName": "Interface name","userId": "usr00000000000000"}],"workspaces": [{"deletedTime": null,"formerPermissionLevel": "owner","userId": "usr00000000000000","workspaceId": "wsp00000000000000","workspaceName": "Workspace name"}]},"wasUserRemovedAsAdmin": true}