Delete multiple users by email.
Users
Delete users by email
delete
https://api.airtable.com/v0/meta/enterpriseAccounts/{enterpriseAccountId}/users
Authentication | Personal access token, OAuth integration |
Scope | enterprise.user:write |
User role | Enterprise admin |
Billing plans | Enterprise (pre-2023.08 legacy plan), Enterprise Scale |
array of the below object
| |||||||
array of the below object
|
Error responses
Action on self failure (403)
Don't deactivate yourself or you might lose access. If action must be performed, add another admin.
{"error": {"message": "Cannot perform action on self","type": "INVALID_PERMISSIONS"}}
Cannot delete sole owner (403)
If a workspace has more than one collaborator, it must have at least one owner. So the sole owner cannot be deleted.
{"error": {"message": "Cannot delete sole owner of a workspace with other collaborators","type": "INVALID_PERMISSIONS"}}
External user account (403)
Cannot modify external user state since they are not considered part of the enterprise account.
{"error": {"message": "User does not belong to the enterprise email domain","type": "INVALID_PERMISSIONS"}}
FLA account error (403)
The provisioned and deactivated states apply only to ELA and "claiming" enterprise accounts. FLA users are always provisioned.
{"error": {"message": "State modification is not enabled for FLA enterprise accounts","type": "INVALID_PERMISSIONS"}}
Non-managed user account (403)
Can only manage information of managed users.
{"error": {"message": "User is not managed by the enterprise account","type": "INVALID_PERMISSIONS"}}
Request (example)
Copy
$curl -X DELETE "https://api.airtable.com/v0/meta/enterpriseAccounts/{enterpriseAccountId}/users\?email[]=foo%40bar.com&email[]=bar%40bam.com" \-H "Authorization: Bearer YOUR_TOKEN"
200 – Response (example)
{"deletedUsers": [{"email": "foo@bar.com","id": "usrL2PNC5o3H4lBEi"}],"errors": [{"email": "bar@bam.com","message": "Invalid permissions","type": "INVALID_PERMISSIONS"}]}