Vizir api documentation API Reference

Documentation of Vizir.co api. Content relative. Internal use only

API Endpoint
https://developers.vizir.co
Terms of Service: https://vizir.co
Request Content-Types: application/json
Response Content-Types: application/json
Schemes: https
Version: 0.0.1

Authentication

basic_auth

type
apiKey
name
Authorization
in
header

application_auth

type
view,edit,admin
name
appid
in
header

Application

Create application

POST /application

Create a new application for this user

Request Example
{
  "title": "Title of your application",
  "description": "Description of your application"
}
201 Created

Application you juste created

500 Internal Server Error

Some parameters are missing or not valid

Response Content-Types: application/json
Response Example (201 Created)
{
  "appID": "String",
  "appIDs": [
    {
      "source": "web",
      "appID": "23145678"
    },
    {
      "source": "slack",
      "appID": "9876543243"
    },
    {
      "source": "fb",
      "appID": "9876543243",
      "appSecret": "3245674325675435676543ERFGVBNGFDRE54"
    }
  ],
  "updatedAt": "Date last update",
  "createdAt": "Date last update",
  "title": "Title of your chatbot",
  "description": "Description of your chatbot",
  "userID": "Id of the owner of the bot",
  "canEdit": [
    "userId_1",
    "userId_1"
  ],
  "canView": [
    "userId_1",
    "userId_1"
  ],
  "info": {
    "showInformationWindow": false,
    "picto": {
      "url": ""
    },
    "titre": "Title of the bot",
    "description": "",
    "placeholderMessage": "Ecrivez votre message ici",
    "errorMessageIfPicture": "",
    "errorMessageIfQCMwithoutNLU": "",
    "show_widget_delay": 23,
    "show_widget_notification_delay": 23,
    "url": "chatbotMyCompany"
  },
  "design": {
    "logo": {
      "url": "https://s3.eu-central-1.amazonaws.com/imagesglobal/vizir-logo-white@2x.png"
    },
    "picto": {
      "url": "https://s3.eu-central-1.amazonaws.com/imagesglobal/picto.png",
      "widget": "https://b.vizir.co/static/images/picto/logo-picto.png"
    },
    "ga": {
      "active": true,
      "code": "UA321452"
    },
    "gtm": {
      "active": true,
      "code": "UA321452"
    },
    "color": "#3DBBD8",
    "showUploadPicto": true,
    "showPhotoPicto": true,
    "showBurgerMenu": true,
    "showTitle": true,
    "showTopBar": true,
    "color-background": "#f7f7f7",
    "color-message": "#FFF",
    "message-color-text": "#1d2129",
    "color-header": "#3DBBD8",
    "color-header-titre": "#FFF",
    "reponse-color-text": "#FFF",
    "image-background": "false",
    "mobile-image-background": "false"
  },
  "sms": {
    "active": false,
    "twilio_accountSid": "fkdsjfqd",
    "twilio_authToken": "fkdlqsjamze",
    "twilio_phone": "132324323",
    "keywordSmsBot": "SMS"
  },
  "persistent_menu": [
    {
      "locale": "default",
      "composer_input_disabled": false,
      "call_to_actions": [
        {
          "type": "web_url",
          "title": "View website",
          "url": "https://vizir.co",
          "payload": "_bot_restart_menu_",
          "logic": {
            "active": true,
            "type": "resource",
            "goToResource": "string",
            "goToFeature": "string",
            "nextResourceDetail": {
              "featureID": "featureID",
              "featureTitle": "featureTitle",
              "resourceID": "resource._id",
              "resourceTitle": "resource.title"
            },
            "restart_process": false
          }
        }
      ]
    }
  ],
  "active": true,
  "filterAvailable": {
    "tag": {
      "list": [
        "favorite_sports"
      ],
      "details": [
        {
          "name": "favorite_sports",
          "type": "string"
        }
      ]
    },
    "attribute": {
      "list": [
        "favorite_sports"
      ],
      "details": [
        {
          "name": "first_name",
          "type": "string",
          "isRoot": false
        }
      ]
    },
    "event": {
      "list": [
        "nb_login"
      ],
      "details": [
        {
          "name": "nb_login",
          "type": "number"
        }
      ]
    }
  },
  "security": {
    "login_needed": true,
    "login_url": "https://api.vizir.co/user/login",
    "login_type": "username, basic, oauth"
  },
  "payload": {
    "title": "name to provide on the dashbaord",
    "payload": "_restart_",
    "logic": {
      "active": true,
      "type": "resource",
      "goToResource": "string",
      "goToFeature": "string",
      "nextResourceDetail": {
        "featureID": "featureID",
        "featureTitle": "featureTitle",
        "resourceID": "resource._id",
        "resourceTitle": "resource.title"
      },
      "restart_process": false
    },
    "force_resource": true
  },
  "dashboard_stat": [
    {
      "title": "title",
      "description": "description",
      "operator": "count",
      "filters": {
        "attribute": {
          "your_properties_name_1": {
            "operator": "=",
            "value": "John"
          }
        },
        "event": {
          "last_login": {
            "operator": "<",
            "value": "2017-10-30T18:22:44.598+0000"
          }
        },
        "tag": {
          "favorite_sports": {
            "operator": "OR",
            "value": [
              "natation",
              "soccer"
            ]
          }
        },
        "entity": "location",
        "operator": "and"
      },
      "groupBy": {
        "value": "source",
        "type": "attribute"
      },
      "color": "#3BDDB8"
    }
  ],
  "isNluFirst": true,
  "documents": "object",
  "smart_format": [
    {
      "name": "applicant",
      "description": "Ask for applicant",
      "featureID": "d39382934"
    }
  ]
}
Response Example (500 Internal Server Error)
{
  "success": false,
  "message": "Some parameters are missing or not valid"
}

Update application

PATCH /application/<appID>

Update the application

json of the part you want to update on the application

appID: string
in query

application._id of your application

Request Example
{
  "title": "Title of your application",
  "description": "Description of your application"
}
200 OK

Application updated

500 Internal Server Error

Some parameters are missing or not valid

Response Content-Types: application/json
Response Example (200 OK)
{
  "appID": "String",
  "appIDs": [
    {
      "source": "web",
      "appID": "23145678"
    },
    {
      "source": "slack",
      "appID": "9876543243"
    },
    {
      "source": "fb",
      "appID": "9876543243",
      "appSecret": "3245674325675435676543ERFGVBNGFDRE54"
    }
  ],
  "updatedAt": "Date last update",
  "createdAt": "Date last update",
  "title": "Title of your chatbot",
  "description": "Description of your chatbot",
  "userID": "Id of the owner of the bot",
  "canEdit": [
    "userId_1",
    "userId_1"
  ],
  "canView": [
    "userId_1",
    "userId_1"
  ],
  "info": {
    "showInformationWindow": false,
    "picto": {
      "url": ""
    },
    "titre": "Title of the bot",
    "description": "",
    "placeholderMessage": "Ecrivez votre message ici",
    "errorMessageIfPicture": "",
    "errorMessageIfQCMwithoutNLU": "",
    "show_widget_delay": 23,
    "show_widget_notification_delay": 23,
    "url": "chatbotMyCompany"
  },
  "design": {
    "logo": {
      "url": "https://s3.eu-central-1.amazonaws.com/imagesglobal/vizir-logo-white@2x.png"
    },
    "picto": {
      "url": "https://s3.eu-central-1.amazonaws.com/imagesglobal/picto.png",
      "widget": "https://b.vizir.co/static/images/picto/logo-picto.png"
    },
    "ga": {
      "active": true,
      "code": "UA321452"
    },
    "gtm": {
      "active": true,
      "code": "UA321452"
    },
    "color": "#3DBBD8",
    "showUploadPicto": true,
    "showPhotoPicto": true,
    "showBurgerMenu": true,
    "showTitle": true,
    "showTopBar": true,
    "color-background": "#f7f7f7",
    "color-message": "#FFF",
    "message-color-text": "#1d2129",
    "color-header": "#3DBBD8",
    "color-header-titre": "#FFF",
    "reponse-color-text": "#FFF",
    "image-background": "false",
    "mobile-image-background": "false"
  },
  "sms": {
    "active": false,
    "twilio_accountSid": "fkdsjfqd",
    "twilio_authToken": "fkdlqsjamze",
    "twilio_phone": "132324323",
    "keywordSmsBot": "SMS"
  },
  "persistent_menu": [
    {
      "locale": "default",
      "composer_input_disabled": false,
      "call_to_actions": [
        {
          "type": "web_url",
          "title": "View website",
          "url": "https://vizir.co",
          "payload": "_bot_restart_menu_",
          "logic": {
            "active": true,
            "type": "resource",
            "goToResource": "string",
            "goToFeature": "string",
            "nextResourceDetail": {
              "featureID": "featureID",
              "featureTitle": "featureTitle",
              "resourceID": "resource._id",
              "resourceTitle": "resource.title"
            },
            "restart_process": false
          }
        }
      ]
    }
  ],
  "active": true,
  "filterAvailable": {
    "tag": {
      "list": [
        "favorite_sports"
      ],
      "details": [
        {
          "name": "favorite_sports",
          "type": "string"
        }
      ]
    },
    "attribute": {
      "list": [
        "favorite_sports"
      ],
      "details": [
        {
          "name": "first_name",
          "type": "string",
          "isRoot": false
        }
      ]
    },
    "event": {
      "list": [
        "nb_login"
      ],
      "details": [
        {
          "name": "nb_login",
          "type": "number"
        }
      ]
    }
  },
  "security": {
    "login_needed": true,
    "login_url": "https://api.vizir.co/user/login",
    "login_type": "username, basic, oauth"
  },
  "payload": {
    "title": "name to provide on the dashbaord",
    "payload": "_restart_",
    "logic": {
      "active": true,
      "type": "resource",
      "goToResource": "string",
      "goToFeature": "string",
      "nextResourceDetail": {
        "featureID": "featureID",
        "featureTitle": "featureTitle",
        "resourceID": "resource._id",
        "resourceTitle": "resource.title"
      },
      "restart_process": false
    },
    "force_resource": true
  },
  "dashboard_stat": [
    {
      "title": "title",
      "description": "description",
      "operator": "count",
      "filters": {
        "attribute": {
          "your_properties_name_1": {
            "operator": "=",
            "value": "John"
          }
        },
        "event": {
          "last_login": {
            "operator": "<",
            "value": "2017-10-30T18:22:44.598+0000"
          }
        },
        "tag": {
          "favorite_sports": {
            "operator": "OR",
            "value": [
              "natation",
              "soccer"
            ]
          }
        },
        "entity": "location",
        "operator": "and"
      },
      "groupBy": {
        "value": "source",
        "type": "attribute"
      },
      "color": "#3BDDB8"
    }
  ],
  "isNluFirst": true,
  "documents": "object",
  "smart_format": [
    {
      "name": "applicant",
      "description": "Ask for applicant",
      "featureID": "d39382934"
    }
  ]
}
Response Example (500 Internal Server Error)
{
  "success": false,
  "message": "Some parameters are missing or not valid"
}

Delete application

DELETE /application/<appID>

Delete the application

appID: string
in query

application._id of your application

200 OK

Application removed

500 Internal Server Error

Some parameters are missing or not valid

Response Content-Types: application/json
Response Example (200 OK)
{
  "success": true,
  "message": "Some parameters are missing or not valid",
  "code": 409,
  "token": "eY...."
}
Response Example (500 Internal Server Error)
{
  "success": false,
  "message": "Some parameters are missing or not valid"
}

Get application

GET /application/<appID>

Get the application

appID: string
in query

application._id of your application

200 OK

Application

500 Internal Server Error

Some parameters are missing or not valid

Response Content-Types: application/json
Response Example (200 OK)
{
  "appID": "String",
  "appIDs": [
    {
      "source": "web",
      "appID": "23145678"
    },
    {
      "source": "slack",
      "appID": "9876543243"
    },
    {
      "source": "fb",
      "appID": "9876543243",
      "appSecret": "3245674325675435676543ERFGVBNGFDRE54"
    }
  ],
  "updatedAt": "Date last update",
  "createdAt": "Date last update",
  "title": "Title of your chatbot",
  "description": "Description of your chatbot",
  "userID": "Id of the owner of the bot",
  "canEdit": [
    "userId_1",
    "userId_1"
  ],
  "canView": [
    "userId_1",
    "userId_1"
  ],
  "info": {
    "showInformationWindow": false,
    "picto": {
      "url": ""
    },
    "titre": "Title of the bot",
    "description": "",
    "placeholderMessage": "Ecrivez votre message ici",
    "errorMessageIfPicture": "",
    "errorMessageIfQCMwithoutNLU": "",
    "show_widget_delay": 23,
    "show_widget_notification_delay": 23,
    "url": "chatbotMyCompany"
  },
  "design": {
    "logo": {
      "url": "https://s3.eu-central-1.amazonaws.com/imagesglobal/vizir-logo-white@2x.png"
    },
    "picto": {
      "url": "https://s3.eu-central-1.amazonaws.com/imagesglobal/picto.png",
      "widget": "https://b.vizir.co/static/images/picto/logo-picto.png"
    },
    "ga": {
      "active": true,
      "code": "UA321452"
    },
    "gtm": {
      "active": true,
      "code": "UA321452"
    },
    "color": "#3DBBD8",
    "showUploadPicto": true,
    "showPhotoPicto": true,
    "showBurgerMenu": true,
    "showTitle": true,
    "showTopBar": true,
    "color-background": "#f7f7f7",
    "color-message": "#FFF",
    "message-color-text": "#1d2129",
    "color-header": "#3DBBD8",
    "color-header-titre": "#FFF",
    "reponse-color-text": "#FFF",
    "image-background": "false",
    "mobile-image-background": "false"
  },
  "sms": {
    "active": false,
    "twilio_accountSid": "fkdsjfqd",
    "twilio_authToken": "fkdlqsjamze",
    "twilio_phone": "132324323",
    "keywordSmsBot": "SMS"
  },
  "persistent_menu": [
    {
      "locale": "default",
      "composer_input_disabled": false,
      "call_to_actions": [
        {
          "type": "web_url",
          "title": "View website",
          "url": "https://vizir.co",
          "payload": "_bot_restart_menu_",
          "logic": {
            "active": true,
            "type": "resource",
            "goToResource": "string",
            "goToFeature": "string",
            "nextResourceDetail": {
              "featureID": "featureID",
              "featureTitle": "featureTitle",
              "resourceID": "resource._id",
              "resourceTitle": "resource.title"
            },
            "restart_process": false
          }
        }
      ]
    }
  ],
  "active": true,
  "filterAvailable": {
    "tag": {
      "list": [
        "favorite_sports"
      ],
      "details": [
        {
          "name": "favorite_sports",
          "type": "string"
        }
      ]
    },
    "attribute": {
      "list": [
        "favorite_sports"
      ],
      "details": [
        {
          "name": "first_name",
          "type": "string",
          "isRoot": false
        }
      ]
    },
    "event": {
      "list": [
        "nb_login"
      ],
      "details": [
        {
          "name": "nb_login",
          "type": "number"
        }
      ]
    }
  },
  "security": {
    "login_needed": true,
    "login_url": "https://api.vizir.co/user/login",
    "login_type": "username, basic, oauth"
  },
  "payload": {
    "title": "name to provide on the dashbaord",
    "payload": "_restart_",
    "logic": {
      "active": true,
      "type": "resource",
      "goToResource": "string",
      "goToFeature": "string",
      "nextResourceDetail": {
        "featureID": "featureID",
        "featureTitle": "featureTitle",
        "resourceID": "resource._id",
        "resourceTitle": "resource.title"
      },
      "restart_process": false
    },
    "force_resource": true
  },
  "dashboard_stat": [
    {
      "title": "title",
      "description": "description",
      "operator": "count",
      "filters": {
        "attribute": {
          "your_properties_name_1": {
            "operator": "=",
            "value": "John"
          }
        },
        "event": {
          "last_login": {
            "operator": "<",
            "value": "2017-10-30T18:22:44.598+0000"
          }
        },
        "tag": {
          "favorite_sports": {
            "operator": "OR",
            "value": [
              "natation",
              "soccer"
            ]
          }
        },
        "entity": "location",
        "operator": "and"
      },
      "groupBy": {
        "value": "source",
        "type": "attribute"
      },
      "color": "#3BDDB8"
    }
  ],
  "isNluFirst": true,
  "documents": "object",
  "smart_format": [
    {
      "name": "applicant",
      "description": "Ask for applicant",
      "featureID": "d39382934"
    }
  ]
}
Response Example (500 Internal Server Error)
{
  "success": false,
  "message": "Some parameters are missing or not valid"
}

updateApplicationPermission

PUT /application/<appID>/permission

Update the application User permission the body must have 2 keys:

  • permission that can be edit or view
  • userID of userEmail

  • In case you have the userID (change user permsission, you can user it) otherwise you can use the email with the key userEmail

appID: string
in query

application._id of your application

Request Example
{
  "permission": "edit",
  "userID": "12345678",
  "userEmail": "john@doe.fr"
}
200 OK

success

500 Internal Server Error

Some parameters are missing or not valid

Response Content-Types: application/json
Response Example (200 OK)
{
  "success": true,
  "message": "Some parameters are missing or not valid",
  "code": 409,
  "token": "eY...."
}
Response Example (500 Internal Server Error)
{
  "success": false,
  "message": "Some parameters are missing or not valid"
}

Get widget

GET /widget/<appID>

Get the application widget

appID: string
in params

application._id of your application

version: string
in query

can be 1 for the old version or 2 for the new one (default)

200 OK

string to paste on your website

500 Internal Server Error

Some parameters are missing or not valid

Response Content-Types: application/json
Response Example (500 Internal Server Error)
{
  "success": false,
  "message": "Some parameters are missing or not valid"
}

Feature

Create feature

POST /feature

Create a new feature for this application

parameters of the feature we want to create

Request Example
{
  "title": "String",
  "description": "String",
  "featureID": "String",
  "type": "String",
  "faq_options": {
    "active": true,
    "menu": {
      "button_text": "Menu",
      "button_logic": {
        "active": true,
        "type": "resource",
        "goToResource": "string",
        "goToFeature": "string",
        "nextResourceDetail": {
          "featureID": "featureID",
          "featureTitle": "featureTitle",
          "resourceID": "resource._id",
          "resourceTitle": "resource.title"
        },
        "restart_process": false
      }
    },
    "return": {
      "button_text": "Menu"
    }
  },
  "nlu": {
    "nlu_config": []
  },
  "is_smart_format": false,
  "smart_format_name": "applicant",
  "appID": "String",
  "userID": "String",
  "process": {
    "active": true,
    "title": "_LOGIN_",
    "cost": 43,
    "process_termination": [
      {
        "attribute": "validation",
        "operator": "=",
        "value": "validate",
        "list": [
          "Oui",
          "Non"
        ],
        "price": "0.3",
        "actions": {
          "active": true,
          "workflow": "d124542534",
          "logic": {
            "key": "statusCode",
            "value": {
              "201": {
                "active": true,
                "type": "resource",
                "goToResource": "string",
                "goToFeature": "string",
                "nextResourceDetail": {
                  "featureID": "featureID",
                  "featureTitle": "featureTitle",
                  "resourceID": "resource._id",
                  "resourceTitle": "resource.title"
                },
                "restart_process": false
              },
              "401": {
                "active": true,
                "type": "resource",
                "goToResource": "string",
                "goToFeature": "string",
                "nextResourceDetail": {
                  "featureID": "featureID",
                  "featureTitle": "featureTitle",
                  "resourceID": "resource._id",
                  "resourceTitle": "resource.title"
                },
                "restart_process": false
              },
              "default": {
                "active": true,
                "type": "resource",
                "goToResource": "string",
                "goToFeature": "string",
                "nextResourceDetail": {
                  "featureID": "featureID",
                  "featureTitle": "featureTitle",
                  "resourceID": "resource._id",
                  "resourceTitle": "resource.title"
                },
                "restart_process": false
              }
            }
          },
          "performOnlyIfAnswerValid": false
        }
      }
    ],
    "attribute": {
      "test_attribute": "9"
    },
    "event": {
      "test_event": {
        "inc": 1
      }
    }
  },
  "createdAt": "Date",
  "updatedAt": "Date",
  "meta": {
    "nb_resources": {
      "type": "Number",
      "example": 5
    },
    "index_next_resource": {
      "type": "Number",
      "example": 4
    },
    "position": {
      "type": "Number",
      "example": 2
    },
    "partnerID": {
      "type": "string",
      "description": "Used when we deal with partner like we did with Tiller"
    },
    "referrer": {
      "type": "string",
      "description": "Planned to be used in the future program"
    },
    "premium": {
      "type": "Boolean",
      "description": "deprecated",
      "example": false
    }
  }
}
201 Created

Feature you juste created

500 Internal Server Error

Some parameters are missing or not valid

Response Content-Types: application/json
Response Example (201 Created)
{
  "title": "String",
  "description": "String",
  "featureID": "String",
  "type": "String",
  "faq_options": {
    "active": true,
    "menu": {
      "button_text": "Menu",
      "button_logic": {
        "active": true,
        "type": "resource",
        "goToResource": "string",
        "goToFeature": "string",
        "nextResourceDetail": {
          "featureID": "featureID",
          "featureTitle": "featureTitle",
          "resourceID": "resource._id",
          "resourceTitle": "resource.title"
        },
        "restart_process": false
      }
    },
    "return": {
      "button_text": "Menu"
    }
  },
  "nlu": {
    "nlu_config": []
  },
  "is_smart_format": false,
  "smart_format_name": "applicant",
  "appID": "String",
  "userID": "String",
  "process": {
    "active": true,
    "title": "_LOGIN_",
    "cost": 43,
    "process_termination": [
      {
        "attribute": "validation",
        "operator": "=",
        "value": "validate",
        "list": [
          "Oui",
          "Non"
        ],
        "price": "0.3",
        "actions": {
          "active": true,
          "workflow": "d124542534",
          "logic": {
            "key": "statusCode",
            "value": {
              "201": {
                "active": true,
                "type": "resource",
                "goToResource": "string",
                "goToFeature": "string",
                "nextResourceDetail": {
                  "featureID": "featureID",
                  "featureTitle": "featureTitle",
                  "resourceID": "resource._id",
                  "resourceTitle": "resource.title"
                },
                "restart_process": false
              },
              "401": {
                "active": true,
                "type": "resource",
                "goToResource": "string",
                "goToFeature": "string",
                "nextResourceDetail": {
                  "featureID": "featureID",
                  "featureTitle": "featureTitle",
                  "resourceID": "resource._id",
                  "resourceTitle": "resource.title"
                },
                "restart_process": false
              },
              "default": {
                "active": true,
                "type": "resource",
                "goToResource": "string",
                "goToFeature": "string",
                "nextResourceDetail": {
                  "featureID": "featureID",
                  "featureTitle": "featureTitle",
                  "resourceID": "resource._id",
                  "resourceTitle": "resource.title"
                },
                "restart_process": false
              }
            }
          },
          "performOnlyIfAnswerValid": false
        }
      }
    ],
    "attribute": {
      "test_attribute": "9"
    },
    "event": {
      "test_event": {
        "inc": 1
      }
    }
  },
  "createdAt": "Date",
  "updatedAt": "Date",
  "meta": {
    "nb_resources": {
      "type": "Number",
      "example": 5
    },
    "index_next_resource": {
      "type": "Number",
      "example": 4
    },
    "position": {
      "type": "Number",
      "example": 2
    },
    "partnerID": {
      "type": "string",
      "description": "Used when we deal with partner like we did with Tiller"
    },
    "referrer": {
      "type": "string",
      "description": "Planned to be used in the future program"
    },
    "premium": {
      "type": "Boolean",
      "description": "deprecated",
      "example": false
    }
  }
}
Response Example (500 Internal Server Error)
{
  "success": false,
  "message": "Some parameters are missing or not valid"
}

Update feature

PATCH /feature/<featureID>

Update the feature

json of the part you want to update on the feature

featureID: string
in query

feature.featureID of your feature you want to update

Request Example
{
  "title": "String",
  "description": "String",
  "featureID": "String",
  "type": "String",
  "faq_options": {
    "active": true,
    "menu": {
      "button_text": "Menu",
      "button_logic": {
        "active": true,
        "type": "resource",
        "goToResource": "string",
        "goToFeature": "string",
        "nextResourceDetail": {
          "featureID": "featureID",
          "featureTitle": "featureTitle",
          "resourceID": "resource._id",
          "resourceTitle": "resource.title"
        },
        "restart_process": false
      }
    },
    "return": {
      "button_text": "Menu"
    }
  },
  "nlu": {
    "nlu_config": []
  },
  "is_smart_format": false,
  "smart_format_name": "applicant",
  "appID": "String",
  "userID": "String",
  "process": {
    "active": true,
    "title": "_LOGIN_",
    "cost": 43,
    "process_termination": [
      {
        "attribute": "validation",
        "operator": "=",
        "value": "validate",
        "list": [
          "Oui",
          "Non"
        ],
        "price": "0.3",
        "actions": {
          "active": true,
          "workflow": "d124542534",
          "logic": {
            "key": "statusCode",
            "value": {
              "201": {
                "active": true,
                "type": "resource",
                "goToResource": "string",
                "goToFeature": "string",
                "nextResourceDetail": {
                  "featureID": "featureID",
                  "featureTitle": "featureTitle",
                  "resourceID": "resource._id",
                  "resourceTitle": "resource.title"
                },
                "restart_process": false
              },
              "401": {
                "active": true,
                "type": "resource",
                "goToResource": "string",
                "goToFeature": "string",
                "nextResourceDetail": {
                  "featureID": "featureID",
                  "featureTitle": "featureTitle",
                  "resourceID": "resource._id",
                  "resourceTitle": "resource.title"
                },
                "restart_process": false
              },
              "default": {
                "active": true,
                "type": "resource",
                "goToResource": "string",
                "goToFeature": "string",
                "nextResourceDetail": {
                  "featureID": "featureID",
                  "featureTitle": "featureTitle",
                  "resourceID": "resource._id",
                  "resourceTitle": "resource.title"
                },
                "restart_process": false
              }
            }
          },
          "performOnlyIfAnswerValid": false
        }
      }
    ],
    "attribute": {
      "test_attribute": "9"
    },
    "event": {
      "test_event": {
        "inc": 1
      }
    }
  },
  "createdAt": "Date",
  "updatedAt": "Date",
  "meta": {
    "nb_resources": {
      "type": "Number",
      "example": 5
    },
    "index_next_resource": {
      "type": "Number",
      "example": 4
    },
    "position": {
      "type": "Number",
      "example": 2
    },
    "partnerID": {
      "type": "string",
      "description": "Used when we deal with partner like we did with Tiller"
    },
    "referrer": {
      "type": "string",
      "description": "Planned to be used in the future program"
    },
    "premium": {
      "type": "Boolean",
      "description": "deprecated",
      "example": false
    }
  }
}
200 OK

Feature updated

500 Internal Server Error

Some parameters are missing or not valid

Response Content-Types: application/json
Response Example (200 OK)
{
  "title": "String",
  "description": "String",
  "featureID": "String",
  "type": "String",
  "faq_options": {
    "active": true,
    "menu": {
      "button_text": "Menu",
      "button_logic": {
        "active": true,
        "type": "resource",
        "goToResource": "string",
        "goToFeature": "string",
        "nextResourceDetail": {
          "featureID": "featureID",
          "featureTitle": "featureTitle",
          "resourceID": "resource._id",
          "resourceTitle": "resource.title"
        },
        "restart_process": false
      }
    },
    "return": {
      "button_text": "Menu"
    }
  },
  "nlu": {
    "nlu_config": []
  },
  "is_smart_format": false,
  "smart_format_name": "applicant",
  "appID": "String",
  "userID": "String",
  "process": {
    "active": true,
    "title": "_LOGIN_",
    "cost": 43,
    "process_termination": [
      {
        "attribute": "validation",
        "operator": "=",
        "value": "validate",
        "list": [
          "Oui",
          "Non"
        ],
        "price": "0.3",
        "actions": {
          "active": true,
          "workflow": "d124542534",
          "logic": {
            "key": "statusCode",
            "value": {
              "201": {
                "active": true,
                "type": "resource",
                "goToResource": "string",
                "goToFeature": "string",
                "nextResourceDetail": {
                  "featureID": "featureID",
                  "featureTitle": "featureTitle",
                  "resourceID": "resource._id",
                  "resourceTitle": "resource.title"
                },
                "restart_process": false
              },
              "401": {
                "active": true,
                "type": "resource",
                "goToResource": "string",
                "goToFeature": "string",
                "nextResourceDetail": {
                  "featureID": "featureID",
                  "featureTitle": "featureTitle",
                  "resourceID": "resource._id",
                  "resourceTitle": "resource.title"
                },
                "restart_process": false
              },
              "default": {
                "active": true,
                "type": "resource",
                "goToResource": "string",
                "goToFeature": "string",
                "nextResourceDetail": {
                  "featureID": "featureID",
                  "featureTitle": "featureTitle",
                  "resourceID": "resource._id",
                  "resourceTitle": "resource.title"
                },
                "restart_process": false
              }
            }
          },
          "performOnlyIfAnswerValid": false
        }
      }
    ],
    "attribute": {
      "test_attribute": "9"
    },
    "event": {
      "test_event": {
        "inc": 1
      }
    }
  },
  "createdAt": "Date",
  "updatedAt": "Date",
  "meta": {
    "nb_resources": {
      "type": "Number",
      "example": 5
    },
    "index_next_resource": {
      "type": "Number",
      "example": 4
    },
    "position": {
      "type": "Number",
      "example": 2
    },
    "partnerID": {
      "type": "string",
      "description": "Used when we deal with partner like we did with Tiller"
    },
    "referrer": {
      "type": "string",
      "description": "Planned to be used in the future program"
    },
    "premium": {
      "type": "Boolean",
      "description": "deprecated",
      "example": false
    }
  }
}
Response Example (500 Internal Server Error)
{
  "success": false,
  "message": "Some parameters are missing or not valid"
}

Delete feature

DELETE /feature/<featureID>

Delete the feature

featureID: string
in query

feature.featureID of your feature you want to remove

200 OK

Feature removed

500 Internal Server Error

Some parameters are missing or not valid

Response Content-Types: application/json
Response Example (200 OK)
{
  "success": true,
  "message": "Some parameters are missing or not valid",
  "code": 409,
  "token": "eY...."
}
Response Example (500 Internal Server Error)
{
  "success": false,
  "message": "Some parameters are missing or not valid"
}

Get feature

GET /feature/<featureID>

Get the feature

featureID: string
in query

feature.featureID of your feature

200 OK

Feature

500 Internal Server Error

Some parameters are missing or not valid

Response Content-Types: application/json
Response Example (200 OK)
{
  "title": "String",
  "description": "String",
  "featureID": "String",
  "type": "String",
  "faq_options": {
    "active": true,
    "menu": {
      "button_text": "Menu",
      "button_logic": {
        "active": true,
        "type": "resource",
        "goToResource": "string",
        "goToFeature": "string",
        "nextResourceDetail": {
          "featureID": "featureID",
          "featureTitle": "featureTitle",
          "resourceID": "resource._id",
          "resourceTitle": "resource.title"
        },
        "restart_process": false
      }
    },
    "return": {
      "button_text": "Menu"
    }
  },
  "nlu": {
    "nlu_config": []
  },
  "is_smart_format": false,
  "smart_format_name": "applicant",
  "appID": "String",
  "userID": "String",
  "process": {
    "active": true,
    "title": "_LOGIN_",
    "cost": 43,
    "process_termination": [
      {
        "attribute": "validation",
        "operator": "=",
        "value": "validate",
        "list": [
          "Oui",
          "Non"
        ],
        "price": "0.3",
        "actions": {
          "active": true,
          "workflow": "d124542534",
          "logic": {
            "key": "statusCode",
            "value": {
              "201": {
                "active": true,
                "type": "resource",
                "goToResource": "string",
                "goToFeature": "string",
                "nextResourceDetail": {
                  "featureID": "featureID",
                  "featureTitle": "featureTitle",
                  "resourceID": "resource._id",
                  "resourceTitle": "resource.title"
                },
                "restart_process": false
              },
              "401": {
                "active": true,
                "type": "resource",
                "goToResource": "string",
                "goToFeature": "string",
                "nextResourceDetail": {
                  "featureID": "featureID",
                  "featureTitle": "featureTitle",
                  "resourceID": "resource._id",
                  "resourceTitle": "resource.title"
                },
                "restart_process": false
              },
              "default": {
                "active": true,
                "type": "resource",
                "goToResource": "string",
                "goToFeature": "string",
                "nextResourceDetail": {
                  "featureID": "featureID",
                  "featureTitle": "featureTitle",
                  "resourceID": "resource._id",
                  "resourceTitle": "resource.title"
                },
                "restart_process": false
              }
            }
          },
          "performOnlyIfAnswerValid": false
        }
      }
    ],
    "attribute": {
      "test_attribute": "9"
    },
    "event": {
      "test_event": {
        "inc": 1
      }
    }
  },
  "createdAt": "Date",
  "updatedAt": "Date",
  "meta": {
    "nb_resources": {
      "type": "Number",
      "example": 5
    },
    "index_next_resource": {
      "type": "Number",
      "example": 4
    },
    "position": {
      "type": "Number",
      "example": 2
    },
    "partnerID": {
      "type": "string",
      "description": "Used when we deal with partner like we did with Tiller"
    },
    "referrer": {
      "type": "string",
      "description": "Planned to be used in the future program"
    },
    "premium": {
      "type": "Boolean",
      "description": "deprecated",
      "example": false
    }
  }
}
Response Example (500 Internal Server Error)
{
  "success": false,
  "message": "Some parameters are missing or not valid"
}

Get features

GET /features/<appID>

Get the features of the a specific application

You can add simple query in the params. for example ?is_smart_format=true

query: string
in query

you can add simple query in the request

Features

500 Internal Server Error

Some parameters are missing or not valid

Response Content-Types: application/json
Response Example (200 OK)
[
  {
    "title": "String",
    "description": "String",
    "featureID": "String",
    "type": "String",
    "faq_options": {
      "active": true,
      "menu": {
        "button_text": "Menu",
        "button_logic": {
          "active": true,
          "type": "resource",
          "goToResource": "string",
          "goToFeature": "string",
          "nextResourceDetail": {
            "featureID": "featureID",
            "featureTitle": "featureTitle",
            "resourceID": "resource._id",
            "resourceTitle": "resource.title"
          },
          "restart_process": false
        }
      },
      "return": {
        "button_text": "Menu"
      }
    },
    "nlu": {
      "nlu_config": []
    },
    "is_smart_format": false,
    "smart_format_name": "applicant",
    "appID": "String",
    "userID": "String",
    "process": {
      "active": true,
      "title": "_LOGIN_",
      "cost": 43,
      "process_termination": [
        {
          "attribute": "validation",
          "operator": "=",
          "value": "validate",
          "list": [
            "Oui",
            "Non"
          ],
          "price": "0.3",
          "actions": {
            "active": true,
            "workflow": "d124542534",
            "logic": {
              "key": "statusCode",
              "value": {
                "201": {
                  "active": true,
                  "type": "resource",
                  "goToResource": "string",
                  "goToFeature": "string",
                  "nextResourceDetail": {
                    "featureID": "featureID",
                    "featureTitle": "featureTitle",
                    "resourceID": "resource._id",
                    "resourceTitle": "resource.title"
                  },
                  "restart_process": false
                },
                "401": {
                  "active": true,
                  "type": "resource",
                  "goToResource": "string",
                  "goToFeature": "string",
                  "nextResourceDetail": {
                    "featureID": "featureID",
                    "featureTitle": "featureTitle",
                    "resourceID": "resource._id",
                    "resourceTitle": "resource.title"
                  },
                  "restart_process": false
                },
                "default": {
                  "active": true,
                  "type": "resource",
                  "goToResource": "string",
                  "goToFeature": "string",
                  "nextResourceDetail": {
                    "featureID": "featureID",
                    "featureTitle": "featureTitle",
                    "resourceID": "resource._id",
                    "resourceTitle": "resource.title"
                  },
                  "restart_process": false
                }
              }
            },
            "performOnlyIfAnswerValid": false
          }
        }
      ],
      "attribute": {
        "test_attribute": "9"
      },
      "event": {
        "test_event": {
          "inc": 1
        }
      }
    },
    "createdAt": "Date",
    "updatedAt": "Date",
    "meta": {
      "nb_resources": {
        "type": "Number",
        "example": 5
      },
      "index_next_resource": {
        "type": "Number",
        "example": 4
      },
      "position": {
        "type": "Number",
        "example": 2
      },
      "partnerID": {
        "type": "string",
        "description": "Used when we deal with partner like we did with Tiller"
      },
      "referrer": {
        "type": "string",
        "description": "Planned to be used in the future program"
      },
      "premium": {
        "type": "Boolean",
        "description": "deprecated",
        "example": false
      }
    }
  }
]
Response Example (500 Internal Server Error)
{
  "success": false,
  "message": "Some parameters are missing or not valid"
}

Change Features order

POST /features/order

Change Features order

Request Example
{
  "appID": "5c822b07cc7a723206bfc7a3ab",
  "features": [
    "5c822b07cc7a723206bfc7a3ae",
    "5c822b07cc7a723206bfc7a3af",
    "5c822b07cc7a723206bfc7a3ag"
  ]
}
200 OK

Success

500 Internal Server Error

Some parameters are missing or not valid

Response Content-Types: application/json
Response Example (200 OK)
{
  "success": true,
  "message": "Some parameters are missing or not valid",
  "code": 409,
  "token": "eY...."
}
Response Example (500 Internal Server Error)
{
  "success": false,
  "message": "Some parameters are missing or not valid"
}

Duplicate Feature

POST /features/duplicate/<featureID>

[NOT ready yet] - Duplicate Feature

200 OK

undefined

500 Internal Server Error

Some parameters are missing or not valid

Response Content-Types: application/json
Response Example (500 Internal Server Error)
{
  "success": false,
  "message": "Some parameters are missing or not valid"
}

Resource

Create resource

POST /resource

Create a new resource for this feature

parameters of the resource we want to create, appID and featureID are required

Request Example
{
  "title": "age",
  "type": "collect",
  "description": "We ask the age of the user",
  "featureID": "F543524",
  "featureTitle": "Title of the feature",
  "appID": "324567",
  "userID": "3453647586",
  "createdAt": "Date",
  "updatedAt": "Date",
  "messages": [],
  "answers": [],
  "filters": {},
  "askIfKnown": false,
  "messageIfKnown": {
    "active": false,
    "messages": []
  },
  "properties": {
    "active": true,
    "attribute": {
      "name": "answer"
    },
    "tag": {
      "favorite_sports": {
        "add": "answer"
      }
    },
    "event": {
      "nb_login": {
        "inc": 1
      }
    }
  },
  "validation": {
    "active": true,
    "type": "email"
  },
  "actions": {
    "active": true,
    "list": [
      {
        "attribute": "validation",
        "operator": "=",
        "value": "validate",
        "list": [
          "Oui",
          "Non"
        ],
        "actions": {
          "active": true,
          "workflow": "d124542534",
          "logic": {
            "key": "statusCode",
            "value": {
              "201": {
                "active": true,
                "type": "resource",
                "goToResource": "string",
                "goToFeature": "string",
                "nextResourceDetail": {
                  "featureID": "featureID",
                  "featureTitle": "featureTitle",
                  "resourceID": "resource._id",
                  "resourceTitle": "resource.title"
                },
                "restart_process": false
              },
              "401": {
                "active": true,
                "type": "resource",
                "goToResource": "string",
                "goToFeature": "string",
                "nextResourceDetail": {
                  "featureID": "featureID",
                  "featureTitle": "featureTitle",
                  "resourceID": "resource._id",
                  "resourceTitle": "resource.title"
                },
                "restart_process": false
              },
              "default": {
                "active": true,
                "type": "resource",
                "goToResource": "string",
                "goToFeature": "string",
                "nextResourceDetail": {
                  "featureID": "featureID",
                  "featureTitle": "featureTitle",
                  "resourceID": "resource._id",
                  "resourceTitle": "resource.title"
                },
                "restart_process": false
              }
            }
          },
          "performOnlyIfAnswerValid": false
        }
      }
    ]
  },
  "api": {},
  "multiple_answers": false,
  "multiple_answers_options": {
    "attribute": "test_multiple",
    "hide_selected_answer": false,
    "max_answers": 2,
    "min_answers": 1,
    "tag": "favorite_sports",
    "messages": [
      [
        {
          "type": "text",
          "text": "Message 1"
        }
      ],
      [
        {
          "type": "text",
          "text": "Message 2"
        }
      ]
    ],
    "stop_button": {
      "display_first_occurence": true,
      "position": "first",
      "logic": {
        "nextResourceDetail": {},
        "goToResource": "4564758"
      }
    }
  },
  "activeSuggestions": false,
  "helpText": {
    "invalidAnswer": "Oups ! Il semblerait que votre réponse ne soit pas valide, pouvez vous la renseigner de nouveau"
  },
  "nlu": {
    "active": true,
    "nlu_config": [
      "nlu_config_item_id1",
      "nlu_config_item_id2"
    ]
  },
  "meta": {
    "position": 3
  },
  "logic": {
    "active": true,
    "type": "resource",
    "goToResource": "string",
    "goToFeature": "string",
    "nextResourceDetail": {
      "featureID": "featureID",
      "featureTitle": "featureTitle",
      "resourceID": "resource._id",
      "resourceTitle": "resource.title"
    },
    "restart_process": false
  },
  "linked_feature": "feature_id",
  "level": 0,
  "level_details": {
    "active": false,
    "show_return_button": true,
    "show_menu_button": true,
    "parent_resource": "43567712643"
  },
  "autocomplete": {
    "active": false,
    "smart_format_name": "applicant"
  }
}
201 Created

Resource you juste created

500 Internal Server Error

Some parameters are missing or not valid

Response Content-Types: application/json
Response Example (201 Created)
{
  "title": "age",
  "type": "collect",
  "description": "We ask the age of the user",
  "featureID": "F543524",
  "featureTitle": "Title of the feature",
  "appID": "324567",
  "userID": "3453647586",
  "createdAt": "Date",
  "updatedAt": "Date",
  "messages": [],
  "answers": [],
  "filters": {},
  "askIfKnown": false,
  "messageIfKnown": {
    "active": false,
    "messages": []
  },
  "properties": {
    "active": true,
    "attribute": {
      "name": "answer"
    },
    "tag": {
      "favorite_sports": {
        "add": "answer"
      }
    },
    "event": {
      "nb_login": {
        "inc": 1
      }
    }
  },
  "validation": {
    "active": true,
    "type": "email"
  },
  "actions": {
    "active": true,
    "list": [
      {
        "attribute": "validation",
        "operator": "=",
        "value": "validate",
        "list": [
          "Oui",
          "Non"
        ],
        "actions": {
          "active": true,
          "workflow": "d124542534",
          "logic": {
            "key": "statusCode",
            "value": {
              "201": {
                "active": true,
                "type": "resource",
                "goToResource": "string",
                "goToFeature": "string",
                "nextResourceDetail": {
                  "featureID": "featureID",
                  "featureTitle": "featureTitle",
                  "resourceID": "resource._id",
                  "resourceTitle": "resource.title"
                },
                "restart_process": false
              },
              "401": {
                "active": true,
                "type": "resource",
                "goToResource": "string",
                "goToFeature": "string",
                "nextResourceDetail": {
                  "featureID": "featureID",
                  "featureTitle": "featureTitle",
                  "resourceID": "resource._id",
                  "resourceTitle": "resource.title"
                },
                "restart_process": false
              },
              "default": {
                "active": true,
                "type": "resource",
                "goToResource": "string",
                "goToFeature": "string",
                "nextResourceDetail": {
                  "featureID": "featureID",
                  "featureTitle": "featureTitle",
                  "resourceID": "resource._id",
                  "resourceTitle": "resource.title"
                },
                "restart_process": false
              }
            }
          },
          "performOnlyIfAnswerValid": false
        }
      }
    ]
  },
  "api": {},
  "multiple_answers": false,
  "multiple_answers_options": {
    "attribute": "test_multiple",
    "hide_selected_answer": false,
    "max_answers": 2,
    "min_answers": 1,
    "tag": "favorite_sports",
    "messages": [
      [
        {
          "type": "text",
          "text": "Message 1"
        }
      ],
      [
        {
          "type": "text",
          "text": "Message 2"
        }
      ]
    ],
    "stop_button": {
      "display_first_occurence": true,
      "position": "first",
      "logic": {
        "nextResourceDetail": {},
        "goToResource": "4564758"
      }
    }
  },
  "activeSuggestions": false,
  "helpText": {
    "invalidAnswer": "Oups ! Il semblerait que votre réponse ne soit pas valide, pouvez vous la renseigner de nouveau"
  },
  "nlu": {
    "active": true,
    "nlu_config": [
      "nlu_config_item_id1",
      "nlu_config_item_id2"
    ]
  },
  "meta": {
    "position": 3
  },
  "logic": {
    "active": true,
    "type": "resource",
    "goToResource": "string",
    "goToFeature": "string",
    "nextResourceDetail": {
      "featureID": "featureID",
      "featureTitle": "featureTitle",
      "resourceID": "resource._id",
      "resourceTitle": "resource.title"
    },
    "restart_process": false
  },
  "linked_feature": "feature_id",
  "level": 0,
  "level_details": {
    "active": false,
    "show_return_button": true,
    "show_menu_button": true,
    "parent_resource": "43567712643"
  },
  "autocomplete": {
    "active": false,
    "smart_format_name": "applicant"
  }
}
Response Example (500 Internal Server Error)
{
  "success": false,
  "message": "Some parameters are missing or not valid"
}

Update Resource

PATCH /resource/<resourceID>

Update the Resource

json of the part you want to update on the resource

Resource: string
in query

Resource._id of your resource you want to update

Request Example
{
  "title": "age",
  "type": "collect",
  "description": "We ask the age of the user",
  "featureID": "F543524",
  "featureTitle": "Title of the feature",
  "appID": "324567",
  "userID": "3453647586",
  "createdAt": "Date",
  "updatedAt": "Date",
  "messages": [],
  "answers": [],
  "filters": {},
  "askIfKnown": false,
  "messageIfKnown": {
    "active": false,
    "messages": []
  },
  "properties": {
    "active": true,
    "attribute": {
      "name": "answer"
    },
    "tag": {
      "favorite_sports": {
        "add": "answer"
      }
    },
    "event": {
      "nb_login": {
        "inc": 1
      }
    }
  },
  "validation": {
    "active": true,
    "type": "email"
  },
  "actions": {
    "active": true,
    "list": [
      {
        "attribute": "validation",
        "operator": "=",
        "value": "validate",
        "list": [
          "Oui",
          "Non"
        ],
        "actions": {
          "active": true,
          "workflow": "d124542534",
          "logic": {
            "key": "statusCode",
            "value": {
              "201": {
                "active": true,
                "type": "resource",
                "goToResource": "string",
                "goToFeature": "string",
                "nextResourceDetail": {
                  "featureID": "featureID",
                  "featureTitle": "featureTitle",
                  "resourceID": "resource._id",
                  "resourceTitle": "resource.title"
                },
                "restart_process": false
              },
              "401": {
                "active": true,
                "type": "resource",
                "goToResource": "string",
                "goToFeature": "string",
                "nextResourceDetail": {
                  "featureID": "featureID",
                  "featureTitle": "featureTitle",
                  "resourceID": "resource._id",
                  "resourceTitle": "resource.title"
                },
                "restart_process": false
              },
              "default": {
                "active": true,
                "type": "resource",
                "goToResource": "string",
                "goToFeature": "string",
                "nextResourceDetail": {
                  "featureID": "featureID",
                  "featureTitle": "featureTitle",
                  "resourceID": "resource._id",
                  "resourceTitle": "resource.title"
                },
                "restart_process": false
              }
            }
          },
          "performOnlyIfAnswerValid": false
        }
      }
    ]
  },
  "api": {},
  "multiple_answers": false,
  "multiple_answers_options": {
    "attribute": "test_multiple",
    "hide_selected_answer": false,
    "max_answers": 2,
    "min_answers": 1,
    "tag": "favorite_sports",
    "messages": [
      [
        {
          "type": "text",
          "text": "Message 1"
        }
      ],
      [
        {
          "type": "text",
          "text": "Message 2"
        }
      ]
    ],
    "stop_button": {
      "display_first_occurence": true,
      "position": "first",
      "logic": {
        "nextResourceDetail": {},
        "goToResource": "4564758"
      }
    }
  },
  "activeSuggestions": false,
  "helpText": {
    "invalidAnswer": "Oups ! Il semblerait que votre réponse ne soit pas valide, pouvez vous la renseigner de nouveau"
  },
  "nlu": {
    "active": true,
    "nlu_config": [
      "nlu_config_item_id1",
      "nlu_config_item_id2"
    ]
  },
  "meta": {
    "position": 3
  },
  "logic": {
    "active": true,
    "type": "resource",
    "goToResource": "string",
    "goToFeature": "string",
    "nextResourceDetail": {
      "featureID": "featureID",
      "featureTitle": "featureTitle",
      "resourceID": "resource._id",
      "resourceTitle": "resource.title"
    },
    "restart_process": false
  },
  "linked_feature": "feature_id",
  "level": 0,
  "level_details": {
    "active": false,
    "show_return_button": true,
    "show_menu_button": true,
    "parent_resource": "43567712643"
  },
  "autocomplete": {
    "active": false,
    "smart_format_name": "applicant"
  }
}
200 OK

Resource updated

500 Internal Server Error

Some parameters are missing or not valid

Response Content-Types: application/json
Response Example (200 OK)
{
  "title": "age",
  "type": "collect",
  "description": "We ask the age of the user",
  "featureID": "F543524",
  "featureTitle": "Title of the feature",
  "appID": "324567",
  "userID": "3453647586",
  "createdAt": "Date",
  "updatedAt": "Date",
  "messages": [],
  "answers": [],
  "filters": {},
  "askIfKnown": false,
  "messageIfKnown": {
    "active": false,
    "messages": []
  },
  "properties": {
    "active": true,
    "attribute": {
      "name": "answer"
    },
    "tag": {
      "favorite_sports": {
        "add": "answer"
      }
    },
    "event": {
      "nb_login": {
        "inc": 1
      }
    }
  },
  "validation": {
    "active": true,
    "type": "email"
  },
  "actions": {
    "active": true,
    "list": [
      {
        "attribute": "validation",
        "operator": "=",
        "value": "validate",
        "list": [
          "Oui",
          "Non"
        ],
        "actions": {
          "active": true,
          "workflow": "d124542534",
          "logic": {
            "key": "statusCode",
            "value": {
              "201": {
                "active": true,
                "type": "resource",
                "goToResource": "string",
                "goToFeature": "string",
                "nextResourceDetail": {
                  "featureID": "featureID",
                  "featureTitle": "featureTitle",
                  "resourceID": "resource._id",
                  "resourceTitle": "resource.title"
                },
                "restart_process": false
              },
              "401": {
                "active": true,
                "type": "resource",
                "goToResource": "string",
                "goToFeature": "string",
                "nextResourceDetail": {
                  "featureID": "featureID",
                  "featureTitle": "featureTitle",
                  "resourceID": "resource._id",
                  "resourceTitle": "resource.title"
                },
                "restart_process": false
              },
              "default": {
                "active": true,
                "type": "resource",
                "goToResource": "string",
                "goToFeature": "string",
                "nextResourceDetail": {
                  "featureID": "featureID",
                  "featureTitle": "featureTitle",
                  "resourceID": "resource._id",
                  "resourceTitle": "resource.title"
                },
                "restart_process": false
              }
            }
          },
          "performOnlyIfAnswerValid": false
        }
      }
    ]
  },
  "api": {},
  "multiple_answers": false,
  "multiple_answers_options": {
    "attribute": "test_multiple",
    "hide_selected_answer": false,
    "max_answers": 2,
    "min_answers": 1,
    "tag": "favorite_sports",
    "messages": [
      [
        {
          "type": "text",
          "text": "Message 1"
        }
      ],
      [
        {
          "type": "text",
          "text": "Message 2"
        }
      ]
    ],
    "stop_button": {
      "display_first_occurence": true,
      "position": "first",
      "logic": {
        "nextResourceDetail": {},
        "goToResource": "4564758"
      }
    }
  },
  "activeSuggestions": false,
  "helpText": {
    "invalidAnswer": "Oups ! Il semblerait que votre réponse ne soit pas valide, pouvez vous la renseigner de nouveau"
  },
  "nlu": {
    "active": true,
    "nlu_config": [
      "nlu_config_item_id1",
      "nlu_config_item_id2"
    ]
  },
  "meta": {
    "position": 3
  },
  "logic": {
    "active": true,
    "type": "resource",
    "goToResource": "string",
    "goToFeature": "string",
    "nextResourceDetail": {
      "featureID": "featureID",
      "featureTitle": "featureTitle",
      "resourceID": "resource._id",
      "resourceTitle": "resource.title"
    },
    "restart_process": false
  },
  "linked_feature": "feature_id",
  "level": 0,
  "level_details": {
    "active": false,
    "show_return_button": true,
    "show_menu_button": true,
    "parent_resource": "43567712643"
  },
  "autocomplete": {
    "active": false,
    "smart_format_name": "applicant"
  }
}
Response Example (500 Internal Server Error)
{
  "success": false,
  "message": "Some parameters are missing or not valid"
}

Delete Resource

DELETE /resource/<resourceID>

Delete the Resource

resourceID: string
in query

resource._id of your resource you want to remove

200 OK

Resource removed

500 Internal Server Error

Some parameters are missing or not valid

Response Content-Types: application/json
Response Example (200 OK)
{
  "success": true,
  "message": "Some parameters are missing or not valid",
  "code": 409,
  "token": "eY...."
}
Response Example (500 Internal Server Error)
{
  "success": false,
  "message": "Some parameters are missing or not valid"
}

Get resource

GET /resource/<resourceID>

Get the resource

resourceID: string
in query

resource._id of your resource

200 OK

Resource

500 Internal Server Error

Some parameters are missing or not valid

Response Content-Types: application/json
Response Example (200 OK)
{
  "title": "age",
  "type": "collect",
  "description": "We ask the age of the user",
  "featureID": "F543524",
  "featureTitle": "Title of the feature",
  "appID": "324567",
  "userID": "3453647586",
  "createdAt": "Date",
  "updatedAt": "Date",
  "messages": [],
  "answers": [],
  "filters": {},
  "askIfKnown": false,
  "messageIfKnown": {
    "active": false,
    "messages": []
  },
  "properties": {
    "active": true,
    "attribute": {
      "name": "answer"
    },
    "tag": {
      "favorite_sports": {
        "add": "answer"
      }
    },
    "event": {
      "nb_login": {
        "inc": 1
      }
    }
  },
  "validation": {
    "active": true,
    "type": "email"
  },
  "actions": {
    "active": true,
    "list": [
      {
        "attribute": "validation",
        "operator": "=",
        "value": "validate",
        "list": [
          "Oui",
          "Non"
        ],
        "actions": {
          "active": true,
          "workflow": "d124542534",
          "logic": {
            "key": "statusCode",
            "value": {
              "201": {
                "active": true,
                "type": "resource",
                "goToResource": "string",
                "goToFeature": "string",
                "nextResourceDetail": {
                  "featureID": "featureID",
                  "featureTitle": "featureTitle",
                  "resourceID": "resource._id",
                  "resourceTitle": "resource.title"
                },
                "restart_process": false
              },
              "401": {
                "active": true,
                "type": "resource",
                "goToResource": "string",
                "goToFeature": "string",
                "nextResourceDetail": {
                  "featureID": "featureID",
                  "featureTitle": "featureTitle",
                  "resourceID": "resource._id",
                  "resourceTitle": "resource.title"
                },
                "restart_process": false
              },
              "default": {
                "active": true,
                "type": "resource",
                "goToResource": "string",
                "goToFeature": "string",
                "nextResourceDetail": {
                  "featureID": "featureID",
                  "featureTitle": "featureTitle",
                  "resourceID": "resource._id",
                  "resourceTitle": "resource.title"
                },
                "restart_process": false
              }
            }
          },
          "performOnlyIfAnswerValid": false
        }
      }
    ]
  },
  "api": {},
  "multiple_answers": false,
  "multiple_answers_options": {
    "attribute": "test_multiple",
    "hide_selected_answer": false,
    "max_answers": 2,
    "min_answers": 1,
    "tag": "favorite_sports",
    "messages": [
      [
        {
          "type": "text",
          "text": "Message 1"
        }
      ],
      [
        {
          "type": "text",
          "text": "Message 2"
        }
      ]
    ],
    "stop_button": {
      "display_first_occurence": true,
      "position": "first",
      "logic": {
        "nextResourceDetail": {},
        "goToResource": "4564758"
      }
    }
  },
  "activeSuggestions": false,
  "helpText": {
    "invalidAnswer": "Oups ! Il semblerait que votre réponse ne soit pas valide, pouvez vous la renseigner de nouveau"
  },
  "nlu": {
    "active": true,
    "nlu_config": [
      "nlu_config_item_id1",
      "nlu_config_item_id2"
    ]
  },
  "meta": {
    "position": 3
  },
  "logic": {
    "active": true,
    "type": "resource",
    "goToResource": "string",
    "goToFeature": "string",
    "nextResourceDetail": {
      "featureID": "featureID",
      "featureTitle": "featureTitle",
      "resourceID": "resource._id",
      "resourceTitle": "resource.title"
    },
    "restart_process": false
  },
  "linked_feature": "feature_id",
  "level": 0,
  "level_details": {
    "active": false,
    "show_return_button": true,
    "show_menu_button": true,
    "parent_resource": "43567712643"
  },
  "autocomplete": {
    "active": false,
    "smart_format_name": "applicant"
  }
}
Response Example (500 Internal Server Error)
{
  "success": false,
  "message": "Some parameters are missing or not valid"
}

Get Resources

GET /resources/<featureID>

Get the Resources of the a specific feature

Resources

500 Internal Server Error

Some parameters are missing or not valid

Response Content-Types: application/json
Response Example (200 OK)
[
  {
    "title": "age",
    "type": "collect",
    "description": "We ask the age of the user",
    "featureID": "F543524",
    "featureTitle": "Title of the feature",
    "appID": "324567",
    "userID": "3453647586",
    "createdAt": "Date",
    "updatedAt": "Date",
    "messages": [],
    "answers": [],
    "filters": {},
    "askIfKnown": false,
    "messageIfKnown": {
      "active": false,
      "messages": []
    },
    "properties": {
      "active": true,
      "attribute": {
        "name": "answer"
      },
      "tag": {
        "favorite_sports": {
          "add": "answer"
        }
      },
      "event": {
        "nb_login": {
          "inc": 1
        }
      }
    },
    "validation": {
      "active": true,
      "type": "email"
    },
    "actions": {
      "active": true,
      "list": [
        {
          "attribute": "validation",
          "operator": "=",
          "value": "validate",
          "list": [
            "Oui",
            "Non"
          ],
          "actions": {
            "active": true,
            "workflow": "d124542534",
            "logic": {
              "key": "statusCode",
              "value": {
                "201": {
                  "active": true,
                  "type": "resource",
                  "goToResource": "string",
                  "goToFeature": "string",
                  "nextResourceDetail": {
                    "featureID": "featureID",
                    "featureTitle": "featureTitle",
                    "resourceID": "resource._id",
                    "resourceTitle": "resource.title"
                  },
                  "restart_process": false
                },
                "401": {
                  "active": true,
                  "type": "resource",
                  "goToResource": "string",
                  "goToFeature": "string",
                  "nextResourceDetail": {
                    "featureID": "featureID",
                    "featureTitle": "featureTitle",
                    "resourceID": "resource._id",
                    "resourceTitle": "resource.title"
                  },
                  "restart_process": false
                },
                "default": {
                  "active": true,
                  "type": "resource",
                  "goToResource": "string",
                  "goToFeature": "string",
                  "nextResourceDetail": {
                    "featureID": "featureID",
                    "featureTitle": "featureTitle",
                    "resourceID": "resource._id",
                    "resourceTitle": "resource.title"
                  },
                  "restart_process": false
                }
              }
            },
            "performOnlyIfAnswerValid": false
          }
        }
      ]
    },
    "api": {},
    "multiple_answers": false,
    "multiple_answers_options": {
      "attribute": "test_multiple",
      "hide_selected_answer": false,
      "max_answers": 2,
      "min_answers": 1,
      "tag": "favorite_sports",
      "messages": [
        [
          {
            "type": "text",
            "text": "Message 1"
          }
        ],
        [
          {
            "type": "text",
            "text": "Message 2"
          }
        ]
      ],
      "stop_button": {
        "display_first_occurence": true,
        "position": "first",
        "logic": {
          "nextResourceDetail": {},
          "goToResource": "4564758"
        }
      }
    },
    "activeSuggestions": false,
    "helpText": {
      "invalidAnswer": "Oups ! Il semblerait que votre réponse ne soit pas valide, pouvez vous la renseigner de nouveau"
    },
    "nlu": {
      "active": true,
      "nlu_config": [
        "nlu_config_item_id1",
        "nlu_config_item_id2"
      ]
    },
    "meta": {
      "position": 3
    },
    "logic": {
      "active": true,
      "type": "resource",
      "goToResource": "string",
      "goToFeature": "string",
      "nextResourceDetail": {
        "featureID": "featureID",
        "featureTitle": "featureTitle",
        "resourceID": "resource._id",
        "resourceTitle": "resource.title"
      },
      "restart_process": false
    },
    "linked_feature": "feature_id",
    "level": 0,
    "level_details": {
      "active": false,
      "show_return_button": true,
      "show_menu_button": true,
      "parent_resource": "43567712643"
    },
    "autocomplete": {
      "active": false,
      "smart_format_name": "applicant"
    }
  }
]
Response Example (500 Internal Server Error)
{
  "success": false,
  "message": "Some parameters are missing or not valid"
}

Get all Resources

GET /resources/application/<appID>

Get the Resources of the application

Resources

500 Internal Server Error

Some parameters are missing or not valid

Response Content-Types: application/json
Response Example (200 OK)
[
  {
    "title": "age",
    "type": "collect",
    "description": "We ask the age of the user",
    "featureID": "F543524",
    "featureTitle": "Title of the feature",
    "appID": "324567",
    "userID": "3453647586",
    "createdAt": "Date",
    "updatedAt": "Date",
    "messages": [],
    "answers": [],
    "filters": {},
    "askIfKnown": false,
    "messageIfKnown": {
      "active": false,
      "messages": []
    },
    "properties": {
      "active": true,
      "attribute": {
        "name": "answer"
      },
      "tag": {
        "favorite_sports": {
          "add": "answer"
        }
      },
      "event": {
        "nb_login": {
          "inc": 1
        }
      }
    },
    "validation": {
      "active": true,
      "type": "email"
    },
    "actions": {
      "active": true,
      "list": [
        {
          "attribute": "validation",
          "operator": "=",
          "value": "validate",
          "list": [
            "Oui",
            "Non"
          ],
          "actions": {
            "active": true,
            "workflow": "d124542534",
            "logic": {
              "key": "statusCode",
              "value": {
                "201": {
                  "active": true,
                  "type": "resource",
                  "goToResource": "string",
                  "goToFeature": "string",
                  "nextResourceDetail": {
                    "featureID": "featureID",
                    "featureTitle": "featureTitle",
                    "resourceID": "resource._id",
                    "resourceTitle": "resource.title"
                  },
                  "restart_process": false
                },
                "401": {
                  "active": true,
                  "type": "resource",
                  "goToResource": "string",
                  "goToFeature": "string",
                  "nextResourceDetail": {
                    "featureID": "featureID",
                    "featureTitle": "featureTitle",
                    "resourceID": "resource._id",
                    "resourceTitle": "resource.title"
                  },
                  "restart_process": false
                },
                "default": {
                  "active": true,
                  "type": "resource",
                  "goToResource": "string",
                  "goToFeature": "string",
                  "nextResourceDetail": {
                    "featureID": "featureID",
                    "featureTitle": "featureTitle",
                    "resourceID": "resource._id",
                    "resourceTitle": "resource.title"
                  },
                  "restart_process": false
                }
              }
            },
            "performOnlyIfAnswerValid": false
          }
        }
      ]
    },
    "api": {},
    "multiple_answers": false,
    "multiple_answers_options": {
      "attribute": "test_multiple",
      "hide_selected_answer": false,
      "max_answers": 2,
      "min_answers": 1,
      "tag": "favorite_sports",
      "messages": [
        [
          {
            "type": "text",
            "text": "Message 1"
          }
        ],
        [
          {
            "type": "text",
            "text": "Message 2"
          }
        ]
      ],
      "stop_button": {
        "display_first_occurence": true,
        "position": "first",
        "logic": {
          "nextResourceDetail": {},
          "goToResource": "4564758"
        }
      }
    },
    "activeSuggestions": false,
    "helpText": {
      "invalidAnswer": "Oups ! Il semblerait que votre réponse ne soit pas valide, pouvez vous la renseigner de nouveau"
    },
    "nlu": {
      "active": true,
      "nlu_config": [
        "nlu_config_item_id1",
        "nlu_config_item_id2"
      ]
    },
    "meta": {
      "position": 3
    },
    "logic": {
      "active": true,
      "type": "resource",
      "goToResource": "string",
      "goToFeature": "string",
      "nextResourceDetail": {
        "featureID": "featureID",
        "featureTitle": "featureTitle",
        "resourceID": "resource._id",
        "resourceTitle": "resource.title"
      },
      "restart_process": false
    },
    "linked_feature": "feature_id",
    "level": 0,
    "level_details": {
      "active": false,
      "show_return_button": true,
      "show_menu_button": true,
      "parent_resource": "43567712643"
    },
    "autocomplete": {
      "active": false,
      "smart_format_name": "applicant"
    }
  }
]
Response Example (500 Internal Server Error)
{
  "success": false,
  "message": "Some parameters are missing or not valid"
}

Change Resources order

POST /resources/order

Change Resources order

Request Example
{
  "featureID": "5c822b07cc7a7e06bfc7a3ab",
  "resources": [
    "5c822b07cc7a7e06bfc7a3ae",
    "5c822b07cc7a7e06bfc7a3af",
    "5c822b07cc7a7e06bfc7a3ag"
  ]
}
200 OK

success

500 Internal Server Error

Some parameters are missing or not valid

Response Content-Types: application/json
Response Example (500 Internal Server Error)
{
  "success": false,
  "message": "Some parameters are missing or not valid"
}

Duplicate resource

POST /resources/duplicate/<resourceID>

Duplicate resource

resourceID: string
in query

Resource._id of your resource you want to move

200 OK

new resource you created

500 Internal Server Error

Some parameters are missing or not valid

Response Content-Types: application/json
Response Example (200 OK)
{
  "title": "age",
  "type": "collect",
  "description": "We ask the age of the user",
  "featureID": "F543524",
  "featureTitle": "Title of the feature",
  "appID": "324567",
  "userID": "3453647586",
  "createdAt": "Date",
  "updatedAt": "Date",
  "messages": [],
  "answers": [],
  "filters": {},
  "askIfKnown": false,
  "messageIfKnown": {
    "active": false,
    "messages": []
  },
  "properties": {
    "active": true,
    "attribute": {
      "name": "answer"
    },
    "tag": {
      "favorite_sports": {
        "add": "answer"
      }
    },
    "event": {
      "nb_login": {
        "inc": 1
      }
    }
  },
  "validation": {
    "active": true,
    "type": "email"
  },
  "actions": {
    "active": true,
    "list": [
      {
        "attribute": "validation",
        "operator": "=",
        "value": "validate",
        "list": [
          "Oui",
          "Non"
        ],
        "actions": {
          "active": true,
          "workflow": "d124542534",
          "logic": {
            "key": "statusCode",
            "value": {
              "201": {
                "active": true,
                "type": "resource",
                "goToResource": "string",
                "goToFeature": "string",
                "nextResourceDetail": {
                  "featureID": "featureID",
                  "featureTitle": "featureTitle",
                  "resourceID": "resource._id",
                  "resourceTitle": "resource.title"
                },
                "restart_process": false
              },
              "401": {
                "active": true,
                "type": "resource",
                "goToResource": "string",
                "goToFeature": "string",
                "nextResourceDetail": {
                  "featureID": "featureID",
                  "featureTitle": "featureTitle",
                  "resourceID": "resource._id",
                  "resourceTitle": "resource.title"
                },
                "restart_process": false
              },
              "default": {
                "active": true,
                "type": "resource",
                "goToResource": "string",
                "goToFeature": "string",
                "nextResourceDetail": {
                  "featureID": "featureID",
                  "featureTitle": "featureTitle",
                  "resourceID": "resource._id",
                  "resourceTitle": "resource.title"
                },
                "restart_process": false
              }
            }
          },
          "performOnlyIfAnswerValid": false
        }
      }
    ]
  },
  "api": {},
  "multiple_answers": false,
  "multiple_answers_options": {
    "attribute": "test_multiple",
    "hide_selected_answer": false,
    "max_answers": 2,
    "min_answers": 1,
    "tag": "favorite_sports",
    "messages": [
      [
        {
          "type": "text",
          "text": "Message 1"
        }
      ],
      [
        {
          "type": "text",
          "text": "Message 2"
        }
      ]
    ],
    "stop_button": {
      "display_first_occurence": true,
      "position": "first",
      "logic": {
        "nextResourceDetail": {},
        "goToResource": "4564758"
      }
    }
  },
  "activeSuggestions": false,
  "helpText": {
    "invalidAnswer": "Oups ! Il semblerait que votre réponse ne soit pas valide, pouvez vous la renseigner de nouveau"
  },
  "nlu": {
    "active": true,
    "nlu_config": [
      "nlu_config_item_id1",
      "nlu_config_item_id2"
    ]
  },
  "meta": {
    "position": 3
  },
  "logic": {
    "active": true,
    "type": "resource",
    "goToResource": "string",
    "goToFeature": "string",
    "nextResourceDetail": {
      "featureID": "featureID",
      "featureTitle": "featureTitle",
      "resourceID": "resource._id",
      "resourceTitle": "resource.title"
    },
    "restart_process": false
  },
  "linked_feature": "feature_id",
  "level": 0,
  "level_details": {
    "active": false,
    "show_return_button": true,
    "show_menu_button": true,
    "parent_resource": "43567712643"
  },
  "autocomplete": {
    "active": false,
    "smart_format_name": "applicant"
  }
}
Response Example (500 Internal Server Error)
{
  "success": false,
  "message": "Some parameters are missing or not valid"
}

Filter

Create filter

POST /filter

Create a new filter for this application

parameters of the filter we want to create, appID is required

Request Example
{
  "attribute": {
    "your_properties_name_1": {
      "operator": "=",
      "value": "John"
    }
  },
  "event": {
    "last_login": {
      "operator": "<",
      "value": "2017-10-30T18:22:44.598+0000"
    }
  },
  "tag": {
    "favorite_sports": {
      "operator": "OR",
      "value": [
        "natation",
        "soccer"
      ]
    }
  },
  "entity": "location",
  "operator": "and"
}
201 Created

Filter you juste created

500 Internal Server Error

Some parameters are missing or not valid

Response Content-Types: application/json
Response Example (201 Created)
{
  "attribute": {
    "your_properties_name_1": {
      "operator": "=",
      "value": "John"
    }
  },
  "event": {
    "last_login": {
      "operator": "<",
      "value": "2017-10-30T18:22:44.598+0000"
    }
  },
  "tag": {
    "favorite_sports": {
      "operator": "OR",
      "value": [
        "natation",
        "soccer"
      ]
    }
  },
  "entity": "location",
  "operator": "and"
}
Response Example (500 Internal Server Error)
{
  "success": false,
  "message": "Some parameters are missing or not valid"
}

Update filter

PATCH /filter/<filter_id>

Update the filter

json of the part you want to update in the filter

filter_id: string
in query

filter_id of your filter you want to update

Request Example
{
  "attribute": {
    "your_properties_name_1": {
      "operator": "=",
      "value": "John"
    }
  },
  "event": {
    "last_login": {
      "operator": "<",
      "value": "2017-10-30T18:22:44.598+0000"
    }
  },
  "tag": {
    "favorite_sports": {
      "operator": "OR",
      "value": [
        "natation",
        "soccer"
      ]
    }
  },
  "entity": "location",
  "operator": "and"
}
200 OK

Filter updated

500 Internal Server Error

Some parameters are missing or not valid

Response Content-Types: application/json
Response Example (200 OK)
{
  "attribute": {
    "your_properties_name_1": {
      "operator": "=",
      "value": "John"
    }
  },
  "event": {
    "last_login": {
      "operator": "<",
      "value": "2017-10-30T18:22:44.598+0000"
    }
  },
  "tag": {
    "favorite_sports": {
      "operator": "OR",
      "value": [
        "natation",
        "soccer"
      ]
    }
  },
  "entity": "location",
  "operator": "and"
}
Response Example (500 Internal Server Error)
{
  "success": false,
  "message": "Some parameters are missing or not valid"
}

Delete filter

DELETE /filter/<filter_id>

Delete the filter

filter_id: string
in query

filter_id of your filter you want to remove

200 OK

Message success

500 Internal Server Error

Some parameters are missing or not valid

Response Content-Types: application/json
Response Example (200 OK)
{
  "success": true,
  "message": "Some parameters are missing or not valid",
  "code": 409,
  "token": "eY...."
}
Response Example (500 Internal Server Error)
{
  "success": false,
  "message": "Some parameters are missing or not valid"
}

Get filter

GET /filter/<filter_id>

Get the filter

filter_id: string
in query

filter_id of your filter

200 OK

Filter

500 Internal Server Error

Some parameters are missing or not valid

Response Content-Types: application/json
Response Example (200 OK)
{
  "attribute": {
    "your_properties_name_1": {
      "operator": "=",
      "value": "John"
    }
  },
  "event": {
    "last_login": {
      "operator": "<",
      "value": "2017-10-30T18:22:44.598+0000"
    }
  },
  "tag": {
    "favorite_sports": {
      "operator": "OR",
      "value": [
        "natation",
        "soccer"
      ]
    }
  },
  "entity": "location",
  "operator": "and"
}
Response Example (500 Internal Server Error)
{
  "success": false,
  "message": "Some parameters are missing or not valid"
}

Get filters

GET /filters/<appID>

Get the filters of the a specific application

appID: string
in query

application._id of the application

Filter

500 Internal Server Error

Some parameters are missing or not valid

Response Content-Types: application/json
Response Example (200 OK)
[
  {
    "attribute": {
      "your_properties_name_1": {
        "operator": "=",
        "value": "John"
      }
    },
    "event": {
      "last_login": {
        "operator": "<",
        "value": "2017-10-30T18:22:44.598+0000"
      }
    },
    "tag": {
      "favorite_sports": {
        "operator": "OR",
        "value": [
          "natation",
          "soccer"
        ]
      }
    },
    "entity": "location",
    "operator": "and"
  }
]
Response Example (500 Internal Server Error)
{
  "success": false,
  "message": "Some parameters are missing or not valid"
}

Workflow

Create workflow

POST /workflow/<appID>

Create a new workflow for this application

parameters of the workflow we want to create, appID is required

Request Example
{
  "title": "create doc and send email",
  "description": "description of the workflow",
  "userID": "String",
  "appID": "String",
  "actions": [
    {
      "active": true,
      "type": "email",
      "params": {
        "params": {
          "active": true,
          "list": [
            {
              "title": "New password Azure AD",
              "fallback": "unknown",
              "input": "{{firstname}}",
              "options": {
                "length": 10,
                "numbers": true,
                "uppercase": true,
                "symbols": true
              },
              "table": {
                "value": "new_value",
                "johndoe": "jdoe"
              },
              "filters": {
                "attribute": {
                  "your_properties_name_1": {
                    "operator": "=",
                    "value": "John"
                  }
                },
                "event": {
                  "last_login": {
                    "operator": "<",
                    "value": "2017-10-30T18:22:44.598+0000"
                  }
                },
                "tag": {
                  "favorite_sports": {
                    "operator": "OR",
                    "value": [
                      "natation",
                      "soccer"
                    ]
                  }
                },
                "entity": "location",
                "operator": "and"
              }
            }
          ]
        }
      },
      "email": {
        "active": true,
        "list": [
          {
            "content": "<p></p>",
            "subject": "SUMMARY : {{first_name}}",
            "toEmail": [
              "john@doe.fr",
              "marc@fb.com"
            ],
            "fromEmail": "{{email}}",
            "filters": {
              "attribute": {
                "your_properties_name_1": {
                  "operator": "=",
                  "value": "John"
                }
              },
              "event": {
                "last_login": {
                  "operator": "<",
                  "value": "2017-10-30T18:22:44.598+0000"
                }
              },
              "tag": {
                "favorite_sports": {
                  "operator": "OR",
                  "value": [
                    "natation",
                    "soccer"
                  ]
                }
              },
              "entity": "location",
              "operator": "and"
            }
          }
        ],
        "content": "<p></p>",
        "subject": "SUMMARY : {{first_name}}",
        "toEmail": [
          "john@doe.fr",
          "marc@fb.com"
        ]
      },
      "webhook": {
        "active": true,
        "list": [
          {
            "type": "POST",
            "url": "https://api.vizir.co/example",
            "params": [
              {
                "title": "name",
                "value": "first_name"
              }
            ],
            "body": {
              "name": "{{name}}",
              "first_name": "{{first_name}}"
            },
            "headers": [
              {
                "title": "name",
                "value": "first_name"
              }
            ],
            "performOnlyIfAnswerValid": false,
            "save_response_in_attribute": false,
            "restart_process": false,
            "output": {
              "memory_details": [
                {
                  "api_value": "name"
                }
              ]
            }
          }
        ]
      }
    }
  ]
}
201 Created

workflow you juste created

500 Internal Server Error

Some parameters are missing or not valid

Response Content-Types: application/json
Response Example (201 Created)
{
  "title": "create doc and send email",
  "description": "description of the workflow",
  "userID": "String",
  "appID": "String",
  "actions": [
    {
      "active": true,
      "type": "email",
      "params": {
        "params": {
          "active": true,
          "list": [
            {
              "title": "New password Azure AD",
              "fallback": "unknown",
              "input": "{{firstname}}",
              "options": {
                "length": 10,
                "numbers": true,
                "uppercase": true,
                "symbols": true
              },
              "table": {
                "value": "new_value",
                "johndoe": "jdoe"
              },
              "filters": {
                "attribute": {
                  "your_properties_name_1": {
                    "operator": "=",
                    "value": "John"
                  }
                },
                "event": {
                  "last_login": {
                    "operator": "<",
                    "value": "2017-10-30T18:22:44.598+0000"
                  }
                },
                "tag": {
                  "favorite_sports": {
                    "operator": "OR",
                    "value": [
                      "natation",
                      "soccer"
                    ]
                  }
                },
                "entity": "location",
                "operator": "and"
              }
            }
          ]
        }
      },
      "email": {
        "active": true,
        "list": [
          {
            "content": "<p></p>",
            "subject": "SUMMARY : {{first_name}}",
            "toEmail": [
              "john@doe.fr",
              "marc@fb.com"
            ],
            "fromEmail": "{{email}}",
            "filters": {
              "attribute": {
                "your_properties_name_1": {
                  "operator": "=",
                  "value": "John"
                }
              },
              "event": {
                "last_login": {
                  "operator": "<",
                  "value": "2017-10-30T18:22:44.598+0000"
                }
              },
              "tag": {
                "favorite_sports": {
                  "operator": "OR",
                  "value": [
                    "natation",
                    "soccer"
                  ]
                }
              },
              "entity": "location",
              "operator": "and"
            }
          }
        ],
        "content": "<p></p>",
        "subject": "SUMMARY : {{first_name}}",
        "toEmail": [
          "john@doe.fr",
          "marc@fb.com"
        ]
      },
      "webhook": {
        "active": true,
        "list": [
          {
            "type": "POST",
            "url": "https://api.vizir.co/example",
            "params": [
              {
                "title": "name",
                "value": "first_name"
              }
            ],
            "body": {
              "name": "{{name}}",
              "first_name": "{{first_name}}"
            },
            "headers": [
              {
                "title": "name",
                "value": "first_name"
              }
            ],
            "performOnlyIfAnswerValid": false,
            "save_response_in_attribute": false,
            "restart_process": false,
            "output": {
              "memory_details": [
                {
                  "api_value": "name"
                }
              ]
            }
          }
        ]
      }
    }
  ]
}
Response Example (500 Internal Server Error)
{
  "success": false,
  "message": "Some parameters are missing or not valid"
}

Update workflow

PATCH /workflow/<workflow_id>

Update the workflow

json of the part you want to update in the workflow

workflow_id: string
in query

workflow_id of your workflow you want to update

Request Example
{
  "title": "create doc and send email",
  "description": "description of the workflow",
  "userID": "String",
  "appID": "String",
  "actions": [
    {
      "active": true,
      "type": "email",
      "params": {
        "params": {
          "active": true,
          "list": [
            {
              "title": "New password Azure AD",
              "fallback": "unknown",
              "input": "{{firstname}}",
              "options": {
                "length": 10,
                "numbers": true,
                "uppercase": true,
                "symbols": true
              },
              "table": {
                "value": "new_value",
                "johndoe": "jdoe"
              },
              "filters": {
                "attribute": {
                  "your_properties_name_1": {
                    "operator": "=",
                    "value": "John"
                  }
                },
                "event": {
                  "last_login": {
                    "operator": "<",
                    "value": "2017-10-30T18:22:44.598+0000"
                  }
                },
                "tag": {
                  "favorite_sports": {
                    "operator": "OR",
                    "value": [
                      "natation",
                      "soccer"
                    ]
                  }
                },
                "entity": "location",
                "operator": "and"
              }
            }
          ]
        }
      },
      "email": {
        "active": true,
        "list": [
          {
            "content": "<p></p>",
            "subject": "SUMMARY : {{first_name}}",
            "toEmail": [
              "john@doe.fr",
              "marc@fb.com"
            ],
            "fromEmail": "{{email}}",
            "filters": {
              "attribute": {
                "your_properties_name_1": {
                  "operator": "=",
                  "value": "John"
                }
              },
              "event": {
                "last_login": {
                  "operator": "<",
                  "value": "2017-10-30T18:22:44.598+0000"
                }
              },
              "tag": {
                "favorite_sports": {
                  "operator": "OR",
                  "value": [
                    "natation",
                    "soccer"
                  ]
                }
              },
              "entity": "location",
              "operator": "and"
            }
          }
        ],
        "content": "<p></p>",
        "subject": "SUMMARY : {{first_name}}",
        "toEmail": [
          "john@doe.fr",
          "marc@fb.com"
        ]
      },
      "webhook": {
        "active": true,
        "list": [
          {
            "type": "POST",
            "url": "https://api.vizir.co/example",
            "params": [
              {
                "title": "name",
                "value": "first_name"
              }
            ],
            "body": {
              "name": "{{name}}",
              "first_name": "{{first_name}}"
            },
            "headers": [
              {
                "title": "name",
                "value": "first_name"
              }
            ],
            "performOnlyIfAnswerValid": false,
            "save_response_in_attribute": false,
            "restart_process": false,
            "output": {
              "memory_details": [
                {
                  "api_value": "name"
                }
              ]
            }
          }
        ]
      }
    }
  ]
}
200 OK

workflow updated

500 Internal Server Error

Some parameters are missing or not valid

Response Content-Types: application/json
Response Example (200 OK)
{
  "title": "create doc and send email",
  "description": "description of the workflow",
  "userID": "String",
  "appID": "String",
  "actions": [
    {
      "active": true,
      "type": "email",
      "params": {
        "params": {
          "active": true,
          "list": [
            {
              "title": "New password Azure AD",
              "fallback": "unknown",
              "input": "{{firstname}}",
              "options": {
                "length": 10,
                "numbers": true,
                "uppercase": true,
                "symbols": true
              },
              "table": {
                "value": "new_value",
                "johndoe": "jdoe"
              },
              "filters": {
                "attribute": {
                  "your_properties_name_1": {
                    "operator": "=",
                    "value": "John"
                  }
                },
                "event": {
                  "last_login": {
                    "operator": "<",
                    "value": "2017-10-30T18:22:44.598+0000"
                  }
                },
                "tag": {
                  "favorite_sports": {
                    "operator": "OR",
                    "value": [
                      "natation",
                      "soccer"
                    ]
                  }
                },
                "entity": "location",
                "operator": "and"
              }
            }
          ]
        }
      },
      "email": {
        "active": true,
        "list": [
          {
            "content": "<p></p>",
            "subject": "SUMMARY : {{first_name}}",
            "toEmail": [
              "john@doe.fr",
              "marc@fb.com"
            ],
            "fromEmail": "{{email}}",
            "filters": {
              "attribute": {
                "your_properties_name_1": {
                  "operator": "=",
                  "value": "John"
                }
              },
              "event": {
                "last_login": {
                  "operator": "<",
                  "value": "2017-10-30T18:22:44.598+0000"
                }
              },
              "tag": {
                "favorite_sports": {
                  "operator": "OR",
                  "value": [
                    "natation",
                    "soccer"
                  ]
                }
              },
              "entity": "location",
              "operator": "and"
            }
          }
        ],
        "content": "<p></p>",
        "subject": "SUMMARY : {{first_name}}",
        "toEmail": [
          "john@doe.fr",
          "marc@fb.com"
        ]
      },
      "webhook": {
        "active": true,
        "list": [
          {
            "type": "POST",
            "url": "https://api.vizir.co/example",
            "params": [
              {
                "title": "name",
                "value": "first_name"
              }
            ],
            "body": {
              "name": "{{name}}",
              "first_name": "{{first_name}}"
            },
            "headers": [
              {
                "title": "name",
                "value": "first_name"
              }
            ],
            "performOnlyIfAnswerValid": false,
            "save_response_in_attribute": false,
            "restart_process": false,
            "output": {
              "memory_details": [
                {
                  "api_value": "name"
                }
              ]
            }
          }
        ]
      }
    }
  ]
}
Response Example (500 Internal Server Error)
{
  "success": false,
  "message": "Some parameters are missing or not valid"
}

Delete workflow

DELETE /workflow/<workflow_id>

Delete the workflow

workflow_id: string
in query

workflow_id of your workflow you want to remove

200 OK

Message success

500 Internal Server Error

Some parameters are missing or not valid

Response Content-Types: application/json
Response Example (200 OK)
{
  "success": true,
  "message": "Some parameters are missing or not valid",
  "code": 409,
  "token": "eY...."
}
Response Example (500 Internal Server Error)
{
  "success": false,
  "message": "Some parameters are missing or not valid"
}

Get workflow

GET /workflow/<workflow_id>

Get the workflow

workflow_id: string
in query

workflow_id of your workflow

200 OK

workflow

500 Internal Server Error

Some parameters are missing or not valid

Response Content-Types: application/json
Response Example (200 OK)
{
  "title": "create doc and send email",
  "description": "description of the workflow",
  "userID": "String",
  "appID": "String",
  "actions": [
    {
      "active": true,
      "type": "email",
      "params": {
        "params": {
          "active": true,
          "list": [
            {
              "title": "New password Azure AD",
              "fallback": "unknown",
              "input": "{{firstname}}",
              "options": {
                "length": 10,
                "numbers": true,
                "uppercase": true,
                "symbols": true
              },
              "table": {
                "value": "new_value",
                "johndoe": "jdoe"
              },
              "filters": {
                "attribute": {
                  "your_properties_name_1": {
                    "operator": "=",
                    "value": "John"
                  }
                },
                "event": {
                  "last_login": {
                    "operator": "<",
                    "value": "2017-10-30T18:22:44.598+0000"
                  }
                },
                "tag": {
                  "favorite_sports": {
                    "operator": "OR",
                    "value": [
                      "natation",
                      "soccer"
                    ]
                  }
                },
                "entity": "location",
                "operator": "and"
              }
            }
          ]
        }
      },
      "email": {
        "active": true,
        "list": [
          {
            "content": "<p></p>",
            "subject": "SUMMARY : {{first_name}}",
            "toEmail": [
              "john@doe.fr",
              "marc@fb.com"
            ],
            "fromEmail": "{{email}}",
            "filters": {
              "attribute": {
                "your_properties_name_1": {
                  "operator": "=",
                  "value": "John"
                }
              },
              "event": {
                "last_login": {
                  "operator": "<",
                  "value": "2017-10-30T18:22:44.598+0000"
                }
              },
              "tag": {
                "favorite_sports": {
                  "operator": "OR",
                  "value": [
                    "natation",
                    "soccer"
                  ]
                }
              },
              "entity": "location",
              "operator": "and"
            }
          }
        ],
        "content": "<p></p>",
        "subject": "SUMMARY : {{first_name}}",
        "toEmail": [
          "john@doe.fr",
          "marc@fb.com"
        ]
      },
      "webhook": {
        "active": true,
        "list": [
          {
            "type": "POST",
            "url": "https://api.vizir.co/example",
            "params": [
              {
                "title": "name",
                "value": "first_name"
              }
            ],
            "body": {
              "name": "{{name}}",
              "first_name": "{{first_name}}"
            },
            "headers": [
              {
                "title": "name",
                "value": "first_name"
              }
            ],
            "performOnlyIfAnswerValid": false,
            "save_response_in_attribute": false,
            "restart_process": false,
            "output": {
              "memory_details": [
                {
                  "api_value": "name"
                }
              ]
            }
          }
        ]
      }
    }
  ]
}
Response Example (500 Internal Server Error)
{
  "success": false,
  "message": "Some parameters are missing or not valid"
}

Get workflows

GET /workflows/<appID>

Get the workflows of the a specific application

appID: string
in query

application._id of the application

workflow

500 Internal Server Error

Some parameters are missing or not valid

Response Content-Types: application/json
Response Example (200 OK)
[
  {
    "title": "create doc and send email",
    "description": "description of the workflow",
    "userID": "String",
    "appID": "String",
    "actions": [
      {
        "active": true,
        "type": "email",
        "params": {
          "params": {
            "active": true,
            "list": [
              {
                "title": "New password Azure AD",
                "fallback": "unknown",
                "input": "{{firstname}}",
                "options": {
                  "length": 10,
                  "numbers": true,
                  "uppercase": true,
                  "symbols": true
                },
                "table": {
                  "value": "new_value",
                  "johndoe": "jdoe"
                },
                "filters": {
                  "attribute": {
                    "your_properties_name_1": {
                      "operator": "=",
                      "value": "John"
                    }
                  },
                  "event": {
                    "last_login": {
                      "operator": "<",
                      "value": "2017-10-30T18:22:44.598+0000"
                    }
                  },
                  "tag": {
                    "favorite_sports": {
                      "operator": "OR",
                      "value": [
                        "natation",
                        "soccer"
                      ]
                    }
                  },
                  "entity": "location",
                  "operator": "and"
                }
              }
            ]
          }
        },
        "email": {
          "active": true,
          "list": [
            {
              "content": "<p></p>",
              "subject": "SUMMARY : {{first_name}}",
              "toEmail": [
                "john@doe.fr",
                "marc@fb.com"
              ],
              "fromEmail": "{{email}}",
              "filters": {
                "attribute": {
                  "your_properties_name_1": {
                    "operator": "=",
                    "value": "John"
                  }
                },
                "event": {
                  "last_login": {
                    "operator": "<",
                    "value": "2017-10-30T18:22:44.598+0000"
                  }
                },
                "tag": {
                  "favorite_sports": {
                    "operator": "OR",
                    "value": [
                      "natation",
                      "soccer"
                    ]
                  }
                },
                "entity": "location",
                "operator": "and"
              }
            }
          ],
          "content": "<p></p>",
          "subject": "SUMMARY : {{first_name}}",
          "toEmail": [
            "john@doe.fr",
            "marc@fb.com"
          ]
        },
        "webhook": {
          "active": true,
          "list": [
            {
              "type": "POST",
              "url": "https://api.vizir.co/example",
              "params": [
                {
                  "title": "name",
                  "value": "first_name"
                }
              ],
              "body": {
                "name": "{{name}}",
                "first_name": "{{first_name}}"
              },
              "headers": [
                {
                  "title": "name",
                  "value": "first_name"
                }
              ],
              "performOnlyIfAnswerValid": false,
              "save_response_in_attribute": false,
              "restart_process": false,
              "output": {
                "memory_details": [
                  null
                ]
              }
            }
          ]
        }
      }
    ]
  }
]
Response Example (500 Internal Server Error)
{
  "success": false,
  "message": "Some parameters are missing or not valid"
}

Statistics

Get conversation Statistics

GET /statistics/conversation/<appID>

Get the conversation statistics of the a specific application

appID: string
in params

application._id of the application

from: number
in query

starting date javascript format (datenow())

to: number
in query

starting date javascript format (datenow())

200 OK

@TODO: list of statistics
see github

500 Internal Server Error

Some parameters are missing or not valid

Response Content-Types: application/json
Response Example (500 Internal Server Error)
{
  "success": false,
  "message": "Some parameters are missing or not valid"
}

Get nlu Statistics

GET /statistics/nlu/<appID>

Get the nlu statistics of the a specific application

appID: string
in params

application._id of the application

from: number
in query

starting date javascript format (datenow())

to: number
in query

starting date javascript format (datenow())

200 OK

Object with nb_request, nb_request_positive, nb_request_negative, nb_request_understood, nb_request_not_understood entries

500 Internal Server Error

Some parameters are missing or not valid

Response Content-Types: application/json
Response Example (500 Internal Server Error)
{
  "success": false,
  "message": "Some parameters are missing or not valid"
}

Get nlu couples Statistics

GET /statistics/nlucouple/<appID>

Get the nlu couples statistics of the a specific application

appID: string
in params

application._id of the application

from: number
in query

starting date javascript format (datenow())

to: number
in query

starting date javascript format (datenow())

200 OK

array of the most frequent couple intent/entities with entries: _id: {intent, entities (array)}, nb_request, nb_request_positive, nb_request_negative

500 Internal Server Error

Some parameters are missing or not valid

Response Content-Types: application/json
Response Example (500 Internal Server Error)
{
  "success": false,
  "message": "Some parameters are missing or not valid"
}

Get nlu negative Statistics

GET /statistics/nlunegative/<appID>

Get the nlu negative statistics of the a specific application

appID: string
in params

application._id of the application

from: number
in query

starting date javascript format (datenow())

to: number
in query

starting date javascript format (datenow())

page: number
in query

Starting at 1

200 OK

array of the last negative feedback givent by the users with entries: intent (_id), score, createdAt, respondentID, entities: [], text (respondent input), resource (title, featureTitle, resourceID)

500 Internal Server Error

Some parameters are missing or not valid

Response Content-Types: application/json
Response Example (500 Internal Server Error)
{
  "success": false,
  "message": "Some parameters are missing or not valid"
}

Get details Statistics

PUT /statistics/attribute/<appID>

Get the userprofile statistics of the a specific application

appID: string
in params

application._id of the application

from: number
in query

starting date javascript format (datenow())

to: number
in query

starting date javascript format (datenow())

body: string
in body

@TODO: see github for now object of the query

200 OK

@TODO: list of statistics
see github

500 Internal Server Error

Some parameters are missing or not valid

Response Content-Types: application/json
Response Example (500 Internal Server Error)
{
  "success": false,
  "message": "Some parameters are missing or not valid"
}

Get notation Statistics

GET /statistics/notation/<appID>

Get the notation statistics of the a specific application

appID: string
in params

application._id of the application

from: number
in query

starting date javascript format (datenow())

to: number
in query

starting date javascript format (datenow())

statistics

500 Internal Server Error

Some parameters are missing or not valid

Response Content-Types: application/json
Response Example (200 OK)
{
  "success": true,
  "message": "Some parameters are missing or not valid",
  "appID": "appID",
  "from": "123456789876543",
  "to": "123456789876543",
  "nb_users": 16,
  "notation": 3.4,
  "table": [
    {
      "respondentID": "3425",
      "question_1": "answer_1"
    },
    {
      "respondentID": "3426",
      "question_1": "answer_1"
    }
  ]
}
Response Example (500 Internal Server Error)
{
  "success": false,
  "message": "Some parameters are missing or not valid"
}

Respondents

Remove all Respondent's data

DELETE /respondents/<appID>

Remove all Respondent's data

appID: string
in params

appID

200 OK

success

500 Internal Server Error

Some parameters are missing or not valid

Response Content-Types: application/json
Response Example (200 OK)
{
  "success": true,
  "message": "Some parameters are missing or not valid",
  "code": 409,
  "token": "eY...."
}
Response Example (500 Internal Server Error)
{
  "success": false,
  "message": "Some parameters are missing or not valid"
}

Get Respondent

GET /respondent/<respondentID>

Get Respondent's user Profile

respondentID: string
in params

respondentID

200 OK

Respondent with only attribute, tag and event

500 Internal Server Error

Some parameters are missing or not valid

Response Content-Types: application/json
Response Example (200 OK)
{
  "respondentID": "RERAEREZAREZ",
  "messages": "array",
  "attribute": {
    "source": "string",
    "lastResponse": "string",
    "isSubUser": "boolean",
    "userParent": "string",
    "rootUser": "string",
    "last_process": "string",
    "last_process_title": "string",
    "isProcessOver": "boolean",
    "is_smart_resource": "boolean",
    "smart_attribute": "object",
    "smart_tag": "object",
    "smart_format_related_attribute": "object"
  },
  "tag": {
    "sub_users": "array"
  },
  "event": {
    "numConversations": "number",
    "numMessages": "number",
    "lastReplied": "number",
    "firstMessage": "string",
    "misunderstood": "number",
    "total_misunderstood": "number"
  },
  "processes": {
    "active": true,
    "last_active": {
      "respondentID": "string",
      "featureID": "string",
      "title": "string",
      "cost": "0"
    }
  },
  "liveStatus": false,
  "isConnected": false
}
Response Example (500 Internal Server Error)
{
  "success": false,
  "message": "Some parameters are missing or not valid"
}

Update full Respondent

PUT /respondent/<respondentID>

update Respondent's user Profile

respondentID: string
in params

respondentID

Request Example
{
  "liveStatus": true
}
200 OK

Respondents

500 Internal Server Error

Some parameters are missing or not valid

Response Content-Types: application/json
Response Example (200 OK)
{
  "respondentID": "RERAEREZAREZ",
  "messages": "array",
  "attribute": {
    "source": "string",
    "lastResponse": "string",
    "isSubUser": "boolean",
    "userParent": "string",
    "rootUser": "string",
    "last_process": "string",
    "last_process_title": "string",
    "isProcessOver": "boolean",
    "is_smart_resource": "boolean",
    "smart_attribute": "object",
    "smart_tag": "object",
    "smart_format_related_attribute": "object"
  },
  "tag": {
    "sub_users": "array"
  },
  "event": {
    "numConversations": "number",
    "numMessages": "number",
    "lastReplied": "number",
    "firstMessage": "string",
    "misunderstood": "number",
    "total_misunderstood": "number"
  },
  "processes": {
    "active": true,
    "last_active": {
      "respondentID": "string",
      "featureID": "string",
      "title": "string",
      "cost": "0"
    }
  },
  "liveStatus": false,
  "isConnected": false
}
Response Example (500 Internal Server Error)
{
  "success": false,
  "message": "Some parameters are missing or not valid"
}

Remove Respondent

DELETE /respondent/<respondentID>

Remove Respondent and all the sub respondent of this respondent

respondentID: string
in params

respondentID

200 OK

Respondents

500 Internal Server Error

Some parameters are missing or not valid

Response Content-Types: application/json
Response Example (200 OK)
{
  "respondentID": "RERAEREZAREZ",
  "messages": "array",
  "attribute": {
    "source": "string",
    "lastResponse": "string",
    "isSubUser": "boolean",
    "userParent": "string",
    "rootUser": "string",
    "last_process": "string",
    "last_process_title": "string",
    "isProcessOver": "boolean",
    "is_smart_resource": "boolean",
    "smart_attribute": "object",
    "smart_tag": "object",
    "smart_format_related_attribute": "object"
  },
  "tag": {
    "sub_users": "array"
  },
  "event": {
    "numConversations": "number",
    "numMessages": "number",
    "lastReplied": "number",
    "firstMessage": "string",
    "misunderstood": "number",
    "total_misunderstood": "number"
  },
  "processes": {
    "active": true,
    "last_active": {
      "respondentID": "string",
      "featureID": "string",
      "title": "string",
      "cost": "0"
    }
  },
  "liveStatus": false,
  "isConnected": false
}
Response Example (500 Internal Server Error)
{
  "success": false,
  "message": "Some parameters are missing or not valid"
}

Update Respondent Profile

PUT /respondent/profile/<respondentID>

update Respondent's user Profile, WARNING: We will replace the value of attribute, tag and event with the new values you just sent

respondentID: string
in params

respondentID

Request Example
{
  "attribute": {
    "first_name": "John"
  },
  "event": {
    "nb_login": 3
  },
  "tag": {
    "favorite_cities": [
      "NYC, Paris"
    ]
  }
}
200 OK

Respondents

500 Internal Server Error

Some parameters are missing or not valid

Response Content-Types: application/json
Response Example (200 OK)
{
  "respondentID": "RERAEREZAREZ",
  "messages": "array",
  "attribute": {
    "source": "string",
    "lastResponse": "string",
    "isSubUser": "boolean",
    "userParent": "string",
    "rootUser": "string",
    "last_process": "string",
    "last_process_title": "string",
    "isProcessOver": "boolean",
    "is_smart_resource": "boolean",
    "smart_attribute": "object",
    "smart_tag": "object",
    "smart_format_related_attribute": "object"
  },
  "tag": {
    "sub_users": "array"
  },
  "event": {
    "numConversations": "number",
    "numMessages": "number",
    "lastReplied": "number",
    "firstMessage": "string",
    "misunderstood": "number",
    "total_misunderstood": "number"
  },
  "processes": {
    "active": true,
    "last_active": {
      "respondentID": "string",
      "featureID": "string",
      "title": "string",
      "cost": "0"
    }
  },
  "liveStatus": false,
  "isConnected": false
}
Response Example (500 Internal Server Error)
{
  "success": false,
  "message": "Some parameters are missing or not valid"
}

Send a message

POST /sendMessage

Send a new message to a unique Respondent

information about the message we will send

type: string

can be resource or feature

resourceID: string

resourceID of the resource you want to send to the user

featureID: string

featureID of the resource you want to send to the user

appID: string

appID

Request Example
{
  "type": "feature",
  "resourceID": "1FZE23423",
  "featureID": "1FZE23423",
  "appID": "1FZE23423"
}
200 OK

Success

500 Internal Server Error

Some parameters are missing or not valid

Response Content-Types: application/json
Response Example (200 OK)
{
  "success": true,
  "message": "Some parameters are missing or not valid",
  "code": 409,
  "token": "eY...."
}
Response Example (500 Internal Server Error)
{
  "success": false,
  "message": "Some parameters are missing or not valid"
}

Close webview

POST /closewebview

Close the webview on behalf of the user

information about the message we will send

respondentID: string

respondentID

Request Example
{
  "respondentID": "124567"
}
200 OK

Success

500 Internal Server Error

Some parameters are missing or not valid

Response Content-Types: application/json
Response Example (200 OK)
{
  "success": true,
  "message": "Some parameters are missing or not valid",
  "code": 409,
  "token": "eY...."
}
Response Example (500 Internal Server Error)
{
  "success": false,
  "message": "Some parameters are missing or not valid"
}

Resume conversation

POST /resumeconversation

Resume the conversation with a specific sub user use case: Sometimes, we want to provide a viual interface to show the sub uses of a specfic user. So from this webview, we can resume the conversation directly on the sub user context

we will need the 2 respondentID, the rootOne and the child one (sub_users)

rootUser: string

respondentID

respondentID: string

respondentID

appID: string

appID

Request Example
{
  "rootUser": "124568",
  "respondentID": "124567",
  "appID": "124567"
}
200 OK

Success

500 Internal Server Error

Some parameters are missing or not valid

Response Content-Types: application/json
Response Example (200 OK)
{
  "success": true,
  "message": "Some parameters are missing or not valid",
  "code": 409,
  "token": "eY...."
}
Response Example (500 Internal Server Error)
{
  "success": false,
  "message": "Some parameters are missing or not valid"
}

Execute workflow

POST /executeaction

Execute the workflow on the behalf of a respondent (from the dashboard or via API)

we will need the respondentID, the appID and the workflowID

appID: string

appID

respondentID: string

respondentID

workflowID: string

workflowID

Request Example
{
  "appID": "124568",
  "respondentID": "124567",
  "workflowID": "124566"
}
200 OK

respondent

500 Internal Server Error

Some parameters are missing or not valid

Response Content-Types: application/json
Response Example (200 OK)
{
  "respondentID": "RERAEREZAREZ",
  "messages": "array",
  "attribute": {
    "source": "string",
    "lastResponse": "string",
    "isSubUser": "boolean",
    "userParent": "string",
    "rootUser": "string",
    "last_process": "string",
    "last_process_title": "string",
    "isProcessOver": "boolean",
    "is_smart_resource": "boolean",
    "smart_attribute": "object",
    "smart_tag": "object",
    "smart_format_related_attribute": "object"
  },
  "tag": {
    "sub_users": "array"
  },
  "event": {
    "numConversations": "number",
    "numMessages": "number",
    "lastReplied": "number",
    "firstMessage": "string",
    "misunderstood": "number",
    "total_misunderstood": "number"
  },
  "processes": {
    "active": true,
    "last_active": {
      "respondentID": "string",
      "featureID": "string",
      "title": "string",
      "cost": "0"
    }
  },
  "liveStatus": false,
  "isConnected": false
}
Response Example (500 Internal Server Error)
{
  "success": false,
  "message": "Some parameters are missing or not valid"
}

Process

Get Processes

GET /processes/<appID>

Get the list of Process for the application

appID: string
in params

application._id of the application

Processes

500 Internal Server Error

Some parameters are missing or not valid

Response Content-Types: application/json
Response Example (200 OK)
[
  {
    "featureID": "23456787",
    "process": {
      "active": true,
      "title": "_LOGIN_",
      "cost": 43,
      "attributes_list": [
        {
          "name": "incoterm",
          "resetAttribute": true
        }
      ],
      "process_termination": [
        {
          "attribute": "validation",
          "operator": "=",
          "value": "validate",
          "price": "0.3",
          "actions": {
            "active": true,
            "workflow": "workflow_001",
            "logic": {
              "default": {
                "active": true,
                "goToResource": "234567",
                "goToFeature": "345637458",
                "nextResourceDetail": {}
              }
            }
          }
        }
      ]
    },
    "memory": {
      "attribute": {
        "test_attribute": "9"
      },
      "event": {
        "test_event": {
          "inc": 1
        }
      }
    },
    "respondentData": {
      "processStarted": 3,
      "processFinished": 2
    }
  }
]
Response Example (500 Internal Server Error)
{
  "success": false,
  "message": "Some parameters are missing or not valid"
}

Get Process Respondents

GET /process/<featureID>

Get the list of respondents for the process

featureID: string
in params

featureID of the process

rootRespondent: string
in query

You can filter by rootrespondent to get all the process of a specific user

respondents

500 Internal Server Error

Some parameters are missing or not valid

Response Content-Types: application/json
Response Example (200 OK)
[
  {
    "respondentID": "RERAEREZAREZ",
    "messages": "array",
    "attribute": {
      "source": "string",
      "lastResponse": "string",
      "isSubUser": "boolean",
      "userParent": "string",
      "rootUser": "string",
      "last_process": "string",
      "last_process_title": "string",
      "isProcessOver": "boolean",
      "is_smart_resource": "boolean",
      "smart_attribute": "object",
      "smart_tag": "object",
      "smart_format_related_attribute": "object"
    },
    "tag": {
      "sub_users": "array"
    },
    "event": {
      "numConversations": "number",
      "numMessages": "number",
      "lastReplied": "number",
      "firstMessage": "string",
      "misunderstood": "number",
      "total_misunderstood": "number"
    },
    "processes": {
      "active": true,
      "last_active": {
        "respondentID": "string",
        "featureID": "string",
        "title": "string",
        "cost": "0"
      }
    },
    "liveStatus": false,
    "isConnected": false
  }
]
Response Example (500 Internal Server Error)
{
  "success": false,
  "message": "Some parameters are missing or not valid"
}

Intent

Get intent List

GET /intents/{agent_id}

Get List of all the intent for a specific agent

agent_id: object
in params

agent_id

List of intents

default

Some parameters are missing or not valid

Response Content-Types: application/json
Response Example (200 OK)
[
  {
    "_id": "string",
    "agent_id": "string",
    "intent_name": "string",
    "is_small_talk": false,
    "meta": {
      "entities": [
        "entity_id_1",
        "entity_id_2"
      ],
      "expressions_nb": 23,
      "expressions_details": {
        "en": 12,
        "fr": 11
      }
    }
  }
]
Response Example (default )
{
  "success": false,
  "message": "Some parameters are missing or not valid"
}

Get single intent

GET /intent/{intent_id}

Get a single intent

intent_id: object
in params

intent_id

200 OK

Intent

default

Some parameters are missing or not valid

Response Content-Types: application/json
Response Example (200 OK)
{
  "_id": "string",
  "agent_id": "string",
  "intent_name": "string",
  "is_small_talk": false,
  "meta": {
    "entities": [
      "entity_id_1",
      "entity_id_2"
    ],
    "expressions_nb": 23,
    "expressions_details": {
      "en": 12,
      "fr": 11
    }
  }
}
Response Example (default )
{
  "success": false,
  "message": "Some parameters are missing or not valid"
}

Update Intent

PATCH /intent/{intent_id}

Update an intent

json valide de la Agent

intent_id: object
in params

intent_id

Request Example
{
  "_id": "string",
  "agent_id": "string",
  "intent_name": "string",
  "is_small_talk": false,
  "meta": {
    "entities": [
      "entity_id_1",
      "entity_id_2"
    ],
    "expressions_nb": 23,
    "expressions_details": {
      "en": 12,
      "fr": 11
    }
  }
}
200 OK

Agent updated

default

Some parameters are missing or not valid

Response Content-Types: application/json
Response Example (200 OK)
{
  "_id": "string",
  "agent_id": "string",
  "intent_name": "string",
  "is_small_talk": false,
  "meta": {
    "entities": [
      "entity_id_1",
      "entity_id_2"
    ],
    "expressions_nb": 23,
    "expressions_details": {
      "en": 12,
      "fr": 11
    }
  }
}
Response Example (default )
{
  "success": false,
  "message": "Some parameters are missing or not valid"
}

Delete Intent

DELETE /intent/{intent_id}

Delete an intent

intent_id: object
in params

intent_id

200 OK

OK

default

Some parameters are missing or not valid

Response Content-Types: application/json
Response Example (200 OK)
{
  "success": true,
  "message": "Some parameters are missing or not valid",
  "code": 409,
  "token": "eY...."
}
Response Example (default )
{
  "success": false,
  "message": "Some parameters are missing or not valid"
}

Create Intent

POST /intent/{intent_id}

Create a new intent for a specific agent

json valide de l'intent

agent_id: object
in params

agent_id

Request Example
{
  "_id": "string",
  "agent_id": "string",
  "intent_name": "string",
  "is_small_talk": false,
  "meta": {
    "entities": [
      "entity_id_1",
      "entity_id_2"
    ],
    "expressions_nb": 23,
    "expressions_details": {
      "en": 12,
      "fr": 11
    }
  }
}
200 OK

New intent

default

Some parameters are missing or not valid

Response Content-Types: application/json
Response Example (200 OK)
{
  "_id": "string",
  "agent_id": "string",
  "intent_name": "string",
  "is_small_talk": false,
  "meta": {
    "entities": [
      "entity_id_1",
      "entity_id_2"
    ],
    "expressions_nb": 23,
    "expressions_details": {
      "en": 12,
      "fr": 11
    }
  }
}
Response Example (default )
{
  "success": false,
  "message": "Some parameters are missing or not valid"
}

Get list of small talk (common intents)

GET /intents/common/:agent_id

Get List intent pre build with expressions

agent_id: object
in params

agent_id

lang: object
in query

language of the small talk we want to get

List of intents

default

Some parameters are missing or not valid

Response Content-Types: application/json
Response Example (200 OK)
[
  {
    "_id": "string",
    "agent_id": "string",
    "intent_name": "string",
    "is_small_talk": false,
    "meta": {
      "entities": [
        "entity_id_1",
        "entity_id_2"
      ],
      "expressions_nb": 23,
      "expressions_details": {
        "en": 12,
        "fr": 11
      }
    }
  }
]
Response Example (default )
{
  "success": false,
  "message": "Some parameters are missing or not valid"
}

Add a common intent

POST /intents/common/:agent_id

Add a common intent to an application

agent_id: object
in params

agent_id of the intent we want to copy on our application

intent: object
in params

intent we want to copy on our application

201 Created

Intent we created

default

Some parameters are missing or not valid

Response Content-Types: application/json
Response Example (201 Created)
{
  "_id": "string",
  "agent_id": "string",
  "intent_name": "string",
  "is_small_talk": false,
  "meta": {
    "entities": [
      "entity_id_1",
      "entity_id_2"
    ],
    "expressions_nb": 23,
    "expressions_details": {
      "en": 12,
      "fr": 11
    }
  }
}
Response Example (default )
{
  "success": false,
  "message": "Some parameters are missing or not valid"
}

Entity

Get Agent Entities

GET /entities/{agent_id}

Get a list of Entities for a specific agent

agent_id: object
in params

agent_id

Entity List

default

Some parameters are missing or not valid

Response Content-Types: application/json
Response Example (200 OK)
[
  {
    "_id": "entity_000001",
    "agent_id": "agent_000001",
    "entity_name": "city",
    "slot_data_type": "string",
    "synonyms": [
      {
        "synonym_reference": "country_europe",
        "synonym_variants": [
          "France",
          "Italy",
          "Germany"
        ]
      }
    ],
    "lookup_table": {
      "name": "country",
      "elements": [
        "France",
        "Italy",
        "Germany"
      ]
    },
    "saveAsAttribute": true,
    "attribute": [
      "destination-country",
      "departure-country"
    ],
    "additional_attribute": {
      "type": "value",
      "value": 100000,
      "unit": "$",
      "grain": "day",
      "from": {
        "value": "2019-04-19T21:00:00.000+02:00",
        "grain": "minute"
      }
    },
    "isDuckling": true
  }
]
Response Example (default )
{
  "success": false,
  "message": "Some parameters are missing or not valid"
}

Get single entity

GET /entity/{entity_id}

Get a single Entity

entity_id: object
in params

entity_id

200 OK

Entity

default

Some parameters are missing or not valid

Response Content-Types: application/json
Response Example (200 OK)
{
  "_id": "entity_000001",
  "agent_id": "agent_000001",
  "entity_name": "city",
  "slot_data_type": "string",
  "synonyms": [
    {
      "synonym_reference": "country_europe",
      "synonym_variants": [
        "France",
        "Italy",
        "Germany"
      ]
    }
  ],
  "lookup_table": {
    "name": "country",
    "elements": [
      "France",
      "Italy",
      "Germany"
    ]
  },
  "saveAsAttribute": true,
  "attribute": [
    "destination-country",
    "departure-country"
  ],
  "additional_attribute": {
    "type": "value",
    "value": 100000,
    "unit": "$",
    "grain": "day",
    "from": {
      "value": "2019-04-19T21:00:00.000+02:00",
      "grain": "minute"
    }
  },
  "isDuckling": true
}
Response Example (default )
{
  "success": false,
  "message": "Some parameters are missing or not valid"
}

Update Entity

PATCH /entity/{entity_id}

Update an Entity

json valide de la Entity

entity_id: object
in params

entity_id

Request Example
{
  "_id": "entity_000001",
  "agent_id": "agent_000001",
  "entity_name": "city",
  "slot_data_type": "string",
  "synonyms": [
    {
      "synonym_reference": "country_europe",
      "synonym_variants": [
        "France",
        "Italy",
        "Germany"
      ]
    }
  ],
  "lookup_table": {
    "name": "country",
    "elements": [
      "France",
      "Italy",
      "Germany"
    ]
  },
  "saveAsAttribute": true,
  "attribute": [
    "destination-country",
    "departure-country"
  ],
  "additional_attribute": {
    "type": "value",
    "value": 100000,
    "unit": "$",
    "grain": "day",
    "from": {
      "value": "2019-04-19T21:00:00.000+02:00",
      "grain": "minute"
    }
  },
  "isDuckling": true
}
200 OK

Entity updated

default

Some parameters are missing or not valid

Response Content-Types: application/json
Response Example (200 OK)
{
  "_id": "entity_000001",
  "agent_id": "agent_000001",
  "entity_name": "city",
  "slot_data_type": "string",
  "synonyms": [
    {
      "synonym_reference": "country_europe",
      "synonym_variants": [
        "France",
        "Italy",
        "Germany"
      ]
    }
  ],
  "lookup_table": {
    "name": "country",
    "elements": [
      "France",
      "Italy",
      "Germany"
    ]
  },
  "saveAsAttribute": true,
  "attribute": [
    "destination-country",
    "departure-country"
  ],
  "additional_attribute": {
    "type": "value",
    "value": 100000,
    "unit": "$",
    "grain": "day",
    "from": {
      "value": "2019-04-19T21:00:00.000+02:00",
      "grain": "minute"
    }
  },
  "isDuckling": true
}
Response Example (default )
{
  "success": false,
  "message": "Some parameters are missing or not valid"
}

Create Entity

POST /entity/{entity_id}

Create an Entity

json valide de la Entity

appID: object
in params

appID

Request Example
{
  "_id": "entity_000001",
  "agent_id": "agent_000001",
  "entity_name": "city",
  "slot_data_type": "string",
  "synonyms": [
    {
      "synonym_reference": "country_europe",
      "synonym_variants": [
        "France",
        "Italy",
        "Germany"
      ]
    }
  ],
  "lookup_table": {
    "name": "country",
    "elements": [
      "France",
      "Italy",
      "Germany"
    ]
  },
  "saveAsAttribute": true,
  "attribute": [
    "destination-country",
    "departure-country"
  ],
  "additional_attribute": {
    "type": "value",
    "value": 100000,
    "unit": "$",
    "grain": "day",
    "from": {
      "value": "2019-04-19T21:00:00.000+02:00",
      "grain": "minute"
    }
  },
  "isDuckling": true
}
201 Created

Entity created

default

Some parameters are missing or not valid

Response Content-Types: application/json
Response Example (201 Created)
{
  "_id": "entity_000001",
  "agent_id": "agent_000001",
  "entity_name": "city",
  "slot_data_type": "string",
  "synonyms": [
    {
      "synonym_reference": "country_europe",
      "synonym_variants": [
        "France",
        "Italy",
        "Germany"
      ]
    }
  ],
  "lookup_table": {
    "name": "country",
    "elements": [
      "France",
      "Italy",
      "Germany"
    ]
  },
  "saveAsAttribute": true,
  "attribute": [
    "destination-country",
    "departure-country"
  ],
  "additional_attribute": {
    "type": "value",
    "value": 100000,
    "unit": "$",
    "grain": "day",
    "from": {
      "value": "2019-04-19T21:00:00.000+02:00",
      "grain": "minute"
    }
  },
  "isDuckling": true
}
Response Example (default )
{
  "success": false,
  "message": "Some parameters are missing or not valid"
}

Delete Entity

DELETE /entity/{entity_id}

Delete an Entity

entity_id: object
in params

entity_id

200 OK

Success message

default

Some parameters are missing or not valid

Response Content-Types: application/json
Response Example (200 OK)
{
  "success": true,
  "message": "Some parameters are missing or not valid",
  "code": 409,
  "token": "eY...."
}
Response Example (default )
{
  "success": false,
  "message": "Some parameters are missing or not valid"
}

Config

Get Agent config

GET /nluconfigs/{agent_id}

Get a list of Config for a specific agent

agent_id: object
in params

agent_id

config List

default

Some parameters are missing or not valid

Response Content-Types: application/json
Response Example (200 OK)
[
  null
]
Response Example (default )
{
  "success": false,
  "message": "Some parameters are missing or not valid"
}

Get single config

GET /nluconfig/{config_id}

Get a single config

config: object
in params

config

200 OK

Config

default

Some parameters are missing or not valid

Response Content-Types: application/json
Response Example (200 OK)
{
  "appID": "string",
  "intent": {
    "_id": "string",
    "agent_id": "string",
    "intent_name": "string",
    "is_small_talk": false,
    "meta": {
      "entities": [
        "entity_id_1",
        "entity_id_2"
      ],
      "expressions_nb": 23,
      "expressions_details": {
        "en": 12,
        "fr": 11
      }
    }
  },
  "entities": [
    {
      "_id": "entity_000001",
      "agent_id": "agent_000001",
      "entity_name": "city",
      "slot_data_type": "string",
      "synonyms": [
        {
          "synonym_reference": "country_europe",
          "synonym_variants": [
            "France",
            "Italy",
            "Germany"
          ]
        }
      ],
      "lookup_table": {
        "name": "country",
        "elements": [
          "France",
          "Italy",
          "Germany"
        ]
      },
      "saveAsAttribute": true,
      "attribute": [
        "destination-country",
        "departure-country"
      ],
      "additional_attribute": {
        "type": "value",
        "value": 100000,
        "unit": "$",
        "grain": "day",
        "from": {
          "value": "2019-04-19T21:00:00.000+02:00",
          "grain": "minute"
        }
      },
      "isDuckling": true
    }
  ],
  "logic": {
    "active": true,
    "type": "resource",
    "goToResource": "string",
    "goToFeature": "string",
    "nextResourceDetail": {
      "featureID": "featureID",
      "featureTitle": "featureTitle",
      "resourceID": "resource._id",
      "resourceTitle": "resource.title"
    },
    "restart_process": false
  },
  "saveEntities": true,
  "nlu": {
    "active": true
  },
  "context": {
    "resume_context": true,
    "entity_value": {
      "active": true,
      "type": "resource",
      "goToResource": "string",
      "goToFeature": "string",
      "nextResourceDetail": {
        "featureID": "featureID",
        "featureTitle": "featureTitle",
        "resourceID": "resource._id",
        "resourceTitle": "resource.title"
      },
      "restart_process": false
    }
  },
  "feature_linked": {
    "active": true,
    "default": {
      "active": true,
      "type": "resource",
      "goToResource": "string",
      "goToFeature": "string",
      "nextResourceDetail": {
        "featureID": "featureID",
        "featureTitle": "featureTitle",
        "resourceID": "resource._id",
        "resourceTitle": "resource.title"
      },
      "restart_process": false
    },
    "entity_value": {
      "active": true,
      "type": "resource",
      "goToResource": "string",
      "goToFeature": "string",
      "nextResourceDetail": {
        "featureID": "featureID",
        "featureTitle": "featureTitle",
        "resourceID": "resource._id",
        "resourceTitle": "resource.title"
      },
      "restart_process": false
    }
  },
  "smsResponse": "We understood that you have a wifi issue.\n        Please click on the link below or answer SMS to continue the conversation"
}
Response Example (default )
{
  "success": false,
  "message": "Some parameters are missing or not valid"
}

Update Config

PATCH /nluconfig/{config_id}

Update an Config

json valide de la Config

config_id: object
in params

config_id

Request Example
{
  "appID": "string",
  "intent": {
    "_id": "string",
    "agent_id": "string",
    "intent_name": "string",
    "is_small_talk": false,
    "meta": {
      "entities": [
        "entity_id_1",
        "entity_id_2"
      ],
      "expressions_nb": 23,
      "expressions_details": {
        "en": 12,
        "fr": 11
      }
    }
  },
  "entities": [
    {
      "_id": "entity_000001",
      "agent_id": "agent_000001",
      "entity_name": "city",
      "slot_data_type": "string",
      "synonyms": [
        {
          "synonym_reference": "country_europe",
          "synonym_variants": [
            "France",
            "Italy",
            "Germany"
          ]
        }
      ],
      "lookup_table": {
        "name": "country",
        "elements": [
          "France",
          "Italy",
          "Germany"
        ]
      },
      "saveAsAttribute": true,
      "attribute": [
        "destination-country",
        "departure-country"
      ],
      "additional_attribute": {
        "type": "value",
        "value": 100000,
        "unit": "$",
        "grain": "day",
        "from": {
          "value": "2019-04-19T21:00:00.000+02:00",
          "grain": "minute"
        }
      },
      "isDuckling": true
    }
  ],
  "logic": {
    "active": true,
    "type": "resource",
    "goToResource": "string",
    "goToFeature": "string",
    "nextResourceDetail": {
      "featureID": "featureID",
      "featureTitle": "featureTitle",
      "resourceID": "resource._id",
      "resourceTitle": "resource.title"
    },
    "restart_process": false
  },
  "saveEntities": true,
  "nlu": {
    "active": true
  },
  "context": {
    "resume_context": true,
    "entity_value": {
      "active": true,
      "type": "resource",
      "goToResource": "string",
      "goToFeature": "string",
      "nextResourceDetail": {
        "featureID": "featureID",
        "featureTitle": "featureTitle",
        "resourceID": "resource._id",
        "resourceTitle": "resource.title"
      },
      "restart_process": false
    }
  },
  "feature_linked": {
    "active": true,
    "default": {
      "active": true,
      "type": "resource",
      "goToResource": "string",
      "goToFeature": "string",
      "nextResourceDetail": {
        "featureID": "featureID",
        "featureTitle": "featureTitle",
        "resourceID": "resource._id",
        "resourceTitle": "resource.title"
      },
      "restart_process": false
    },
    "entity_value": {
      "active": true,
      "type": "resource",
      "goToResource": "string",
      "goToFeature": "string",
      "nextResourceDetail": {
        "featureID": "featureID",
        "featureTitle": "featureTitle",
        "resourceID": "resource._id",
        "resourceTitle": "resource.title"
      },
      "restart_process": false
    }
  },
  "smsResponse": "We understood that you have a wifi issue.\n        Please click on the link below or answer SMS to continue the conversation"
}
200 OK

NluconfigItem updated

default

Some parameters are missing or not valid

Response Content-Types: application/json
Response Example (200 OK)
{
  "appID": "string",
  "intent": {
    "_id": "string",
    "agent_id": "string",
    "intent_name": "string",
    "is_small_talk": false,
    "meta": {
      "entities": [
        "entity_id_1",
        "entity_id_2"
      ],
      "expressions_nb": 23,
      "expressions_details": {
        "en": 12,
        "fr": 11
      }
    }
  },
  "entities": [
    {
      "_id": "entity_000001",
      "agent_id": "agent_000001",
      "entity_name": "city",
      "slot_data_type": "string",
      "synonyms": [
        {
          "synonym_reference": "country_europe",
          "synonym_variants": [
            "France",
            "Italy",
            "Germany"
          ]
        }
      ],
      "lookup_table": {
        "name": "country",
        "elements": [
          "France",
          "Italy",
          "Germany"
        ]
      },
      "saveAsAttribute": true,
      "attribute": [
        "destination-country",
        "departure-country"
      ],
      "additional_attribute": {
        "type": "value",
        "value": 100000,
        "unit": "$",
        "grain": "day",
        "from": {
          "value": "2019-04-19T21:00:00.000+02:00",
          "grain": "minute"
        }
      },
      "isDuckling": true
    }
  ],
  "logic": {
    "active": true,
    "type": "resource",
    "goToResource": "string",
    "goToFeature": "string",
    "nextResourceDetail": {
      "featureID": "featureID",
      "featureTitle": "featureTitle",
      "resourceID": "resource._id",
      "resourceTitle": "resource.title"
    },
    "restart_process": false
  },
  "saveEntities": true,
  "nlu": {
    "active": true
  },
  "context": {
    "resume_context": true,
    "entity_value": {
      "active": true,
      "type": "resource",
      "goToResource": "string",
      "goToFeature": "string",
      "nextResourceDetail": {
        "featureID": "featureID",
        "featureTitle": "featureTitle",
        "resourceID": "resource._id",
        "resourceTitle": "resource.title"
      },
      "restart_process": false
    }
  },
  "feature_linked": {
    "active": true,
    "default": {
      "active": true,
      "type": "resource",
      "goToResource": "string",
      "goToFeature": "string",
      "nextResourceDetail": {
        "featureID": "featureID",
        "featureTitle": "featureTitle",
        "resourceID": "resource._id",
        "resourceTitle": "resource.title"
      },
      "restart_process": false
    },
    "entity_value": {
      "active": true,
      "type": "resource",
      "goToResource": "string",
      "goToFeature": "string",
      "nextResourceDetail": {
        "featureID": "featureID",
        "featureTitle": "featureTitle",
        "resourceID": "resource._id",
        "resourceTitle": "resource.title"
      },
      "restart_process": false
    }
  },
  "smsResponse": "We understood that you have a wifi issue.\n        Please click on the link below or answer SMS to continue the conversation"
}
Response Example (default )
{
  "success": false,
  "message": "Some parameters are missing or not valid"
}

Create Config

POST /nluconfig/{config_id}

Create an Config

json valide de la Config

appID: object
in params

appID

Request Example
{
  "appID": "string",
  "intent": {
    "_id": "string",
    "agent_id": "string",
    "intent_name": "string",
    "is_small_talk": false,
    "meta": {
      "entities": [
        "entity_id_1",
        "entity_id_2"
      ],
      "expressions_nb": 23,
      "expressions_details": {
        "en": 12,
        "fr": 11
      }
    }
  },
  "entities": [
    {
      "_id": "entity_000001",
      "agent_id": "agent_000001",
      "entity_name": "city",
      "slot_data_type": "string",
      "synonyms": [
        {
          "synonym_reference": "country_europe",
          "synonym_variants": [
            "France",
            "Italy",
            "Germany"
          ]
        }
      ],
      "lookup_table": {
        "name": "country",
        "elements": [
          "France",
          "Italy",
          "Germany"
        ]
      },
      "saveAsAttribute": true,
      "attribute": [
        "destination-country",
        "departure-country"
      ],
      "additional_attribute": {
        "type": "value",
        "value": 100000,
        "unit": "$",
        "grain": "day",
        "from": {
          "value": "2019-04-19T21:00:00.000+02:00",
          "grain": "minute"
        }
      },
      "isDuckling": true
    }
  ],
  "logic": {
    "active": true,
    "type": "resource",
    "goToResource": "string",
    "goToFeature": "string",
    "nextResourceDetail": {
      "featureID": "featureID",
      "featureTitle": "featureTitle",
      "resourceID": "resource._id",
      "resourceTitle": "resource.title"
    },
    "restart_process": false
  },
  "saveEntities": true,
  "nlu": {
    "active": true
  },
  "context": {
    "resume_context": true,
    "entity_value": {
      "active": true,
      "type": "resource",
      "goToResource": "string",
      "goToFeature": "string",
      "nextResourceDetail": {
        "featureID": "featureID",
        "featureTitle": "featureTitle",
        "resourceID": "resource._id",
        "resourceTitle": "resource.title"
      },
      "restart_process": false
    }
  },
  "feature_linked": {
    "active": true,
    "default": {
      "active": true,
      "type": "resource",
      "goToResource": "string",
      "goToFeature": "string",
      "nextResourceDetail": {
        "featureID": "featureID",
        "featureTitle": "featureTitle",
        "resourceID": "resource._id",
        "resourceTitle": "resource.title"
      },
      "restart_process": false
    },
    "entity_value": {
      "active": true,
      "type": "resource",
      "goToResource": "string",
      "goToFeature": "string",
      "nextResourceDetail": {
        "featureID": "featureID",
        "featureTitle": "featureTitle",
        "resourceID": "resource._id",
        "resourceTitle": "resource.title"
      },
      "restart_process": false
    }
  },
  "smsResponse": "We understood that you have a wifi issue.\n        Please click on the link below or answer SMS to continue the conversation"
}
201 Created

Config created

default

Some parameters are missing or not valid

Response Content-Types: application/json
Response Example (201 Created)
{
  "appID": "string",
  "intent": {
    "_id": "string",
    "agent_id": "string",
    "intent_name": "string",
    "is_small_talk": false,
    "meta": {
      "entities": [
        "entity_id_1",
        "entity_id_2"
      ],
      "expressions_nb": 23,
      "expressions_details": {
        "en": 12,
        "fr": 11
      }
    }
  },
  "entities": [
    {
      "_id": "entity_000001",
      "agent_id": "agent_000001",
      "entity_name": "city",
      "slot_data_type": "string",
      "synonyms": [
        {
          "synonym_reference": "country_europe",
          "synonym_variants": [
            "France",
            "Italy",
            "Germany"
          ]
        }
      ],
      "lookup_table": {
        "name": "country",
        "elements": [
          "France",
          "Italy",
          "Germany"
        ]
      },
      "saveAsAttribute": true,
      "attribute": [
        "destination-country",
        "departure-country"
      ],
      "additional_attribute": {
        "type": "value",
        "value": 100000,
        "unit": "$",
        "grain": "day",
        "from": {
          "value": "2019-04-19T21:00:00.000+02:00",
          "grain": "minute"
        }
      },
      "isDuckling": true
    }
  ],
  "logic": {
    "active": true,
    "type": "resource",
    "goToResource": "string",
    "goToFeature": "string",
    "nextResourceDetail": {
      "featureID": "featureID",
      "featureTitle": "featureTitle",
      "resourceID": "resource._id",
      "resourceTitle": "resource.title"
    },
    "restart_process": false
  },
  "saveEntities": true,
  "nlu": {
    "active": true
  },
  "context": {
    "resume_context": true,
    "entity_value": {
      "active": true,
      "type": "resource",
      "goToResource": "string",
      "goToFeature": "string",
      "nextResourceDetail": {
        "featureID": "featureID",
        "featureTitle": "featureTitle",
        "resourceID": "resource._id",
        "resourceTitle": "resource.title"
      },
      "restart_process": false
    }
  },
  "feature_linked": {
    "active": true,
    "default": {
      "active": true,
      "type": "resource",
      "goToResource": "string",
      "goToFeature": "string",
      "nextResourceDetail": {
        "featureID": "featureID",
        "featureTitle": "featureTitle",
        "resourceID": "resource._id",
        "resourceTitle": "resource.title"
      },
      "restart_process": false
    },
    "entity_value": {
      "active": true,
      "type": "resource",
      "goToResource": "string",
      "goToFeature": "string",
      "nextResourceDetail": {
        "featureID": "featureID",
        "featureTitle": "featureTitle",
        "resourceID": "resource._id",
        "resourceTitle": "resource.title"
      },
      "restart_process": false
    }
  },
  "smsResponse": "We understood that you have a wifi issue.\n        Please click on the link below or answer SMS to continue the conversation"
}
Response Example (default )
{
  "success": false,
  "message": "Some parameters are missing or not valid"
}

Delete Config

DELETE /nluconfig/{config_id}

Delete a Config

config_id: object
in params

config_id

200 OK

Success message

default

Some parameters are missing or not valid

Response Content-Types: application/json
Response Example (200 OK)
{
  "success": true,
  "message": "Some parameters are missing or not valid",
  "code": 409,
  "token": "eY...."
}
Response Example (default )
{
  "success": false,
  "message": "Some parameters are missing or not valid"
}

Expression

Get single expression

GET /expression/{expression_id}

Get a single expression

expression_id: object
in params

expression_id

200 OK

Expression

default

Some parameters are missing or not valid

Response Content-Types: application/json
Response Example (200 OK)
{
  "_id": "expression_000001",
  "intent": {
    "_id": "string",
    "agent_id": "string",
    "intent_name": "string",
    "is_small_talk": false,
    "meta": {
      "entities": [
        "entity_id_1",
        "entity_id_2"
      ],
      "expressions_nb": 23,
      "expressions_details": {
        "en": 12,
        "fr": 11
      }
    }
  },
  "language": "fr",
  "language_is_default": true,
  "expression_text": "Where can I find a restaurant in Paris ?",
  "expression_highlighted_text": "string",
  "parameters": [
    {
      "_id": "parameter_000001",
      "parameter_required": true,
      "parameter_value": "Paris",
      "expression_id": "expression_000001",
      "parameter_start": 13,
      "parameter_end": 18,
      "entity": {
        "_id": "entity_000001",
        "agent_id": "agent_000001",
        "entity_name": "city",
        "slot_data_type": "string",
        "synonyms": [
          {
            "synonym_reference": "country_europe",
            "synonym_variants": [
              "France",
              "Italy",
              "Germany"
            ]
          }
        ],
        "lookup_table": {
          "name": "country",
          "elements": [
            "France",
            "Italy",
            "Germany"
          ]
        },
        "saveAsAttribute": true,
        "attribute": [
          "destination-country",
          "departure-country"
        ],
        "additional_attribute": {
          "type": "value",
          "value": 100000,
          "unit": "$",
          "grain": "day",
          "from": {
            "value": "2019-04-19T21:00:00.000+02:00",
            "grain": "minute"
          }
        },
        "isDuckling": true
      }
    }
  ]
}
Response Example (default )
{
  "success": false,
  "message": "Some parameters are missing or not valid"
}

Create Expression

POST /expression/{expression_id}

Create an Expression

json valide de la Expression

intent_id: object
in params

intent_id

Request Example
{
  "_id": "expression_000001",
  "intent": {
    "_id": "string",
    "agent_id": "string",
    "intent_name": "string",
    "is_small_talk": false,
    "meta": {
      "entities": [
        "entity_id_1",
        "entity_id_2"
      ],
      "expressions_nb": 23,
      "expressions_details": {
        "en": 12,
        "fr": 11
      }
    }
  },
  "language": "fr",
  "language_is_default": true,
  "expression_text": "Where can I find a restaurant in Paris ?",
  "expression_highlighted_text": "string",
  "parameters": [
    {
      "_id": "parameter_000001",
      "parameter_required": true,
      "parameter_value": "Paris",
      "expression_id": "expression_000001",
      "parameter_start": 13,
      "parameter_end": 18,
      "entity": {
        "_id": "entity_000001",
        "agent_id": "agent_000001",
        "entity_name": "city",
        "slot_data_type": "string",
        "synonyms": [
          {
            "synonym_reference": "country_europe",
            "synonym_variants": [
              "France",
              "Italy",
              "Germany"
            ]
          }
        ],
        "lookup_table": {
          "name": "country",
          "elements": [
            "France",
            "Italy",
            "Germany"
          ]
        },
        "saveAsAttribute": true,
        "attribute": [
          "destination-country",
          "departure-country"
        ],
        "additional_attribute": {
          "type": "value",
          "value": 100000,
          "unit": "$",
          "grain": "day",
          "from": {
            "value": "2019-04-19T21:00:00.000+02:00",
            "grain": "minute"
          }
        },
        "isDuckling": true
      }
    }
  ]
}
200 OK

Expression

default

Some parameters are missing or not valid

Response Content-Types: application/json
Response Example (200 OK)
{
  "_id": "expression_000001",
  "intent": {
    "_id": "string",
    "agent_id": "string",
    "intent_name": "string",
    "is_small_talk": false,
    "meta": {
      "entities": [
        "entity_id_1",
        "entity_id_2"
      ],
      "expressions_nb": 23,
      "expressions_details": {
        "en": 12,
        "fr": 11
      }
    }
  },
  "language": "fr",
  "language_is_default": true,
  "expression_text": "Where can I find a restaurant in Paris ?",
  "expression_highlighted_text": "string",
  "parameters": [
    {
      "_id": "parameter_000001",
      "parameter_required": true,
      "parameter_value": "Paris",
      "expression_id": "expression_000001",
      "parameter_start": 13,
      "parameter_end": 18,
      "entity": {
        "_id": "entity_000001",
        "agent_id": "agent_000001",
        "entity_name": "city",
        "slot_data_type": "string",
        "synonyms": [
          {
            "synonym_reference": "country_europe",
            "synonym_variants": [
              "France",
              "Italy",
              "Germany"
            ]
          }
        ],
        "lookup_table": {
          "name": "country",
          "elements": [
            "France",
            "Italy",
            "Germany"
          ]
        },
        "saveAsAttribute": true,
        "attribute": [
          "destination-country",
          "departure-country"
        ],
        "additional_attribute": {
          "type": "value",
          "value": 100000,
          "unit": "$",
          "grain": "day",
          "from": {
            "value": "2019-04-19T21:00:00.000+02:00",
            "grain": "minute"
          }
        },
        "isDuckling": true
      }
    }
  ]
}
Response Example (default )
{
  "success": false,
  "message": "Some parameters are missing or not valid"
}

Update Expression

PATCH /expression/{expression_id}

Update an Expression

information we want to update in the expression

expression_id: object
in params

expression_id

Request Example
{
  "_id": "expression_000001",
  "intent": {
    "_id": "string",
    "agent_id": "string",
    "intent_name": "string",
    "is_small_talk": false,
    "meta": {
      "entities": [
        "entity_id_1",
        "entity_id_2"
      ],
      "expressions_nb": 23,
      "expressions_details": {
        "en": 12,
        "fr": 11
      }
    }
  },
  "language": "fr",
  "language_is_default": true,
  "expression_text": "Where can I find a restaurant in Paris ?",
  "expression_highlighted_text": "string",
  "parameters": [
    {
      "_id": "parameter_000001",
      "parameter_required": true,
      "parameter_value": "Paris",
      "expression_id": "expression_000001",
      "parameter_start": 13,
      "parameter_end": 18,
      "entity": {
        "_id": "entity_000001",
        "agent_id": "agent_000001",
        "entity_name": "city",
        "slot_data_type": "string",
        "synonyms": [
          {
            "synonym_reference": "country_europe",
            "synonym_variants": [
              "France",
              "Italy",
              "Germany"
            ]
          }
        ],
        "lookup_table": {
          "name": "country",
          "elements": [
            "France",
            "Italy",
            "Germany"
          ]
        },
        "saveAsAttribute": true,
        "attribute": [
          "destination-country",
          "departure-country"
        ],
        "additional_attribute": {
          "type": "value",
          "value": 100000,
          "unit": "$",
          "grain": "day",
          "from": {
            "value": "2019-04-19T21:00:00.000+02:00",
            "grain": "minute"
          }
        },
        "isDuckling": true
      }
    }
  ]
}
200 OK

Expression updated

default

Some parameters are missing or not valid

Response Content-Types: application/json
Response Example (200 OK)
{
  "_id": "expression_000001",
  "intent": {
    "_id": "string",
    "agent_id": "string",
    "intent_name": "string",
    "is_small_talk": false,
    "meta": {
      "entities": [
        "entity_id_1",
        "entity_id_2"
      ],
      "expressions_nb": 23,
      "expressions_details": {
        "en": 12,
        "fr": 11
      }
    }
  },
  "language": "fr",
  "language_is_default": true,
  "expression_text": "Where can I find a restaurant in Paris ?",
  "expression_highlighted_text": "string",
  "parameters": [
    {
      "_id": "parameter_000001",
      "parameter_required": true,
      "parameter_value": "Paris",
      "expression_id": "expression_000001",
      "parameter_start": 13,
      "parameter_end": 18,
      "entity": {
        "_id": "entity_000001",
        "agent_id": "agent_000001",
        "entity_name": "city",
        "slot_data_type": "string",
        "synonyms": [
          {
            "synonym_reference": "country_europe",
            "synonym_variants": [
              "France",
              "Italy",
              "Germany"
            ]
          }
        ],
        "lookup_table": {
          "name": "country",
          "elements": [
            "France",
            "Italy",
            "Germany"
          ]
        },
        "saveAsAttribute": true,
        "attribute": [
          "destination-country",
          "departure-country"
        ],
        "additional_attribute": {
          "type": "value",
          "value": 100000,
          "unit": "$",
          "grain": "day",
          "from": {
            "value": "2019-04-19T21:00:00.000+02:00",
            "grain": "minute"
          }
        },
        "isDuckling": true
      }
    }
  ]
}
Response Example (default )
{
  "success": false,
  "message": "Some parameters are missing or not valid"
}

Delete Expression

DELETE /expression/{expression_id}

Delete an Expression

expression_id: object
in params

expression_id

200 OK

Message success true

default

Some parameters are missing or not valid

Response Content-Types: application/json
Response Example (200 OK)
{
  "success": true,
  "message": "Some parameters are missing or not valid",
  "code": 409,
  "token": "eY...."
}
Response Example (default )
{
  "success": false,
  "message": "Some parameters are missing or not valid"
}

Get expressions list

GET /expressions/{intent_id}

Get a list expression for a specific intent

intent_id: object
in params

intent_id

page: object
in query

page number

lang: object
in query

language of the utterances we are looking for

entity_id: object
in query

It is possible to filter the expressions with an entity. entity_id of the utterances we are looking for

Expression List

default

Some parameters are missing or not valid

Response Content-Types: application/json
Response Example (200 OK)
[
  {
    "_id": "expression_000001",
    "intent": {
      "_id": "string",
      "agent_id": "string",
      "intent_name": "string",
      "is_small_talk": false,
      "meta": {
        "entities": [
          "entity_id_1",
          "entity_id_2"
        ],
        "expressions_nb": 23,
        "expressions_details": {
          "en": 12,
          "fr": 11
        }
      }
    },
    "language": "fr",
    "language_is_default": true,
    "expression_text": "Where can I find a restaurant in Paris ?",
    "expression_highlighted_text": "string",
    "parameters": [
      {
        "_id": "parameter_000001",
        "parameter_required": true,
        "parameter_value": "Paris",
        "expression_id": "expression_000001",
        "parameter_start": 13,
        "parameter_end": 18,
        "entity": {
          "_id": "entity_000001",
          "agent_id": "agent_000001",
          "entity_name": "city",
          "slot_data_type": "string",
          "synonyms": [
            {
              "synonym_reference": "country_europe",
              "synonym_variants": [
                "France",
                "Italy",
                "Germany"
              ]
            }
          ],
          "lookup_table": {
            "name": "country",
            "elements": [
              "France",
              "Italy",
              "Germany"
            ]
          },
          "saveAsAttribute": true,
          "attribute": [
            "destination-country",
            "departure-country"
          ],
          "additional_attribute": {
            "type": "value",
            "value": 100000,
            "unit": "$",
            "grain": "day",
            "from": {
              "value": "2019-04-19T21:00:00.000+02:00",
              "grain": "minute"
            }
          },
          "isDuckling": true
        }
      }
    ]
  }
]
Response Example (default )
{
  "success": false,
  "message": "Some parameters are missing or not valid"
}

Update several expressions

PUT /expressions/{intent_id}

Allow the user to update several expression in one API call. This route is mainly use when a user wants to change the Intent of several expressions.

array of expressions

Expression
appID: object
in params

appID

Request Example
[
  {
    "_id": "expression_000001",
    "intent": {
      "_id": "string",
      "agent_id": "string",
      "intent_name": "string",
      "is_small_talk": false,
      "meta": {
        "entities": [
          "entity_id_1",
          "entity_id_2"
        ],
        "expressions_nb": 23,
        "expressions_details": {
          "en": 12,
          "fr": 11
        }
      }
    },
    "language": "fr",
    "language_is_default": true,
    "expression_text": "Where can I find a restaurant in Paris ?",
    "expression_highlighted_text": "string",
    "parameters": [
      {
        "_id": "parameter_000001",
        "parameter_required": true,
        "parameter_value": "Paris",
        "expression_id": "expression_000001",
        "parameter_start": 13,
        "parameter_end": 18,
        "entity": {
          "_id": "entity_000001",
          "agent_id": "agent_000001",
          "entity_name": "city",
          "slot_data_type": "string",
          "synonyms": [
            {
              "synonym_reference": "country_europe",
              "synonym_variants": [
                "France",
                "Italy",
                "Germany"
              ]
            }
          ],
          "lookup_table": {
            "name": "country",
            "elements": [
              "France",
              "Italy",
              "Germany"
            ]
          },
          "saveAsAttribute": true,
          "attribute": [
            "destination-country",
            "departure-country"
          ],
          "additional_attribute": {
            "type": "value",
            "value": 100000,
            "unit": "$",
            "grain": "day",
            "from": {
              "value": "2019-04-19T21:00:00.000+02:00",
              "grain": "minute"
            }
          },
          "isDuckling": true
        }
      }
    ]
  }
]
201 Created

Array of the expressions we just created

default

Some parameters are missing or not valid

Response Content-Types: application/json
Response Example (201 Created)
[
  {
    "_id": "expression_000001",
    "intent": {
      "_id": "string",
      "agent_id": "string",
      "intent_name": "string",
      "is_small_talk": false,
      "meta": {
        "entities": [
          "entity_id_1",
          "entity_id_2"
        ],
        "expressions_nb": 23,
        "expressions_details": {
          "en": 12,
          "fr": 11
        }
      }
    },
    "language": "fr",
    "language_is_default": true,
    "expression_text": "Where can I find a restaurant in Paris ?",
    "expression_highlighted_text": "string",
    "parameters": [
      {
        "_id": "parameter_000001",
        "parameter_required": true,
        "parameter_value": "Paris",
        "expression_id": "expression_000001",
        "parameter_start": 13,
        "parameter_end": 18,
        "entity": {
          "_id": "entity_000001",
          "agent_id": "agent_000001",
          "entity_name": "city",
          "slot_data_type": "string",
          "synonyms": [
            {
              "synonym_reference": "country_europe",
              "synonym_variants": [
                "France",
                "Italy",
                "Germany"
              ]
            }
          ],
          "lookup_table": {
            "name": "country",
            "elements": [
              "France",
              "Italy",
              "Germany"
            ]
          },
          "saveAsAttribute": true,
          "attribute": [
            "destination-country",
            "departure-country"
          ],
          "additional_attribute": {
            "type": "value",
            "value": 100000,
            "unit": "$",
            "grain": "day",
            "from": {
              "value": "2019-04-19T21:00:00.000+02:00",
              "grain": "minute"
            }
          },
          "isDuckling": true
        }
      }
    ]
  }
]
Response Example (default )
{
  "success": false,
  "message": "Some parameters are missing or not valid"
}

Add several expressions

POST /expressions/{intent_id}

Add several Expressions
It is used to train the nlu when user talked to chatbot

array of expressions or utternaces

Request Example
[
  {
    "_id": "expression_000001",
    "intent": {
      "_id": "string",
      "agent_id": "string",
      "intent_name": "string",
      "is_small_talk": false,
      "meta": {
        "entities": [
          "entity_id_1",
          "entity_id_2"
        ],
        "expressions_nb": 23,
        "expressions_details": {
          "en": 12,
          "fr": 11
        }
      }
    },
    "language": "fr",
    "language_is_default": true,
    "expression_text": "Where can I find a restaurant in Paris ?",
    "expression_highlighted_text": "string",
    "parameters": [
      {
        "_id": "parameter_000001",
        "parameter_required": true,
        "parameter_value": "Paris",
        "expression_id": "expression_000001",
        "parameter_start": 13,
        "parameter_end": 18,
        "entity": {
          "_id": "entity_000001",
          "agent_id": "agent_000001",
          "entity_name": "city",
          "slot_data_type": "string",
          "synonyms": [
            {
              "synonym_reference": "country_europe",
              "synonym_variants": [
                "France",
                "Italy",
                "Germany"
              ]
            }
          ],
          "lookup_table": {
            "name": "country",
            "elements": [
              "France",
              "Italy",
              "Germany"
            ]
          },
          "saveAsAttribute": true,
          "attribute": [
            "destination-country",
            "departure-country"
          ],
          "additional_attribute": {
            "type": "value",
            "value": 100000,
            "unit": "$",
            "grain": "day",
            "from": {
              "value": "2019-04-19T21:00:00.000+02:00",
              "grain": "minute"
            }
          },
          "isDuckling": true
        }
      }
    ]
  }
]
201 Created

Message

default

Some parameters are missing or not valid

Response Content-Types: application/json
Response Example (201 Created)
[
  {
    "_id": "expression_000001",
    "intent": {
      "_id": "string",
      "agent_id": "string",
      "intent_name": "string",
      "is_small_talk": false,
      "meta": {
        "entities": [
          "entity_id_1",
          "entity_id_2"
        ],
        "expressions_nb": 23,
        "expressions_details": {
          "en": 12,
          "fr": 11
        }
      }
    },
    "language": "fr",
    "language_is_default": true,
    "expression_text": "Where can I find a restaurant in Paris ?",
    "expression_highlighted_text": "string",
    "parameters": [
      {
        "_id": "parameter_000001",
        "parameter_required": true,
        "parameter_value": "Paris",
        "expression_id": "expression_000001",
        "parameter_start": 13,
        "parameter_end": 18,
        "entity": {
          "_id": "entity_000001",
          "agent_id": "agent_000001",
          "entity_name": "city",
          "slot_data_type": "string",
          "synonyms": [
            {
              "synonym_reference": "country_europe",
              "synonym_variants": [
                "France",
                "Italy",
                "Germany"
              ]
            }
          ],
          "lookup_table": {
            "name": "country",
            "elements": [
              "France",
              "Italy",
              "Germany"
            ]
          },
          "saveAsAttribute": true,
          "attribute": [
            "destination-country",
            "departure-country"
          ],
          "additional_attribute": {
            "type": "value",
            "value": 100000,
            "unit": "$",
            "grain": "day",
            "from": {
              "value": "2019-04-19T21:00:00.000+02:00",
              "grain": "minute"
            }
          },
          "isDuckling": true
        }
      }
    ]
  }
]
Response Example (default )
{
  "success": false,
  "message": "Some parameters are missing or not valid"
}

Remove several expressions

POST /expressions/remove

Remove several Expressions

List of the utternances we want to mark as read

Expression
Request Example
[
  {
    "_id": "expression_000001",
    "intent": {
      "_id": "string",
      "agent_id": "string",
      "intent_name": "string",
      "is_small_talk": false,
      "meta": {
        "entities": [
          "entity_id_1",
          "entity_id_2"
        ],
        "expressions_nb": 23,
        "expressions_details": {
          "en": 12,
          "fr": 11
        }
      }
    },
    "language": "fr",
    "language_is_default": true,
    "expression_text": "Where can I find a restaurant in Paris ?",
    "expression_highlighted_text": "string",
    "parameters": [
      {
        "_id": "parameter_000001",
        "parameter_required": true,
        "parameter_value": "Paris",
        "expression_id": "expression_000001",
        "parameter_start": 13,
        "parameter_end": 18,
        "entity": {
          "_id": "entity_000001",
          "agent_id": "agent_000001",
          "entity_name": "city",
          "slot_data_type": "string",
          "synonyms": [
            {
              "synonym_reference": "country_europe",
              "synonym_variants": [
                "France",
                "Italy",
                "Germany"
              ]
            }
          ],
          "lookup_table": {
            "name": "country",
            "elements": [
              "France",
              "Italy",
              "Germany"
            ]
          },
          "saveAsAttribute": true,
          "attribute": [
            "destination-country",
            "departure-country"
          ],
          "additional_attribute": {
            "type": "value",
            "value": 100000,
            "unit": "$",
            "grain": "day",
            "from": {
              "value": "2019-04-19T21:00:00.000+02:00",
              "grain": "minute"
            }
          },
          "isDuckling": true
        }
      }
    ]
  }
]
200 OK

message success

default

Some parameters are missing or not valid

Response Content-Types: application/json
Response Example (200 OK)
{
  "success": true,
  "message": "Some parameters are missing or not valid",
  "code": 409,
  "token": "eY...."
}
Response Example (default )
{
  "success": false,
  "message": "Some parameters are missing or not valid"
}

Get expressions list by entity

GET /expressions/entity/{entity_id}

Get a list expression for a specific entity

entity_id: object
in params

entity_id

page: object
in query

page number

lang: object
in query

language of the utterances we are looking for

Expressions List

default

Some parameters are missing or not valid

Response Content-Types: application/json
Response Example (200 OK)
[
  {
    "_id": "expression_000001",
    "intent": {
      "_id": "string",
      "agent_id": "string",
      "intent_name": "string",
      "is_small_talk": false,
      "meta": {
        "entities": [
          "entity_id_1",
          "entity_id_2"
        ],
        "expressions_nb": 23,
        "expressions_details": {
          "en": 12,
          "fr": 11
        }
      }
    },
    "language": "fr",
    "language_is_default": true,
    "expression_text": "Where can I find a restaurant in Paris ?",
    "expression_highlighted_text": "string",
    "parameters": [
      {
        "_id": "parameter_000001",
        "parameter_required": true,
        "parameter_value": "Paris",
        "expression_id": "expression_000001",
        "parameter_start": 13,
        "parameter_end": 18,
        "entity": {
          "_id": "entity_000001",
          "agent_id": "agent_000001",
          "entity_name": "city",
          "slot_data_type": "string",
          "synonyms": [
            {
              "synonym_reference": "country_europe",
              "synonym_variants": [
                "France",
                "Italy",
                "Germany"
              ]
            }
          ],
          "lookup_table": {
            "name": "country",
            "elements": [
              "France",
              "Italy",
              "Germany"
            ]
          },
          "saveAsAttribute": true,
          "attribute": [
            "destination-country",
            "departure-country"
          ],
          "additional_attribute": {
            "type": "value",
            "value": 100000,
            "unit": "$",
            "grain": "day",
            "from": {
              "value": "2019-04-19T21:00:00.000+02:00",
              "grain": "minute"
            }
          },
          "isDuckling": true
        }
      }
    ]
  }
]
Response Example (default )
{
  "success": false,
  "message": "Some parameters are missing or not valid"
}

Utterances

Get list of the utterances for this application

GET /utterances/{appID}

Get a list of utterances for an intent or an entity

appID: object
in params

appID

intent: object
in query

intent_id of the utterances we want to show

entity: object
in query

entity_idf of the utterances we want to show

page: object
in query

page number

lang: object
in query

language of the utterances we are looking for

Utterances List

default

Some parameters are missing or not valid

Response Content-Types: application/json
Response Example (200 OK)
[
  {
    "_id": "string",
    "appID": "string",
    "respondantID": "string",
    "text": " I would like to buy a pizza",
    "responseValue": "string",
    "avis": "positive",
    "intent": "intent_001",
    "score": 0.9,
    "date": 12345678,
    "createdAt": "Date",
    "application_title": "String",
    "entities": [
      {
        "start": 3,
        "end": 12,
        "value": "Regina",
        "entity": "entity_id",
        "confidence": 0.9,
        "extractor": "ner_crf"
      }
    ]
  }
]
Response Example (default )
{
  "success": false,
  "message": "Some parameters are missing or not valid"
}

Mark as read

PUT /utterances/{appID}

Allow the user to mark the utterances as review by the user The utterance won't show up in the utterances list.
When an utterance is added to the expressions of a specific intent, we need to use this route to delete the utternace from the utterance list

List of the utternances we want to mark as read

Utterances
appID: object
in params

appID

Request Example
[
  {
    "_id": "string",
    "appID": "string",
    "respondantID": "string",
    "text": " I would like to buy a pizza",
    "responseValue": "string",
    "avis": "positive",
    "intent": "intent_001",
    "score": 0.9,
    "date": 12345678,
    "createdAt": "Date",
    "application_title": "String",
    "entities": [
      {
        "start": 3,
        "end": 12,
        "value": "Regina",
        "entity": "entity_id",
        "confidence": 0.9,
        "extractor": "ner_crf"
      }
    ]
  }
]
200 OK

message

default

Some parameters are missing or not valid

Response Content-Types: application/json
Response Example (default )
{
  "success": false,
  "message": "Some parameters are missing or not valid"
}

NLU

NLU

Train nlu

POST /train/{appID}

Train the nlu for a specific appID

appID: object
in path

application._id de l'application

lang: object
in query

language you want to train

200 OK

Training data formated

204 No Content

You need more training example. Minimum is 10 training examples (expressions)

default

Some parameters are missing or not valid

Response Content-Types: application/json
Response Example (default )
{
  "success": false,
  "message": "Some parameters are missing or not valid"
}
NLU

Parse input

GET /parse/{appID}

Parse an input in order to see what the NLU understood.

appID: object
in params

application._id de l'application

lang: object
in query

language you want to train

q: object
in query

query you want to parse

200 OK

NLU return

default

Some parameters are missing or not valid

Response Content-Types: application/json
Response Example (200 OK)
{
  "intent": {
    "name": "acheter",
    "confidence": 0.8706680536270142
  },
  "entities": [
    {
      "start": 9,
      "end": 11,
      "text": "un",
      "value": 1,
      "confidence": 1,
      "additional_info": {
        "value": 1,
        "type": "value"
      },
      "entity": "number",
      "extractor": "ner_duckling_http"
    }
  ],
  "intent_ranking": [
    {
      "name": "acheter",
      "confidence": 0.8706680536270142
    },
    {
      "name": "bonjour",
      "confidence": 0.37793076038360596
    }
  ],
  "text": "I want to buy a pizza",
  "project": "5c65a62b031725af07ace78100",
  "model": "model_20190220-092425",
  "language": "fr"
}
Response Example (default )
{
  "success": false,
  "message": "Some parameters are missing or not valid"
}

User

Get user information

GET /me

Get user information

200 OK

User object

default

Some parameters are missing or not valid

Response Content-Types: application/json
Response Example (200 OK)
{
  "local": {
    "email": "john@doe.fr",
    "password": "tar43RFECV254YGfdgze(tgfr(!))"
  },
  "token": "eY.....",
  "language": "fr",
  "first_name": "John",
  "last_name": "Doe",
  "full_name": "John Doe",
  "phone": "0648146495",
  "avatar_utl": "https://resize-elle.ladmedia.fr/rcrop/638,,forcex/img/var/plain_site/storage/images/people/la-vie-des-people/news/les-photos-les-plus-cool-de-jacques-chirac/46232088-1-fre-FR/Les-photos-les-plus-cool-de-Jacques-Chirac.jpg",
  "enterprise": {
    "name": "Apple",
    "siret_number": "404 833 048",
    "vat": "83",
    "address": {
      "street": "Avenue des champs Elysées",
      "street_number": "1",
      "city": "string",
      "zip_code": "75008",
      "country": "France"
    }
  },
  "referral": "string"
}
Response Example (default )
{
  "success": false,
  "message": "Some parameters are missing or not valid"
}

Update user

PATCH /me

Update user information

information we want to update for this user

Request Example
{
  "local": {
    "email": "john@doe.fr",
    "password": "tar43RFECV254YGfdgze(tgfr(!))"
  },
  "token": "eY.....",
  "language": "fr",
  "first_name": "John",
  "last_name": "Doe",
  "full_name": "John Doe",
  "phone": "0648146495",
  "avatar_utl": "https://resize-elle.ladmedia.fr/rcrop/638,,forcex/img/var/plain_site/storage/images/people/la-vie-des-people/news/les-photos-les-plus-cool-de-jacques-chirac/46232088-1-fre-FR/Les-photos-les-plus-cool-de-Jacques-Chirac.jpg",
  "enterprise": {
    "name": "Apple",
    "siret_number": "404 833 048",
    "vat": "83",
    "address": {
      "street": "Avenue des champs Elysées",
      "street_number": "1",
      "city": "string",
      "zip_code": "75008",
      "country": "France"
    }
  },
  "referral": "string"
}
200 OK

User updated

default

Some parameters are missing or not valid

Response Content-Types: application/json
Response Example (200 OK)
{
  "local": {
    "email": "john@doe.fr",
    "password": "tar43RFECV254YGfdgze(tgfr(!))"
  },
  "token": "eY.....",
  "language": "fr",
  "first_name": "John",
  "last_name": "Doe",
  "full_name": "John Doe",
  "phone": "0648146495",
  "avatar_utl": "https://resize-elle.ladmedia.fr/rcrop/638,,forcex/img/var/plain_site/storage/images/people/la-vie-des-people/news/les-photos-les-plus-cool-de-jacques-chirac/46232088-1-fre-FR/Les-photos-les-plus-cool-de-Jacques-Chirac.jpg",
  "enterprise": {
    "name": "Apple",
    "siret_number": "404 833 048",
    "vat": "83",
    "address": {
      "street": "Avenue des champs Elysées",
      "street_number": "1",
      "city": "string",
      "zip_code": "75008",
      "country": "France"
    }
  },
  "referral": "string"
}
Response Example (default )
{
  "success": false,
  "message": "Some parameters are missing or not valid"
}

Change password

POST /changePassword

Change user password

new password

password: string
Request Example
{
  "password": "Password123456"
}
200 OK

User updated

default

Some parameters are missing or not valid

Response Content-Types: application/json
Response Example (200 OK)
{
  "success": true,
  "message": "Some parameters are missing or not valid",
  "code": 409,
  "token": "eY...."
}
Response Example (default )
{
  "success": false,
  "message": "Some parameters are missing or not valid"
}

Forgot password

POST /forgetPassword

User Forgot his password

email

email: string
Request Example
{
  "email": "john@doe.fr"
}
200 OK

User updated

default

Some parameters are missing or not valid

Response Content-Types: application/json
Response Example (200 OK)
{
  "success": true,
  "message": "Some parameters are missing or not valid",
  "code": 409,
  "token": "eY...."
}
Response Example (default )
{
  "success": false,
  "message": "Some parameters are missing or not valid"
}

Signup

POST /signup

Create user account

new user

email: string
password: string
password1: string
first_name: string
last_name: string
phone: string
Request Example
{
  "email": "john@doe.fr",
  "password": "Password123456",
  "password1": "Password123456",
  "first_name": "John",
  "last_name": "Doe",
  "phone": "0648146495"
}
200 OK

User updated

default

Some parameters are missing or not valid

Response Content-Types: application/json
Response Example (200 OK)
{
  "success": true,
  "message": "Some parameters are missing or not valid",
  "code": 409,
  "token": "eY...."
}
Response Example (default )
{
  "success": false,
  "message": "Some parameters are missing or not valid"
}

Login

POST /login

Login

email

email: string
password: string
Request Example
{
  "email": "john@doe.fr",
  "password": "Password123456"
}
200 OK

User

default

Some parameters are missing or not valid

Response Content-Types: application/json
Response Example (200 OK)
{
  "success": true,
  "message": "Some parameters are missing or not valid",
  "code": 409,
  "token": "eY...."
}
Response Example (default )
{
  "success": false,
  "message": "Some parameters are missing or not valid"
}

Schema Definitions

application: object

appID: String

Deprecated in favor of appIds

appIDs: array

List of the appID of this application

updatedAt: string
createdAt: string
title: string
description: string
userID: string
canEdit: array
canView: array
info: object

Information of the bot that can be personnalized, see example on the right

design: object

Allow the user to choose the color, typo of the bot, see example on the right

url: string

Personalized url of the chatbot

widget-picto-size: string

Size of the picto on the website. can be small, medium, big

widget-font-size: string

Size of the picto on the website. can be small, medium, big, normal normal is the size of the website, this is the default value

widget-notification-background-color: string

Code hexa of the backgroud color of the notification

widget-notification-text-color: string

Code hexa of the text color of the notification

widget-picto-shape: string

round or square

widget-picto-position: string

left of right

sms: object

Bots are also available on sms via an integration with twillio Here is where we add the api keys for twilio integration

active: boolean

is the SMS bot active

twilio_accountSid: string

Twillio api credentials

twilio_authToken: string

Twillio api credentials

twilio_phone: string

Twillio phone number

keywordSmsBot: string

Usually we answer the first SMS with a link to redirect to the web chatbot
if the user type the keywordSmsBot we continue with a the conversation with SMS

persistent_menu: applicationPersistentMenu

Burger menu that allow to access main functionnalities

applicationPersistentMenu