curl --request POST \
--url 'https://api.nsr.stateset.com/api/v1/triples' \
--header "X-API-Key: $STATESET_NSR_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"confidence": 7.5,
"object_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"predicate": "string",
"subject_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"valid_from": "string",
"valid_to": "string"
}'
{
"confidence": 7.5,
"object": "string",
"object_name": "string",
"predicate": "string",
"subject": "Replacement tent pole set",
"subject_name": "string",
"valid_from": "string",
"valid_to": "string"
}
Create a new triple (fact) in the knowledge base.
A triple represents a relationship between two entities in the form: (subject, predicate, object) - e.g., (‘Socrates’, ‘is_a’, ‘Human’) Request Body -…
POST
/
api
/
v1
/
triples
curl --request POST \
--url 'https://api.nsr.stateset.com/api/v1/triples' \
--header "X-API-Key: $STATESET_NSR_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"confidence": 7.5,
"object_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"predicate": "string",
"subject_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"valid_from": "string",
"valid_to": "string"
}'
{
"confidence": 7.5,
"object": "string",
"object_name": "string",
"predicate": "string",
"subject": "Replacement tent pole set",
"subject_name": "string",
"valid_from": "string",
"valid_to": "string"
}
A triple represents a relationship between two entities in the form:
(subject, predicate, object) - e.g., (‘Socrates’, ‘is_a’, ‘Human’)
Request Body
subject_id: ID of the subject entity (must exist)predicate: Relationship name (e.g., ‘is_a’, ‘has_property’)object_id: ID of the object entity (must exist)confidence: Optional confidence score (0.0-1.0, default: 1.0) Errors400 Bad Request: Invalid input or referenced entities don’t exist Create a triple (relation) between entities.
write
Request body
CreateTripleRequest
number (float)
Optional confidence score
string
required
Object entity ID
string
required
Predicate/relationship name
string
required
Subject entity ID
string
Optional RFC3339 start of validity interval.
string
Optional RFC3339 end of validity interval (must be >= valid_from).
Response
TripleResponse
number (float)
required
string
required
string
required
string
required
string
required
string
required
string
string
Status codes
| Code | Meaning |
|---|---|
201 | Triple created successfully |
400 | Invalid input or referenced entities don’t exist |
401 | Unauthorized — missing or invalid credentials |
402 | Tenant quota exceeded |
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/triples' \
--header "X-API-Key: $STATESET_NSR_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"confidence": 7.5,
"object_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"predicate": "string",
"subject_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"valid_from": "string",
"valid_to": "string"
}'
{
"confidence": 7.5,
"object": "string",
"object_name": "string",
"predicate": "string",
"subject": "Replacement tent pole set",
"subject_name": "string",
"valid_from": "string",
"valid_to": "string"
}
Last modified on August 31, 2026