Create Widget

POST https://api.jelou.ai/v1/widget/create

Headers

NameTypeDescription

authorization*

token | basic

Company credentials

Request Body

NameTypeDescription

bot*

Object

Bot payload

widget*

Object

Widget Settings and Styles

credentials.blacKList

String[]

credentials.whiteList

String[]

{
  "message": [
    "Widget was created successfully!"
  ],
  "statusMessage": "success",
  "status": 1,
  "data": {
    "Bot": <Bot_Payload>,
    "Widget": <Widget_Payload>,
    "ApiKey": {
      "id": <number>,
      "state": <1 | 0>,
      "key": <apikey>,
      "widgetId": <widgetId>,
      "updatedAt": <Date>,
      "createdAt": <Date>
    }
  }
}
// Bot exists
curl --request POST \
  --url 'https://api.jelou.ai/v1/widget/create' \
  --header 'Content-Type: application/json' \
  --header 'authorization: Basic <TOKEN_COMPANY>' \
  --data '{
	"bot": {
		"id": <botId>
	},
	"widget": {
		"properties": {
			"type": "group"
		},
		"theme": {
			"position": "br",
			"status": true,
			"font": {
				"googlefont": true,
				"name": "Manrope"
			},
			"vars": {
				"color": {
					"primary": "#910018",
					"primaryDarker": "#933434",
					"secondary": "#E23E48",
					"secondaryLight": "#FDF0F1",
					"userText": "rgba(38, 42, 48, 0.8)",
					"hoverText": "#262A30",
					"selectedText": "#262A30",
					"userBubble": "rgba(252, 241, 115, 0.15)",
					"groupTopStyle": "black",
					"errorTxt": "#A83927",
					"errorBg": "#D6806F",
					"warningTxt": "#D39C00",
					"warningBg": "#F4DB96",
					"infoTxt": "#00677F",
					"infoBg": "#00A2CF",
					"successTxt": "#08705C",
					"successBg": "#209F8B",
					"grey": {
						"200": "#F2F7FD",
						"400": "#A6B4D0",
						"600": "#727C94",
						"800": "#262A30"
					}
				}
			}
		},
		"startButton": {
			"backgroundColor": "#189AB4",
			"borderPercentage": "50%",
			"logoUrl": "https:s3.us-west-2.amazonaws.com/cdn.devlabs.tech/Shippify_Logo.png",
			"position": "bl"
		},
		"tooltipPanel": {
			"backgroundColor": "main",
			"border": {
				"enabled": false
			},
			"message": {
				"textColor": "light",
				"backgroundColor": "none",
				"text": "Estoy lista para ayudarte con consultas sobre tus cuentas y transacciones",
				"title": "!Hola soy Sophi!"
			},
			"logo": {
				"url": "https:s3.us-west-2.amazonaws.com/cdn.devlabs.tech/Shippify_Logo.png",
				"position": "l",
				"enabled": false
			}
		},
		"headerPanel": {
			"title": {
				"type": "TXT",
				"text": "Hola, soy Sophi!"
			},
			"message": {
				"description": "Queremos ayudarte hoy con los servicios de Banco del Pacifico"
			},
			"backgroundColor": "dark",
			"logo": {
				"url": "https:s3.us-west-2.amazonaws.com/cdn.devlabs.tech/Shippify_Logo.png",
				"position": "l"
			},
			"distribution": "HORIZONTAL"
		},
		"homeMenu": [],
		"topMenu": {
			"title": "Consultas Rapidas",
			"options": [
				{
					"title": "Saldos",
					"emoji": "&#128181;",
					"flow": {},
					"event": ""
				},
				{
					"title": "Requisitos de tramites",
					"emoji": "&#128195;",
					"flow": {},
					"event": ""
				},
				{
					"title": "Solicitud alcantarillado",
					"emoji": "&#128166;",
					"flow": {},
					"event": ""
				},
				{
					"title": "Solicitud Clave",
					"emoji": "&#128273;",
					"flow": {},
					"event": ""
				}
			]
		},
		"verticalPanel": {
			"enabled": false,
			"position": "right"
		},
		"bodyPanel": {
			"backgroundColor": "white",
			"topBorder": "FLAT"
		}
	}
}'
// Create Bot and Widget
curl --request POST \
  --url 'https://api.jelou.ai/v1/widget/create' \
  --header 'Content-Type: application/json' \
  --header 'authorization: Basic <TOKEN_COMPANY>' \
  --data '{
	"bot": {},
	"widget": {
		"propertes": {
			"type": "normal"
		},
		"theme": {
			"font": {
				"googlefont": true,
				"name": "Manrope"
			},
			"position": "br",
			"vars": {
				"color": {
					"primary": "#e5414a",
					"secondary": "#910018",
					"primaryDarker": "#933434",
					"secondaryLight": "#facbd3",
					"userText": "white",
					"hoverText": "#262A30",
					"selectedText": "#262A30",
					"userBubble": "#facbd3",
					"groupTopStyle": "black",
					"errorTxt": "#A83927",
					"errorBg": "#D6806F",
					"warningTxt": "#D39C00",
					"warningBg": "#F4DB96",
					"infoTxt": "#00677F",
					"infoBg": "#00A2CF",
					"successTxt": "#08705C",
					"successBg": "#209F8B",
					"grey": {
						"200": "#F2F7FD",
						"400": "#A6B4D0",
						"600": "#727C94",
						"800": "#262A30"
					}
				}
			}
		},
		"startButton": {
			"backgroundColor": "#e5414a",
			"borderPercentage": "50%",
			"logoUrl": "https:s3.us-west-2.amazonaws.com/cdn.devlabs.tech/Shippify_Logo.png",
			"position": "br"
		},
		"tooltipPanel": {
			"backgroundColor": "main",
			"border": {
				"enabled": false,
				"borderColor": "#9b3339",
				"position": "b",
				"allSides": true
			},
			"message": {
				"textColor": "dark",
				"backgroundColor": "none",
				"text": "Olá, é um prazer saudá-lo / ¡Hola! Es un gusto saludarte"
			},
			"logo": {
				"url": "https:s3.us-west-2.amazonaws.com/cdn.devlabs.tech/Shippify_Logo.png",
				"position": "b",
				"enabled": false
			}
		},
		"headerPanel": {
			"title": {
				"type": "IMG",
				"mediaUrl": "https:cdn.shippify.co/web/images/latest/logo-shippify-lg.png"
			},
			"message": {
				"description": "Olá, é um prazer saudá-lo / ¡Hola! Es un gusto saludarte"
			},
			"backgroundColor": "none",
			"logo": {
				"url": "https:cdn.shippify.co/web/images/latest/logo-shippify-lg.png",
				"position": "b"
			},
			"distribution": "VERTICAL"
		},
		"homeMenu": [
			{
				"icon": {
					"url": "http:simpleicon.com/wp-content/uploads/key-12.png",
					"background": "#facbd3"
				},
				"title": "Claves",
				"description": "Cambia tu clave de shippify",
				"flow": {},
				"event": ""
			}
		],
		"topMenu": {
			"title": "Consultas Rapidas",
			"options": [
				{
					"title": "Saldos",
					"emoji": "&#128181;",
					"flow": {},
					"event": ""
				},
				{
					"title": "Requisitos de tramites",
					"emoji": "&#128195;",
					"flow": {},
					"event": ""
				},
				{
					"title": "Solicitud alcantarillado",
					"emoji": "&#128166;",
					"flow": {},
					"event": ""
				},
				{
					"title": "Solicitud Clave",
					"emoji": "&#128273;",
					"flow": {},
					"event": ""
				}
			]
		},
		"verticalPanel": {
			"enabled": true,
			"position": "right"
		},
		"bodyPanel": {
			"backgroundColor": "white",
			"topBorder": "FLAT"
		}
	}
}'

Last updated