API Reference - Website Contacts
Link: https://support.brilliantdirectories.com/support/solutions/articles/12000108117
← Back to API Reference | Getting Started
Website Contacts
Website Contacts capture inbound inquiries submitted through the site's contact forms. Each record stores the sender's details, the message content, submission metadata (IP address, page, country), and a status field that tracks whether the inquiry has been responded to. These are distinct from the member-level Contacts resource (contacts), which stores your members' personal address books.
website_contacts — DB table: website_contactsThe Website Contact Object
| Field | Type | Description |
|---|---|---|
ID | integer | Unique contact inquiry ID (primary key, read-only) |
NAME | string | Full name of the person who submitted the inquiry; max 255 characters required on create |
EMAIL | string | Email address of the submitter; max 255 characters required on create |
PHONE | string | Phone number of the submitter; max 255 characters |
CONTACT_TYPE | string | The type or source of this inquiry (EG general, support); maps to the contact form type; max 255 characters required on create |
COMMENTS | text | The message body or comments submitted by the sender |
HTTPR | text | The HTTP referrer URL from which the form was submitted |
DATE | string | Submission date stored as a 14-character string (format YYYYMMDDHHMMSS); max 14 characters |
IP | string | IP address of the submitter; max 244 characters |
RESPONSE | text | Admin response message sent back to the submitter |
WEBSITE | string | Website URL provided by the submitter; max 255 characters |
TOKEN | string | Security or tracking token associated with this submission; max 255 characters |
COOKIE | string | Cookie value captured at the time of submission for tracking purposes; max 255 characters |
COUNTRY | string | Country of the submitter, typically detected from IP geolocation; max 255 characters |
PAGE | string | The page path on which the contact form was submitted; max 255 characters |
CATEGORY | string | Additional category classification for this inquiry; max 255 characters |
COMPANY | string | Company name provided by the submitter; max 255 characters |
TITLE | string | Job title or subject line provided by the submitter; max 255 characters |
STATUS | string | Current status of this inquiry (EG New, Responded); defaults to New; max 255 characters |
MESSAGE_ID | integer | Reference to a related message record ID, if applicable |
USER_ID | integer | Reference to the member user ID associated with this inquiry, if applicable |
RESPONSE_BY | string | Name or identifier of the admin who responded to this inquiry; max 255 characters |
RESPONSE_DATE | string | Date and time the response was sent; max 255 characters |
NOTES | text | Internal admin notes about this inquiry (not visible to the submitter) |
List Website Contacts
Example Request
curl -X GET "https://www.yourdomain.com/api/v2/website_contacts/get?limit=25" \ -H "X-Api-Key: your-api-key-here"
Example Response
{
"status": "success",
"message": [
{
"ID": "1",
"NAME": "Jane Smith",
"EMAIL": "jane@example.com",
"PHONE": "5555551234",
"CONTACT_TYPE": "general",
"COMMENTS": "I have a question about membership options.",
"HTTPR": "https://www.yourdomain.com/contact",
"DATE": "20260403120000",
"IP": "203.0.113.45",
"RESPONSE": "",
"WEBSITE": "",
"TOKEN": "",
"COOKIE": "",
"COUNTRY": "US",
"PAGE": "/contact",
"CATEGORY": "",
"COMPANY": "Acme Inc",
"TITLE": "",
"STATUS": "New",
"MESSAGE_ID": "0",
"USER_ID": "0",
"RESPONSE_BY": "",
"RESPONSE_DATE": "",
"NOTES": ""
}
],
"total": "42",
"current_page": 1,
"total_pages": 2,
"next_page": "MipfKjI1"
}Retrieve a Website Contact
Example Request
curl -X GET "https://www.yourdomain.com/api/v2/website_contacts/get/1" \ -H "X-Api-Key: your-api-key-here"
Example Response
{
"status": "success",
"message": [
{
"ID": "1",
"NAME": "Jane Smith",
"EMAIL": "jane@example.com",
"PHONE": "5555551234",
"CONTACT_TYPE": "general",
"COMMENTS": "I have a question about membership options.",
"HTTPR": "https://www.yourdomain.com/contact",
"DATE": "20260403120000",
"IP": "203.0.113.45",
"RESPONSE": "",
"WEBSITE": "",
"TOKEN": "",
"COOKIE": "",
"COUNTRY": "US",
"PAGE": "/contact",
"CATEGORY": "",
"COMPANY": "Acme Inc",
"TITLE": "",
"STATUS": "New",
"MESSAGE_ID": "0",
"USER_ID": "0",
"RESPONSE_BY": "",
"RESPONSE_DATE": "",
"NOTES": ""
}
],
"total": "1",
"current_page": 1,
"total_pages": 1
}Create a Website Contact
Example Request
curl -X POST "https://www.yourdomain.com/api/v2/website_contacts/create" \ -H "X-Api-Key: your-api-key-here" \ -d "NAME=Jane+Smith" \ -d "EMAIL=jane@example.com" \ -d "PHONE=5555551234" \ -d "CONTACT_TYPE=general" \ -d "COMMENTS=I+have+a+question+about+membership+options." \ -d "COMPANY=Acme+Inc"
Example Response
{
"status": "success",
"message": {
"ID": "1",
"NAME": "Jane Smith",
"EMAIL": "jane@example.com",
"PHONE": "5555551234",
"CONTACT_TYPE": "general",
"COMMENTS": "I have a question about membership options.",
"HTTPR": null,
"DATE": null,
"IP": null,
"RESPONSE": null,
"WEBSITE": null,
"TOKEN": null,
"COOKIE": null,
"COUNTRY": null,
"PAGE": null,
"CATEGORY": null,
"COMPANY": "Acme Inc",
"TITLE": null,
"STATUS": null,
"MESSAGE_ID": null,
"USER_ID": null,
"RESPONSE_BY": null,
"RESPONSE_DATE": null,
"NOTES": null
}
}Update a Website Contact
Example Request
curl -X PUT "https://www.yourdomain.com/api/v2/website_contacts/update" \ -H "X-Api-Key: your-api-key-here" \ -d "ID=1" \ -d "STATUS=Responded" \ -d "RESPONSE=Thank+you+for+reaching+out.+A+team+member+will+follow+up+shortly." \ -d "RESPONSE_BY=Admin" \ -d "NOTES=Forwarded+to+sales+team."
Example Response
{
"status": "success",
"message": {
"ID": "1",
"NAME": "Jane Smith",
"EMAIL": "jane@example.com",
"PHONE": "5555551234",
"CONTACT_TYPE": "general",
"COMMENTS": "I have a question about membership options.",
"HTTPR": "",
"DATE": "20260403120000",
"IP": "203.0.113.45",
"RESPONSE": "Thank you for reaching out. A team member will follow up shortly.",
"WEBSITE": "",
"TOKEN": "",
"COOKIE": "",
"COUNTRY": "US",
"PAGE": "/contact",
"CATEGORY": "",
"COMPANY": "Acme Inc",
"TITLE": "",
"STATUS": "Responded",
"MESSAGE_ID": "0",
"USER_ID": "0",
"RESPONSE_BY": "Admin",
"RESPONSE_DATE": "",
"NOTES": "Forwarded to sales team."
}
}Delete a Website Contact
Example Request
curl -X DELETE "https://www.yourdomain.com/api/v2/website_contacts/delete" \ -H "X-Api-Key: your-api-key-here" \ -d "ID=1"
Example Response
{
"status": "success",
"message": "website_contacts record was deleted"
}