Authenticate server-to-server requests with a scoped Agent API key.
Every request to the HeroUI Agents API requires an Agent API key. Keys belong to one Agent, and a successful request can only return resources owned by that Agent.
Create and manage keys in the Agent API keys dashboard.
Use the HTTP Bearer scheme:
Authorization: Bearer he_...For example:
curl "https://api.heroui.pro/v1/conversations?limit=20" \
--header "Authorization: Bearer $HEROUI_AGENT_API_KEY" \
--header "Accept: application/json"Agent API keys are server-side secrets. Never expose one in JavaScript shipped to a browser, a mobile application, logs, analytics, or support messages.
Each key has an explicit set of permissions:
| Permission | Dashboard label | Allows |
|---|---|---|
auth_tokens:create | Connect the Agent to your app | Allow people to use this Agent in your app. |
users:read | View users | See the people who have used this Agent. |
conversations:read | View conversations | See conversations and messages between people and this Agent. |
runs:read | View runs | View this Agent's run history, including usage, latency, and tool activity. |
Choose the smallest set that satisfies the integration. A reporting service that reads runs, for example, does not need auth_tokens:create, users:read, or conversations:read.
Keys created before permissions were introduced retain only auth_tokens:create. Legacy keys never gain access to users, conversations, or runs automatically; create a scoped replacement when you need public API access.
401 unauthorized.403 insufficient_scope.The error message identifies the missing permission. Do not retry either response without changing the key or its permissions.
Create a replacement, deploy it to the server, verify traffic, and then revoke the old key. Revocation takes effect immediately. See API keys for the full rotation workflow.