v14

latestOpenAPI 3.0.0raw.githubusercontent.com2026-05-279719892.3 MB
Basic

Generate visitor token

Generate an identification token for a website visitor who has been authenticated using your own system. An identification token returned from this API can be used to pass information about your already-authenticated visitor to the chat widget, so that it treats the visitor as a known contact. This allows support agents to recognize and assist the visitor more effectively.

post/visitor-identification/2026-03/tokens/create

Request body

emailstring required

The email of the visitor that you wish to identify

firstNamestring

The first name of the visitor that you wish to identify. This value will only be set in HubSpot for new contacts and existing contacts where first name is unknown. Optional.

hsCustomerAgentContextobject required
lastNamestring

The last name of the visitor that you wish to identify. This value will only be set in HubSpot for new contacts and existing contacts where last name is unknown. Optional.

Response

successful operation

tokenstring required

An identification token that allows the visitor to be treated as a known contact.