Aller au contenu

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.

Fenêtre de terminal
curl --fail-with-body -X GET 'https://app.openlatch.ai/api/public/v1/users/me/context' \
-H "Authorization: Bearer $OPENLATCH_API_KEY"
Rôle dans l’organisationCe point de terminaison
ownerAutorisé
adminAutorisé
editorAutorisé
viewerAutorisé

Une clé porte le rôle que son propriétaire détient dans l’organisation. Voir Authentification.

Portée de clé d’API : self

ChampTypeDescription
docs_urlstringObligatoire.
mcp_accessobjectObligatoire.
mcp_access.enabledbooleanObligatoire.
mcp_access.reasonstring — one of site_off, org_off, org_admin_off or null
organizationobjectObligatoire.
organization.idstringObligatoire.
organization.namestringObligatoire.
rolestring — one of owner, admin, editor, viewerObligatoire.
userobjectObligatoire.
user.emailstring or null
user.idstringObligatoire.
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"
}
}