Automatic chat renaming via API in a Bubble.io app

Hi there. I want to do an API call that renames the conversation after the first message is created and response is returned in a Bubble.io app. any idea how to achieve it? thanks in advance!