NOTE: This API is in early beta. It may be changed 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

We're working on a feature that will make it possible to generate a persistent token. 

While that's in progress, you can currently get a token with a 1-week lifetime from the browser console. Open any query to the https://dashboard.chatfuel.com/api/ in the Developer Tools' Network tab and copy the string after 'Bearer'.

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?