curl --request POST \
--url 'https://api.nsr.stateset.com/api/v1/types/predicates' \
--header "X-API-Key: $STATESET_NSR_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"arg_types": [
"entity",
"location"
],
"doc": "Entity X lived in location Y",
"name": "lived_in"
}'
{
"arg_types": [
"string"
],
"arity": 1,
"doc": "string",
"name": "Two-Person Tent",
"return_type": "string"
}
Register a new predicate signature
Required scope: write
POST
/
api
/
v1
/
types
/
predicates
curl --request POST \
--url 'https://api.nsr.stateset.com/api/v1/types/predicates' \
--header "X-API-Key: $STATESET_NSR_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"arg_types": [
"entity",
"location"
],
"doc": "Entity X lived in location Y",
"name": "lived_in"
}'
{
"arg_types": [
"string"
],
"arity": 1,
"doc": "string",
"name": "Two-Person Tent",
"return_type": "string"
}
Required scope:
write
Request body
RegisterPredicateRequest
string[]
required
Argument types
string
Documentation
string
required
Predicate name
string
Optional return type (for functional predicates)
Response
PredicateResponse
string[]
required
integer
required
string
string
required
string
Status codes
| Code | Meaning |
|---|---|
201 | Predicate registered |
400 | Invalid predicate definition |
401 | Unauthorized — missing or invalid credentials |
403 | Forbidden — the key/token lacks the required scope |
409 | Predicate already exists |
429 | Rate limited — see Retry-After / X-RateLimit-Reset |
curl --request POST \
--url 'https://api.nsr.stateset.com/api/v1/types/predicates' \
--header "X-API-Key: $STATESET_NSR_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"arg_types": [
"entity",
"location"
],
"doc": "Entity X lived in location Y",
"name": "lived_in"
}'
{
"arg_types": [
"string"
],
"arity": 1,
"doc": "string",
"name": "Two-Person Tent",
"return_type": "string"
}
Last modified on August 31, 2026