Docs »

API »

Endpoints »

Bots

Run Bot Behavior

POST /rest/bots/behavior/<id>/run.json

Execute the specified bot Custom API Request behavior. The response will provide the values from the behavior’s dictionary at conclusion. A common strategy is to use the Set custom placeholder action in the bot behavior in order to send information back to the API caller.

The parameters are the public variables defined on the behavior (if any).

Field Type
var_* mixed

Example:


$postfields = array(
  	array('var_name','Jeff@WGM'),
  	array('var_picklist','Red'),
  	array('var_number',1234),
  	array('var_date',"tomorrow 5pm"),
  	array('var_bool',1),
  	array('var_worker',1),
  	array('var_tickets',json_encode(array(1024,1025,1026))),
);
$out = $cerb->post($base_url . 'bots/behavior/123/run.json', $postfields);