Skip to main content
Skills are conversational flows that define the bot’s behavior. You can query the skills available in your bot and redirect users to a specific skill.

Get Skills

Query all skills available in your bot.
GET https://api.jelou.ai/v1/bots/{botId}/skills

Path Parameters

FieldLocationTypeRequiredDescription
botIdPathstringYesUnique identifier of the bot.

Request Example

curl --request GET \
  --url 'https://api.jelou.ai/v1/bots/BOT_ID/skills' \
  --header 'Authorization: Basic {{Base64EncodedUsername:Password}}'

Responses

{
  "message": ["Skills retrieved successfully!"],
  "statusMessage": "success",
  "status": 1,
  "data": [
    {
      "id": 1,
      "name": "Main Skill",
      "description": "Welcome skill",
      "type": "BRAIN",
      "createdAt": "2024-10-24T11:18:05.000Z",
      "updatedAt": "2024-10-24T11:18:05.000Z",
      "state": true,
      "default": true
    },
    {
      "id": 2,
      "name": "Sales Skill",
      "description": "Sales flow",
      "type": "BRAIN",
      "createdAt": "2024-10-24T11:13:32.000Z",
      "updatedAt": "2024-10-24T11:17:44.000Z",
      "state": true,
      "default": false
    }
  ]
}
{
  "message": "Authentication failed"
}
{
  "message": ["Bot not found"],
  "status": "failed"
}

Response Detail

PropertyTypeDescription
idintegerSkill ID. This ID must be used to configure redirects.
namestringSkill name.
descriptionstringSkill description.
typestringSkill type.
statebooleanSkill state. Only skills with state true can be used.
defaultbooleanIndicates whether the skill is selected as the default for the bot.
createdAtdateSkill creation date.
updatedAtdateDate of last update of the skill.

Configure User Skill

Redirect a user to a specific skill within the conversational flow.
POST https://api.jelou.ai/v1/bots/{botId}/users/{userId}/skill/{skillId}

Requirements

  • The user must have an active session.

Path Parameters

FieldLocationTypeRequiredDescription
botIdPathstringYesUnique identifier of the bot.
userIdPathstringYesUnique identifier of the user.
skillIdPathstringYesIdentifier of the skill to which the user will be redirected.

Request Body

FieldLocationTypeRequiredDescription
memoryParamsBodyobjectNoOptional parameters that can be injected and used later in the skill.

Request Example

curl --request POST \
  --url 'https://api.jelou.ai/v1/bots/BOT_ID/users/USER_ID/skill/SKILL_ID' \
  --header 'Authorization: Basic {{Base64EncodedUsername:Password}}' \
  --header 'Content-Type: application/json' \
  --data '{
    "memoryParams": {
      "test": 1
    }
  }'

Responses

{
  "message": "Skill set successfully",
  "status": "success"
}
{
  "message": "Invalid request",
  "status": "failed"
}
{
  "message": "Authentication failed"
}
{
  "message": "User or Skill not found",
  "status": "failed"
}