curl https://app.runtm.com/api/cloud/auth/verify \
-H "Authorization: Bearer runtm_sk_live_abc123..."
import requests
response = requests.get(
"https://app.runtm.com/api/cloud/auth/verify",
headers={"Authorization": "Bearer runtm_sk_live_abc123..."},
)
data = response.json()
print(f"User: {data['email']}, Scopes: {data['scopes']}")
const response = await fetch("https://app.runtm.com/api/cloud/auth/verify", {
headers: {
"Authorization": "Bearer runtm_sk_live_abc123...",
},
});
const data = await response.json();
console.log(`User: ${data.email}, Scopes: ${data.scopes}`);
{
"valid": true,
"key_id": "263f6324-b6f4-4628-b455-d12330648e87",
"name": "Session automation",
"user_id": "user_xyz",
"organization_id": "org_abc123",
"tenant_id": "org_abc123",
"role": "admin",
"scopes": [
"sessions:read",
"sessions:write",
"sessions:prompt",
"sessions:terminal"
],
"effective_scopes": [
"sessions:read",
"sessions:write",
"sessions:prompt",
"sessions:terminal"
],
"expires_at": "2026-06-09T02:34:49.998427+00:00"
}
{
"detail": "Invalid or expired API key"
}
API Reference
Verify API Key
Verify an API key and inspect its scopes
GET
/
auth
/
verify
curl https://app.runtm.com/api/cloud/auth/verify \
-H "Authorization: Bearer runtm_sk_live_abc123..."
import requests
response = requests.get(
"https://app.runtm.com/api/cloud/auth/verify",
headers={"Authorization": "Bearer runtm_sk_live_abc123..."},
)
data = response.json()
print(f"User: {data['email']}, Scopes: {data['scopes']}")
const response = await fetch("https://app.runtm.com/api/cloud/auth/verify", {
headers: {
"Authorization": "Bearer runtm_sk_live_abc123...",
},
});
const data = await response.json();
console.log(`User: ${data.email}, Scopes: ${data.scopes}`);
{
"valid": true,
"key_id": "263f6324-b6f4-4628-b455-d12330648e87",
"name": "Session automation",
"user_id": "user_xyz",
"organization_id": "org_abc123",
"tenant_id": "org_abc123",
"role": "admin",
"scopes": [
"sessions:read",
"sessions:write",
"sessions:prompt",
"sessions:terminal"
],
"effective_scopes": [
"sessions:read",
"sessions:write",
"sessions:prompt",
"sessions:terminal"
],
"expires_at": "2026-06-09T02:34:49.998427+00:00"
}
{
"detail": "Invalid or expired API key"
}
Validates the provided API key and returns its metadata, including the scopes it was granted and the user and organization it belongs to. Any valid key can call this endpoint - no specific scope is required.
Headers
Response
Tenant ID used for deployment and telemetry scoping. Matches
organization_id for org keys, or user_id for personal keys.Current role of the key owner in the organization (
owner, admin, member), or null for personal keys.Scopes actually enforced at request time. This is the intersection of stored scopes (expanded from any legacy names) and the current role ceiling. If the key owner has been demoted,
effective_scopes will be narrower than scopes.curl https://app.runtm.com/api/cloud/auth/verify \
-H "Authorization: Bearer runtm_sk_live_abc123..."
import requests
response = requests.get(
"https://app.runtm.com/api/cloud/auth/verify",
headers={"Authorization": "Bearer runtm_sk_live_abc123..."},
)
data = response.json()
print(f"User: {data['email']}, Scopes: {data['scopes']}")
const response = await fetch("https://app.runtm.com/api/cloud/auth/verify", {
headers: {
"Authorization": "Bearer runtm_sk_live_abc123...",
},
});
const data = await response.json();
console.log(`User: ${data.email}, Scopes: ${data.scopes}`);
{
"valid": true,
"key_id": "263f6324-b6f4-4628-b455-d12330648e87",
"name": "Session automation",
"user_id": "user_xyz",
"organization_id": "org_abc123",
"tenant_id": "org_abc123",
"role": "admin",
"scopes": [
"sessions:read",
"sessions:write",
"sessions:prompt",
"sessions:terminal"
],
"effective_scopes": [
"sessions:read",
"sessions:write",
"sessions:prompt",
"sessions:terminal"
],
"expires_at": "2026-06-09T02:34:49.998427+00:00"
}
{
"detail": "Invalid or expired API key"
}