Your backend, telling the agent what it knows.
Everything the agent knew about the person in front of it used to come from three thin places: whatever your frontend embedded in the page, what it could infer from their behaviour, and what it believed it heard them say. The one system that actually knows this person — the one holding their plan, their seats, their usage, their open tickets — is yours, and it had no way to speak.
Two endpoints fix that. Both live under the same /api/v1 bearer-key auth as
the rest of the API.
| Per-user context | Universal context | |
|---|---|---|
| About | One named person | The whole product |
| Lands on | Their user profile | Your knowledge base |
| Reaches the agent as | An ## Account section in every one of their turns |
A retrieved passage, when it's relevant |
| Good for | Plan, seats, usage, billing state, open tickets, account health | Pricing matrices, current promos, per-tier feature availability |
The rule of thumb: per-user for facts about a person, universal for facts about your product. A fact about your product pushed per-user is paid for in tokens on every turn of every conversation; a fact about a person pushed universally is visible to everyone.
Finding your app key
Every call is scoped to one app by its public key — the same
data-app-id value in your install snippet. If your integration would rather
not have that pasted in by hand:
curl https://console.jalon.dev/api/v1/apps \ -H "Authorization: Bearer sk_…"
{ "data": [ { "publicKey": "pk_…", "name": "Acme CRM", "identityVerification": true } ] }
identityVerification is the one field worth checking before you go further —
see below.
Per-user context
curl -X PUT https://console.jalon.dev/api/v1/apps/pk_…/users/u_8814/context \ -H "Authorization: Bearer sk_…" \ -H "Content-Type: application/json" \ -d '{ "context": { "plan": "Scale", "seats_used": 12, "seats_included": 10, "billing_status": "past_due", "open_tickets": ["#4412 export fails", "#4498 SSO setup"] } }'
The id in the path is the same id you pass to jalon('identify'). We hash
it with your app id the moment it arrives and never store the original, so the
push lands on exactly the profile that person's next conversation loads.
| Call | What |
|---|---|
PUT …/users/{id}/context |
Replace. What you send is the context afterwards |
PATCH …/users/{id}/context |
Merge. Unmentioned keys survive; an explicit null removes one |
GET …/users/{id}/context |
Read back what's stored. Always 200 — "context": {} when there's nothing |
DELETE …/users/{id}/context |
Remove all of it, leaving their behavioural profile intact |
Use PUT for a nightly full sync — it's the only shape that can remove a
cancelled add-on. Use PATCH for a webhook that fires on one field.
GET never 404s on the id. An id you've never pushed and an id you cleared
last night read the same — an empty context — because from your side they
are the same, and a reconciliation job shouldn't have to tell "nothing
stored" apart from "wrong id" to know what to send next.
Identity verification is required
These endpoints refuse with 409 identity_verification_required until your
app has an identity secret set (Settings → Identity verification).
The reason is worth stating plainly. A user id declared by a page is context,
not authentication — anyone can open their console and claim to be alice.
That was a fair trade while a profile held page counts and form abandons. It
stops being one the moment the profile holds what your billing system says
about Alice: without verification, whoever claims her id reads her account
back out of the agent.
With a secret set, the protection already exists and needs nothing from you here: a turn whose declared id doesn't carry a valid HMAC is quietly demoted to an anonymous one, and an anonymous turn keys no profile at all — so it answers with no account context, no memory and no history. It never reads the profile it claimed. See Security & privacy.
What a value may be
Strings, numbers, booleans, and flat lists of those. Up to 50 keys per user, 64 characters per key, 500 per value.
Nested objects are refused, because every value here is read aloud into a
prompt and a nested object has no reading that is both honest and short.
Anything we couldn't take comes back in an ignored array: a nested object, an
empty value, a key over 64 characters, keys past the fiftieth, and a list cut
to its first 20 items. Two things are trimmed without being listed: a string
over 500 characters is cut to 500, and an item inside a list that is not a
string, number or boolean is left out.
{ "data": { "userId": "u_8814", "context": { "plan": "Scale" }, "updatedAt": "2026-08-18T09:14:22+00:00" }, "ignored": ["billing_detail"] }
How it reads to the agent
It becomes an ## Account section, marked as coming from your own systems and
as authoritative — it outranks what the page claimed and what we inferred from
behaviour. The agent is told to answer from it rather than making the person
repeat what their own product already knows, and to defer rather than argue if
they say a value is wrong.
The channel is trusted; the values are not assumed to be. A ticket subject is very often something an end user typed, so every value still goes through the same prompt-injection scan as page text.
Universal context
Facts about your product that no crawl will ever find, because they aren't on a page.
curl -X PUT https://console.jalon.dev/api/v1/apps/pk_…/context/pricing \ -H "Authorization: Bearer sk_…" \ -H "Content-Type: application/json" \ -d '{ "title": "Pricing and plan limits", "content": "# Pricing\n\nStarter is $29/mo…" }'
| Call | What |
|---|---|
PUT …/context/{key} |
Create or replace the entry under that key |
GET …/context |
List everything pushed this way |
DELETE …/context/{key} |
Remove it, and the passages it grounded |
The key is yours — pricing, promo-q3, tier-matrix — and it's what
makes this safe to run on a cron. Push pricing every night and you land on
the same entry each time, rather than stacking a ninetieth price list into
retrieval by the end of the quarter.
Content is markdown. It arrives as an ordinary knowledge source, which means
it gets chunking, embedding, retrieval and reranking, your plan's quota,
overlap detection against your other sources, and a card on the Knowledge
page marked API — all of it for free, and all of it working exactly as it
does for a document you pasted in yourself.
Three consequences of that worth knowing:
- If your organisation has knowledge review switched on, a pushed entry is
stored, embedded and visible in the console but invisible to the agent until
an owner approves it. The response tells you:
"approved": false. - The Knowledge card is read-only in the console. Your server owns this text; letting an operator edit it would only mean losing their edit at the next push.
- A push past your plan's passage quota is reported, never quietly cut: the
response comes back
"status": "partial"withchunkCountbelowtotalChunksand anerrorsaying how much of the document the agent can actually see.
Keys are unique per app. Only entries pushed through this API carry one, so pushing a key you have used before replaces that entry.
Unlike the per-user half, this needs no identity secret. Nothing here is about a person, so there is no identity to verify.
Erasure
Per-user context lives on the same profile row as everything else the console can forget. Forget user (Users → find the person → Forget) erases their profile, remembered facts, sessions and replays for the app — API-pushed context goes with it, because it's stored on that same row rather than somewhere erasure would have to know to look separately.
Universal context isn't personal, so forgetting a user leaves it untouched;
remove it yourself with DELETE …/context/{key} when it goes stale.
Errors
| Code | Meaning |
|---|---|
identity_verification_required |
Set an identity secret before pushing per-user context |
unknown_app |
No app with that public key in your organisation |
unknown_user |
DELETE only — we hold no profile at all for that id. An id the dock has already seen, or one you have already cleared, answers 204 |
unknown_context |
No universal-context entry under that key |
invalid_user_id |
Empty, or longer than 200 characters |
invalid_context_key |
Keys are 1–120 characters of letters, numbers, ., -, _, starting with a letter or number |
context_key_taken |
Reserved for a key held by another kind of source. It cannot happen today, because only entries pushed through this API have keys |
Every write is recorded under Security → Activity in your workspace settings — per-user writes against the hashed key rather than the raw id, since this API does not keep the raw id.