Skip to content

Querying events

Use POST /api/events/query when you need to find multiple events. The request body controls the authorization scope, filters, sort order, and page size.

This guide queries one project with an API key. Use the credential type and authorization scope issued for your integration, as described in the quickstart and API conventions.

You need:

  • the EventPoint API base URL;
  • an API key assigned to the project; and
  • the project’s GUID.
Terminal window
API_URL="https://api.example.com"
API_KEY="your-issued-api-key"
PROJECT_ID="00000000-0000-0000-0000-000000000000"

The projects array limits the query to projects the credential is authorized to access. Page numbers start at 1 in this example.

Terminal window
curl --request POST \
--url "$API_URL/api/events/query" \
--header "Accept: application/json" \
--header "Content-Type: application/json" \
--header "x-api-key: $API_KEY" \
--data "{
\"page\": 1,
\"itemsPerPage\": 25,
\"sort\": \"start\",
\"sortDir\": \"Asc\",
\"projects\": [\"$PROJECT_ID\"]
}"

For an external integration, the request must include at least one authorized scope: organizations, projects, eventIds, topLevelIds, or parentIds. The request is rejected if the credential cannot access every identifier in the selected scope.

A successful response is a paged query result:

{
"page": 1,
"itemsPerPage": 25,
"count": 57,
"numberOfPages": 3,
"data": [
{
"id": "11111111-1111-1111-1111-111111111111",
"name": "Opening session",
"start": "2026-09-15T13:00:00Z"
}
]
}

The event objects can contain more fields than this shortened example. Use the generated operation reference as the source of truth for the current request and response schemas.

Add terms, startUtc, and endUtc to find matching events in a UTC time window:

{
"page": 1,
"itemsPerPage": 25,
"sort": "start",
"sortDir": "Asc",
"projects": ["00000000-0000-0000-0000-000000000000"],
"terms": "workshop",
"startUtc": "2026-09-15T00:00:00Z",
"endUtc": "2026-09-16T00:00:00Z"
}

Common filters include:

FieldPurpose
termsSearch text associated with an event.
eventTypesInclude events with selected event-type GUIDs.
categoriesInclude events associated with selected category GUIDs.
parentIdsFind child events for selected parent-event GUIDs.
topLevelOnlyLimit results to top-level events.
publishFilter by published state.
timePeriodFilterUse All, Upcoming, or Past.

Omit unused optional filters instead of sending empty values. This makes the request easier to read and avoids unintentionally changing the query.

The example below keeps credentials on a trusted server and checks the response before reading the result.

const response = await fetch(`${process.env.API_URL}/api/events/query`, {
method: 'POST',
headers: {
Accept: 'application/json',
'Content-Type': 'application/json',
'x-api-key': process.env.API_KEY,
},
body: JSON.stringify({
page: 1,
itemsPerPage: 25,
sort: 'start',
sortDir: 'Asc',
projects: [projectId],
timePeriodFilter: 'Upcoming',
}),
});
if (!response.ok) {
const details = await response.text();
throw new Error(`Event query failed (${response.status}): ${details}`);
}
const contentType = response.headers.get('content-type') ?? '';
if (!contentType.includes('application/json')) {
const details = await response.text();
throw new Error(`The API returned an unexpected response: ${details}`);
}
const result = await response.json();
for (const event of result.data ?? []) {
console.log(event.name);
}