Skip to content

Contact Created
Webhook

Request

Sent when 3Chat creates a new contact. A contact can be created in any of these situations:

  • A developer calls the Agent API operation Send Message to Agent for a person who does not yet have a contact record.
  • A developer calls the Channel API operation Send Message for a person who does not yet have a contact record.
  • After a channel is connected to 3Chat, a previously unknown person sends their first inbound message through that channel.

3Chat delivers this outbound event to the HTTPS webhook URL configured by the developer in 3Chat Open Platform. Subscribe to BUTLER_VISITOR_CREATED to receive it.

Headers
TENANT_IDstringrequired

ID of the tenant associated with this event.

Example:aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee
STAFF_IDstring

ID of the staff member associated with the event, when applicable.

Example:123123
x-nct-timestringrequired

Timestamp when the event was generated.

Example:1750351569887
business-typestringrequired

Business type code for the Contact Created event.

Example:15009
Value:"15009"
Bodyapplication/jsonrequired

JSON payload delivered to the configured webhook URL.

requestIdstring, (uuid)required

Unique identifier for this webhook delivery.

Example:"03703d30-50f2-4103-bdb6-8aa331f36cc5"
businessTypeintegerrequired

Business type code. The value is 15009 for Contact Created.

Example:15009
Value:15009
dataobject(ContactWebhookData)required

The contact record included in a contact webhook event.

Example:
{ "id": "visitor_001", "workSpaceId": "ws_abc", "channelId": "ch_livechat_01", "name": "Wang Xiaoming", "email": "xiaoming.wang@example.com", "phoneNumber": "+86-13800138000", "language": "zh-CN", "accountId": "acc_1001", "lastVisitIp": "203.0.113.45", "browserAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7)", "fistTouch": "https://example.com/landing?utm=campaign", "lastTouch": "https://example.com/product/1", "externalReferrerLast": "google.com", "landingPageLast": "/product/1", "utmSourceLast": "newsletter", "firstVisitTime": 1690000000, "lastVisitTime": 1690003600, "totalVisits": 5, "externalUserId": "wo56kvDgAA5VmZqvgsX8d-cDmSDXCZXQ", "botUserId": "abc@xinheyun.com", "imBotId": "1688856053740892", "orgId": "6887410937e2124b6d6265a1", "createdTime": 1690000000, "updatedTime": 1690003600, "extendMap": { "preferredContact": "email", "customerTier": "gold" } }
Payload
{ "requestId": "03703d30-50f2-4103-bdb6-8aa331f36cc5", "businessType": 15009, "data": { "id": "visitor_001", "workSpaceId": "ws_abc", "channelId": "ch_livechat_01", "name": "Wang Xiaoming", "email": "xiaoming.wang@example.com", "phoneNumber": "+86-13800138000", "language": "zh-CN", "accountId": "acc_1001", "lastVisitIp": "203.0.113.45", "browserAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7)", "fistTouch": "https://example.com/landing?utm=campaign", "lastTouch": "https://example.com/product/1", "externalReferrerLast": "google.com", "landingPageLast": "/product/1", "utmSourceLast": "newsletter", "firstVisitTime": 1690000000, "lastVisitTime": 1690003600, "totalVisits": 5, "externalUserId": "wo56kvDgAA5VmZqvgsX8d-cDmSDXCZXQ", "botUserId": "abc@xinheyun.com", "imBotId": "1688856053740892", "orgId": "6887410937e2124b6d6265a1", "createdTime": 1690000000, "updatedTime": 1690003600, "extendMap": { … } } }

Responses

Webhook event received successfully.