Skip to content

Get the calling user's context

GET/api/public/v1/users/me/context

The user, the organization the credential is bound to, the user's role there, and whether agent access is on for that organization (mcp_access.enabled; when it is not, reason names the highest level that is off: the site, the organization, or the organization admin). Also the address of the agent docs. An API key reads it like any other credential: the switches describe agent access and never gate the key.

Terminal window
curl --fail-with-body -X GET 'https://app.openlatch.ai/api/public/v1/users/me/context' \
-H "Authorization: Bearer $OPENLATCH_API_KEY"
Role in the organizationThis endpoint
ownerAllowed
adminAllowed
editorAllowed
viewerAllowed

A key carries the role its owner holds in the organization. See Authentication.

API key scope: self

FieldTypeDescription
docs_urlstringRequired.
mcp_accessobjectRequired.
mcp_access.enabledbooleanRequired.
mcp_access.reasonstring — one of site_off, org_off, org_admin_off or null
organizationobjectRequired.
organization.idstringRequired.
organization.namestringRequired.
rolestring — one of owner, admin, editor, viewerRequired.
userobjectRequired.
user.emailstring or null
user.idstringRequired.
user.namestring or null
{
"docs_url": "https://app.openlatch.ai/",
"mcp_access": {
"enabled": false,
"reason": "site_off"
},
"organization": {
"id": "3f6c1a2e-8b4d-4c1f-9a7e-0d5b2c8e4f10",
"name": "release-bot"
},
"role": "owner",
"user": {
"email": "ada@example.com",
"id": "3f6c1a2e-8b4d-4c1f-9a7e-0d5b2c8e4f10",
"name": "release-bot"
}
}