Setup Bot - Early Access

Resource

https://api.infobip.com/ccaas/1/bots

Parameters

Use this method to setup a new bot.

Property name Type Description
*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 - bots 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 enabled status (TRUE, FALSE). If not provided, bot will be set to default: TRUE

Request Example

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

{
    "displayName": "My Whatsapp Bot",
    "webhookUrl": "www.webhookurl.com/link1",
    "destination": "447492263897",
    "channel": "WHATSAPP",
    "messagePersistencePolicy": "PERSIST_ALL",
    "enabled": true
}
					
				

Response

					{
    id: "309BB921757DEAC9BE79EC6259B31C8A",
    "displayName": "My Whatsapp Bot",
    "webhookUrl": "www.webhookurl.com/link1",
    "destination": "447492263897",
    "channel": "WHATSAPP",
    "messagePersistencePolicy": "PERSIST_ALL",
    "enabled": true
}
					
				
					{
    "statusCode": "ERROR",
    "message": "Required request body is missing or not valid"
}