API
Interact with your agent programmatically over HTTP
The API deployment lets you connect your agent to any application. Instead of embedding a widget or relying on a messaging channel, you communicate with your agent directly through HTTP requests — send a message, get a response.
The endpoint is https://bot-v5.helvia.ai/api/events. Explore the full API specification:
Why Use the API
Creating an API Deployment
Prerequisites
You need two credentials from your API deployment in Designer > Deployments:
Deployment Identifier — The deployment's unique identifier (labeled Identifier in the console)
API Token — A Bearer JWT for the
Authorizationheader
Treat the API Token like a password. Do not expose it in client-side code, public repositories, or browser requests. Store it in environment variables or a secrets manager.
How To Use the API
CORS is fully open (origin: *), so browser-based clients can call the API directly.
Start a session by sending a greeting postback:
Then send a text message in the same session:
A successful response:
Each item in the responses array is one message from the agent. The type field indicates the response format (text, buttons, carousel, etc.) and altText contains the plain-text version.
Key Concepts
For the full request/response API schemas and detailed error codes, see the Bot API Reference.
Handle
The handle field is the deployment Identifier from your API deployment settings. It tells the platform which agent and configuration to use for the request.
Sender ID
The sender.id identifies the end user in the conversation. Use a consistent ID (e.g. a UUID) per user to maintain conversation context across messages. If you omit the sender object entirely, the system generates a default ID with the prefix api_subscriber_.
Sessions
Sessions group message exchanges into conversations. A new session is created when:
A new
sender.idsends its first messageYou send a greeting postback to explicitly start a new conversation
A message arrives from an existing user but the inactivity timeout has elapsed since their last message. The timeout is configurable in Designer Settings > Configuration >.
Within a session, the agent maintains conversational context — collected variables, workflow state, and conversation history carry over between messages.
Text vs Payload
The message object can contain either a text or payload property, but not both. The text contains the users message and the payload is a postback message that triggers a specific flow node, intent, or action.
Advanced: Language Override
Pass a language field to override the deployment's default language for a specific request. The value is a language code like EN, EL, or DE.
Advanced: Response Options
Include additional data in the response using the options field:
includeMetadata: true
Adds responsesIds and nodesIds arrays to the response
includeStrippedMarkdownTextResponses: true
Adds a responsesStrippedMarkdownText array with plain-text versions (useful for text-to-speech)
Complete Example with All Options
Last updated
Was this helpful?

