Create entity type

POST /data/entity-types

Create a new entity type with data provided in the request body. JSON format is expected. Entity type names must be unique.

application/json

Body Required

  • name string Required
  • color string

Responses

  • 201 application/json

    Entity type created successfully

    Hide response attributes Show response attributes object
    • id string(uuid)
    • name string
    • color string
    • created_at string(date-time)
    • updated_at string(date-time)
  • 400

    Invalid data format or entity type already exists

POST /data/entity-types
curl \
 --request POST 'http://api.example.com/data/entity-types' \
 --header "Authorization: $API_KEY" \
 --header "Content-Type: application/json" \
 --data '{"name":"Character","color":"#FF5733"}'
Request examples
{
  "name": "Character",
  "color": "#FF5733"
}
Response examples (201)
{
  "id": "a24a6ea4-ce75-4665-a070-57453082c25",
  "name": "Character",
  "color": "#FF5733",
  "created_at": "2024-01-15T10:30:00Z",
  "updated_at": "2024-01-15T10:30:00Z"
}