Specific Workspace Member

https://api.xata.io/workspaces/{workspace_id}/members/{user_id}/

This endpoint enables operations on a specific member of a workspace, referenced by their user ID.

Expected Parameters
NameDescriptionInRequiredSchema
workspace_idWorkspace namepathstring
user_idUserIDpathstring

Update Workspace Member Role

PUT  https://api.xata.io/workspaces/{workspace_id}/members/{user_id}/

Update a workspace member role. Workspaces must always have at least one owner, so this operation will fail if trying to remove owner role from the last owner in the workspace.

Request Body Type Definition
type UpdateWorkspaceMemberRole = {
    role: Role;
};

type Role = "owner" | "maintainer";
Possible Responses
Status CodeDescriptionExample Response/Type Definition
204No Content
400Bad Request
type UpdateWorkspaceMemberRole = {
    id?: string;
    message: string;
};
401Authentication Error
{
  "message": "invalid API key"
}
404Example response
type UpdateWorkspaceMemberRole = {
    id?: string;
    message: string;
};
5XXUnexpected Error

Remove a Member From the Workspace

DELETE  https://api.xata.io/workspaces/{workspace_id}/members/{user_id}/

Remove the member from the workspace

Possible Responses
Status CodeDescriptionExample Response/Type Definition
204No Content
400Bad Request
type RemoveWorkspaceMember = {
    id?: string;
    message: string;
};
401Authentication Error
{
  "message": "invalid API key"
}
404Example response
type RemoveWorkspaceMember = {
    id?: string;
    message: string;
};
5XXUnexpected Error