Concepts
The objects the API works with, how requests flow through Heyllo, and the live and test environments.
Objects
Every object has an opaque, prefixed ID. Treat IDs as strings of up to 64 characters and do not parse them.
| Object | ID prefix | What it is |
|---|---|---|
| Organisation | org_ | You, the partner. Owns workspaces, API keys, webhook endpoints and the contract. |
| Workspace | ws_ | An isolated tenant, typically one per customer of yours. Holds bots, knowledge and conversations. Carries your external_id so you can map it back. |
| Bot | bot_ | An AI agent: instructions, model, temperature, tools, handoff settings and allowed widget domains. |
| Knowledge source | src_ | A website, file, text block or Q&A set attached to a bot. |
| Knowledge job | job_ | One asynchronous ingestion run, with status and progress. |
| Conversation | conv_ | A thread between an end user and a bot, and human agents after a handoff. |
| Message | msg_ | One message in a conversation, from the user, the assistant, a human agent or the system. |
| End user | your ID | The person chatting, identified by your external_id. |
| API key | key_ | A secret credential with scopes, bound to the organisation, one workspace or one bot. |
| Webhook endpoint | whep_ | A URL of yours that receives signed event notifications. |
| Event | evt_ | A record of something that happened, delivered to your webhook endpoints. |
| Request | req_ | The ID of one API request, returned in the Request-Id header and in every error. |
Request path
Your servers call the Heyllo API with a secret key, Heyllo checks the key, its scopes and your limits, the agent runs, and the result comes back to you while events go to your webhook endpoints.
- 01Your platformCalls api.heyllo.co/v1 with a secret API key from your servers.
- 02Heyllo APIAuthenticates the key, scopes it to your workspaces and applies your limits.
- 03Heyllo agentsAnswer from the bot’s knowledge, then stream the reply back to you.
- Gateway. Every request is authenticated, checked against the key's scopes and binding, and rate-limited before any work starts. Requests that add usage are also checked against your monthly limits.
- Scoped execution. Only objects inside the key's organisation, environment and binding can be read or changed. Calls from the API to Heyllo's internal services carry a signed, short-lived context naming the bot, the permitted models and tools. Internal services are not reachable from the internet.
- Metering. Messages, tokens, model cost and ingested words are recorded per workspace, bot and key as work completes.
- Events. State changes are written to an outbox and delivered to your webhook endpoints with retries. A failed delivery does not lose the event.
Live and test environments
Every organisation has two isolated environments. Live keys start with hk_live_ and test keys with hk_test_. A key only sees objects from its own environment: workspaces, bots, conversations, keys, webhook endpoints and events never cross between them.
- Test traffic never counts against your monthly limits and is never billed.
- Rate limits in test mode are a tenth of the live limits, with a floor of 10 requests per minute.
- Webhook endpoints belong to one environment. Register a separate endpoint with a test key to receive test events.
GET /v1/usagereports live usage only.
Build and run your CI against test keys, then switch to live keys when you go live. See Go live.