API Reference
Execute API
Programmatically run bots and tools via the Execute API.
Endpoint
POST /api/v1/executeAuthentication
Include your API key in the Authorization header.
Header
Authorization: Bearer bh_sk_xxxxxxxxxxxxxxxxxxxxxRequest Body
request.json
{
"botId": "your-bot-id",
"input": {
"message": "Explain quantum computing"
},
"sessionId": "optional-session-id"
}Response
response.json
{
"success": true,
"output": "Your bot response",
"transcript": [],
"variables": {},
"runId": "run_abc123",
"sessionId": "optional-session-id"
}Choosing a bot
Pass the ID of a bot you own, have installed, or can access through a workspace. The endpoint runs that bot's HiveLang code with the supplied input and its configured capabilities.
Example: cURL
Terminal
curl -X POST https://bothive.cloud/api/v1/execute \
-H "Authorization: Bearer bh_sk_xxxxx" \
-H "Content-Type: application/json" \
-d '{"botId": "your-bot-id", "input": {"message": "Hello"}}'