Skip to content

Execute a SbQL query (event-scoped)

POST/v1/event/{eventId}/insights/execute

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

Execute a SbQL query scoped to the event in the path. Requires the read:insights scope. The query runs on that event only; an eventId or eventIds in the body or query string that names a different event returns 400 (or 403 EVENT_NOT_ALLOWED for a token limited to specific events). Use POST /v1/insights/execute for queries across events.

Request example

Terminal window
curl --request POST \
--url 'https://public-api.sessionboard.com/v1/event/{eventId}/insights/execute' \
--header 'x-access-token: <api-token>' \
--header 'Content-Type: application/json' \
--data '{
"query": "<string>",
"obfuscatePii": false,
"page": 123,
"limit": 123
}'

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.

Path parameters
Body application/json
POST

Authorizations

  • x-access-tokenstringheader

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

  • AuthorizationBearer <token>headeror

    OAuth 2.1 access token. Obtained via the OAuth PKCE flow at /oauth/token.

Send one of these. See Authentication.

Path parameters

  • eventIdintegerpathrequired

    The event ID to scope the query to.

Request body

application/jsonrequired

  • querystringrequired
  • obfuscatePiiboolean

    Set to true to mask personal-data fields (such as emails and phone numbers) in the results. Results are not masked unless you send true.

    Default
    false
  • pageinteger
  • limitinteger
{
"query": "<string>",
"obfuscatePii": false,
"page": 123,
"limit": 123
}

Responses

200application/json

OK

  • resultsobject[]
  • paginationPagination

    Pagination metadata returned with POST search responses. The event-settings GET lists return the same numbers under snake_case keys — see ListPagination.

    Show child attributes
    • currentPageinteger
    • pageSizeinteger
    • totalPagesinteger
    • totalResultsinteger

400

Invalid query

401

Unauthorized

403

Insufficient scope

Response examples

{
"results": [
{}
],
"pagination": {
"currentPage": 1,
"pageSize": 25,
"totalPages": 4,
"totalResults": 97
}
}

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.