API allows you to send any block or flow from via a POST API request. It also allows you to send blocks to contacts with specific properties.
Here's an example of a typical request:
javascript
https://api.chatfuel.com/bots/<BOT_ID>/users/<USER_ID>/send?chatfuel_token=<TOKEN>&chatfuel_flow_name=<FLOW_NAME>&<USER_ATTRIBUTE_1>=<VALUE_1>&<USER_ATTRIBUTE_2>=<VALUE_2>
With all the data filled in, your request should look something like this:
javascript
https://api.chatfuel.com/bots/612899e1a6ec6f5e0f2fe556/users/5949225915148689/send?chatfuel_token=jPvO73OSpKfQD9hwEb6EnrdgUwAHKQVEHHsNA25IbXEcVLA68myGXzjdXODaGhyS&chatfuel_block_id=63809fc68e17052f16c3ca01

Parameters and values


Required

Parameters:
  • chatfuel_token
  • One of these routing parameters:
    • chatfuel_flow_name
    • chatfuel_block_name
    • chatfuel_block_id
URL values:
  • <BOT_ID>
  • <USER_ID>

Optional

You can add these to customize your request:
  • <USER_ATTRIBUTE>=<VALUE> - Sets custom user properties

List of available parameters and values

Parameter
Description
Type
chatfuel_token
Unique token for your company
Required
<BOT_ID>
Your company ID
Required
<USER_ID>
ID of a contact you want to message
Required
chatfuel_flow_name
Name of your flow
Required*
chatfuel_block_name
Name of your block
Required*
chatfuel_block_id
ID of your block or flow
Required*
chatfuel_message_tag
Tag for sending messages ouside the 24 hour window 🡽
Optional
<USER ATTRIBUTE>
Name and value of a contact property (Example: customertype=new)
Optional
tags
List of tags to set for a contact (Example: tags=Helen,female,new_customer). New tags will replace existing ones.
Optional
* You must include one of these three routing parameters in your request: chatfuel_flow_namechatfuel_block_name, or chatfuel_block_id

How to get Chatfuel token


  1. Go to SettingsAPI.
  1. Copy API key to copy your token.
If you need a new token, click Reset.
Image without caption
Image without caption

How to get company ID


A company ID is a unique combination of numbers and letters. It looks like this: 612899e1a6ec6f5e0f2fe556. To get it:
  1. Open AI & Automation.
  1. Click on the address bar in your browser.
  1. Copy your company ID.
Image without caption

How to get a user ID


There are two types of IDs you can use for the <USER_ID> URL value: user id or chatfuel user id. The easiest way to get them is to look them up in the People tab.
  1. Open Live chat.
  1. Click on your name in the list.
  1. Find and copy either a user id or chatfuel user id.

How to get ID for block or flow


A block or a flow ID looks similar to a company ID: 61fbd2f0a2d3e66f2ed59de7.
  1. Open AI & Automation.
  1. Open your flow.
  1. Click on the address bar in your browser.
  1. Copy your flow ID.
For blocks:
  1. Choose your block.
  1. Copy the ID next to the flow ID.
Image without caption
Image without caption

Rules


  • You can send up to 25 RPS per bot to the Broadcasting API
  • All parameters starting with chatfuel_ are reserved and should not be use