Skip to content

Me Context

GET
/api/me/context
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.

x-workspace-id
Any of:
string

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>
ValidationError
object
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"
}
]
}