Visitor and conversation endpoints sit underneath the widget and inbox workflow.
Use these endpoints when you need lower-level customer messaging integration details, especially for identity and CRM context sync tied to a widget visitor.
Typical uses
- Create or update visitor identity and profile data
- Push custom contact metadata from your product into HAL
- Link a visitor to one or more CRM companies
- Update company stage and company metadata during identify
The route most customers want
If you want your own app or backend to send custom contact or company information into HAL, use POST /api/widget/identify.
POST https://api.chatwithhal.com/api/widget/identifyThis route is the supported integration surface for enriching a widget visitor with known customer identity and CRM context.
Request fields
app_idorproject_id: the HAL projectvisitor_id: your stable identifier for the current visitor session or useruser_id,email,name: known identity fieldsmetadata: custom contact-level properties to merge into HAL contact contextcompany_ids: one or more existing HAL company IDs to linkcompany: optional company object withid,name,stage, andmetadatastage_update_mode: optional override for CRM stage precedenceuser_hash: optional verification signature when identity verification is enabled
What HAL does with the data
metadatais merged into the linked contact metadata when the visitor can be mapped to a contactcompany.metadatais merged into the linked company metadatacompany.stagecan move the linked company in CRM, subject to stage precedence rulescompany_idslinks the visitor’s contact to existing HAL companies
Example request
{
"app_id": "proj_123",
"visitor_id": "user_456",
"email": "alice@acme.com",
"name": "Alice",
"metadata": {
"plan": "enterprise",
"role": "admin"
},
"company": {
"id": "acme",
"name": "Acme Inc",
"stage": "Qualified",
"metadata": {
"arr_band": "50k-100k",
"crm_owner": "Sam"
}
}
}Use set-properties for follow-up updates
If you already identified the visitor and only need to append or refresh custom visitor/contact properties, use POST /api/widget/set-properties.
{
"app_id": "proj_123",
"visitor_id": "user_456",
"properties": {
"feature_flag": "beta",
"last_seen_area": "billing"
}
}This route merges into visitor and linked contact metadata. It is useful for product context, but it does not update company metadata.
CRM stage precedence
Widget-facing stage updates accept an optional stage_update_mode field on visitor identify and stage-setting requests.
advance_onlyis the default and prevents widget updates from moving a company backward when the CRM already has a later stageexactapplies the requested stage exactly and should be reserved for authoritative backend syncs
The project default can be configured in Settings → Widget → CRM Stage Sync. Per-request values still override that default when you need different behavior.
What this is not
The current public API key surface under /api/v1 does not yet expose visitor/company metadata write routes. Use the widget-facing identify flow when you need to push end-user contact and company context.
Guidance
Prefer the higher-level REST API and MCP docs first. Drop to this layer when you need deeper visitor-specific integration behavior tied to a customer-facing widget session.