Query context
Ask a natural-language question and receive an evidence-backed Context Package. Use an explicit project or engagement ID for deterministic delivery context; engagement queries compose the caller-visible projects linked by the canonical commercial-engagement relationship. Customer identity is resolvable with honest provider coverage. Omit subject identity only for portfolio questions such as “What should I focus on today?”.
POST
/api/v1/context/queryAuthorization
agent:readapi key scoperequiredRequired scope when calling with an API key.
agent:context_querysession capabilityoptionalRequired capability when calling with a signed-in session.
Request body
questionstringrequiredNatural-language question.
subjectstringoptionalOptional explicit subject phrase.
focusstringoptional"customer" | "engagement" | "project"Optional subject-kind hint.
subject_refobjectoptionalPreferred deterministic subject: { kind: customer|engagement|project, id: UUID }. Mutually exclusive with subject.
project_idstringoptionalProject UUID shortcut for subject_ref. Mutually exclusive with other subject IDs.
engagement_idstringoptionalCommercial engagement UUID shortcut for subject_ref. Mutually exclusive with other subject IDs.
customer_idstringoptionalCustomer UUID shortcut for subject_ref. Mutually exclusive with other subject IDs.
Example request
{
"question": "Why is this project at risk?",
"project_id": "24ea6df2-7f4c-4c32-9fc1-6c8a0cb5b4b2"
}Request
curl -X POST "https://www.digitalstack360.com/api/v1/context/query" \
-H "Authorization: Bearer $DS_API_KEY" \
-H "Content-Type: application/json" \
-d '{"question":"Why is this project at risk?","project_id":"24ea6df2-7f4c-4c32-9fc1-6c8a0cb5b4b2"}'Examples use a placeholder key from your environment. Store your key in $DS_API_KEY — never commit it.
Response
200 OK
{
"data": {
"intent": {
"name": "daily_focus"
},
"summary": "2 projects need attention.",
"evidence": [],
"coverage": {
"sources": [
{
"source": "subject_resolution",
"status": "ok"
}
]
},
"provenance": {
"plan_id": "daily_focus.v1",
"synthesizer": "none"
}
},
"meta": {
"context_package_version": "C1",
"deterministic": true
}
}Errors
401
missing_authNo credentials provided
401
invalid_api_keyAPI key is invalid or revoked
400
bad_requestMissing question or invalid focus
403
scope_insufficientKey lacks agent:read scope