Skip to content

Entities

The entities endpoint is used to post a new entity. Please use Prisme_Developer_Token.

URL : api.prisme.ai/v1/entities

Method : POST

Request example

curl -X POST \
  https://api.prisme.ai/v1/entities \
  -H 'Authorization: Bearer Prisme_Developer_Token' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "beverage",
    "automaticallyExtensible": {
        "en": false,
        "fr": false
    },
    "useSynonyms": {
        "en": true,
        "fr": true
    },
    "data":{
        "en":[
                {
                    "value": "coffee",
                    "synonyms": [
                        "coffee",
                        "espresso",
                        "decaf"
                    ]
                },
                {
                    "value": "tea",
                    "synonyms": [
                        "tea"
                    ]
                }
        ],
        "fr":[
                {
                    "value": "cafe",
                    "synonyms": [
                        "café",
                    ]
                },
                {
                    "value": "the",
                    "synonyms": [
                        "thé"
                    ]
                }
        ]
    }
}'

Headers

In the request URL, provide the following headers with values.

Key Value
Content-Type application/json
Authorization Bearer Prisme_Developer_Token

Request body

The following parameters are used as JSON keys in the POST body.

Parameter Type Description Required
name String Name of the entity Required
automaticallyExtensible object of boolean by langage Set to True if the Virtual Agent can detect occurrence of the entity that are not in his training list Required
useSynonyms object of boolean by langage Set to True if the Virtual Agent can have synonyms for one entity occurrence Required
data object of array by langage List of different occurence objects of the entity Required

Occurence of entity

Parameter Type Description Required
value String Name of the entity occurence Required
synonyms Array List of String of every synonyms of the occurence Required if useSynonyms is true

Success Response

Condition : No required parameter missing and Prisme_Developer_Token is known by the platform.

Code : 200