Skip to content

Generate a SbQL query from natural language

POST/v1/insights/ai/generate

US Region: https://public-api.sessionboard.com · EU Region: https://public-api-eu.sessionboard.com

Use AI to translate a natural language prompt into a SbQL query. Requires the read:insights scope.

Request example

Terminal window
curl --request POST \
--url 'https://public-api.sessionboard.com/v1/insights/ai/generate' \
--header 'x-access-token: <api-token>' \
--header 'Content-Type: application/json' \
--data '{
"prompt": "Show me all accepted sessions with their speakers",
"eventId": 123,
"eventIds": [
123
],
"conversationHistory": [
{
"role": "<string>",
"content": "<string>"
}
]
}'

Try it

Authorization

Your token stays in this page. It is sent only to the region above and is never saved; it is gone when you leave or reload the page.

Body application/json
POST

Authorizations

  • x-access-tokenstringheaderrequired

    Organization API token. Generate from Organization Settings → API Tokens.

Request body

application/jsonrequired

  • promptstringrequired

    Natural language description of the data you want to query.

  • eventIdinteger

    Scope to a single event for context.

  • eventIdsinteger[]

    Scope to multiple events for context.

  • conversationHistoryobject[]

    Previous conversation turns for multi-turn query refinement.

    Show child attributes
    • rolestring

      The message role (e.g., user, assistant).

    • contentstring

      The message content.

{
"prompt": "Show me all accepted sessions with their speakers",
"eventId": 123,
"eventIds": [
123
],
"conversationHistory": [
{
"role": "<string>",
"content": "<string>"
}
]
}

Responses

200application/json

OK

  • querystring

    The generated SbQL query.

  • explanationstring

    Human-readable explanation of the generated query.

400

Bad request

401

Unauthorized

403

Insufficient scope

Response examples

{
"query": "<string>",
"explanation": "<string>"
}

Get release notes by email

A short digest on the days something new goes live — each change with a link to its note in the release notes. No marketing, and one click to stop.

Company email addresses only. We’ll send one email to confirm it’s you. Already use Sessionboard? You can also turn this on under Community → What’s new.