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 Helvia Console)
API Token: A Bearer JWT for the
Authorizationheader
How To Use the API
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.
Complete Example with All Options
Best Practices
Protect your API Token: Store it server-side in environment variables or a secrets manager, never in client-side code or a public repository
Keep a stable sender ID: Use one consistent
sender.idper user, such as a UUID, so conversation context carries across messagesHandle every response: Iterate the full
responsesarray and switch on each item'stype, falling back toaltTextfor a plain-text versionTag sessions as you go: Use
tagOperationsto label conversations so you can filter and segment them later in Observatory
Last updated

