Contacts
ChatContact

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.

post/contacts/initialize

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

widgetIdstring required

Widget identifier

browser_typestring nullable
operating_systemstring nullable
ipstring nullable
is_simulatorboolean nullable

Optional boolean used by the Chatway widget. This endpoint validates it but does not store it, so it has no effect on the created contact. Omit it.

languagestring nullable
namestring nullable
timezonestring nullable
locationstring nullable
countrystring nullable
country_dialing_codestring nullable
emailstring email nullable
preferred_chat_language'auto-detect' | 'en' | 'pt' | 'es' | 'de' | 'fr' | 'ja' | 'ru' | 'da' | 'fi' | 'it' | 'tr' | 'zh' | 'ab' | 'ace' | 'ach' | 'af' | 'sq' | 'alz' | 'am' | 'ar' | 'hy' | 'as' | 'awa' | 'ay' | 'az' | 'ban' | 'bm' | 'ba' | 'eu' | 'btx' | 'bts' | 'bbc' | 'be' | 'bem' | 'bn' | 'bew' | 'bho' | 'bik' | 'bs' | 'br' | 'bg' | 'bua' | 'yue' | 'ca' | 'ceb' | 'ny' | 'zh-TW' | 'cv' | 'co' | 'crh' | 'hr' | 'cs' | 'din' | 'dv' | 'doi' | 'dov' | 'nl' | 'dz' | 'eo' | 'et' | 'ee' | 'fj' | 'fil' | 'fr-FR' | 'fr-CA' | 'fy' | 'ff' | 'gaa' | 'gl' | 'ka' | 'el' | 'gn' | 'gu' | 'gv' | 'ht' | 'cnh' | 'ha' | 'haw' | 'he' | 'iw' | 'hi' | 'hmn' | 'hu' | 'hrx' | 'is' | 'ig' | 'ilo' | 'id' | 'ga' | 'jv' | 'jw' | 'kn' | 'pam' | 'kk' | 'km' | 'cgg' | 'rw' | 'ktu' | 'gom' | 'ko' | 'kri' | 'ku' | 'ckb' | 'ky' | 'lo' | 'ltg' | 'la' | 'lv' | 'lij' | 'li' | 'ln' | 'lt' | 'lmo' | 'luo' | 'lb' | 'lg' | 'mk' | 'mai' | 'mak' | 'mg' | 'ms' | 'ms-Arab' | 'ml' | 'mt' | 'mi' | 'mr' | 'mni-Mtei' | 'min' | 'lus' | 'mn' | 'my' | 'nr' | 'new' | 'ne' | 'no' | 'nus' | 'oc' | 'or' | 'om' | 'pag' | 'pap' | 'ps' | 'fa' | 'pl' | 'pt-PT' | 'pt-BR' | 'pa' | 'qu' | 'rom' | 'ro' | 'rn' | 'sm' | 'sg' | 'sa' | 'gd' | 'nso' | 'sr' | 'st' | 'crs' | 'shn' | 'sn' | 'scn' | 'szl' | 'sd' | 'si' | 'sk' | 'sl' | 'so' | 'su' | 'sw' | 'ss' | 'sv' | 'tl' | 'tg' | 'ta' | 'tt' | 'te' | 'tet' | 'th' | 'ti' | 'ts' | 'tn' | 'tk' | 'ak' | 'uk' | 'ur' | 'ug' | 'uz' | 'vi' | 'cy' | 'xh' | 'yi' | 'yo' | 'yua' | 'zu' | 'zh-CN' | 'ak' | 'gom' | 'null' nullable
phonestring nullable
marketplace_channelstring nullable
marketplace_originstring nullable
is_form_auto_submittedboolean nullable

Optional boolean used by the Chatway widget. This endpoint validates it but does not store it, so it has no effect on the created contact. Omit it.

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.

messagestring required

Changes

No recorded changes to this operation across all 1 revision of this API.