Article suggestions
  1. Home
  2. Section: Developer Hub
  3. Users API - How to Manage Users with API Calls

Users API - How to Manage Users with API Calls

  • avatar
Written by Chan Nier
Updated on April 1, 2025

Link: https://support.brilliantdirectories.com/support/solutions/articles/12000103947

The API allows for creating, reading, updating, deleting, and searching users within the database. Below is a list of available endpoints and their usage.

To search for members by address, enable the setting: Enable All Location Features for "Pretty URL" Search Results Pages (Additional Google Maps API Cost) in the site's Advanced Settings.

For detailed instructions, please refer to the guide here: Set Up Pretty URLs with Google Maps.

Available Endpoints

Below is a list of the available endpoints for managing users:

  • https://example.com/api/v2/user/get/{user_id}
  • https://example.com/api/v2/user/create
  • https://example.com/api/v2/user/update
  • https://example.com/api/v2/user/delete
  • https://example.com/api/v2/user/search
  • https://example.com/api/v2/user/transactions

Get a User

Retrieve details of a single user using their user_id.

Parameter Notes: Use user_id.
Endpoint:

GET https://example.com/api/v2/user/get/?property=user_id&property_value=3
JavaScript

Example Request:

GET https://example.com/api/v2/user/get/{user_id}

curl -H "Authorization: YOUR_API_KEY" "https://example.com/api/v2/user/get/{user_id}"
JavaScript
Query Parameters:
property The property key (eg., user_id).
property_value The value associated with the property.


Example Response:

{
    "status": "success",
    "message": [
        {
            "user_id": "26",
            "business_type": "",
            "first_name": "Jane",
            "last_name": "Smith",
            "email": "sample@brilliantdirectories.com",
            "company": "Templehoff Icecream",
            "phone_number": "234234",
            "address1": "5 Platz d. Luftbrücke ",
            "address2": "",
            "city": "Berlin",
            "zip_code": "12101",
            "state_code": "BE",
            "state_ln": "Berlin",
            "country_code": "DE",
            "country_ln": "Germany",
            "modtime": "2025-03-27T16:42:48+00:00",
            "subscription_id": "3",
            "filename": "germany/berlin/food-content-creators/templehoff-icecream",
            "active": "2",
            "ref_code": "Manually Added",
            "signup_date": "2025-02-14T10:54:12+00:00",
            "cookie": "",
            "last_login": "1970-01-01T00:00:00+00:00",
            "profession_id": "2",
            "listing_type": "Company",
            "lat": "52.48302330",
            "lon": "13.38924470",
            "parent_id": "0",
            "filename_hidden": "pro/20250214105412",
            "subscription_schema": {
                "subscription_id": "3",
                "subscription_name": "Gold - Plan 3",
                "subscription_type": "member",
                "lead_price": "20.00",
                "nofollow_links": "1",
                "payment_default": "yearly",
                "menu_name": "",
                "profile_layout": "1",
                "searchable": "1",
                "search_priority": "3",
                "about_form": "about",
                "listing_details_form": "member_listing_details",
                "contact_details_form": "member_contact_details",
                "receive_messages": "0",
                "location_settings": "",
                "data_settings": "2,1,0",
                "data_settings_read": "0",
                "login_redirect": "/account/home",
                "profile_sidebar": "Member Profile Page",
                "signup_email_template": "welcome-basic",
                "upgrade_email_template": "upgrade-response",
                "email_member": "0",
                "signup_promotion_widget": "1",
                "revision_timestamp": "2025-03-26 10:23:37",
                "search_membership_permissions": "visitor,",
                "upgradable_membership": "2,",
                "hide_specialties": "0",
                "auto_activate": "active",
            },
            "profession_schema": {
                "profession_id": "2",
                "name": "Food Content Creators",
                "desc": "",
                "filename": "food-content-creators",
                "keywords": "",
                "icon": "",
                "revision_timestamp": "2025-02-10 10:54:21",
                "sort_order": "0",
                "lead_price": null,
                "image": ""
            },
            "photos_schema": false,
            "tags": false,
            "services_schema": false,
            "credit_balance": 0,
            "transactions": false
        }
    ],
    "total": "1",
    "current_page": 1,
    "total_pages": 1
}
JavaScript

Create a User

Add a new user to the database.
Parameter Notes: The user_id will be assigned by the system.
Use the variables shown on the import file: How To Import Members Via CSV File.

Required: emailpassword.

Endpoint:

POST https://example.com/api/v2/user/create
JavaScript

Example Request:

{
  "company": "Cafe Milchgesicht (Manakish Spot)",
  "first_name": "Ingrid",
  "last_name": "Klein",
  "email": "sample@brilliantdirectories.com",
  "phone_number": "+49 30 54688459",
  "address1": "Mainzer Str. 1, Frankfurter Allee 42",
  "city": "Berlin",
  "zip_code": "10247",
  "state_code": "BE",
  "state_ln": "Berlin",
  "country_code": "DE",
  "country_ln": "Germany",
  "subscription_id": "3",
  "active": "2",
  "password": "Manually Added",
  "profession_name": "Cafe",
  "listing_type": "Company",
  "create_new_categories": "1"
}
JavaScript

Query Parameters:

user_id The unique identifier for the user.
first_name The user's first name.
last_name The user's last name.
email The user's email address.
password The user's account password.
subscription_id The ID of the user's subscription plan.
company The name of the company the user is associated with.
phone_number The user's contact phone number.
address1 The user's primary address.
address2 Additional address details (e.g., apartment, suite).
city The city where the user resides.
zip_code The user's postal or ZIP code.
state_code The state abbreviation.
state_ln The full name of the state.
country_code The country code.
country_ln The full name of the country.
website The user's personal or company website URL.
twitter The user's Twitter / X profile URL.
youtube The user's YouTube profile URL.
facebook The user's Facebook profile URL.
linkedin The user's LinkedIn profile URL.
instagram The user's Instagram profile URL.
pinterest The user's Pinterest profile URL.
blog The user's blog URL.
quote A personal or professional quote from the user.
experience Year Established.
affiliation Accepted payment methods.
awards Awards and recognitions received by the user.
about_me Additional personal or business details.
featured Indicates if the user is featured.
modtime The last modification timestamp.
active The user's account status.
signup_date The date and time the user signed up.
last_login The date and time of the user's last login.
position The user's job position or title.
credentials The user's academic or professional credentials.
profession_id The ID of the Category
verified Indicates if the user is verified.
listing_type The type of user listing (e.g., individual, business).
lat The user's latitude coordinates.
lon The user's longitude coordinates.
search_description A short description for search results.
send_email_notifications Set to 1 to trigger email sign up email notifications.

Example Response:

{
	"status": "success",
	"message": {
		"user_id": "27",
		"business_type": "",
		"first_name": "Ingrid",
		"last_name": "Klein",
		"email": "sample@brilliantdirectories.com",
		"company": "Cafe Milchgesicht (Manakish Spot)",
		"phone_number": "+49 30 54688459",
		"address1": "Mainzer Str. 1, Frankfurter Allee 42",
		"address2": null,
		"city": "Berlin",
		"zip_code": "10247",
		"state_code": "BE",
		"state_ln": "Berlin",
		"country_code": "DE",
		"country_ln": "Germany",
		"subscription_id": "3",
		"filename": "germany\/berlin\/cafe-milchgesicht-manakish-spot",
		"password": "$2a$11$1e068f4ae4f6a791232c4utGv4MrtmVeexYfFa7sf26t2.Nwk7ofm",
		"active": "2",
		"token": "cf04e1d0f6619d5c1af58baa09d4a6d5",
		"ref_code": "",
		"signup_date": "20250327212617",
		"profession_id": "3",
		"parent_id": "0",
		"create_new_categories": "1",
		"profession_name": "Cafe",
		"subscription_schema": {
			"subscription_id": "3",
			"subscription_name": "Gold - Plan 3",
			"listing_details_form": "member_listing_details",
			"contact_details_form": "member_contact_details",
		},
		"profession_schema": {
			"profession_id": "3",
			"name": "Cafe",
			"filename": "cafe",
			"revision_timestamp": "2025-03-27 17:26:17",
			"sort_order": "0",
			"lead_price": null,
		},
		"photos_schema": false,
		"tags": false,
		"services_schema": false
	}
}
JavaScript

Update a User

Modify an existing user’s data.
Parameter Notes: Use user_id.

Key Considerations Details
Adding New Services (Sub & Sub-Sub Categories) Use create_new_categories = 1. Sub and sub-sub categories must match their parent categories.
Email & Password Rules Duplicate emails allowed only if allow_duplicate_member_emails is enabled. Email + password combo must be unique.
Token Requirements Must be alphanumeric, 32 characters long, and unique.
Accepted Field Values All values must match accepted defaults. Refer to the member import template for guidance.
Referencing Categories in API Use single quotes around category names (e.g., '25-30').
Subscription & Profession ID Requirements The subscription_id and profession_id must be created within the site before they can be used or updated via spreadsheet. This means the membership plan and categories must already exist for the API call to work properly.
→ Finance » Membership Plans Overview
→ How To Import Categories Via CSV File

Endpoint:

PUT https://example.com/api/v2/user/update
JavaScript

Example Request:

{
  "user_id": " 27",
  "create_new_categories": "1",
  "email": "sample@brilliantdirectories.com",
  "company": "Green Cafe Milchgesicht (Manakish Spot) ",
  "phone_number": "+49 30 54688459",
  "address1": "Mainzer Str. 1, Frankfurter Allee 42",
  "city": "Berlin",
  "zip_code": "10247",
  "state_code": "BE",
  "state_ln": "Berlin",
  "country_ln": "Germany",
  "subscription_id": " 3",
  "active": "1",
  "password": " Manually Added",
  "profession_name": "Cafe",
  "listing_type": "Company"
}
JavaScript

Example Response:

{
    "status": "success",
    "message": {
        "user_id": "27",
        "business_type": "",
        "first_name": "Ingrid",
        "last_name": "Klein",
        "email": "sample@brilliantdirectories.com",
        "company": "Green Cafe Milchgesicht (Manakish Spot) ",
        "phone_number": "+49 30 54688459",
        "address1": "Mainzer Str. 1, Frankfurter Allee 42",
        "address2": null,
        "city": "Berlin",
        "zip_code": "10247",
        "state_code": "BE",
        "state_ln": "Berlin",
        "country_code": "DE",
        "country_ln": "Germany",
        "modtime": "2025-03-27T17:26:17+00:00",
        "subscription_id": "3",
        "filename": "germany/berlin/cafe/cafe-milchgesicht-manakish-spot",
        "password": "$2a$11$1e068f4ae4f6a791232c4uqAjlLsTI0weocrFN4IPlD6bGFqJ/G1S",
        "active": "1",
        "subscription_schema": {
            "subscription_id": "3",
            "subscription_name": "Gold - Plan 3",
            "subscription_type": "member",
            "status_after_upgrade": "keep"
        },
        "profession_schema": {
            "profession_id": "3",
            "name": "Cafe",
            "filename": "cafe",
            "revision_timestamp": "2025-03-27 17:26:17",
        },
        "photos_schema": false,
        "tags": false,
        "services_schema": false,
        "credit_balance": null,
        "transactions": false
    }
}
JavaScript

Delete a User

Remove a user from the database.
Parameter Notes: Use user_id.

Endpoint:

DELETE https://example.com/api/v2/user/delete
JavaScript

Example Request:

{
  "user_id": "30"
}
JavaScript

Example Response:

{
    "status": "success",
    "message": "user record was deleted"
}
JavaScript

Search Users

Find users based on criteria.
Parameter Notes: Use q, address, pid,tid,ttid.

Endpoint:

POST https://example.com/api/v2/user/search
JavaScript

Example Request:

{
	"q": "Cafe Milchgesicht (Manakish Spot)",
	"output_type": "array"
}
JavaScript

Query Parameters:

dynamic Set to 1 to simulate a Dynamic Category Filter search.
q Enter a keyword to search for in member data.
pid Enter member Top Level Category ID to search for. Enter a comma-separated list of IDs if the Dynamic Category Filter search is enabled.
tid Enter member Sub Level Category ID to search for. Enter a comma-separated list of IDs if the Dynamic Category Filter search is enabled.
ttid Enter member Sub-Sub Level Category ID to search for. Enter a comma-separated list of IDs if the Dynamic Category Filter search is enabled.
address Enter the location to search for. Example: Los Angeles, California, United States.
output_type Enter the type of response to receive. Valid options - html, array. By default the results will show in HTML similar to the search results page on the site. If set to Array the results will show in a JSON array.
limit Enter the maximum number of search results to return per page of results.
sort Set the Order the data would be displayed. The options here are: reviews, name ASC, name DESC, last_name_asc, last_name_desc
page Enter the page number of results to return. For example, enter 2 to return the second page of results.

Example Response:

{    "status": "success",    "message": [        {            "user_id": "28",            "business_type": "",            "first_name": "Ingrid",            "last_name": "Klein",            "email": "sample@brilliantdirectories.com",            "company": "Cafe Milchgesicht (Manakish Spot)",            "phone_number": "+49 30 54688459",            "address1": "Mainzer Str. 1, Frankfurter Allee 42",            "address2": null,            "city": "Berlin",            "zip_code": "10247",            "state_code": "BE",            "state_ln": "Berlin",            "country_code": "DE",            "country_ln": "Germany",            "subscription_id": "3",            "filename": "germany/berlin/ingrid-klein",            "active": "2",            "profession_id": "3",            "listing_type": "Individual",            "subscription_schema": {                "subscription_id": "3",                "subscription_name": "Gold - Plan 3",                "subscription_type": "member",            },            "profession_schema": {                "profession_id": "3",                "name": "Cafe",                "filename": "cafe",                "revision_timestamp": "2025-03-27 17:26:17",                "sort_order": "0",                "lead_price": null,                "image": ""            },            "photos_schema": false,            "tags": false,            "services_schema": false,            "credit_balance": null,            "transactions": false        }    ],    "total_members": "1",    "total_pages": 1}
JavaScript

Request User Transactions

Retrieve transactions related to a user.
Parameter Notes: Use user_id.

Endpoint:

POST https://example.com/api/v2/user/transactions
JavaScript

Example Request:

{
	"user_id": "23",
	"bdapi_model": "user"
}
JavaScript

Example Response:

{
    "status": "success",
    "message": {
        "total": 2,
        "invoices": [
            {
                "invoice_details": {
                    "id": "1639000037",
                    "userid": "4",
                    "invoicenum": "",
                    "date": "2025-02-28",
                    "duedate": "2025-03-14",
                    "datepaid": "2025-03-14 10:45:11",
                    "subtotal": "10.00",
                    "credit": "0.00",
                    "tax": "0.00",
                    "tax2": "0.00",
                    "total": "10.00",
                    "taxrate": "0.00",
                    "taxrate2": "0.00",
                    "status": "Paid",
                    "paymentmethod": "stripe",
                    "notes": "",
                    "items": [
                        {
                            "id": "37",
                            "invoiceid": "1639000037",
                            "userid": "4",
                            "relid": "12",
                            "description": "Membership Plan 2 (14/03/2025 - 13/04/2025)",
                            "amount": "10.00",
                            "taxed": "0",
                            "duedate": "2025-03-14",
                            "paymentmethod": "stripe",
                            "notes": ""
                        }
                    ]
                },
                "subscription_details": {
                    "id": "12",
                    "userid": "4",
                    "orderid": "12",
                    "packageid": "1",
                    "server": "0",
                    "regdate": "2025-02-14",
                    "domain": "",
                    "paymentmethod": "stripe",
                    "firstpaymentamount": "10.00",
                    "amount": "10.00",
                    "billingcycle": "Monthly",
                    "nextduedate": "2025-04-14",
                    "nextinvoicedate": "2025-04-14",
                    "domainstatus": "Active",
                    "username": "",
                    "password": "lfqA2p7hJZ/DpXdUbgqowqyRcvw=",
                    "notes": "Array\n(\n    [reminder_id] => \n)\n",
                    "subscriptionid": "",
                    "promoid": "0",
                    "suspendreason": "",
                    "overideautosuspend": "",
                    "overidesuspenduntil": "0000-00-00"
                }
            },
            {
                "invoice_details": {
                    "id": "1639000026",
                    "userid": "4",
                    "invoicenum": "",
                    "date": "2025-02-13",
                    "duedate": "2025-02-14",
                    "datepaid": "2025-02-14 10:45:15",
                    "subtotal": "10.00",
                    "credit": "0.00",
                    "tax": "0.00",
                    "tax2": "0.00",
                    "total": "10.00",
                    "taxrate": "0.00",
                    "taxrate2": "0.00",
                    "status": "Paid",
                    "paymentmethod": "stripe",
                    "notes": "",
                    "items": [
                        {
                            "id": "26",
                            "invoiceid": "1639000026",
                            "userid": "4",
                            "type": "Hosting",
                            "relid": "12",
                            "description": "Membership Plan 2 (14/02/2025 - 13/03/2025)",
                            "amount": "10.00",
                            "taxed": "0",
                            "duedate": "2025-02-14",
                            "paymentmethod": "stripe",
                            "notes": ""
                        }
                    ]
                },
                "subscription_details": {
                    "id": "12",
                    "userid": "4",
                    "orderid": "12",
                    "packageid": "1",
                    "server": "0",
                    "regdate": "2025-02-14",
                    "domain": "",
                    "paymentmethod": "stripe",
                    "firstpaymentamount": "10.00",
                    "amount": "10.00",
                    "billingcycle": "Monthly",
                    "nextduedate": "2025-04-14",
                    "nextinvoicedate": "2025-04-14",
                    "domainstatus": "Active"
                }
            }
        ]
    }
}
JavaScript

Thank you for leaving a rating!
Did you find this article helpful?
0 out of 0 people found this article helpful so far
Can't find what you're looking for? Get in touch
How can we help?
Send your question below and we'll get back to you as soon as possible.
Cancel
translation missing: en.kb.default.contact_form_error
×
Thanks for your message!
Thanks for your message!
×