Initialize Chat Contact
Initialize a visitor contact for a widget. Obtain the widget identifier from data[].id in List Widgets and send it as widgetId. The response returns the contact under data; save data.id for later contact operations.
Start with the required widgetId field. The other fields add optional visitor details or context; you do not need to copy every field from the example to initialize a contact. Supply only information your integration has and needs.
Request
- Base URL: https://developers.chatway.app/api/v1
- URL: https://developers.chatway.app/api/v1/contacts/initialize
- Auth: API key in header X-API-KEY
Request body
Example request
{
"widgetId": "eouqtiupanm6uvglwshy",
"message": {
"urls": [
"https://example.com/page"
],
"content": "Hello world"
}
}Response
To send a visitor message for the returned contact, call Create Visitor Message with the same widget, the returned ID as contact_id, and your message in content. That endpoint uses widget_id, while this endpoint uses widgetId. Keep this spelling difference when building requests.
Changes
No recorded changes to this operation across all 1 revision of this API.