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

Responses

type GetUser = User & {
    id: UserID;
};
 
type User = {
    /**
     * @format email
     */
    email: string;
    fullname: string;
    image: string;
};
 
/**
 * @pattern [a-zA-Z0-9_-~:]+
 */
type UserID = string;

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;
};

Responses

type UpdateUser = User & {
    id: UserID;
};
 
type User = {
    /**
     * @format email
     */
    email: string;
    fullname: string;
    image: string;
};
 
/**
 * @pattern [a-zA-Z0-9_-~:]+
 */
type UserID = string;

Delete User

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

Delete the user making the request

Responses

type DeleteUser = void;