Skip to content
TriedDocs
Account

List public keys

List the browser public keys of the workspace with their domains, agents and fraud settings.

GEThttps://api.tried.com.au/public-keys

Returns every public key in the workspace, newest first. A public key lets a browser start web calls and chats from an allowed domain without exposing your secret API key. See Create public key for how they work.

Request#

This endpoint takes no path, query or body parameters.

Example request#

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

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

Response#

200 OK

[
  {
    "public_key_id": "pk_4a7e1c9b2d0f5e83a6c1b7d2",
    "name": "Website widget",
    "public_key": "public_key_9c2e4f7a1b3d5e6f8a0c2e4b6d8f1a3c",
    "chat_agent_id": null,
    "allowed_domains": ["example.com.au", "*.example.com.au"],
    "created_timestamp": 1760313600000,
    "chat_agents": [
      { "chat_agent_id": "chat_agent_1e5b9d3f7a2c4e6b8d0f2a4c", "weight": 0.5 },
      { "chat_agent_id": "chat_agent_7c3a1e9b5d2f4a6c8e0b1d3f", "weight": 0.5 }
    ],
    "agent_id": "agent_2f8d4b6a0c1e3f5a7b9d1c3e",
    "recaptcha_enabled": true,
    "recaptcha_threshold": 0.5,
    "rate_limit_per_minute": 60,
    "blocked_countries": ["RU"]
  }
]

The fields are described on Create public key. Unlike secret API keys, the full public_key value is returned every time.

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.
429 Rate limit exceeded. See Rate limits.

See Errors for the body format.