Me Context
GET
/api/me/context
const url = 'http://localhost:8000/api/me/context';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url http://localhost:8000/api/me/context \ --header 'Authorization: Bearer <token>'Return the caller’s role for the resolved active workspace.
Membership is already enforced by current_workspace (403 otherwise), so a
successful response always carries a real role. member_role returns the
raw role stored in workspace_members (owner rows carry role owner);
if for any reason the row is missing we fall back to member (least
privilege) rather than leaking elevated access.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”Responses
Section titled “Responses”Successful Response
Media typeapplication/json
MeContext
object
is_owner
required
Is Owner
boolean
role
required
Role
string
user_id
required
User Id
string
workspace_id
required
Workspace Id
string
Examplegenerated
{ "is_owner": true, "role": "example", "user_id": "example", "workspace_id": "example"}Validation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
ctx
Context
object
input
Input
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{ "detail": [ { "ctx": {}, "input": "example", "loc": [ "example" ], "msg": "example", "type": "example" } ]}