Record a fact
Record the value of a definition for a contact or a conversation, or that it has none (valueStatus: unknown or not_applicable). Only record something actually observed, and say where it came from (sourceConversationId, sourceMessageId, reason). The value follows the definition's type: text, number, boolean, a YYYY-MM-DD date or an option key. The newest assertion that was not rejected becomes the current fact; older ones stay as history. Get definitionId from list_definitions.
- Scope:
raiz:facts:write - Credentials: an API key, a client-credentials token or a person's access token
- Effect: writes; not idempotent: check the outcome before you retry
- Limits: request body up to 32 KB, response up to 1 MB
- CLI:
arbol raiz facts create· MCP tool:raiz_facts_create
POST
https://api.getarbol.com/v1/raiz/factsAuthorization
Request body JSON required
- contactIdoptionalstring
The contact the fact is about, for a definition whose subject is
contact. Give it orconversationId, not both. The id of a merged duplicate asserts on the contact that absorbed it.pattern: ^cnt_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$
Returns
200
Successful operation.
404
NOT_FOUND: The requested operation does not exist.RESOURCE_NOT_FOUND: The requested resource does not exist in this organization.
409
DEFINITION_NOT_ACTIVE: Facts can be asserted only under an active definition.SOURCE_CONVERSATION_OPEN: A fact can cite only a closed conversation as its source.
422
FACT_SUBJECT_MISMATCH: The fact's subject (a contact or a conversation) does not match what its definition describes.FACT_VALUE_INVALID: The value does not match the definition's value type, or names no active option.
502
OUTCOME_UNKNOWN: The operation may have been applied; check its result before repeating it.
503
UPSTREAM_UNAVAILABLE: The upstream service could not complete the request.INTEGRATIONS_UNAVAILABLE: The organization's integrations cannot be read right now. Try again shortly.