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.

Model name in URL: website_contacts — DB table: website_contacts

The Website Contact Object

FieldTypeDescription
IDintegerUnique contact inquiry ID (primary key, read-only)
NAMEstringFull name of the person who submitted the inquiry; max 255 characters required on create
EMAILstringEmail address of the submitter; max 255 characters required on create
PHONEstringPhone number of the submitter; max 255 characters
CONTACT_TYPEstringThe type or source of this inquiry (EG general, support); maps to the contact form type; max 255 characters required on create
COMMENTStextThe message body or comments submitted by the sender
HTTPRtextThe HTTP referrer URL from which the form was submitted
DATEstringSubmission date stored as a 14-character string (format YYYYMMDDHHMMSS); max 14 characters
IPstringIP address of the submitter; max 244 characters
RESPONSEtextAdmin response message sent back to the submitter
WEBSITEstringWebsite URL provided by the submitter; max 255 characters
TOKENstringSecurity or tracking token associated with this submission; max 255 characters
COOKIEstringCookie value captured at the time of submission for tracking purposes; max 255 characters
COUNTRYstringCountry of the submitter, typically detected from IP geolocation; max 255 characters
PAGEstringThe page path on which the contact form was submitted; max 255 characters
CATEGORYstringAdditional category classification for this inquiry; max 255 characters
COMPANYstringCompany name provided by the submitter; max 255 characters
TITLEstringJob title or subject line provided by the submitter; max 255 characters
STATUSstringCurrent status of this inquiry (EG New, Responded); defaults to New; max 255 characters
MESSAGE_IDintegerReference to a related message record ID, if applicable
USER_IDintegerReference to the member user ID associated with this inquiry, if applicable
RESPONSE_BYstringName or identifier of the admin who responded to this inquiry; max 255 characters
RESPONSE_DATEstringDate and time the response was sent; max 255 characters
NOTEStextInternal admin notes about this inquiry (not visible to the submitter)

List Website Contacts

GET /api/v2/website_contacts/get

Example Request

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

Example Response

Copy
{
  "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

GET /api/v2/website_contacts/get/{ID}

Example Request

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

Example Response

Copy
{
  "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

POST /api/v2/website_contacts/create

Example Request

Copy
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

Copy
{
  "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

PUT /api/v2/website_contacts/update

Example Request

Copy
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

Copy
{
  "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

DELETE /api/v2/website_contacts/delete

Example Request

Copy
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

Copy
{
  "status": "success",
  "message": "website_contacts record was deleted"
}