Rest API
Sending a question (async)
POST /api/v1/ai/async/query
Submit AI queries for asynchronous processing using the Unless API. This returns a questionId to retrieve the results later.
The async AI query endpoint allows you to submit questions for background processing, ideal for long-running queries or batch processing scenarios where immediate response is not required.
How it works
- Submit query: Send your question to
/ai/async/query - Get question ID: Receive a
questionIdimmediately - Retrieve results: Use the
questionIdwith/ai/async/answerto get results when ready
Parameters
Section titled “ Parameters ”Header Parameters
Section titled “Header Parameters ”Your API key from account settings.
The email address of your user.
The ID of your account. You can find this in the account settings.
The ID of the workspace you want to use.
Request Body required
Section titled “Request Body required ”object
The question you want to send to the AI.
An unique identifier for the current session.
An unique identifier for your visitor.
Optional segment ID to search within for relevant content.
Optional metadata object displayed in the dashboard.
object
In case you have multiple topics, you can give each a different name.
An audienceId to use for content lookup.
Responses
Section titled “ Responses ”Question accepted. Use questionId to poll for the answer.
object
Unique identifier for retrieving the query results later.
Example
550e8400-e29b-41d4-a716-446655440000