NOTE: This API is in early beta. We may change it without prior notice.

General Information

Chatfuel dashboard uses HTTP API to create/modify your bots and pages.
Base URL for all the API methods: https://dashboard.chatfuel.com/api/
All methods require an authorization token. You need to add this HTTP header to all your requests:

Authorization: Bearer {token}

This article only covers some of the API methods. You can use Developers Tools (i.e. Network tab in Chrome's Developer Tools) in your browser to check what other methods are available in the API. 

You can use any of the API methods that Chatfuel dashboard uses. Feel free to perform an action you're interested in in the dashboard and check what API method is used.

However, keep in mind that this API is designed primarily for internal use and is subject to change without prior notice.

How to Get a Token

In order to generate a Dashboard API token you need to click on "Dashboard API Token" button in your user menu. You'll then see a popup with a "Generate Token" button that you can use to generate a new token.

Keep in mind that you won't be able to retrieve a token again after you've generated it. You will only be able to revoke your current token and generate a new one instead. Therefore, make sure to write down your token and keep it safe.

Retrieving an Existing Bot ID

If you want to use this API to modify your existing bots, you will want to get their bot IDs. In order to do it you should open your bot in the Chatfuel dashboard and check the URL in your browser. You will find your Bot ID here:

Create an Empty Bot

In order to create a new bot you should send a POST request:

POST /bots
{
    "title": "Bot Title"
}


As a response you will receive an object describing your new bot:

{
    "success": true,
    "result": {
        "id": "{botId}",
        ...
    }
}

Clone a Bot

Even though this method is called "clone" a bot, it's closer to "copy to another" bot as it doesn't create a new cloned bot. You need to create a target bot manually and then copy the content from the original bot to the target.

POST /bots/{targetBotId}/clone_from/{originalBotId}

Generate an Invite link

POST /bots/{botId}/invite/{role}


Currently supported roles: ADMIN, EDITOR, MARKETER, OPERATOR, VIEWER.
As a response to this request, you will receive a description of your invite link:

{
    "success": true,
    "result": {
        "token": "{token}",
        ...
    }
}


You should use the token field from the response to get your invite link:

https://dashboard.chatfuel.com/#/invite/{token}

Disconnect a Chatfuel Bot from a Page

This method only works for pages that have a connected Chatfuel bot. There's no way for Chatfuel to connect/disconnect bots from other systems/platforms. This method should not be called on pages without a Chatfuel bot.

POST /pages/{pageId}/unbind

Connect a Chatfuel Bot to a Page

Keep in mind that you have to be an Admin of the page (Facebook Admin, not Chatfuel Admin) in order for this method to work.

POST /pages/{pageId}/bind/{botId}

Did this answer your question?