/v1/facilities/{facility_id}/access/eventsAuthentication
Bearer API key or Facily session, subject to permissions and facility scope.
Authentication and scopeRequest example
Replace bracketed path values with real IDs from your environment. The body, where shown, is generated from the schema and uses illustrative values.
curl --request GET \
--url 'https://api.staging.facily.ai/v1/facilities/<FACILITY_ID>/access/events' \
--header "Authorization: Bearer $FACILY_API_KEY"Try a request
Staging · read-onlyExplore your organization with a read-only request to staging.
Parameters
facility_idpath · stringrequiredFormat: uuid
cursorquery · string | nulllimitquery · integerDefault: 50 · Minimum: 1 · Maximum: 200
event_typequery · string | nullOne event type, or several separated by commas.
unit_idquery · string | nullOnly events for this unit.
Format: uuid
fromquery · string | nullInclusive lower bound on when it happened.
Format: date-time
toquery · string | nullExclusive upper bound on when it happened.
Format: date-time
Responses
Expand a status to inspect its schema. Generated examples show structure and synthetic values.
200Successful Response
{
"data": [
{
"after_lockout": false,
"event_type": "string",
"id": "00000000-0000-4000-8000-000000000001",
"occurred_at": "2026-10-29T12:00:00Z",
"recorded_at": "2026-10-29T12:00:00Z",
"source": "string",
"time_unreported": false,
"unconfirmed": false,
"access_grant_id": "00000000-0000-4000-8000-000000000001",
"performer_name": "string",
"provider": "string",
"provider_key": "string"
}
],
"meta": {
"request_id": "string"
},
"pagination": {
"has_more": false,
"limit": 0,
"cursor": "string",
"total_count": 0
},
"metrics": {
"cards": {},
"computed_at": "2026-10-29T12:00:00Z",
"is_stale": false,
"scope": "facility"
}
}application/json
dataAccessEventResponse[]requiredShow data schema
access_grant_idstring | nullThe grant a Facily event changed.
Format: uuid
Show access_grant_id schema
string | nullThe grant a Facily event changed.
Variant 1: string
stringVariant 2: null
nullafter_lockoutbooleanrequiredAn open at a time the provider held the unit locked out.
event_typestringrequiredunit_access, gate_entry, denied, failed_attempt, provider_event, granted, suspended, reinstated, hold_placed, hold_released or revoked.
idstringrequiredUnique identifier for this event.
Format: uuid
occurred_atstringrequiredWhen it happened.
Format: date-time
performer_namestring | nullThe name the provider recorded for the person; null without permission to read tenants.
Show performer_name schema
string | nullThe name the provider recorded for the person; null without permission to read tenants.
Variant 1: string
stringVariant 2: null
nullproviderstring | nullThe provider the row came from.
Show provider schema
string | nullThe provider the row came from.
Variant 1: string
stringVariant 2: null
nullprovider_keystring | nullThe provider's own name for the event.
Show provider_key schema
string | nullThe provider's own name for the event.
Variant 1: string
stringVariant 2: null
nullprovider_unit_namestring | nullThe provider's own name for the unit, when the event names a provider unit no Facily unit matches; null otherwise.
Show provider_unit_name schema
string | nullThe provider's own name for the unit, when the event names a provider unit no Facily unit matches; null otherwise.
Variant 1: string
stringVariant 2: null
nullreasonstring | nullWhy Facily made the change, for a grant event.
Show reason schema
string | nullWhy Facily made the change, for a grant event.
Variant 1: string
stringVariant 2: null
nullrecorded_atstringrequiredWhen the provider received it (provider rows) or Facily wrote it; a late upload shows here.
Format: date-time
sourcestringrequiredprovider for the provider's log; staff or system for Facily's own (the feed never lists a data load's migration grant events).
tenant_idstring | nullThe tenant of that grant.
Format: uuid
Show tenant_id schema
string | nullThe tenant of that grant.
Variant 1: string
stringVariant 2: null
nulltime_unreportedbooleanrequiredThe device reported no time; occurred_at is when the provider got it.
unconfirmedbooleanrequiredThe device did not confirm the lock moved.
unit_idstring | nullThe unit, when the event names one.
Format: uuid
Show unit_id schema
string | nullThe unit, when the event names one.
Variant 1: string
stringVariant 2: null
nullunit_numberstring | nullThat unit's number.
Show unit_number schema
string | nullThat unit's number.
Variant 1: string
stringVariant 2: null
nullmetaMetarequiredEnvelope metadata. Every response carries one.
Show meta schema
request_idstringrequiredmetricsEmbeddedMetrics | nullShow metrics schema
EmbeddedMetrics | nullVariant 1: EmbeddedMetrics
cardsobjectrequiredcomputed_atstring | nullrequiredFormat: date-time
Show computed_at schema
string | nullVariant 1: string
stringVariant 2: null
nullis_stalebooleanrequiredscopestringrequiredValues: "facility", "portfolio"
Variant 2: null
nullpaginationPaginationBlockrequiredPagination metadata for list responses.
Show pagination schema
cursorstring | nullShow cursor schema
string | nullVariant 1: string
stringVariant 2: null
nullhas_morebooleanrequiredlimitintegerrequiredtotal_countinteger | nullShow total_count schema
integer | nullVariant 1: integer
integerVariant 2: null
null400Validation error
{
"error": {
"code": "string",
"message": "string",
"details": {}
},
"meta": {
"request_id": "string"
}
}application/json
errorErrorBodyrequiredThe shape of error.* in an error response.
Show error schema
codestringrequireddetailsobject | nullShow details schema
object | nullVariant 1: object
objectVariant 2: null
nullmessagestringrequiredmetaMetarequiredEnvelope metadata. Every response carries one.
Show meta schema
request_idstringrequired401Unauthenticated
{
"error": {
"code": "string",
"message": "string",
"details": {}
},
"meta": {
"request_id": "string"
}
}application/json
errorErrorBodyrequiredThe shape of error.* in an error response.
Show error schema
codestringrequireddetailsobject | nullShow details schema
object | nullVariant 1: object
objectVariant 2: null
nullmessagestringrequiredmetaMetarequiredEnvelope metadata. Every response carries one.
Show meta schema
request_idstringrequired403Permission denied
{
"error": {
"code": "string",
"message": "string",
"details": {}
},
"meta": {
"request_id": "string"
}
}application/json
errorErrorBodyrequiredThe shape of error.* in an error response.
Show error schema
codestringrequireddetailsobject | nullShow details schema
object | nullVariant 1: object
objectVariant 2: null
nullmessagestringrequiredmetaMetarequiredEnvelope metadata. Every response carries one.
Show meta schema
request_idstringrequired404Not found
{
"error": {
"code": "string",
"message": "string",
"details": {}
},
"meta": {
"request_id": "string"
}
}application/json
errorErrorBodyrequiredThe shape of error.* in an error response.
Show error schema
codestringrequireddetailsobject | nullShow details schema
object | nullVariant 1: object
objectVariant 2: null
nullmessagestringrequiredmetaMetarequiredEnvelope metadata. Every response carries one.
Show meta schema
request_idstringrequired409Business logic error
{
"error": {
"code": "string",
"message": "string",
"details": {}
},
"meta": {
"request_id": "string"
}
}application/json
errorErrorBodyrequiredThe shape of error.* in an error response.
Show error schema
codestringrequireddetailsobject | nullShow details schema
object | nullVariant 1: object
objectVariant 2: null
nullmessagestringrequiredmetaMetarequiredEnvelope metadata. Every response carries one.
Show meta schema
request_idstringrequired503Temporary failure
{
"error": {
"code": "string",
"message": "string",
"details": {}
},
"meta": {
"request_id": "string"
}
}application/json
errorErrorBodyrequiredThe shape of error.* in an error response.
Show error schema
codestringrequireddetailsobject | nullShow details schema
object | nullVariant 1: object
objectVariant 2: null
nullmessagestringrequiredmetaMetarequiredEnvelope metadata. Every response carries one.
Show meta schema
request_idstringrequired