Creates or updates a contact for a visitor. If a contact with the same externalId or email exists, it will be updated. The visitor will be linked to the contact.
id?string
Optional contact ID to update when linking the visitor to an existing contact.
Format
ulidvisitorIdstring
The visitor ID to link to the contact.
Format
ulidexternalId?string
External identifier for the contact. Used to find existing contacts.
name?string
The contact's name.
email?string
The contact's email address. Used to find existing contacts.
Format
emailimage?string
The contact's avatar/image URL.
Format
urimetadata?
Additional custom metadata for the contact.
contactOrganizationId?string
The contact organization ID this contact belongs to.
Format
ulidResponse Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://api.cossistant.com/v1/v1/contacts/identify" \ -H "Content-Type: application/json" \ -d '{ "visitorId": "01JG000000000000000000000" }'{
"contact": {
"id": "01JG000000000000000000000",
"externalId": "user_12345",
"name": "John Doe",
"email": "john.doe@example.com",
"image": "https://example.com/avatar.png",
"metadata": {
"plan": "premium",
"role": "admin"
},
"contactOrganizationId": "01JG000000000000000000000",
"websiteId": "01JG000000000000000000000",
"organizationId": "01JG000000000000000000000",
"userId": "01JG000000000000000000000",
"createdAt": "2021-01-01T00:00:00.000Z",
"updatedAt": "2021-01-01T00:00:00.000Z"
},
"visitorId": "01JG000000000000000000000"
}{
"error": "string",
"message": "string"
}{
"error": "string",
"message": "string"
}{
"error": "string",
"message": "string"
}{
"error": "string",
"message": "string"
}