All queries to the Broadcasting API must be served via POST, with the content type application/json and need to be presented in this form:

https://api.chatfuel.com/bots/<BOT_ID>/users/<USER_ID>/send?chatfuel_token=<TOKEN>&chatfuel_block_name=<BLOCK_NAME>&<USER_ATTRIBUTE_1>=<VALUE_1>&<USER_ATTRIBUTE_2>=<VALUE_2>
  • <TOKEN> — A unique secret token obtained for each bot. You are able to find and reset the token in Configure tab of the dashboard at any time.
  • <USER_ID>{{messenger user id}} attribute that you should get from a JSON plugin call prior to sending a message. {{chatfuel user id}} and {{fb_id}} are accepted as well.
  • <BOT_ID> — ID of the bot you want to send the message from.
  • <BLOCK_NAME> — URL-encoded name of the block you want to send to a user. You can also use <BLOCK_ID> — ID of the block you want to send to a user, instead.
  • <USER_ATTRIBUTE>=<VALUE> — Name and value of a user attribute you want to set up before rendering the block.

The response contains a JSON object, which always has a Boolean field success and may have an optional String field result with a human-readable description of the result. If success equals true, the request was successful. In the case of an unsuccessful request, success equals false and the error is explained in the result field.

Note:

  • You can send up to 25 RPS per bot to the Broadcasting API.
  • All parameters starting with chatfuel_ are reserved and should not be used.
Did this answer your question?