Create or Update a Contact Variable
Creates a new variable for a contact, or updates its value if the key already exists (upsert).
The operation is atomic — uses a PostgreSQL JSONB merge so concurrent writes to different keys never overwrite each other.
The id field is optional when the request is made by the AI via HTTP tools and the
conversationid header is present.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Contact ID or Conversation ID. Optional if the conversationid header is set.
Variable name (key). Must not start with _.
Variable value. Accepts any JSON type (string, number, boolean, object, array, null).
Origin of the variable — human for manual input, ai for AI-generated.
human, ai Response
Free-form key-value store for a contact. Keys starting with _ are reserved for internal
metadata. The special _sources key tracks the origin of each variable.
Was this page helpful?

