curl --request POST \
--url 'https://api.nsr.stateset.com/api/v1/entities' \
--header "X-API-Key: $STATESET_NSR_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"entity_type": "string",
"name": "Two-Person Tent",
"properties": {}
}'
{
"confidence": 7.5,
"created_at": "2026-08-31T14:22:05Z",
"entity_type": "string",
"has_embedding": true,
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "Two-Person Tent",
"properties": {},
"updated_at": "2026-08-31T14:22:05Z"
}
Create a new entity in the knowledge graph.
Entities are the fundamental building blocks of the knowledge graph…
POST
/
api
/
v1
/
entities
curl --request POST \
--url 'https://api.nsr.stateset.com/api/v1/entities' \
--header "X-API-Key: $STATESET_NSR_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"entity_type": "string",
"name": "Two-Person Tent",
"properties": {}
}'
{
"confidence": 7.5,
"created_at": "2026-08-31T14:22:05Z",
"entity_type": "string",
"has_embedding": true,
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "Two-Person Tent",
"properties": {},
"updated_at": "2026-08-31T14:22:05Z"
}
Entities are the fundamental building blocks of the knowledge graph. They
represent concepts, instances, classes, properties, events, actions, or
custom types within your domain.
Request Body
Create a new knowledge graph entity.
Required scope:
name: The entity’s display name (required, max 256 chars)entity_type: Type of entity (concept, instance, class, property, event, action, state, or custom)properties: Optional key-value pairs for additional metadata Response Returns the created entity with its assigned unique identifier and automatically generated embedding vector for semantic similarity search. Errors400 Bad Request: Invalid input (empty name, exceeds limits, invalid characters)500 Internal Server Error: Entity creation or embedding generation failed Example (curl)
curl -X POST 'https://api.nsr.stateset.com/api/v1/entities' \
-H 'X-API-Key: your-api-key' \
-H 'Content-Type: application/json' \
-d '{'name': 'Customer', 'entity_type': 'class', 'properties': {'description': 'A person who purchases goods'}}'
write
Request body
CreateEntityRequest
Response
EntityResponse
Status codes
| Code | Meaning |
|---|---|
201 | Entity created successfully |
400 | Invalid request - validation failed |
401 | Unauthorized — missing or invalid credentials |
403 | Forbidden — the key/token lacks the required scope |
429 | Rate limited — see Retry-After / X-RateLimit-Reset |
curl --request POST \
--url 'https://api.nsr.stateset.com/api/v1/entities' \
--header "X-API-Key: $STATESET_NSR_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"entity_type": "string",
"name": "Two-Person Tent",
"properties": {}
}'
{
"confidence": 7.5,
"created_at": "2026-08-31T14:22:05Z",
"entity_type": "string",
"has_embedding": true,
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "Two-Person Tent",
"properties": {},
"updated_at": "2026-08-31T14:22:05Z"
}
Last modified on August 31, 2026