User info

https://api.xata.io/user/

This endpoint allows retrieving or updating a given user by their user ID.

Get User Details

GET  https://api.xata.io/user/

Return details of the user making the request

Possible Responses
Status CodeDescriptionExample Response/Type Definition
200OK
type GetUser = User & {
    id: UserID;
};

type User = {
    /*
     * @format email
     */
    email: string;
    fullname: string;
    image: string;
};

/**
 * @pattern [a-zA-Z0-9_-~:]+
 */
type UserID = string;
400Bad Request
type GetUser = {
    id?: string;
    message: string;
};
401Authentication Error
{
  "message": "invalid API key"
}
404Example response
type GetUser = {
    id?: string;
    message: string;
};
5XXUnexpected Error

Update User Info

PUT  https://api.xata.io/user/

Update user info

Request Body Type Definition
type UpdateUser = User;

type User = {
    /*
     * @format email
     */
    email: string;
    fullname: string;
    image: string;
};
Possible Responses
Status CodeDescriptionExample Response/Type Definition
200OK
type UpdateUser = User & {
    id: UserID;
};

type User = {
    /*
     * @format email
     */
    email: string;
    fullname: string;
    image: string;
};

/**
 * @pattern [a-zA-Z0-9_-~:]+
 */
type UserID = string;
400Bad Request
type UpdateUser = {
    id?: string;
    message: string;
};
401Authentication Error
{
  "message": "invalid API key"
}
404Example response
type UpdateUser = {
    id?: string;
    message: string;
};
5XXUnexpected Error

Delete User

DELETE  https://api.xata.io/user/

Delete the user making the request

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