Use this to ask the HRC Ledger assistant one question and get its answer, the records it cites and what it read. Requires the agent:ask scope, which is separate from the read scopes because asking spends money. It does not stream, does not write and does not read the web. A run that stopped at a ceiling is a 200 carrying status: "partial" and a stopped_reason — an incomplete answer the caller can tell is incomplete, not an error. Bounded to 200 runs per key per UTC day.
Trimmed before the bounds are applied. The same bounds the web surface enforces.
Optional. The output contract the answer must take. Omitted resolves to general on the server and is never inferred from the question. An unknown value is a 422 naming the four, never a silent fallback.
Deprecated, read for one release and only when contract is omitted: target_list and audience decode as list, answer as general, draft and general as themselves. Send contract instead. An unknown value is a 422.
Optional. A prior run's public_id, when this question answers that run's clarifying question. Resolved with the caller's own key as viewer, so a public_id belonging to another account is a 404 not_found.
Optional. The conversation to append this question to, as returned in data.conversation.id. Omitted opens a new conversation. Resolved against the key's own account, so a conversation belonging to another account is a 404 not_found. The body never carries message content: the prior turns are rebuilt server-side, and a long thread is trimmed by the replay depth cap documented in docs/API.md.
Optional. The asker's IANA time zone, which dates the run so relative dates such as last week resolve in the asker's calendar. An invalid value is never a 422: it is read as unknown, and the run assumes US Eastern (America/New_York) and says so. A zone saved on the key's account outranks this field, which is then only a fallback.
- Mock serverhttps://docs.societyhealth.co/_mock/docs/openapi/api/v1/ask
- https://hrcledger.comhttps://hrcledger.com/api/v1/ask
curl -i -X POST \
https://docs.societyhealth.co/_mock/docs/openapi/api/v1/ask \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"question": "Which Ohio hospitals changed EHR vendor this year?",
"contract": "general"
}'{ "ok": true, "data": { "run": { … }, "conversation": { … }, "answer": "Two Ohio hospitals posted an EHR replacement this year.", "citations": [ … ], "rows": [ … ], "coverage": { … }, "usage": { … }, "feedback": { … } } }