Update Bot - Early Access

Resource

https://api.infobip.com/ccaas/1/bots/{botId}

Parameters

Use this method to update bot.

Property name Type Description
*botId string  Required - Bot id to update.
*displayName string Required - Bot name to be displayed, 255 characters max.
*webhookUrl string Required - webhook url on your callback server on which the message will be sent, 2000 characters max.
*destination string Required - bot destination telephone number or FacebookMessengerId. 255 characters max.
*channel string Required - bots channel (SMS, VIBER, FACEBOOK_MESSENGER, WHATSAPP)
messagePersistencePolicy string Optional message persisting (PERSIST_ALL, PERSIST_NONE). If set to PERSIST_NONE, messages exchanged between customers and bot will not be persisted to the database and not visible to agents once they take over the conversation. Default: PERSIST_ALL.
enabled boolean Possible bot status (TRUE, FALSE). if not provided, bot will be set to default TRUE

Request Example

					PUT /ccaas/1/bots/97457D13B1FC79AF3C1A1096AE7E77AB HTTP/1.1
Host: api.infobip.com
Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
Accept: application/json

{
    "displayName": "New Whatsapp Bot",
    "webhookUrl": "www.newwebhookurl.com/newlink",
    "destination": "447492263897",
    "channel": "WHATSAPP",
    "messagePersistencePolicy": "PERSIST_ALL",
    "enabled": false
}
					
				

Response

					{
    id: "97457D13B1FC79AF3C1A1096AE7E77AB",
    "displayName": "New Whatsapp Bot",
    "webhookUrl": "www.newwebhookurl.com/newlink",
    "destination": "447492263897",
    "channel": "WHATSAPP",
    "messagePersistencePolicy": "PERSIST_ALL",
    "enabled": false
}
					
				
					{
  "statusCode": "ERROR",
  "message": "Invalid id '97457D13B1FC79AF3C1A1096AE7E77AB' given! No such entity exists."
}
					
				
					{
    "statusCode": "ERROR",
    "message": "Required request body is missing or not valid"
}
					
				
					{
    "statusCode": "ERROR",
    "message": "name cannot be null"
}
					
				

Note

Not all bot properties can be updated. Destination and Channel cannot be changed once the bot is created.

If the conversation with a bot is active and messagePersistencePolicy is changed, saved messages will not be affected.