A key feature of Qwil is the versatility that our 40 APIs provide users. One very useful example is automating messages to clients. Whether you're sending a Financial Report or simply sending a New Years' greeting, you can automate it.
This guide details how it is possible for a staff member to send an automated message to any of their clients, then archive the chat so it doesn't fill their inbox. If the client replies, this chat will be removed from the archive and return to the inbox.
Master User API Keys are very powerful and you should treat them as you would a password. It is best practice to revoke them if they are not being used and allow the fewest permissions possible.
Setting up the API
This automation requires the use of a Master User API Key and Secret. For a detailed guide on how to create a Master User API Key and Secret click here. When setting up the API, you will be given a choice in the permissions you grant. This API will only needs permission to perform write-only chat actions.
Once your Master User API key is set up, you will be able to begin the process of automating your accounts. For this automation, you need to be familiar with the following three endpoints:
This endpoint creates a new chat thread with the given title and members.
This endpoint sends a text message (including url links) to a chat from a member.
"reply_to_seq": "integer(min=0) (optional)",
This endpoint archives or unarchives a chat.
A combination of these endpoints can first create a chat, secondly, send a message to that chat and then archive the chat so it does not fill your inbox.