Skip to content

Learn Knowledge

POST /knowledge-learn

Store one fact, after the write-time validation of annex 10 §6.3 and Q-M2.

201 for the merge outcome too, deliberately: the caller’s fact is now represented — by the incumbent whose confidence just rose — and the body says which of the two happened. A 200/201 split would make every client branch on a distinction the body already carries.

FieldTypeNotes
knowledge_setstringrequiredmin length 1 max length 120
contentstringrequiredmin length 1 max length 20000
titlestring | nulloptionalmax length 300
kindfact | rule | open_question | huboptionalDefault "fact".
importancelow | normal | highoptionalDefault "normal".
tagsstring[]optionalDefault [].
supersedes_hintstring | nulloptionalmax length 2000
StatusDescriptionBody
201Successful ResponseKnowledgeLearnView
422Validation ErrorHTTPValidationError

The body shows the fields the schema always carries. Which combination is legal is a service rule the schema cannot express, so read the description above before copying this.

Terminal window
curl -X POST https://your-deployment.example.com/knowledge-learn \
-H "Authorization: Bearer $COBRE_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"knowledge_set": "string",
"content": "string"
}'
FieldTypeNotes
storedbooleanrequired—
item_idstring (uuid)required—
merged_intostring (uuid) | nullrequired, nullable—
superseded_candidatestring (uuid) | nullrequired, nullable—