API Reference - Form Inquiries
Link: https://support.brilliantdirectories.com/support/solutions/articles/12000108077
← Back to API Reference | Getting Started
Form Inquiries
Form Inquiries store submissions received through contact forms and other inquiry forms on your directory website. Each record captures the submitter's email and IP address, the form they used, the full HTML content of their submission, and status information for tracking whether the inquiry has been handled.
form_inquiries — DB table: form_inquiriesThe Form Inquiries Object
| Field | Type | Description |
|---|---|---|
inquiry_id | integer | Unique inquiry ID (primary key, read-only) |
inquiry_email | string | Email address of the person who submitted the form |
inquiry_ip | string | IP address of the submitter at the time of submission |
inquiry_user_id | integer | Member user ID of the submitter (0 if submitted by a guest) |
inquiry_form | string | Machine name of the form used to submit this inquiry |
inquiry_content | text | Full HTML content of the submission, including all field values formatted for email display |
inquiry_status | string | Handling status of the inquiry (EG 0 = new/unread, 1 = handled) |
inquiry_archived | integer | Whether the inquiry has been archived: 1 = archived, 0 = active |
inquiry_notes | text | Internal admin notes about this inquiry |
url_origin | string | Full URL of the page where the form was submitted from |
date_submitted | string | Date and time the inquiry was submitted, stored as a string in YYYYMMDDHHmmss format |
user_consent | text | Record of any consent or GDPR agreement captured at the time of submission |
comments | string | Dynamic form submission field for comments |
phone | string | Dynamic form submission field for phone number |
yourname | string | Dynamic form submission field for name |
company | string | Dynamic form submission field for company |
action | string | Dynamic form submission field for action type |
email | string | Dynamic form submission field for email address |
froala | string | Dynamic form submission field for rich text content |
first_name | string | Dynamic form submission field for first name |
List Form Inquiries Records
Returns a paginated list of form inquiry records.
Example Request
curl -X GET "https://www.yourdomain.com/api/v2/form_inquiries/get?limit=25" \ -H "X-Api-Key: your-api-key-here"
Example Response
{
"status": "success",
"message": [
{
"tablesExists": true,
"inquiry_id": "1",
"inquiry_email": "jane@example.com",
"inquiry_ip": "203.0.113.42",
"inquiry_user_id": "0",
"inquiry_form": "contact_form",
"inquiry_content": "<p>Hello, I have a question about membership.</p>",
"inquiry_status": "0",
"inquiry_archived": "0",
"inquiry_notes": "",
"url_origin": "https://www.yourdomain.com/about/contact",
"date_submitted": "20250107052345",
"user_consent": ""
}
],
"total": "12",
"current_page": 1,
"total_pages": 1
}Retrieve a Form Inquiry
Example Request
curl -X GET "https://www.yourdomain.com/api/v2/form_inquiries/get/1" \ -H "X-Api-Key: your-api-key-here"
Example Response
{
"status": "success",
"message": [
{
"tablesExists": true,
"inquiry_id": "1",
"inquiry_email": "jane@example.com",
"inquiry_ip": "203.0.113.42",
"inquiry_user_id": "0",
"inquiry_form": "contact_form",
"inquiry_content": "<p>Hello, I have a question about membership.</p>",
"inquiry_status": "0",
"inquiry_archived": "0",
"inquiry_notes": "",
"url_origin": "https://www.yourdomain.com/about/contact",
"date_submitted": "20250107052345",
"user_consent": ""
}
],
"total": "1",
"current_page": 1,
"total_pages": 1
}Create a Form Inquiry
Example Request
curl -X POST "https://www.yourdomain.com/api/v2/form_inquiries/create" \ -H "X-Api-Key: your-api-key-here" \ -d "inquiry_email=jane%40example.com" \ -d "inquiry_ip=203.0.113.42" \ -d "inquiry_form=contact_form" \ -d "inquiry_content=Hello%2C+I+have+a+question." \ -d "inquiry_status=0" \ -d "inquiry_archived=0" \ -d "date_submitted=20260403120000" \ -d "url_origin=https%3A%2F%2Fwww.yourdomain.com%2Fabout%2Fcontact"
Example Response
{
"status": "success",
"message": {
"inquiry_id": "344",
"inquiry_email": "jane@example.com",
"inquiry_ip": "203.0.113.42",
"inquiry_user_id": null,
"inquiry_form": "contact_form",
"inquiry_content": "Hello, I have a question.",
"inquiry_status": "0",
"inquiry_archived": "0",
"inquiry_notes": null,
"url_origin": "https://www.yourdomain.com/about/contact",
"date_submitted": "20260403120000",
"user_consent": null
}
}Update a Form Inquiry
Example Request
curl -X PUT "https://www.yourdomain.com/api/v2/form_inquiries/update" \ -H "X-Api-Key: your-api-key-here" \ -d "inquiry_id=344" \ -d "inquiry_status=1" \ -d "inquiry_notes=Replied+via+email+on+April+3rd"
Example Response
{
"status": "success",
"message": {
"inquiry_id": "344",
"inquiry_email": "jane@example.com",
"inquiry_ip": "203.0.113.42",
"inquiry_user_id": "0",
"inquiry_form": "contact_form",
"inquiry_content": "Hello, I have a question.",
"inquiry_status": "1",
"inquiry_archived": "0",
"inquiry_notes": "Replied via email on April 3rd",
"url_origin": "https://www.yourdomain.com/about/contact",
"date_submitted": "20260403120000",
"user_consent": ""
}
}Delete a Form Inquiry
Example Request
curl -X DELETE "https://www.yourdomain.com/api/v2/form_inquiries/delete" \ -H "X-Api-Key: your-api-key-here" \ -d "inquiry_id=344"
Example Response
{
"status": "success",
"message": "form_inquiries record was deleted"
}