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.

ObjectID prefixWhat it is
Organisationorg_You, the partner. Owns workspaces, API keys, webhook endpoints and the contract.
Workspacews_An isolated tenant, typically one per customer of yours. Holds bots, knowledge and conversations. Carries your external_id so you can map it back.
Botbot_An AI agent: instructions, model, temperature, tools, handoff settings and allowed widget domains.
Knowledge sourcesrc_A website, file, text block or Q&A set attached to a bot.
Knowledge jobjob_One asynchronous ingestion run, with status and progress.
Conversationconv_A thread between an end user and a bot, and human agents after a handoff.
Messagemsg_One message in a conversation, from the user, the assistant, a human agent or the system.
End useryour IDThe person chatting, identified by your external_id.
API keykey_A secret credential with scopes, bound to the organisation, one workspace or one bot.
Webhook endpointwhep_A URL of yours that receives signed event notifications.
Eventevt_A record of something that happened, delivered to your webhook endpoints.
Requestreq_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.

  1. 01Your platformCalls api.heyllo.co/v1 with a secret API key from your servers.
  2. 02Heyllo APIAuthenticates the key, scopes it to your workspaces and applies your limits.
  3. 03Heyllo agentsAnswer from the bot’s knowledge, then stream the reply back to you.
Events such as new conversations, handoffs and finished knowledge jobs are sent to your webhook endpoints.
  1. 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.
  2. 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.
  3. Metering. Messages, tokens, model cost and ingested words are recorded per workspace, bot and key as work completes.
  4. 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/usage reports live usage only.

Build and run your CI against test keys, then switch to live keys when you go live. See Go live.