Ir al contenido

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.

Ventana de terminal
curl --fail-with-body -X GET 'https://app.openlatch.ai/api/public/v1/users/me/context' \
-H "Authorization: Bearer $OPENLATCH_API_KEY"
Rol en la organizaciónEste punto de conexión
ownerPermitido
adminPermitido
editorPermitido
viewerPermitido

Una clave tiene el rol que su propietario ocupa en la organización. Consulte Autenticación.

Ámbito de la clave de API: self

CampoTipoDescripción
docs_urlstringObligatorio.
mcp_accessobjectObligatorio.
mcp_access.enabledbooleanObligatorio.
mcp_access.reasonstring — one of site_off, org_off, org_admin_off or null
organizationobjectObligatorio.
organization.idstringObligatorio.
organization.namestringObligatorio.
rolestring — one of owner, admin, editor, viewerObligatorio.
userobjectObligatorio.
user.emailstring or null
user.idstringObligatorio.
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"
}
}