githubEdit

REST API

The Alhena API allows developers to send queries to their Alhena knowledge base and receive AI-generated responses.

circle-info

API access is available to enterprise customers. Contact the Alhena team to request access.

circle-info

You only need an API key for backend integrations. For frontend integration, use the Website SDK.

Terminology

A user query is the question sent to Alhena AI.

An AI response is what Alhena AI returns after a user query is submitted.

A thread is all user queries and AI responses in a conversation. All messages in a thread share the same thread_id.

Example thread:

user: Hello

Alhena AI: How can I help you?

user: What is Alhena AI?

Alhena AI: A customer success product

How thread_id works

  • For a new conversation, omit thread_id. Alhena AI generates and returns a new thread_id.

  • For follow-up messages, pass the thread_id from the previous response.

  • Alhena AI returns the thread_id in every response.


Send Message

POST https://api.alhena.ai/api/v1/send_message

Send a query to Alhena AI and receive a generated response.

Headers

Name
Type
Description

Authorization *

string

Bearer <your_api_key>

Request Body

Name
Type
Description

query_text *

string

The user's question

thread_id

string

Thread ID for follow-up conversations

Example Request

Example Response

Last updated