Skip to main content
POST
/
visitor-identification
/
v3
/
tokens
/
create
cURL
curl --request POST \
  --url https://api.hubapi.com/visitor-identification/v3/tokens/create \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "email": "visitor-email@example.com",
  "firstName": "Gob",
  "lastName": "Bluth"
}'
{
  "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"
}

Supported products

Requires one of the following products or higher.
Marketing HubMarketing Hub -Professional
Sales HubSales Hub -Professional
Service HubService Hub -Professional
Content HubContent Hub -Professional
This API requires one of the following scopes:
conversations.visitor_identification.tokens.create

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Body

application/json

Information used to generate a token

email
string
required

The email of the visitor that you wish to identify

firstName
string

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.

lastName
string

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

The identification token to be passed to the Conversations JS API to identify the visitor

token
string
required