Yes, even if the user was anonymous.
There is not REST API that takes a chat log, but their is a training API