Botsociety offers you an API to programatically import and export your design data. It's a standard JSON API. You can find the complete API reference here.
In order to use the API, you need to request your User ID and API Key, which will be requested for authentication. To do that, go the API section inside Botsociety.
Click on to generate a new API key.
You can now use both the user_id and the API key generated in this page in the header of your API calls, as described in the API reference.
While using the API, you will encounter the attribute conversation_id. You can find the current conversation's ID on the right side of the Build mode inside your design:
Webhooks [beta only]
Botsociety allows you to set up webhooks in order to trigger your integration. Once you create a webhook, you will see the option to trigger it in the build mode. Webhooks are useful because they will tell you when a design is updated, and therefore when to call the Botsociety API to retrieve updated data.
⚠️ Attention Webhooks are available to our beta users, as a relatively new feature. If you would like to give us feedback (for example, if you would like to trigger your webhooks based on other events that are not a click), drop us an email at email@example.com
Create a webhook
Go the API section inside Botsociety. Scroll down, and you will see a section called webhooks. For each webhook you can set up:
The name will be shown in the Build page. The URL is the URL that Botsociety will call whe the webhook is triggered. Botsociety will call the URL in GET with the following parameters:
user_id=the user who triggered the conversation
So for example if you create a webhook called 'Mytech' with url 'https://mytech.com/webhook', Botsociety will call it in GET as follows when the webhook is triggered:
Trigger a webhook
Go to the build page of the design file that you would like to export. Click on 'My own codebase' on the right hand side. You will seee the list of webhooks that you created. Click the 'Send' button to trigger your webhook.
Botsociety is available as an NPM package, which you can find here.
Follow the instructions on Github to install and use the package.