Test your Livechat trigger setup with external service using this endpoint. Make sure that you have created the trigger. Permission required: view-livechat-manager. Rate limit applies: 15 requests per 60000 milliseconds.
The authToken of the authenticated user.
The userId of the authenticated user.
{
"webhookUrl": "https://webhook.site/2f5df6a1-592c-4d9f-8f36-ab15ca3caf23",
"timeout": "10000",
"fallbackMessage": "Request timeout"
}Enter the external webhook URL.
Enter the time in milliseconds to wait for the external service to respond before cancelling the request.
Enter the message to send after the timeout ends.
OK
Rocket.Chat sends a request to the webhook containing a payload of the visitor metadata. The webhook returns the response as demonstrated in this example.
{
"triggerId": "test-trigger",
"response": {
"statusCode": 200,
"contents": [
{
"msg": "Welcome to our support center, Morgan! How can we assist you today?",
"order": 0
},
{
"msg": "Feel free to ask any questions you have. We're here to help!",
"order": 1
}
]
},
"success": true
}Bad Request
{
"success": false,
"error": "must have required property 'webhookUrl' [invalid-params]",
"errorType": "invalid-params"
}Unauthorized
{
"status": "error",
"message": "You must be logged in to do this."
}