Adding chat api endpoint.