Skip to main content

Retrieve User

Retrieve a specific user by its unique ID.

HTTP Request

GET/api/users/:id

Authorization

Authorization

  • Required: Yes
  • Permission: Staff with UserPermission or Admin
  • Permission Code: 1222
  • Authentication: Token-based (Authorization: Token <your_api_key>)

Path Parameters

ParameterTypeRequiredDescription
idIntegerYesUnique ID of the user to retrieve

Example Requests

1import requests
2
3api = requests.Session()
4api.headers.update({'Authorization': 'Token f4e75eab6e0f663a972d145478d6fc4b81762070'})
5response = api.get('http://www.example.com/api/users/78/')
6print(response.json())

Response Fields

FieldTypeDescription
idIntegerUnique ID of the user (unique)
usernameStringUsername of the user (unique)
mobile_numberStringMobile phone number of the user(unique, nullable)
emailStringEmail address of the user(unique, nullable)
is_email_verifiedBooleanShows if the email has been verified
avatarStringURL to the user's avatar image (nullable).
first_nameStringFirst name of the user(nullable)
last_nameStringLast name of the user(nullable)
full_nameStringFull name (nullable).
genderStringGender of the user.(male/female/other)
invited_byObject(InvitingUser)User who has invited current user
invite_codeStringRelated invite code of the user (nullable)
invitees_countIntegerNumber of users invited by the current user(nullable)
is_activeBooleanWhether user account is active.
is_staffBooleanWhether user has staff privileges.
is_adminBooleanWhether user has admin privileges.
is_profile_completedBooleanWhether user profile data are complete or not
last_loginString (ISO 8601)Timestamp of last login (null for new users).
created_atString (ISO 8601)Timestamp when user was created.
updated_atString (ISO 8601)Timestamp when user was last updated.
is_onlineBooleanWhether user is currently online.
inviteesObject(InvitedUsers)List of invited users
groups_dataArray[Object]Array of group objects with detailed info.
permissions_dataArray[Ojbect(Permission)]Array of permissions objects the user have

Group Data Structure

FieldTypeDescription
idIntegerUnique ID of the group
nameStringName of the group

Example Response

{
"id": 2,
"username": "moratti120",
"mobile_number": "09150207212",
"email": "masimo@intermilan.com",
"is_email_verified": false,
"avatar": null,
"first_name": "masimo",
"last_name": "moratti",
"full_name": "masimo moratti",
"gender": "male",
"invited_by": {
"id": 1,
"username": "keegan2255",
"full_name": "kevin keegan"
},
"invite_code": null,
"invitees_count": 1,
"is_active": true,
"is_staff": true,
"is_admin": false,
"is_online": false,
"is_profile_completed": true,
"last_login": "2026-02-21T07:20:25.338627Z",
"created_at": "2026-02-21T07:20:25.859632Z",
"updated_at": "2026-02-21T07:37:56.219930Z",
"invitees": [
{
"id": 3,
"username": "Eve68",
"full_name": "پارسا حسینی‌نژاد"
}
],
"groups_data": [
{
"id": 1,
"name": "Inter"
}
],
"permissions_data": [
{
"id": 1,
"code": 1001,
"name": "general_settings_read"
}
]
}

Note

  • only users how have at least one of admin or staff privileges may be retrieved by this endpoint