User info
https://api.xata.io/user
This endpoint allows retrieving or updating a given user by their user ID.
Get User Details
GEThttps://api.xata.io/user
Return details of the user making the request
Responses
type GetUser = User & {
id: UserID;
};
type User = {
/**
* @format email
*/
email: string;
fullname: string;
image: string;
};
/**
* @pattern [a-zA-Z0-9_-~:]+
*/
type UserID = string;
type GetUser = {
id?: string;
message: string;
};
{
"message": "invalid API key"
}
type GetUser = {
id?: string;
message: string;
};
type GetUser = void;
Update User Info
PUThttps://api.xata.io/user
Update user info
Request Body Type Definition
type UpdateUser = User;
type User = {
/**
* @format email
*/
email: string;
fullname: string;
image: string;
};
Responses
type UpdateUser = User & {
id: UserID;
};
type User = {
/**
* @format email
*/
email: string;
fullname: string;
image: string;
};
/**
* @pattern [a-zA-Z0-9_-~:]+
*/
type UserID = string;
type UpdateUser = {
id?: string;
message: string;
};
{
"message": "invalid API key"
}
type UpdateUser = {
id?: string;
message: string;
};
type UpdateUser = void;
Delete User
DELETEhttps://api.xata.io/user
Delete the user making the request
Responses
type DeleteUser = void;
type DeleteUser = {
id?: string;
message: string;
};
{
"message": "invalid API key"
}
type DeleteUser = {
id?: string;
message: string;
};
type DeleteUser = void;