Register Livechat Visitor
- Print
- DarkLight
- PDF
Register Livechat Visitor
- Print
- DarkLight
- PDF
Article summary
Did you find this summary helpful?
Thank you for your feedback
Post
/api/v1/livechat/visitor
Register a visitor's information before creating a new Omnichannel room. You can set basic information such as name, phone, custom fields, and the initial department.
Body parameters
Example 1
{
"visitor": {
"name": "Livechat Visitor",
"email": "[email protected]",
"department": "Support",
"token": "iNKE8a6k6cjbqWhWd",
"phone": "55 51 5555-5555",
"customFields": [
{
"key": "address",
"value": "Rocket.Chat street",
"overwrite": true
}
]
}
}
object
visitor
objectRequired
Enter the body parameters in the visitor
object.
name
string
The visitor's name.
email
string
The visitor's email.
department
string
The department that the visitor wants to register to.
token
string Required
Enter a random unique string as the visitor token.
phone
string
The visitor's phone number.
username
string
The agent's username.
customFields
Array of object
Enter the custom field key, value, and whether you want to overwrite this information.
object
key
string
Exampleaddress
value
string
ExampleRocket.Chat street
overwrite
boolean
Responses
200
Success Example
{
"visitor": {
"_id": "642fc15452492a08c3a756de",
"username": "guest-19",
"status": "online",
"ts": "2023-04-07T07:08:04.375Z",
"_updatedAt": "2023-11-03T08:23:23.449Z",
"name": "Livechat Visitor",
"phone": [
{
"phoneNumber": "55 51 5555-5555"
}
],
"token": "iNKE8a6k6cjbqWhWd",
"visitorEmails": [
{
"address": "[email protected]"
}
],
"department": "64181a0728384134ed600dcc"
},
"success": true
}
object
visitor
object
_id
string
username
string
status
string
ts
string
_updatedAt
string
name
string
phone
Array of object
object
phoneNumber
string
token
string
visitorEmails
Array of object
object
address
string
department
string
success
boolean
400
Bad Request
Example 1
{
"success": false,
"error": "Match error: Missing key 'visitor'"
}
Example 2
{
"success": false,
"error": "Match error: Missing key 'token' in field visitor"
}
object
success
boolean
error
string
Was this article helpful?