You're browsing the legacy version of the API documentation. Switch to the latest stable version →
User entities
User Entities come with help when you need a data bucket relevant to your services. You can create your knowledge repositories to make your bot work smarter.
In user entities, you can list your products, branches, locations, services and everything you want. Moreover, you can create as many entities as you need.
List all user entities
Returns list of all created user entities.
Properties
Property | Type | Description |
---|---|---|
id |
String | User Entity id. |
name |
String | User entity name. |
entries |
Array.<Object> | An array of entries objects. |
Request URL
curl --request GET \
--url https://api.chatbot.com/entities \
--header 'authorization: Bearer ${DEVELOPER_ACCESS_TOKEN}'
Response Example
[
{
"id": "5a3be57a137efa00076cb579",
"name": "movies",
"entries": [
{
"synonyms": [
{
"value": "Star Wars"
},
{
"value": "SW"
}
],
"value": "Star Wars"
},
{
"synonyms": [
{
"value": "The Lord of the Rings"
},
{
"value": "LOTR"
},
{
"value": "The Fellowship of the Ring"
}
],
"value": "The Lord of the Rings"
}
]
}
]
Get single entity
Returns single entity object for the given id.
curl --request GET \
--url https://api.chatbot.com/entities/:ID \
--header 'authorization: Bearer ${DEVELOPER_ACCESS_TOKEN}'
Request URL
Response Example
{
"id": "5a3be57a137efa00076cb579",
"name": "movies",
"entries": [
{
"synonyms": [
{
"value": "Star Wars"
},
{
"value": "SW"
}
],
"value": "Star Wars"
},
{
"synonyms": [
{
"value": "The Lord of the Rings"
},
{
"value": "LOTR"
},
{
"value": "The Fellowship of the Ring"
}
],
"value": "The Lord of the Rings"
}
]
}
Properties
Property | Type | Description |
---|---|---|
id |
String | User Entity id. |
name |
String | User entity name. |
entries |
Array.<Object> | An array of entries objects. |
Add new entity
Creates a new User Entity.
Properties
Property | Type | Description |
---|---|---|
name |
String | User entity name. String(1, 128) |
entries |
Array.<Object> | An array of entries objects. Array(1, 2000) |
Request URL
curl --request POST \
--url https://api.chatbot.com/entities \
--header 'authorization: Bearer ${DEVELOPER_ACCESS_TOKEN}' \
--header 'content-type: application/json' \
--data '
{
"name": "movies",
"entries": [
{
"synonyms": [
{
"value": "Star Wars"
},
{
"value": "SW"
}
],
"value": "Star Wars"
},
{
"synonyms": [
{
"value": "The Lord of the Rings"
},
{
"value": "LOTR"
},
{
"value": "The Fellowship of the Ring"
}
],
"value": "The Lord of the Rings"
}
]
}
'
Response Example
{
"id": "58ee2e085d033800059a3f7f",
"timestamp": "2018-01-12T13:40:40.260Z",
"status": {
"code": 200,
"type": "success"
}
}
Update entity
Updates the specific User Entity.
Properties
Property | Type | Description |
---|---|---|
name |
String | User entity name. String(1, 128) |
entries |
Array.<Object> | An array of entries objects. Array(1, 2000) |
Request URL
curl --request PUT \
--url https://api.chatbot.com/entities \
--header 'authorization: Bearer ${DEVELOPER_ACCESS_TOKEN}' \
--header 'content-type: application/json' \
--data '
{
"name": "movies",
"entries": [
{
"synonyms": [
{
"value": "Star Wars"
},
{
"value": "SW"
}
],
"value": "Star Wars"
},
{
"synonyms": [
{
"value": "The Lord of the Rings"
},
{
"value": "LOTR"
},
{
"value": "The Fellowship of the Ring"
}
],
"value": "The Lord of the Rings"
}
]
}
'
Response Example
{
"id": "58ee2e085d033800059a3f7f",
"timestamp": "2018-01-12T13:40:40.260Z",
"status": {
"code": 200,
"type": "success"
}
}
Delete entity
Removes a entity with the given id.
Request URL
curl --request DEL \
--url https://api.chatbot.com/entities/:ID \
--header 'authorization: Bearer ${DEVELOPER_ACCESS_TOKEN}' \
--header 'content-type: application/json'
Response Example
{
"timestamp": "2018-01-12T13:40:40.260Z",
"status": {
"code": 200,
"type": "success"
}
}
Common object definitions
entries
An object which represents single entry in your User Entity.
Property | Type | Description |
---|---|---|
value |
String | Entry value. String(1, 1024) |
synonyms |
Array.<Object> | Array of synonyms objects for entry value. Array(1, 99) |
entries.synonyms
Property | Type | Description |
---|---|---|
value |
String | Synonym value. String(1, 1024) |