Skip to main content

GraphQL API

Use GraphQL to discover the XY Sense portfolio, enrich webhook events with reference data, reconcile downstream state, and query historical or aggregated data.

For ongoing occupancy, floor-sighting, and space-sensor changes, prefer webhooks over continuous polling.

Get started

  1. Follow the Quickstart, which takes you from API key to first response in four steps.
  2. Read Authentication and the connection requirements for the details.
  3. Explore the available data and pick the right surface with Choosing the right API.
  4. Choose a GraphQL guide for your integration workflow.
  5. Use the API reference for current query, mutation, and type definitions.

When to use GraphQL

  • Bootstrap buildings, floors, spaces, sensors, and their relationships.
  • Resolve identifiers received in webhook payloads into names and hierarchy.
  • Reconcile downstream state after interruptions or processing failures.
  • Query analytics, heatmaps, and bounded historical windows.
  • Perform occasional backfills where webhook delivery is not appropriate.

Avoid frequent polling for data already available through webhooks. Register a webhook and maintain a local reference-data cache instead.

Endpoint

Send authenticated POST requests to:

https://core-api.app.xysense.io/api/external/query

GraphQL responses can contain errors even when the HTTP response is successful. See Errors and retries.