Has events by entity
API Reference
Has events by entity
Fast boolean check whether an entity has any linked user events β same linkage scope as list-by-entity without returning event rows or counts.
GET
Has events by entity
Documentation Index
Fetch the complete documentation index at: https://docs.gu1.ai/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Use this endpoint when you only need to know if an entity has user events (for UI badges, tab visibility, or preflight checks), not the full timeline. It uses the same matching scope as List by Entity:entity_id, entity_external_id, or tax_id within your organization.
Performance
Designed for low latency:| Aspect | Behavior |
|---|---|
| Queries | Two round trips: entity lookup by UUID (PK) + one LIMIT 1 probe on user_events |
| No | COUNT(*), ORDER BY, pagination, or full event / metadata columns in the response |
| Indexes | organization_id + entity_id uses idx_user_events_organization_entity_id; entity_external_id and tax_id use dedicated indexes when the OR branch matches those identifiers |
Endpoint
Authentication
Requires a valid API key in the Authorization header:Path Parameters
UUID of the entity to check
Response
Indicates if the request was successful
true if at least one user event is linked to this entity (same scope as list-by-entity); otherwise falseConfirmed entity UUID (same as path parameter when the entity exists)
Example β has events
Example β no events
Errors
| Status | Code | When |
|---|---|---|
| 404 | ENTITY_NOT_FOUND | Entity UUID does not exist in your organization or is soft-deleted |
| 401 | β | Missing or invalid API key |
| 403 | β | Insufficient permissions (events:read) |
Examples
Next Steps
List by Entity
Full event timeline when
hasEvents is trueList Events
Query events with filters
Event Statistics
Aggregated counts by event type
Events Overview
User events API overview