API Reference - Getting Started

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

← Back to API Reference

Brilliant Directories API Reference

Version 2.1 — Last updated April 2026

Introduction

The Brilliant Directories API gives you programmatic access to your directory website's data. You can create, read, update, and delete members, leads, posts, reviews, widgets, and more using standard HTTP requests.

The API follows REST conventions. All requests and responses use JSON. Dates are formatted as YYYYMMDDHHmmss (e.g. 20240115143000) unless noted otherwise.

Base URL

Replace yourdomain.com with your actual Brilliant Directories website domain in every request:

Copy
https://www.yourdomain.com/api/v2/

Request Format

Send POST and PUT request bodies as application/x-www-form-urlencoded (standard HTML form encoding). DELETE request bodies follow the same format. GET parameters are sent as query string parameters.

Authentication

Every request must include a valid API key in the X-Api-Key HTTP header. API keys are created and managed in your website's Admin Panel under Developer Hub → Generate API Key.

API keys are shown only once at the time of creation. Store them securely — there is no way to retrieve a key after closing the creation dialog.

Verify API Key

GET /api/v2/token/verify

Check whether an API key is valid and retrieve the associated website URL and key name.

Example Request

Copy
curl -X GET "https://www.yourdomain.com/api/v2/token/verify" \
  -H "X-Api-Key: your-api-key-here"

Example Response

Copy
{
  "status": "success",
  "message": {
    "website": "https://www.yourdomain.com",
    "key": "My API Key Name"
  }
}

Rate Limiting

The API enforces rate limiting to prevent abuse. The default limit is 100 requests per 60 seconds. This limit can be adjusted in your website's Admin Panel settings (maximum 1,000 requests per minute).

When you exceed the rate limit, the API returns a 429 Too Many Requests response. Wait for the time window to reset before retrying.

Rate Limit Response

Copy
{
  "status": "error",
  "message": "Too many API requests per minute"
}

Errors

All error responses follow the same structure: a status field set to "error" and a message field describing the problem.

Error Response Format

Copy
{
  "status": "error",
  "message": "Description of the error"
}

HTTP Status Codes

StatusMeaning
200Success — request processed normally
400Bad Request — missing or invalid parameters (e.g. required field not provided)
401Unauthorized — API key missing, invalid, or disabled
403Forbidden — API key does not have permission to access this endpoint (API Permissions feature)
405Method Not Allowed — wrong HTTP method used for this endpoint
429Too Many Requests — rate limit exceeded

Pagination

All list endpoints return paginated results. By default, 25 records are returned per page. The maximum is 100 per page.

Pagination Parameters

ParameterTypeDefaultDescription
pagestring(none)Cursor token from a previous response's next_page or prev_page field. Omit on the first request to start at page 1.
limitinteger25Number of records per page (max 100)

Pagination Response Fields

FieldTypeDescription
totalintegerTotal number of records matching the query
current_pageintegerCurrent page number
total_pagesintegerTotal number of pages
next_pagestringCursor token for the next page. Pass as the page parameter to retrieve the next page. Empty string on the last page.
prev_pagestringCursor token for the previous page. Pass as the page parameter to go back. Omitted on the first page.
messagearrayArray of resource objects for the current page

Example Paginated Response

Copy
{
  "status": "success",
  "total": 156,
  "current_page": 2,
  "total_pages": 7,
  "next_page": "MypfKjI1",
  "prev_page": "MSpfKjI1",
  "message": [ ... ]
}

Pagination Flow

First request — omit the page parameter to start at page 1:

Copy
curl -X GET "https://www.yourdomain.com/api/v2/user/get?limit=25" \
  -H "X-Api-Key: your-api-key-here"

Subsequent requests — pass the next_page token from the previous response:

Copy
curl -X GET "https://www.yourdomain.com/api/v2/user/get?page=MipfKjI1" \
  -H "X-Api-Key: your-api-key-here"

Filtering and Sorting

All list endpoints support filtering by any field and sorting by any column using query string parameters.

Filter Parameters

ParameterTypeDescription
propertystring or arrayField name to filter on. Pass multiple filters as property[]
property_valuestring or arrayValue to match against. Use property_value[] for multiple filters
property_operatorstring or arrayComparison operator: =, LIKE, >, <, >=, <=. Defaults to =

Sort Parameters

ParameterTypeDescription
order_columnstringColumn name to sort by
order_typestringASC or DESC

Filter Example — Exact Match

Copy
# Get all active users (active = 2)
curl -X GET "https://www.yourdomain.com/api/v2/user/get?property=active&property_value=2" \
  -H "X-Api-Key: your-api-key-here"

Filter Example — LIKE Search

Copy
# Find users whose company name contains "Tech"
curl -X GET "https://www.yourdomain.com/api/v2/user/get?property=company&property_value=%25Tech%25&property_operator=LIKE" \
  -H "X-Api-Key: your-api-key-here"

Filter Example — Multiple Filters

Copy
# Get active users in California
curl -X GET "https://www.yourdomain.com/api/v2/user/get?property[]=active&property_value[]=2&property[]=state_code&property_value[]=CA" \
  -H "X-Api-Key: your-api-key-here"

The Fields Endpoint

Each resource exposes a /fields endpoint that returns the list of writable fields for that resource. This is useful for discovering available fields dynamically without consulting the documentation.

GET /api/v2/{model}/fields

Example Request

Copy
curl -X GET "https://www.yourdomain.com/api/v2/user/fields" \
  -H "X-Api-Key: your-api-key-here"

Example Response

Copy
[
  { "key": "first_name", "label": "first_name", "required": 0 },
  { "key": "last_name",  "label": "last_name",  "required": 0 },
  { "key": "email",      "label": "email",      "required": 0 },
  ...
]

For post types (data_posts and users_portfolio_groups), pass a form_name parameter to retrieve the custom fields specific to that post type:

Copy
curl -X GET "https://www.yourdomain.com/api/v2/data_posts/fields?form_name=my-listings-form" \
  -H "X-Api-Key: your-api-key-here"