Skip to main content
POST
Set Fact

Overview

Records a fact about a person in an assistant’s memory. Pass a fact_type (one of your workspace’s fields, see Vocabulary) so the value is checked and stored on the person’s record. Setting the same value again changes nothing.
Changes data, so it needs a key that isn’t read-only.
Operation name: fact.set.

Authorization

string
required
Your Composer API key

Headers

string
required
Must be set to application/json

Body

string
required
The value to record.
Example
string
The field to record it as, such as timezone.
Example
string
The assistant whose memory it goes into. Without it, no assistant will recall the fact.
Example
string
The id of the person it is about. Defaults to the caller.
string
An old value this corrects. Facts with that value are forgotten.
string
When the fact stops being true (RFC 3339).
number
How certain the fact is, 0–1. Default 1.
Example Request

Response

string
The id of the recorded fact.
boolean
False when the value was already recorded.
array
Facts this value replaced.
array
Facts forgotten because of replaces.
Example Success Response

Example cURL

cURL

Error Codes