Get user context
This endpoint retrieves the context information for a user. The context is used to personalize LLM responses.
Behavior:
- Returns the user's context if it exists
- Returns 404 if the user context does not exist
- Note: User doesn't need to exist in the system; the endpoint only checks for context
Authorization
ApiTokenAuth PRODUCTx-api-key<token>
API Key with role based permission
In: header
Scope: PRODUCT
Header Parameters
x-user-id*string
The ID of the user to retrieve context for
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/v1/context" \ -H "x-user-id: string"{
"role": "Software Engineer",
"personalPreference": "Prefers concise technical answers"
}{
"message": "x-user-id is required"
}{
"message": "Unauthorized"
}{
"message": "User context not found"
}{
"message": "Internal Server Error"
}