Skip to main content

Users API

The Users API provides endpoints for managing users in Joomla.

Base URL

/api/index.php/v1/users

Endpoints Overview

MethodEndpointDescription
GET/usersRetrieve all users
GET/users/{id}Retrieve specific user
POST/usersCreate new user
PATCH/users/{id}Update user
DELETE/users/{id}Delete user

Retrieve all users

GET /api/index.php/v1/users

Response

{
"data": [
{
"type": "users",
"id": "42",
"attributes": {
"name": "John Doe",
"username": "johndoe",
"email": "john@example.com",
"registerDate": "2024-01-01 12:00:00",
"lastvisitDate": "2024-10-26 10:30:00",
"block": 0
}
}
]
}

Retrieve specific user

GET /api/index.php/v1/users/{id}

Parameters

ParameterTypeDescription
idintegerUser ID

Example

curl -X GET "https://yoursite.com/api/index.php/v1/users/42" \
-H "X-Joomla-Token: YOUR_API_TOKEN"

Create user

POST /api/index.php/v1/users

Request Body

{
"name": "Jane Doe",
"username": "janedoe",
"email": "jane@example.com",
"password": "SecurePassword123!",
"groups": [2]
}

Required fields

FieldTypeDescription
namestringFull name
usernamestringUsername (unique)
emailstringEmail address (unique)
passwordstringPassword

Optional fields

FieldTypeDefaultDescription
groupsarray[2]Group IDs
blockint0Blocked (0=no, 1=yes)
paramsobjectExtra parameters

Example

curl -X POST "https://yoursite.com/api/index.php/v1/users" \
-H "X-Joomla-Token: YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Jane Doe",
"username": "janedoe",
"email": "jane@example.com",
"password": "SecurePassword123!",
"groups": [2]
}'

Update user

PATCH /api/index.php/v1/users/{id}

Request Body

{
"name": "Jane Smith",
"email": "jane.smith@example.com"
}

Example

curl -X PATCH "https://yoursite.com/api/index.php/v1/users/42" \
-H "X-Joomla-Token: YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Jane Smith",
"email": "jane.smith@example.com"
}'

Delete user

DELETE /api/index.php/v1/users/{id}

Example

curl -X DELETE "https://yoursite.com/api/index.php/v1/users/42" \
-H "X-Joomla-Token: YOUR_API_TOKEN"
Note

Deleting a user is permanent and cannot be undone.

Block/Unblock user

To block a user, use the PATCH method:

curl -X PATCH "https://yoursite.com/api/index.php/v1/users/42" \
-H "X-Joomla-Token: YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"block": 1}'

User Groups

Default Joomla Groups

IDNameDescription
1PublicPublic access
2RegisteredRegistered users
3AuthorAuthors
4EditorEditors
5PublisherPublishers
6ManagerManagers
7AdministratorAdministrators
8Super UsersSuper Users

Filtering

Search by name

GET /api/index.php/v1/users?filter[search]=john

By group

GET /api/index.php/v1/users?filter[group]=2

Blocked users

GET /api/index.php/v1/users?filter[block]=1
  • User Fields - Custom fields for users
  • User Field Groups - Grouping of custom fields