permissions
Add User To Tenant
Add a user to a tenant.
This endpoint assigns a user to a specific tenant, allowing them to access resources and data associated with that tenant. The authenticated user must be the owner of the tenant or have appropriate administrative permissions.
Path Parameters
- user_id (UUID): The UUID of the user to add to the tenant
Request Parameters
- tenant_id (UUID): The UUID of the tenant to assign the user to
Response
Returns a success message indicating the user was added to the tenant.
Error Codes
- 400 Bad Request: Invalid user or tenant ID
- 403 Forbidden: User doesn’t have permission to assign tenants
- 404 Not Found: User or tenant doesn’t exist
- 500 Internal Server Error: Error adding user to tenant
POST
Add User To Tenant
Documentation Index
Fetch the complete documentation index at: https://docs.cognee.ai/llms.txt
Use this file to discover all available pages before exploring further.
Previous
Remove User From Tenant EndpointRemove a user from a tenant.
The tenant owner or any user with ``has_user_management_permission`` in the
tenant (e.g. users in the Admin role) can remove users from the tenant. The
tenant owner cannot be removed from their own tenant. This removes the user
from all roles in the tenant and revokes their permissions on datasets
belonging to the tenant. Data owned by the removed user (e.g. datasets they
created) remains in the tenant.
## Path Parameters
- **tenant_id** (UUID): The UUID of the tenant
- **user_id** (UUID): The UUID of the user to remove from the tenant
## Response
Returns a success message indicating the user was removed from the tenant.
## Error Codes
- **400 Bad Request**: Attempt to remove the tenant owner from their own tenant
- **403 Forbidden**: Requester is not the tenant owner and does not have
``has_user_management_permission`` (e.g. Admin role) in the tenant
- **404 Not Found**: Tenant not found, user not found, or user not in tenant
- **500 Internal Server Error**: Error removing user from tenant
Next
Add User To Tenant