Users API
Manage user accounts and profiles
The Users API allows you to manage user accounts within your Xata organization, including listing, retrieving, updating, and deleting user accounts.
List users
Retrieves a list of all users in an organization.
GET /organizations/{organizationID}/users
Path parameters
Parameter | Type | Description |
---|---|---|
organizationID | string | Unique identifier for the organization |
Response
{
"users": [
{
"id": "user_123",
"email": "user@example.com",
"name": "John Doe",
"createdAt": "2024-01-01T00:00:00Z",
"updatedAt": "2024-01-01T00:00:00Z"
}
]
}
Get user
Retrieves detailed information about a specific user.
GET /organizations/{organizationID}/users/{userID}
Path parameters
Parameter | Type | Description |
---|---|---|
organizationID | string | Unique identifier for the organization |
userID | string | Unique identifier for the user |
Response
{
"id": "user_123",
"email": "user@example.com",
"name": "John Doe",
"createdAt": "2024-01-01T00:00:00Z",
"updatedAt": "2024-01-01T00:00:00Z"
}
Update user
Updates user information within an organization.
PATCH /organizations/{organizationID}/users/{userID}
Path parameters
Parameter | Type | Description |
---|---|---|
organizationID | string | Unique identifier for the organization |
userID | string | Unique identifier for the user |
Request body
{
"name": "Updated User Name",
"email": "updated@example.com"
}
Response
{
"id": "user_123",
"email": "updated@example.com",
"name": "Updated User Name",
"createdAt": "2024-01-01T00:00:00Z",
"updatedAt": "2024-01-01T00:00:00Z"
}
Delete user
Removes a user from an organization.
DELETE /organizations/{organizationID}/users/{userID}
Path parameters
Parameter | Type | Description |
---|---|---|
organizationID | string | Unique identifier for the organization |
userID | string | Unique identifier for the user |
Response
Returns a 204 status code with no content on success.