HTTP API Reference

Create a new entity

Creates a new entity with the given attributes.


The request body must contain a JSON object with the given fields:

name required type doc
id required string ID or name of the requested entity
doc optional string Short sentence describing this entity
values optional array Possible values for this entity



Example request

  $ curl -XPOST ' \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"doc":"A city that I like",
                                    "expressions":["Paris", "City of Light", "Capital of France"]}]}'

Example response

    "lang" : "en",
    "closed" : false,
    "exotic" : false,
    "values" : [ {
      "expressions" : [ "Paris" ],
      "value" : "Paris"
    } ],
    "builtin" : false,
    "doc" : "A city that I like",
    "name" : "favorite_city",
    "id" : "5418abc7-cc68-4073-ae9e-3a5c3c81d965"