Skip to content
TriedDocs
Account

Get API key info

Read the API key that made the request, with its scopes, limits and workspace.

GEThttps://api.tried.com.au/get-api-key-info

Returns details of the credential that sent the request: the API key's name, masked value, scopes, IP allowlist and rate limit, plus the workspace it belongs to. Use it to check which key a service is running with. The plaintext key is never returned.

Request#

This endpoint takes no path, query or body parameters.

Example request#

curl https://api.tried.com.au/get-api-key-info \
  -H "Authorization: Bearer $TRIED_API_KEY"
const res = await fetch("https://api.tried.com.au/get-api-key-info", {
  headers: { Authorization: `Bearer ${process.env.TRIED_API_KEY}` },
});
const info = await res.json();
import os, requests

res = requests.get(
    "https://api.tried.com.au/get-api-key-info",
    headers={"Authorization": f"Bearer {os.environ['TRIED_API_KEY']}"},
)
info = res.json()

Response#

200 OK

{
  "auth_type": "api_key",
  "api_key_id": "key_6f1c2a9e4b7d03581e2c9a47",
  "name": "Production backend",
  "masked_key": "key_3f9a********c41d",
  "is_webhook_key": true,
  "scopes": ["calls", "agents"],
  "allowed_ips": ["203.0.113.10"],
  "rate_limit_per_minute": 1200,
  "created_timestamp": 1758240000000,
  "last_used_timestamp": 1760917800000,
  "workspace_id": "ws_9b2e7d41c0a85f36e1d4b7a2",
  "workspace_name": "Acme Dental",
  "concurrency_limit": 20
}
Field Type Description
auth_type string api_key for a Bearer API key. A dashboard session gets session and only workspace_id, workspace_name and role.
masked_key string First 8 characters of the key, 8 asterisks, then the last 4 characters.
is_webhook_key boolean Whether this key signs outgoing webhooks.
scopes string[] Scopes the key is limited to. An empty list means full access.
allowed_ips string[] Source IPs the key is accepted from. An empty list means any IP.
rate_limit_per_minute integer or null The key's own request limit. null uses the server default.
last_used_timestamp integer or null Last time the key authenticated a request.
concurrency_limit integer or null Concurrency limit of the workspace.

Errors#

Status When
401 Missing or invalid API key.
403 The key's IP allowlist or scopes reject the request. This route needs the admin scope.
404 API key not found: the key was deleted while the request was in flight.
429 Rate limit exceeded. See Rate limits.

See Errors for the body format.