API Reference - Users
Link: https://support.brilliantdirectories.com/support/solutions/articles/12000108047
← Back to API Reference | Getting Started
Users
Users (members) are the core of every Brilliant Directories website. This resource maps to the users_data database table. Every user belongs to a membership level (subscription type) and has a status code that controls their access to the site.
user — DB table: users_dataThe User Object
| Field | Type | Description |
|---|---|---|
user_id | integer | Unique user ID (primary key, read-only) |
first_name | string | User's first name |
last_name | string | User's last name |
email | string | Email address — must be unique across the site required on create |
password | string | Password (plain text on create/update; stored as hash) required on create |
subscription_id | integer | Membership level ID required on create |
active | integer | Account status: 1=Inactive, 2=Active, 3=Cancelled, 4=On Hold, 5=Past Due |
company | string | Business or company name |
phone_number | string | Phone number |
address1 | string | Street address line 1 |
address2 | string | Street address line 2 |
city | string | City |
zip_code | string | ZIP or postal code |
state_code | string | 2-letter state/province code (e.g. CA) |
state_ln | string | Full state/province name (e.g. California) |
country_code | string | 2-letter country code (e.g. US) |
country_ln | string | Full country name (e.g. United States) |
website | string | User's website URL |
twitter | string | Twitter/X profile URL |
youtube | string | YouTube channel URL |
facebook | string | Facebook profile/page URL |
linkedin | string | LinkedIn profile URL |
instagram | string | Instagram profile URL |
pinterest | string | Pinterest profile URL |
snapchat | string | Snapchat handle |
whatsapp | string | WhatsApp contact number |
about_me | text | About Me biography (HTML allowed) |
quote | string | Tagline or quote displayed on profile |
experience | integer | Year experience began (e.g. 2015) |
affiliation | text | Professional affiliations |
awards | text | Awards and achievements |
credentials | text | Professional credentials or certifications |
position | string | Job title or position |
profession_id | integer | Industry/profession category ID |
featured | integer | 1 if user is featured, 0 otherwise |
nationwide | integer | 1 if user serves clients nationwide |
lat | number | Latitude coordinate |
lon | number | Longitude coordinate |
signup_date | string | Date user signed up (format: YYYYMMDDHHmmss) |
last_login | string | Date/time of last login (format: YYYYMMDDHHmmss) |
modtime | timestamp | Last modified timestamp (auto-updated) |
filename | string | URL-friendly profile slug |
parent_id | integer | Parent user ID for sub-accounts |
verified | integer | 1 if email verified |
blog | text | Blog URL or blog content |
no_geo | string | Flag to disable geocoding for this user |
user_consent | text | Record of user consent (GDPR/privacy compliance) |
search_description | text | Custom description displayed in search results |
token | string | Unique user token (auto-generated) |
cookie | string | Session cookie token |
ref_code | string | Referral code or signup source (e.g. Manually Added) |
bitly | string | Bitly URL shortening flag or shortened URL |
facebook_id | string | Facebook account ID (for Facebook login integration) |
google_id | string | Google account ID (for Google login integration) |
cv | text | Curriculum vitae or resume content |
work_experience | text | Work experience details |
rep_matters | text | Business hours or additional reputation information |
gmap | string | Google Maps embed URL or place ID |
listing_type | string | Listing type classification (e.g. Individual, Business) |
Special Update Parameters
| Parameter | Type | Description |
|---|---|---|
member_tag_action | integer | Set to 1 to apply tag changes |
member_tags | string | Comma-separated tag IDs to assign (e.g. 1,2,3) |
credit_action | string | add, deduct, or override credits |
credit_amount | number | Credit amount for the credit action |
images_action | string | remove_all, remove_cover_image, remove_logo_image, or remove_profile_image |
services | string | Services in format category=>service1,service2 |
auto_geocode | integer | 1 to automatically geocode the user's address |
List Users
Returns a paginated list of users. Supports filtering and sorting via query parameters.
Example Request
curl -X GET "https://www.yourdomain.com/api/v2/user/get?limit=25" \ -H "X-Api-Key: your-api-key-here"
Example Response
{
"status": "success",
"total": 84,
"current_page": 1,
"total_pages": 4,
"next_page": "MipfKjI1",
"message": [
{
"user_id": 1,
"first_name": "Jane",
"last_name": "Smith",
"email": "jane@example.com",
"company": "Acme Corp",
"active": 2,
"subscription_id": 1,
"city": "Los Angeles",
"state_code": "CA",
"country_code": "US",
"signup_date": "20240115143000"
},
...
]
}Retrieve a User
Returns a single user by their user_id.
Example Request
curl -X GET "https://www.yourdomain.com/api/v2/user/get/42" \ -H "X-Api-Key: your-api-key-here"
Example Response
{
"status": "success",
"total": 1,
"current_page": 1,
"total_pages": 1,
"message": [
{
"user_id": 42,
"first_name": "John",
"last_name": "Doe",
"email": "john@example.com",
"company": "Tech Solutions LLC",
"active": 2,
"subscription_id": 3,
"phone_number": "555-867-5309",
"city": "San Francisco",
"state_code": "CA",
"country_code": "US",
"website": "https://www.techsolutions.com",
"signup_date": "20230901090000"
}
]
}Create a User
Creates a new user. The email, password, and subscription_id fields are required.
Required Fields
| Parameter | Type | Description |
|---|---|---|
email | string | Required |
password | string | Required |
subscription_id | integer | Required — membership level ID |
Example Request
curl -X POST "https://www.yourdomain.com/api/v2/user/create" \ -H "X-Api-Key: your-api-key-here" \ -d "email=jane@example.com" \ -d "password=SecurePass123" \ -d "subscription_id=1" \ -d "first_name=Jane" \ -d "last_name=Smith" \ -d "company=Acme+Corp" \ -d "phone_number=555-555-1234" \ -d "city=Los+Angeles" \ -d "state_code=CA" \ -d "country_code=US"
Example Response
{
"status": "success",
"message": {
"user_id": 101,
"first_name": "Jane",
"last_name": "Smith",
"email": "jane@example.com",
"company": "Acme Corp",
"active": 1,
"subscription_id": 1
}
}Update a User
Updates an existing user. The user_id is required in the request body. Only include the fields you want to change.
Example Request
curl -X PUT "https://www.yourdomain.com/api/v2/user/update" \ -H "X-Api-Key: your-api-key-here" \ -d "user_id=101" \ -d "company=New+Company+Name" \ -d "active=2" \ -d "phone_number=555-999-8888"
Example Response
{
"status": "success",
"message": {
"user_id": 101,
"first_name": "Jane",
"last_name": "Smith",
"company": "New Company Name",
"active": 2,
"phone_number": "555-999-8888"
}
}Delete a User
Permanently deletes a user and all associated data. The user_id is required. Set delete_images to 1 to also remove the user's uploaded image files.
Example Request
curl -X DELETE "https://www.yourdomain.com/api/v2/user/delete" \ -H "X-Api-Key: your-api-key-here" \ -d "user_id=101" \ -d "delete_images=1"
Example Response
{
"status": "success",
"message": "user record was deleted"
}Search Users
Performs a full member directory search with keyword, category, and location filtering. This endpoint mirrors the front-end member search functionality.
Search Parameters
| Parameter | Type | Description |
|---|---|---|
q | string | Keyword to search across member data |
pid | integer | Top-level category ID to filter by |
tid | integer | Sub-level category ID to filter by |
ttid | integer | Sub-sub-level category ID to filter by |
address | string | Location to search near (e.g. Los Angeles, CA) |
sort | string | Sort order: reviews, name ASC, name DESC, last_name_asc, last_name_desc |
page | integer | Page number |
limit | integer | Results per page |
dynamic | integer | Set to 1 to use Dynamic Category Filter search mode |
output_type | string | array (default) or html |
Example Request
curl -X POST "https://www.yourdomain.com/api/v2/user/search" \ -H "X-Api-Key: your-api-key-here" \ -d "q=plumber" \ -d "address=Chicago%2C+IL" \ -d "limit=10"
User Login
Validates a user's email and password. Returns a success or error status indicating whether the credentials are valid. This endpoint does not return user profile data — use GET /api/v2/user/get to retrieve user details after confirming credentials.
Example Request
curl -X POST "https://www.yourdomain.com/api/v2/user/login" \ -H "X-Api-Key: your-api-key-here" \ -d "email=jane@example.com" \ -d "password=SecurePass123"
Example Response
{
"status": "success",
"message": "credentials are valid"
}User Transactions
Returns billing transactions for a specific user. Pass the user's user_id as a POST body parameter.
Example Request
curl -X POST "https://www.yourdomain.com/api/v2/user/transactions" \ -H "X-Api-Key: your-api-key-here" \ -d "user_id=42"
User Subscriptions
Returns the subscription/membership history for a specific user. Pass the user's user_id as a POST body parameter.
Example Request
curl -X POST "https://www.yourdomain.com/api/v2/user/subscriptions" \ -H "X-Api-Key: your-api-key-here" \ -d "user_id=42"
