{"openapi":"3.1.0","info":{"title":"Nimbio Public API","description":"Programmatic access to your Nimbio keys, latches, members, and opens.\n\n**Authentication** — every endpoint (except `/healthz`) takes a bearer token:\n`Authorization: Bearer nimbio_test_…` or `nimbio_live_…`. Click **Authorize**\nand paste a key to try calls here.\n\n**Test vs live** — a `nimbio_test_*` key runs the full pipeline (auth, rate\nlimit, scope, validation) but never fires a gate, sends a message, or mutates a\nmember: writes come back `simulated` / `would_*`. Use a test key to explore\nsafely; switch to a `nimbio_live_*` key only when you want real side effects.\n\n**Idempotency** — the write endpoints that have a physical side effect (the\nopens and `POST /v1/community/messages`) accept an `idempotency_key`, either as a\nbody field or as an `Idempotency-Key` request header. Scoped to your API key, it\nmakes the write at-most-once for 24 hours: a retry with the same token replays\nthe original status code and body (marked `Idempotent-Replayed: true`) rather\nthan opening the gate again. Retry-safe failures — `502 upstream_unavailable` —\nfree the token; a `504 did_not_open` deliberately does not, because the open was\ndispatched and may have physically fired.\n\n**Account vs community keys** — there are two key types. The `/v1/account/*`\nendpoints (your keys and opening your own latches) require an account-scoped key;\nthe `/v1/community/*` endpoints require a community-scoped key (created by a\ncommunity manager in the admin portal). `/v1/me` works with either — its `key.type`\nfield tells you which one you're holding.\n","version":"0.12.0"},"paths":{"/healthz":{"get":{"summary":"Healthz","operationId":"healthz_healthz_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/me":{"get":{"tags":["Account"],"summary":"Who am I","description":"Key metadata + usage. Quota-exempt (per-minute limit only), so\nintegrations can poll it for diagnostics without burning quota.","operationId":"me_v1_me_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Key metadata, capabilities, and usage counters.","content":{"application/json":{"schema":{},"example":{"account_id":"a1b2…","key":{"api_key_id":"k1…","prefix":"nimbio_test_ab12cd34","name":"Integration","mode":"test","type":"account","capabilities":["open"],"self_service":false,"last_used_datetime":"2026-06-10T12:00:00+00:00","minute_limit":60,"minute_count":1,"month_limit":10000,"month_count":42}}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"example":{"error":{"code":"unauthorized","message":"Invalid API key","request_id":"b1c2…"}}}}},"429":{"description":"Rate limit exceeded — see Retry-After.","content":{"application/json":{"example":{"error":{"code":"rate_limited","message":"Too many requests","request_id":"b1c2…"}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"bearerAuth":[]}]}},"/v1/account/keys":{"get":{"tags":["Account"],"summary":"List your keys","description":"Every Nimbio key on your account, with its latches nested. Hidden keys are\nexcluded unless `include_hidden=true`.","operationId":"list_account_keys_v1_account_keys_get","parameters":[{"name":"include_hidden","in":"query","required":false,"schema":{"type":"boolean","description":"Include keys the user has hidden (default: exclude).","default":false,"title":"Include Hidden"},"description":"Include keys the user has hidden (default: exclude)."},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"If-None-Match","in":"header","required":false,"description":"The `ETag` from a previous response to this URL. If the representation has not changed you get `304 Not Modified` with no body — reuse your cached copy. A comma-separated list and `*` are both accepted.","schema":{"type":"string"},"example":"\"6f9a3c1e8b2d4f70a1c5e9b3d7f2a4c8\""}],"responses":{"200":{"description":"Your keys, each with its latches nested.","content":{"application/json":{"schema":{},"example":{"keys":[{"id":"k1…","name":"Home","home":"123 Main St","disabled":false,"hidden":false,"pending":false,"parent_name":"Maple Court Master","latches":[{"id":"l1…","name":"Front Gate","offline":false,"location":"Entrance","held_open":false}]}]}}},"headers":{"ETag":{"description":"Validator for this representation. Send it back as `If-None-Match` on the next poll.","schema":{"type":"string"}},"Cache-Control":{"description":"`private, no-cache`. `no-cache` means revalidate before reuse — not \"do not store\".","schema":{"type":"string"}}}},"403":{"description":"This API key is bound to a community; use an account key.","content":{"application/json":{"example":{"error":{"code":"not_account_key","message":"This API key is bound to a community; use an account key","request_id":"b1c2…"}}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"example":{"error":{"code":"unauthorized","message":"Invalid API key","request_id":"b1c2…"}}}}},"429":{"description":"Rate limit exceeded — see Retry-After.","content":{"application/json":{"example":{"error":{"code":"rate_limited","message":"Too many requests","request_id":"b1c2…"}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"304":{"description":"Not modified — your `If-None-Match` matched the current representation. No body. Does not consume monthly quota.","headers":{"ETag":{"description":"The unchanged validator.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]}]}},"/v1/account/keys/{key_id}/latches/{latch_id}/open":{"post":{"tags":["Account"],"summary":"Open one of your latches","description":"Open a latch using one of your own keys.\n\nTest mode: writes `test_simulated`, returns 200 with `would_open` — box never\nfires (the latch permission is authorized on the backend only for live opens).\nLive mode: synchronous — blocks until the open settles, then returns 200 when\nthe box confirms, 403 when denied, 409 when the latch requires an NFC scan, or\n504 when the gate does not confirm within the timeout (`did_not_open`).\n\nIdempotency: send an `idempotency_key` (body field or `Idempotency-Key`\nheader) to make this at-most-once. Within 24h a repeat of the same token\nreplays the original status and body — marked with `Idempotent-Replayed:\ntrue` and an `idempotent_replay` body field, carrying the original\n`request_id` — and issues no second open. A duplicate arriving while the\nfirst is still in flight gets 409; the same token with a different request\ngets 422. A 502 frees the token so a real retry proceeds. **A 504\n`did_not_open` does not**: the open was dispatched and may have physically\nfired, so retrying it would risk opening the gate again with nobody there —\nuse a new `idempotency_key` if you deliberately want another attempt.","operationId":"open_account_latch_v1_account_keys__key_id__latches__latch_id__open_post","parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","title":"Key Id"}},{"name":"latch_id","in":"path","required":true,"schema":{"type":"string","title":"Latch Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body","properties":{"note":{"type":"string","maxLength":500,"description":"Optional free-text note stored with the open. Comes back as `api_note` on GET /v1/community/access-logs, and is shown beside the open on the community manager's Access Logs page. Trimmed, and truncated to 500 characters."},"idempotency_key":{"type":"string","maxLength":80,"description":"Optional client token that makes this write at-most-once. A repeat of the same token within 24h replays the original response instead of issuing a second open (see the `Idempotency-Key` header parameter for the full contract). Max 80 characters."}}},"example":{"note":"Front gate test"}}},"required":false},"responses":{"200":{"description":"Opened (live, box confirmed) or simulated (test key).","content":{"application/json":{"schema":{},"example":{"result":"opened","request_id":"b1c2…","key_log_id":9001}}}},"403":{"description":"Not permitted, the key can't open this latch, or the key is bound to a community (code `not_account_key`).","content":{"application/json":{"example":{"error":{"code":"open_denied","message":"Not permitted now","request_id":"b1c2…"}}}}},"409":{"description":"This latch requires an in-person NFC scan (`scan_required`), or a request with this idempotency_key is still in flight (`idempotency_key_in_flight`).","content":{"application/json":{"example":{"error":{"code":"scan_required","message":"Latch requires an NFC scan","request_id":"b1c2…"}}}}},"504":{"description":"The gate did not confirm the open within the timeout.","content":{"application/json":{"example":{"error":{"code":"did_not_open","message":"Box did not acknowledge the open within the timeout","request_id":"b1c2…"}}}}},"422":{"description":"This idempotency_key was already used for a different request.","content":{"application/json":{"example":{"error":{"code":"idempotency_key_reuse","message":"This idempotency_key was already used for a different request","request_id":"b1c2…"}}}}},"503":{"description":"Idempotency could not be enforced (store unavailable); the request was NOT processed. Retry with the same key.","content":{"application/json":{"example":{"error":{"code":"idempotency_unavailable","message":"Idempotency could not be enforced; the request was not processed","request_id":"b1c2…"}}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"example":{"error":{"code":"unauthorized","message":"Invalid API key","request_id":"b1c2…"}}}}},"429":{"description":"Rate limit exceeded — see Retry-After.","content":{"application/json":{"example":{"error":{"code":"rate_limited","message":"Too many requests","request_id":"b1c2…"}}}}}},"security":[{"bearerAuth":[]}]}},"/v1/community":{"get":{"tags":["Community · Reads"],"summary":"Describe this community","description":"**Call this first.** A read-only description of the community your key is\nbound to — the bootstrap call for any integration.\n\nIt answers the three things the rest of this surface assumes you already\nknow:\n\n**Latch ids.** `latches[].latch_id` is what `POST /v1/community/open` and\nthe hold-open endpoints take. Read them from here instead of scraping them\nout of a gate-status or key-status payload. The ids and names are the same\nones `GET /v1/community/gate-status` reports; live sensed state is not\nduplicated here, so call gate-status for that.\n\n**Feature flags.** `features` tells you what this community has turned on —\nbranch on it instead of calling an endpoint and interpreting a 403. For\nexample, `features.hold_opens` false means every `/v1/community/hold-opens`\ncall will 403, and `features.access_log_history` false means the access-log\nendpoints will. `member_open_notifications` and `event_keys` are the\n*resolved* values (the property-type default combined with any\nper-community override), i.e. what the product actually enforces.\n\n**Timezone.** Every timestamp you read or write on this API — access-log\nrows, hold-open windows, recurring schedules — is meant to be interpreted in\nthe community's local clock, and that clock lives on its hardware. A\ncommunity has no timezone column of its own: each latch inherits the\ntimezone of the box it hangs off. `timezone` is the single zone every\nconfigured latch agrees on, or `null` when they disagree or none is set;\n`timezones` lists every distinct zone in play, and each entry in `latches`\ncarries its own. A multi-site community will legitimately report `null` at\nthe top level — use the per-latch value there.\n\nContains no personal data: this describes the community, not its roster\n(see `GET /v1/community/members` for that).\n\nQuota-exempt: never counts against the monthly quota, so integrations can\ncall it on startup and on every config refresh.","operationId":"get_community_v1_community_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"If-None-Match","in":"header","required":false,"description":"The `ETag` from a previous response to this URL. If the representation has not changed you get `304 Not Modified` with no body — reuse your cached copy. A comma-separated list and `*` are both accepted.","schema":{"type":"string"},"example":"\"6f9a3c1e8b2d4f70a1c5e9b3d7f2a4c8\""}],"responses":{"200":{"description":"Identity, timezone, feature flags, latches, and terminology for the community this key is bound to.","content":{"application/json":{"schema":{},"example":{"community_id":2585,"community_uuid":"6f1c2a80-6b3e-4a1e-9a54-1f0f8a2c9d10","name":"Sunset Ridge","active":true,"property_type":{"id":2,"name":"Commercial"},"number_of_units":120,"timezone":"America/Los_Angeles","timezones":["America/Los_Angeles"],"features":{"hold_opens":true,"access_log_history":true,"directory_viewing":false,"directory_access_codes":false,"guest_view_entry":false,"subkeys":true,"member_open_notifications":true,"event_keys":false},"latches":[{"latch_id":"0f8d3b6e-6d1c-4f2a-9c33-9b7a1d5e2c41","latch_name":"Main Entrance","offline":false,"timezone":"America/Los_Angeles","box_id":"7355421c-6a2f-4f9b-8f0a-2d3c4b5a6e7f","box_name":"Front Gate Box"},{"latch_id":"b21e4477-5c8a-4a10-89ff-0c9e1a2b3c4d","latch_name":"Parking Garage","offline":false,"timezone":"America/Los_Angeles","box_id":"7355421c-6a2f-4f9b-8f0a-2d3c4b5a6e7f","box_name":"Front Gate Box"}],"terminology":{"member":{"singular":"Tenant","plural":"Tenants","icon":"person"},"home":{"singular":"Suite","plural":"Suites","icon":"home"}},"counts":{"latches":2,"keys":1,"homes":40,"members_accepted":87,"members_pending":3,"members_removed":12}}}},"headers":{"ETag":{"description":"Validator for this representation. Send it back as `If-None-Match` on the next poll.","schema":{"type":"string"}},"Cache-Control":{"description":"`private, no-cache`. `no-cache` means revalidate before reuse — not \"do not store\".","schema":{"type":"string"}}}},"403":{"description":"This API key is not bound to a community (`not_community_key`), or its manager no longer has API access to the community (`api_access_revoked`: removed as a manager, API access blocked for the community, or the permission withdrawn). The key itself stays valid and works again if that access is restored.","content":{"application/json":{"example":{"error":{"code":"not_community_key","message":"This API key is not bound to a community","request_id":"b1c2…"}}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"example":{"error":{"code":"unauthorized","message":"Invalid API key","request_id":"b1c2…"}}}}},"429":{"description":"Rate limit exceeded — see Retry-After.","content":{"application/json":{"example":{"error":{"code":"rate_limited","message":"Too many requests","request_id":"b1c2…"}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"304":{"description":"Not modified — your `If-None-Match` matched the current representation. No body. Does not consume monthly quota.","headers":{"ETag":{"description":"The unchanged validator.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]}]}},"/v1/community/gate-status":{"get":{"tags":["Community · Reads"],"summary":"Get gate status","description":"Latest known sensed state per latch in the key's community, including\neach latch's configured status vocabulary (``possible_statuses``).\nQuota-exempt: never counts against the monthly quota.","operationId":"get_gate_status_v1_community_gate_status_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"If-None-Match","in":"header","required":false,"description":"The `ETag` from a previous response to this URL. If the representation has not changed you get `304 Not Modified` with no body — reuse your cached copy. A comma-separated list and `*` are both accepted.","schema":{"type":"string"},"example":"\"6f9a3c1e8b2d4f70a1c5e9b3d7f2a4c8\""}],"responses":{"200":{"description":"Latest sensed state per latch.","content":{"application/json":{"schema":{},"example":{"latches":[{"latch_id":"l1…","latch_name":"Front Gate","status":"closed","offline":false,"latch_status_current_message":"Closed"}]}}},"headers":{"ETag":{"description":"Validator for this representation. Send it back as `If-None-Match` on the next poll.","schema":{"type":"string"}},"Cache-Control":{"description":"`private, no-cache`. `no-cache` means revalidate before reuse — not \"do not store\".","schema":{"type":"string"}}}},"403":{"description":"This API key is not bound to a community (`not_community_key`), or its manager no longer has API access to the community (`api_access_revoked`: removed as a manager, API access blocked for the community, or the permission withdrawn). The key itself stays valid and works again if that access is restored.","content":{"application/json":{"example":{"error":{"code":"not_community_key","message":"This API key is not bound to a community","request_id":"b1c2…"}}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"example":{"error":{"code":"unauthorized","message":"Invalid API key","request_id":"b1c2…"}}}}},"429":{"description":"Rate limit exceeded — see Retry-After.","content":{"application/json":{"example":{"error":{"code":"rate_limited","message":"Too many requests","request_id":"b1c2…"}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"304":{"description":"Not modified — your `If-None-Match` matched the current representation. No body. Does not consume monthly quota.","headers":{"ETag":{"description":"The unchanged validator.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]}]}},"/v1/community/members":{"get":{"tags":["Community · Reads"],"summary":"List members","description":"Pending / accepted / removed members for the key's community.","operationId":"get_members_v1_community_members_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"If-None-Match","in":"header","required":false,"description":"The `ETag` from a previous response to this URL. If the representation has not changed you get `304 Not Modified` with no body — reuse your cached copy. A comma-separated list and `*` are both accepted.","schema":{"type":"string"},"example":"\"6f9a3c1e8b2d4f70a1c5e9b3d7f2a4c8\""}],"responses":{"200":{"description":"Pending / accepted / removed members.","content":{"application/json":{"schema":{},"example":{"accepted":[{"account_community_id":4021,"first_name":"Dana","last_name":"Lee","phone_number":"+15551234567"}],"unaccepted":[],"removed":[]}}},"headers":{"ETag":{"description":"Validator for this representation. Send it back as `If-None-Match` on the next poll.","schema":{"type":"string"}},"Cache-Control":{"description":"`private, no-cache`. `no-cache` means revalidate before reuse — not \"do not store\".","schema":{"type":"string"}}}},"403":{"description":"This API key is not bound to a community (`not_community_key`), or its manager no longer has API access to the community (`api_access_revoked`: removed as a manager, API access blocked for the community, or the permission withdrawn). The key itself stays valid and works again if that access is restored.","content":{"application/json":{"example":{"error":{"code":"not_community_key","message":"This API key is not bound to a community","request_id":"b1c2…"}}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"example":{"error":{"code":"unauthorized","message":"Invalid API key","request_id":"b1c2…"}}}}},"429":{"description":"Rate limit exceeded — see Retry-After.","content":{"application/json":{"example":{"error":{"code":"rate_limited","message":"Too many requests","request_id":"b1c2…"}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"304":{"description":"Not modified — your `If-None-Match` matched the current representation. No body. Does not consume monthly quota.","headers":{"ETag":{"description":"The unchanged validator.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]}]},"post":{"tags":["Community · Writes"],"summary":"Add a member by phone","description":"Add a member to the community by phone number and grant them keys.\n\nIf the phone number has no Nimbio account, a pending account is created.\n`key_ids` are community key ids (from /v1/community/key-statuses); each\ngrants the member access via a new key on their account.\n\nTest mode: validate phone + key scope, write `test_simulated`, return 200 —\nno account is created and no keys are granted.","operationId":"add_member_v1_community_members_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body","properties":{"phone_number":{"type":"string","description":"E.164 phone, e.g. +15551234567."},"key_ids":{"type":"array","items":{"type":"string"},"description":"Community key ids (from key-statuses) to grant."}},"required":["phone_number","key_ids"]},"example":{"phone_number":"+15551234567","key_ids":["{{community_key_id}}"]}}},"required":true},"responses":{"201":{"description":"Live: member added + keys granted.","content":{"application/json":{"schema":{},"example":{"result":"member_added","request_id":"b1c2…","account_community_id":4021,"account_id":"a1…","keys":[{"key_id":"k1…"}]}}}},"200":{"description":"Test: validated — nothing created.","content":{"application/json":{"example":{"result":"simulated","request_id":"b1c2…"}}}},"400":{"description":"Missing phone_number or key_ids.","content":{"application/json":{"example":{"error":{"code":"missing_phone_number","message":"A 'phone_number' is required","request_id":"b1c2…"}}}}},"403":{"description":"This API key is not bound to a community (`not_community_key`), or its manager no longer has API access to the community (`api_access_revoked`: removed as a manager, API access blocked for the community, or the permission withdrawn). The key itself stays valid and works again if that access is restored.","content":{"application/json":{"example":{"error":{"code":"not_community_key","message":"This API key is not bound to a community","request_id":"b1c2…"}}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"example":{"error":{"code":"unauthorized","message":"Invalid API key","request_id":"b1c2…"}}}}},"429":{"description":"Rate limit exceeded — see Retry-After.","content":{"application/json":{"example":{"error":{"code":"rate_limited","message":"Too many requests","request_id":"b1c2…"}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"bearerAuth":[]}]}},"/v1/community/members/page":{"get":{"tags":["Community · Reads"],"summary":"List members (paged + searchable)","description":"One bucket of the key's community roster, paged and optionally searched.\n\n`bucket` is `accepted` (default), `unaccepted` (pending join requests), or\n`removed`. `page` is 1-indexed; `size` is 1–500 (default 100). `search` is a\ncase-insensitive substring match over first name, last name, and phone\nnumber — phone matching ignores punctuation, so `555-1234` matches\n`+1 555-123-4567`. Filtering happens before paging, so `total` counts the\nmatches and paging through a search never skips anyone.\n\nRows are shaped exactly as /v1/community/members returns them; homes appear\nas a single `is_home: true` row listing their members' ids. Use this instead\nof /v1/community/members when you poll a large community or only need one\nbucket — it ships far less data (and far fewer phone numbers) per call.","operationId":"get_members_page_v1_community_members_page_get","parameters":[{"name":"bucket","in":"query","required":false,"schema":{"type":"string","pattern":"^(accepted|unaccepted|removed)$","default":"accepted","title":"Bucket"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Size"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Search"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"If-None-Match","in":"header","required":false,"description":"The `ETag` from a previous response to this URL. If the representation has not changed you get `304 Not Modified` with no body — reuse your cached copy. A comma-separated list and `*` are both accepted.","schema":{"type":"string"},"example":"\"6f9a3c1e8b2d4f70a1c5e9b3d7f2a4c8\""}],"responses":{"200":{"description":"One bucket of the roster, paged. `total` is the size of the filtered set, not the whole bucket.","content":{"application/json":{"schema":{},"example":{"result":"ok","bucket":"accepted","page":1,"size":100,"total":137,"has_more":true,"members":[{"id":"a1…","is_home":false,"account_community_id":4021,"first_name":"Dana","last_name":"Lee","phone_numbers":["+1 555-123-4567"],"keys":[{"key_name":"Front Gate Key","key_id":"k1…","disabled":false,"expires_at_valid":false,"installer_grant":false}],"accepted":true,"subkey_count":1,"created_datetime":"2026-01-14","installer_grant":false}]}}},"headers":{"ETag":{"description":"Validator for this representation. Send it back as `If-None-Match` on the next poll.","schema":{"type":"string"}},"Cache-Control":{"description":"`private, no-cache`. `no-cache` means revalidate before reuse — not \"do not store\".","schema":{"type":"string"}}}},"422":{"description":"Unknown bucket, or page/size out of range.","content":{"application/json":{"example":{"error":{"code":"invalid_bucket","message":"Invalid bucket 'pending'","request_id":"b1c2…"}}}}},"403":{"description":"This API key is not bound to a community (`not_community_key`), or its manager no longer has API access to the community (`api_access_revoked`: removed as a manager, API access blocked for the community, or the permission withdrawn). The key itself stays valid and works again if that access is restored.","content":{"application/json":{"example":{"error":{"code":"not_community_key","message":"This API key is not bound to a community","request_id":"b1c2…"}}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"example":{"error":{"code":"unauthorized","message":"Invalid API key","request_id":"b1c2…"}}}}},"429":{"description":"Rate limit exceeded — see Retry-After.","content":{"application/json":{"example":{"error":{"code":"rate_limited","message":"Too many requests","request_id":"b1c2…"}}}}},"304":{"description":"Not modified — your `If-None-Match` matched the current representation. No body. Does not consume monthly quota.","headers":{"ETag":{"description":"The unchanged validator.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]}]}},"/v1/community/members/{account_community_id}":{"get":{"tags":["Community · Reads"],"summary":"Get one member","description":"One member of the key's community, by `account_community_id` (as returned\nby /v1/community/members or carried on a `member.requested` webhook).\n\n`bucket` says which list they are in (`accepted` / `unaccepted` /\n`removed`). A member of any other community returns 404, exactly as an\nunknown id does — a key can only ever read its own community's roster.","operationId":"get_member_v1_community_members__account_community_id__get","parameters":[{"name":"account_community_id","in":"path","required":true,"schema":{"type":"integer","title":"Account Community Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"If-None-Match","in":"header","required":false,"description":"The `ETag` from a previous response to this URL. If the representation has not changed you get `304 Not Modified` with no body — reuse your cached copy. A comma-separated list and `*` are both accepted.","schema":{"type":"string"},"example":"\"6f9a3c1e8b2d4f70a1c5e9b3d7f2a4c8\""}],"responses":{"200":{"description":"One member of the key's community.","content":{"application/json":{"schema":{},"example":{"result":"ok","bucket":"accepted","id":"a1…","is_home":false,"account_community_id":4021,"first_name":"Dana","last_name":"Lee","phone_numbers":["+1 555-123-4567"],"keys":[{"key_name":"Front Gate Key","key_id":"k1…","disabled":false,"expires_at_valid":false,"installer_grant":false}],"accepted":true,"subkey_count":1,"created_datetime":"2026-01-14","installer_grant":false,"status":1}}},"headers":{"ETag":{"description":"Validator for this representation. Send it back as `If-None-Match` on the next poll.","schema":{"type":"string"}},"Cache-Control":{"description":"`private, no-cache`. `no-cache` means revalidate before reuse — not \"do not store\".","schema":{"type":"string"}}}},"404":{"description":"No such member in this community.","content":{"application/json":{"example":{"error":{"code":"member_not_found","message":"Member not found","request_id":"b1c2…"}}}}},"403":{"description":"This API key is not bound to a community (`not_community_key`), or its manager no longer has API access to the community (`api_access_revoked`: removed as a manager, API access blocked for the community, or the permission withdrawn). The key itself stays valid and works again if that access is restored.","content":{"application/json":{"example":{"error":{"code":"not_community_key","message":"This API key is not bound to a community","request_id":"b1c2…"}}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"example":{"error":{"code":"unauthorized","message":"Invalid API key","request_id":"b1c2…"}}}}},"429":{"description":"Rate limit exceeded — see Retry-After.","content":{"application/json":{"example":{"error":{"code":"rate_limited","message":"Too many requests","request_id":"b1c2…"}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"304":{"description":"Not modified — your `If-None-Match` matched the current representation. No body. Does not consume monthly quota.","headers":{"ETag":{"description":"The unchanged validator.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]}]}},"/v1/community/key-statuses":{"get":{"tags":["Community · Reads"],"summary":"Get key + latch statuses","description":"All key + latch statuses (disabled, offline, held_open, disabled_until).\nQuota-exempt: never counts against the monthly quota.","operationId":"get_key_statuses_v1_community_key_statuses_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"If-None-Match","in":"header","required":false,"description":"The `ETag` from a previous response to this URL. If the representation has not changed you get `304 Not Modified` with no body — reuse your cached copy. A comma-separated list and `*` are both accepted.","schema":{"type":"string"},"example":"\"6f9a3c1e8b2d4f70a1c5e9b3d7f2a4c8\""}],"responses":{"200":{"description":"All keys and latches with disabled / offline / held-open state.","content":{"application/json":{"schema":{},"example":{"keys":[{"id":"k1…","name":"Front Gate Key"}],"hold_opens":{}}}},"headers":{"ETag":{"description":"Validator for this representation. Send it back as `If-None-Match` on the next poll.","schema":{"type":"string"}},"Cache-Control":{"description":"`private, no-cache`. `no-cache` means revalidate before reuse — not \"do not store\".","schema":{"type":"string"}}}},"403":{"description":"This API key is not bound to a community (`not_community_key`), or its manager no longer has API access to the community (`api_access_revoked`: removed as a manager, API access blocked for the community, or the permission withdrawn). The key itself stays valid and works again if that access is restored.","content":{"application/json":{"example":{"error":{"code":"not_community_key","message":"This API key is not bound to a community","request_id":"b1c2…"}}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"example":{"error":{"code":"unauthorized","message":"Invalid API key","request_id":"b1c2…"}}}}},"429":{"description":"Rate limit exceeded — see Retry-After.","content":{"application/json":{"example":{"error":{"code":"rate_limited","message":"Too many requests","request_id":"b1c2…"}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"304":{"description":"Not modified — your `If-None-Match` matched the current representation. No body. Does not consume monthly quota.","headers":{"ETag":{"description":"The unchanged validator.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]}]}},"/v1/community/keys":{"get":{"tags":["Community · Reads"],"summary":"List keys with restrictions","description":"List every key in the key's community with its access restrictions.\n\nRestriction-focused companion to `/v1/community/key-statuses`: that endpoint\nreports live state (offline, held-open) for monitoring; this one reports the\nconfigured limits on each key — whether it is disabled, time-restricted\n(temporal windows), expiring (`expiry`), depth-limited for resharing\n(`sharing.max_share_depth`), or per-latch restricted (scan-only, NFC-scan\nrequired, a limited number of uses).","operationId":"list_community_keys_v1_community_keys_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"If-None-Match","in":"header","required":false,"description":"The `ETag` from a previous response to this URL. If the representation has not changed you get `304 Not Modified` with no body — reuse your cached copy. A comma-separated list and `*` are both accepted.","schema":{"type":"string"},"example":"\"6f9a3c1e8b2d4f70a1c5e9b3d7f2a4c8\""}],"responses":{"200":{"description":"Every key in the community with its access restrictions — temporal windows, expiry, share depth, scan-only / NFC-scan, and limited uses.","content":{"application/json":{"schema":{},"example":{"result":"ok","keys":[{"id":"k1c2…","name":"Front Gate Key","disabled":false,"hidden":false,"pending":false,"is_favorite":false,"sharing":{"allow_subkeys":true,"max_share_depth":2,"max_share_depth_enabled":true,"parent_name":"Alice Smith"},"expiry":{"expires_at":"2026-12-31 23:59:59","active":true},"temporal":{"enabled":true,"windows":[{"days":"Mon, Wed, Fri","start_date":"2026-01-01","recurring_week":1,"times":[{"start":"09:00:00","end":"17:00:00"}]}]},"latches":[{"latch_id":"l9a8…","name":"Front Gate","scan_only":false,"require_nfc_scan":false,"numbered_use":5}]}]}}},"headers":{"ETag":{"description":"Validator for this representation. Send it back as `If-None-Match` on the next poll.","schema":{"type":"string"}},"Cache-Control":{"description":"`private, no-cache`. `no-cache` means revalidate before reuse — not \"do not store\".","schema":{"type":"string"}}}},"403":{"description":"This API key is not bound to a community (`not_community_key`), or its manager no longer has API access to the community (`api_access_revoked`: removed as a manager, API access blocked for the community, or the permission withdrawn). The key itself stays valid and works again if that access is restored.","content":{"application/json":{"example":{"error":{"code":"not_community_key","message":"This API key is not bound to a community","request_id":"b1c2…"}}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"example":{"error":{"code":"unauthorized","message":"Invalid API key","request_id":"b1c2…"}}}}},"429":{"description":"Rate limit exceeded — see Retry-After.","content":{"application/json":{"example":{"error":{"code":"rate_limited","message":"Too many requests","request_id":"b1c2…"}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"304":{"description":"Not modified — your `If-None-Match` matched the current representation. No body. Does not consume monthly quota.","headers":{"ETag":{"description":"The unchanged validator.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]}]}},"/v1/community/keys/{key_id}":{"patch":{"tags":["Community · Writes"],"summary":"Rename or disable a community key","description":"Rename one of the community's own keys, or disable it community-wide.\n\nSend `name`, `disabled`, or both — each is applied only when present, so\nthis never clobbers the field you did not send. An empty body is rejected\n(422) rather than treated as a no-op write.\n\n**Disabling a community key affects every member holding a child of it.**\nKeys are not shared between accounts in Nimbio: sharing a key *mints a new\nchild key* on the recipient's account, pointing back at the parent. A key's\ndisabled state is inherited down that chain, so disabling the community's\nkey instantly denies every member key descended from it — potentially the\nentire community. `descendant_key_count` in the response is that blast\nradius; read `GET /v1/community/keys` first if you are unsure which key you\nare about to cut.\n\nIt is reversible by this same endpoint: send `disabled: false` to restore\naccess. Authorization for this API key does not depend on the key you\ndisable, so you cannot lock yourself out of re-enabling it.\n\nTo disable one member's access instead of the whole community's, use\n`POST /v1/community/members/{account_community_id}/keys-disabled`.\n\n`name` is cosmetic — it changes what members see and what the access logs\nlabel opens with, never who can open what. It is trimmed, must not be\nempty, and is capped at 200 characters.\n\nTest mode: validated and scope-checked, then returns `\"result\":\n\"simulated\"` — a test key never disables a real key or renames anything.","operationId":"update_community_key_v1_community_keys__key_id__patch","parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","title":"Key Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body","properties":{"name":{"type":"string","description":"New display name for the key (1-200 chars, trimmed). Cosmetic only."},"disabled":{"type":"boolean","description":"true disables the key community-wide — including every member key shared from it; false re-enables it."}}},"example":{"name":"Contractor Key (revoked)","disabled":true}}},"required":false},"responses":{"200":{"description":"The updated key, in the same shape `GET /v1/community/keys` returns, plus the blast radius of the change.","content":{"application/json":{"schema":{},"example":{"result":"ok","request_id":"b1c2…","descendant_key_count":42,"key":{"id":"k1c2…","name":"Contractor Key (revoked)","disabled":true,"hidden":false,"pending":false,"is_favorite":false,"sharing":{"allow_subkeys":true,"max_share_depth":2,"max_share_depth_enabled":true},"expiry":{"active":false},"temporal":{"enabled":false,"windows":[]},"latches":[{"latch_id":"l9a8…","name":"Front Gate","scan_only":false,"require_nfc_scan":false}]}}}}},"404":{"description":"No such key in this community.","content":{"application/json":{"example":{"error":{"code":"key_not_found","message":"Key is not in this community","request_id":"b1c2…"}}}}},"422":{"description":"Nothing to change, or an invalid field value.","content":{"application/json":{"example":{"error":{"code":"nothing_to_update","message":"Send at least one of 'name' or 'disabled'","request_id":"b1c2…"}}}}},"403":{"description":"This API key is not bound to a community (`not_community_key`), or its manager no longer has API access to the community (`api_access_revoked`: removed as a manager, API access blocked for the community, or the permission withdrawn). The key itself stays valid and works again if that access is restored.","content":{"application/json":{"example":{"error":{"code":"not_community_key","message":"This API key is not bound to a community","request_id":"b1c2…"}}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"example":{"error":{"code":"unauthorized","message":"Invalid API key","request_id":"b1c2…"}}}}},"429":{"description":"Rate limit exceeded — see Retry-After.","content":{"application/json":{"example":{"error":{"code":"rate_limited","message":"Too many requests","request_id":"b1c2…"}}}}}},"security":[{"bearerAuth":[]}]}},"/v1/community/latches/{latch_id}/open":{"post":{"tags":["Community · Writes"],"summary":"Issue an open","description":"Issue an open on a latch in the key's community.\n\nTest mode: validate scope, write `test_simulated`, return 200 — box never fires.\nLive mode: synchronous — blocks until the open settles, then returns 200 when\nthe box confirms it opened, 403 when the open is denied, or 504 when the gate\ndoes not confirm within the timeout (`did_not_open`).\n\nIdempotency: send an `idempotency_key` (body field or `Idempotency-Key`\nheader) to make this at-most-once. Within 24h a repeat of the same token\nreplays the original status and body — marked with `Idempotent-Replayed:\ntrue` and an `idempotent_replay` body field, carrying the original\n`request_id` — and issues no second open. A duplicate arriving while the\nfirst is still in flight gets 409; the same token with a different request\ngets 422. A 502 frees the token so a real retry proceeds. **A 504\n`did_not_open` does not**: the open was dispatched and may have physically\nfired, so retrying it would risk opening the gate again with nobody there —\nuse a new `idempotency_key` if you deliberately want another attempt.","operationId":"issue_open_v1_community_latches__latch_id__open_post","parameters":[{"name":"latch_id","in":"path","required":true,"schema":{"type":"string","title":"Latch Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body","properties":{"note":{"type":"string","maxLength":500,"description":"Optional free-text note stored with the open. Comes back as `api_note` on GET /v1/community/access-logs, and is shown beside the open on the community manager's Access Logs page. Trimmed, and truncated to 500 characters."},"idempotency_key":{"type":"string","maxLength":80,"description":"Optional client token that makes this write at-most-once. A repeat of the same token within 24h replays the original response instead of issuing a second open (see the `Idempotency-Key` header parameter for the full contract). Max 80 characters."}}},"example":{"note":"Front gate test"}}},"required":false},"responses":{"200":{"description":"Opened (live, box confirmed) or simulated (test key).","content":{"application/json":{"schema":{},"example":{"result":"opened","request_id":"b1c2…","key_log_id":9001}}}},"403":{"description":"This API key is not bound to a community (`not_community_key`), or its manager no longer has API access to the community (`api_access_revoked`: removed as a manager, API access blocked for the community, or the permission withdrawn). The key itself stays valid and works again if that access is restored.","content":{"application/json":{"example":{"error":{"code":"not_community_key","message":"This API key is not bound to a community","request_id":"b1c2…"}}}}},"504":{"description":"The gate did not confirm the open within the timeout.","content":{"application/json":{"example":{"error":{"code":"did_not_open","message":"Box did not acknowledge the open within the timeout","request_id":"b1c2…"}}}}},"409":{"description":"A request with this idempotency_key is still in flight.","content":{"application/json":{"example":{"error":{"code":"idempotency_key_in_flight","message":"A request with this idempotency_key is still in progress","request_id":"b1c2…"}}}}},"422":{"description":"This idempotency_key was already used for a different request.","content":{"application/json":{"example":{"error":{"code":"idempotency_key_reuse","message":"This idempotency_key was already used for a different request","request_id":"b1c2…"}}}}},"503":{"description":"Idempotency could not be enforced (store unavailable); the request was NOT processed. Retry with the same key.","content":{"application/json":{"example":{"error":{"code":"idempotency_unavailable","message":"Idempotency could not be enforced; the request was not processed","request_id":"b1c2…"}}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"example":{"error":{"code":"unauthorized","message":"Invalid API key","request_id":"b1c2…"}}}}},"429":{"description":"Rate limit exceeded — see Retry-After.","content":{"application/json":{"example":{"error":{"code":"rate_limited","message":"Too many requests","request_id":"b1c2…"}}}}}},"security":[{"bearerAuth":[]}]}},"/v1/community/messages":{"post":{"tags":["Community · Writes"],"summary":"Message all members","description":"Send a message to all community members.\n\nTest mode: validated via dry_run — no push is sent. Live mode: delivered.\n\nIdempotency: send an `idempotency_key` (body field or `Idempotency-Key`\nheader) to make this at-most-once — a retry within 24h replays the original\nresponse instead of pushing the message to every member a second time. A\nduplicate still in flight gets 409; the same token with a different message\ngets 422; a 502 frees the token so a real retry proceeds.","operationId":"send_message_v1_community_messages_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body","properties":{"message":{"type":"string","description":"Message body. Your name is appended automatically."},"idempotency_key":{"type":"string","maxLength":80,"description":"Optional client token that makes this write at-most-once. A repeat of the same token within 24h replays the original response instead of issuing a second open (see the `Idempotency-Key` header parameter for the full contract). Max 80 characters."}},"required":["message"]},"example":{"message":"Pool maintenance Thursday 9am–noon."}}},"required":true},"responses":{"200":{"description":"Sent (live) or validated (test).","content":{"application/json":{"schema":{},"example":{"result":"sent","request_id":"b1c2…"}}}},"400":{"description":"Missing/empty message.","content":{"application/json":{"example":{"error":{"code":"missing_message","message":"A non-empty 'message' is required","request_id":"b1c2…"}}}}},"409":{"description":"A request with this idempotency_key is still in flight.","content":{"application/json":{"example":{"error":{"code":"idempotency_key_in_flight","message":"A request with this idempotency_key is still in progress","request_id":"b1c2…"}}}}},"422":{"description":"This idempotency_key was already used for a different request.","content":{"application/json":{"example":{"error":{"code":"idempotency_key_reuse","message":"This idempotency_key was already used for a different request","request_id":"b1c2…"}}}}},"503":{"description":"Idempotency could not be enforced (store unavailable); the request was NOT processed. Retry with the same key.","content":{"application/json":{"example":{"error":{"code":"idempotency_unavailable","message":"Idempotency could not be enforced; the request was not processed","request_id":"b1c2…"}}}}},"403":{"description":"This API key is not bound to a community (`not_community_key`), or its manager no longer has API access to the community (`api_access_revoked`: removed as a manager, API access blocked for the community, or the permission withdrawn). The key itself stays valid and works again if that access is restored.","content":{"application/json":{"example":{"error":{"code":"not_community_key","message":"This API key is not bound to a community","request_id":"b1c2…"}}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"example":{"error":{"code":"unauthorized","message":"Invalid API key","request_id":"b1c2…"}}}}},"429":{"description":"Rate limit exceeded — see Retry-After.","content":{"application/json":{"example":{"error":{"code":"rate_limited","message":"Too many requests","request_id":"b1c2…"}}}}}},"security":[{"bearerAuth":[]}]},"get":{"tags":["Community · Writes"],"summary":"List sent messages","description":"The messages already sent to this community, newest first.\n\nThe read half of `POST /v1/community/messages`: confirm a broadcast landed,\nrender a history, or check before re-sending after an ambiguous failure.\nPaginated by `limit` (1-200, default 50) and `offset`; `has_more` says\nwhether another page exists. `sent_at` is ISO-8601 in **UTC**.\n\nOnly real sends appear here. A test-mode key's send is validated and\ndiscarded without being recorded, so nothing simulated is ever in the log\nand there is no simulated/real flag to check — a test-mode key reads the\nlive history but can never add to it.\n\n`sender_name` / `sender_account_id` identify the community manager the\nmessage was sent as. An API key acts as its owning manager, so a message\nsent through this API is not distinguishable from one the same person sent\nfrom the Nimbio community portal.","operationId":"list_messages_v1_community_messages_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"If-None-Match","in":"header","required":false,"description":"The `ETag` from a previous response to this URL. If the representation has not changed you get `304 Not Modified` with no body — reuse your cached copy. A comma-separated list and `*` are both accepted.","schema":{"type":"string"},"example":"\"6f9a3c1e8b2d4f70a1c5e9b3d7f2a4c8\""}],"responses":{"200":{"description":"Messages already sent, newest first.","content":{"application/json":{"schema":{},"example":{"result":"ok","limit":50,"offset":0,"has_more":false,"messages":[{"message_id":4821,"message":"Gate service Thursday 9am-noon.","sender_name":"Dana Lee","sender_account_id":"3f9c…","sent_at":"2026-06-09T18:02:00+00:00","community_uuid":"a1b2…"}]}}},"headers":{"ETag":{"description":"Validator for this representation. Send it back as `If-None-Match` on the next poll.","schema":{"type":"string"}},"Cache-Control":{"description":"`private, no-cache`. `no-cache` means revalidate before reuse — not \"do not store\".","schema":{"type":"string"}}}},"403":{"description":"This API key is not bound to a community (`not_community_key`), or its manager no longer has API access to the community (`api_access_revoked`: removed as a manager, API access blocked for the community, or the permission withdrawn). The key itself stays valid and works again if that access is restored.","content":{"application/json":{"example":{"error":{"code":"not_community_key","message":"This API key is not bound to a community","request_id":"b1c2…"}}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"example":{"error":{"code":"unauthorized","message":"Invalid API key","request_id":"b1c2…"}}}}},"429":{"description":"Rate limit exceeded — see Retry-After.","content":{"application/json":{"example":{"error":{"code":"rate_limited","message":"Too many requests","request_id":"b1c2…"}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"304":{"description":"Not modified — your `If-None-Match` matched the current representation. No body. Does not consume monthly quota.","headers":{"ETag":{"description":"The unchanged validator.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]}]}},"/v1/community/members/keys/bulk-grant":{"post":{"tags":["Community · Writes"],"summary":"Bulk grant keys to members","description":"Grant community keys to many members in one call.\n\n`items` is a list of `{account_community_id, key_ids}` objects (at most 100).\nEvery item is checked against your community *before* anything is applied —\na single member or key belonging elsewhere rejects the whole batch with\nnothing changed (422). Then each item is applied in request order and\nreports its own result; the response is 207 with one entry per input item,\nin the same order.\n\nGrants are idempotent: a key the member already holds is reported under\n`granted.exists` and changes nothing, so re-submitting a batch (or just its\nfailed items) is safe.\n\nQuota: a bulk call costs one monthly-quota unit **per item**, and one call\nagainst the per-minute limit.\n\nTest mode: validate everything, write `test_simulated`, change nothing.","operationId":"bulk_grant_member_keys_v1_community_members_keys_bulk_grant_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body","properties":{"items":{"type":"array","maxItems":100,"items":{"type":"object","properties":{"account_community_id":{"type":"integer","description":"Member id (from /v1/community/members)."},"key_ids":{"type":"array","items":{"type":"string"},"description":"Community key ids for this member."}},"required":["account_community_id","key_ids"]},"description":"Up to 100 members. The whole batch is rejected if any item references another community, or if an account_community_id repeats."}},"required":["items"]},"example":{"items":[{"account_community_id":4021,"key_ids":["{{community_key_id}}"]},{"account_community_id":4022,"key_ids":["{{community_key_id}}"]}]}}},"required":true},"responses":{"207":{"description":"Batch processed. Read each item's `ok` — a 207 does NOT mean every item succeeded.","content":{"application/json":{"schema":{},"example":{"result":"batch_processed","request_id":"b1c2…","simulated":false,"summary":{"total":3,"succeeded":2,"failed":1},"results":[{"index":0,"account_community_id":4021,"ok":true,"granted":{"created":["k1…"],"enabled":[],"exists":[]}},{"index":1,"account_community_id":4022,"ok":true,"granted":{"created":[],"enabled":[],"exists":["k2…"]}},{"index":2,"account_community_id":4023,"ok":false,"code":"member_not_accepted","message":"Member is not an accepted member of this community"}]}}}},"400":{"description":"Missing items.","content":{"application/json":{"example":{"error":{"code":"missing_items","message":"A non-empty 'items' list is required","request_id":"b1c2…"}}}}},"422":{"description":"Whole batch rejected — nothing was applied (foreign member or key, over-size batch, repeated id, malformed item).","content":{"application/json":{"example":{"error":{"code":"scope_denied","message":"item 12: member 91234 is not in this community","request_id":"b1c2…"}}}}},"403":{"description":"This API key is not bound to a community (`not_community_key`), or its manager no longer has API access to the community (`api_access_revoked`: removed as a manager, API access blocked for the community, or the permission withdrawn). The key itself stays valid and works again if that access is restored.","content":{"application/json":{"example":{"error":{"code":"not_community_key","message":"This API key is not bound to a community","request_id":"b1c2…"}}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"example":{"error":{"code":"unauthorized","message":"Invalid API key","request_id":"b1c2…"}}}}},"429":{"description":"Rate limit exceeded — see Retry-After.","content":{"application/json":{"example":{"error":{"code":"rate_limited","message":"Too many requests","request_id":"b1c2…"}}}}}},"security":[{"bearerAuth":[]}]}},"/v1/community/members/keys/bulk-revoke":{"post":{"tags":["Community · Writes"],"summary":"Bulk revoke keys from members","description":"Revoke community keys from many members in one call.\n\n`items` is a list of `{account_community_id, key_ids}` objects (at most 100),\nvalidated in full before anything is applied.\n\nKeys only: members stay accepted members of the community. Removing a member\nentirely (`remove_member`) is deliberately **not** batched — use\n`POST /v1/community/members/{account_community_id}/revoke-keys` per member,\nso a mass removal is always an explicit, per-member act.\n\nRe-submitting is safe: a key the member no longer holds is reported under\n`already_revoked_community_key_ids` and the item still succeeds.\n\nQuota: one monthly-quota unit **per item**; one call against the per-minute\nlimit. Test mode: validate everything, change nothing.","operationId":"bulk_revoke_member_keys_v1_community_members_keys_bulk_revoke_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body","properties":{"items":{"type":"array","maxItems":100,"items":{"type":"object","properties":{"account_community_id":{"type":"integer","description":"Member id (from /v1/community/members)."},"key_ids":{"type":"array","items":{"type":"string"},"description":"Community key ids for this member."}},"required":["account_community_id","key_ids"]},"description":"Up to 100 members. The whole batch is rejected if any item references another community, or if an account_community_id repeats."}},"required":["items"]},"example":{"items":[{"account_community_id":4021,"key_ids":["{{community_key_id}}"]},{"account_community_id":4022,"key_ids":["{{community_key_id}}"]}]}}},"required":true},"responses":{"207":{"description":"Batch processed. Read each item's `ok` — a 207 does NOT mean every item succeeded.","content":{"application/json":{"schema":{},"example":{"result":"batch_processed","request_id":"b1c2…","simulated":false,"summary":{"total":2,"succeeded":2,"failed":0},"results":[{"index":0,"account_community_id":4021,"ok":true,"revoked_key_ids":["s1…"],"already_revoked_community_key_ids":[]},{"index":1,"account_community_id":4022,"ok":true,"revoked_key_ids":[],"already_revoked_community_key_ids":["k1…"]}]}}}},"400":{"description":"Missing items.","content":{"application/json":{"example":{"error":{"code":"missing_items","message":"A non-empty 'items' list is required","request_id":"b1c2…"}}}}},"422":{"description":"Whole batch rejected — nothing was applied (foreign member or key, over-size batch, repeated id, malformed item).","content":{"application/json":{"example":{"error":{"code":"scope_denied","message":"item 12: member 91234 is not in this community","request_id":"b1c2…"}}}}},"403":{"description":"This API key is not bound to a community (`not_community_key`), or its manager no longer has API access to the community (`api_access_revoked`: removed as a manager, API access blocked for the community, or the permission withdrawn). The key itself stays valid and works again if that access is restored.","content":{"application/json":{"example":{"error":{"code":"not_community_key","message":"This API key is not bound to a community","request_id":"b1c2…"}}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"example":{"error":{"code":"unauthorized","message":"Invalid API key","request_id":"b1c2…"}}}}},"429":{"description":"Rate limit exceeded — see Retry-After.","content":{"application/json":{"example":{"error":{"code":"rate_limited","message":"Too many requests","request_id":"b1c2…"}}}}}},"security":[{"bearerAuth":[]}]}},"/v1/community/members/keys/bulk-disabled":{"post":{"tags":["Community · Writes"],"summary":"Bulk disable / enable members' keys","description":"Disable or enable many members' keys in one call (reversible — no key is\nremoved).\n\n`items` is a list of `{account_community_id, key_ids}` objects (at most 100),\nvalidated in full before anything is applied. `disabled` is required and\napplies to the whole batch: true disables, false re-enables.\n\nSetting a key to the state it is already in is a no-op, so re-submitting is\nsafe. A key the member does not hold is a per-item `key_not_held` failure —\nunlike revoke there is no \"already in the desired state\" reading, and\nenabling a key someone does not have needs a grant, not a toggle.\n\nQuota: one monthly-quota unit **per item**; one call against the per-minute\nlimit. Test mode: validate everything, change nothing.","operationId":"bulk_set_member_keys_disabled_v1_community_members_keys_bulk_disabled_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body","properties":{"items":{"type":"array","maxItems":100,"items":{"type":"object","properties":{"account_community_id":{"type":"integer","description":"Member id (from /v1/community/members)."},"key_ids":{"type":"array","items":{"type":"string"},"description":"Community key ids for this member."}},"required":["account_community_id","key_ids"]},"description":"Up to 100 members. The whole batch is rejected if any item references another community, or if an account_community_id repeats."},"disabled":{"type":"boolean","description":"Applies to every item: true disables, false re-enables."}},"required":["items","disabled"]},"example":{"disabled":true,"items":[{"account_community_id":4021,"key_ids":["{{community_key_id}}"]},{"account_community_id":4022,"key_ids":["{{community_key_id}}"]}]}}},"required":true},"responses":{"207":{"description":"Batch processed. Read each item's `ok` — a 207 does NOT mean every item succeeded.","content":{"application/json":{"schema":{},"example":{"result":"batch_processed","request_id":"b1c2…","simulated":false,"summary":{"total":2,"succeeded":1,"failed":1},"results":[{"index":0,"account_community_id":4021,"ok":true,"disabled":true,"key_ids":["s1…"]},{"index":1,"account_community_id":4022,"ok":false,"disabled":true,"code":"key_not_held","message":"Member does not hold a key for community key k1…"}]}}}},"400":{"description":"Missing items or disabled.","content":{"application/json":{"example":{"error":{"code":"missing_disabled","message":"A boolean 'disabled' field is required","request_id":"b1c2…"}}}}},"422":{"description":"Whole batch rejected — nothing was applied (foreign member or key, over-size batch, repeated id, malformed item).","content":{"application/json":{"example":{"error":{"code":"scope_denied","message":"item 12: member 91234 is not in this community","request_id":"b1c2…"}}}}},"403":{"description":"This API key is not bound to a community (`not_community_key`), or its manager no longer has API access to the community (`api_access_revoked`: removed as a manager, API access blocked for the community, or the permission withdrawn). The key itself stays valid and works again if that access is restored.","content":{"application/json":{"example":{"error":{"code":"not_community_key","message":"This API key is not bound to a community","request_id":"b1c2…"}}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"example":{"error":{"code":"unauthorized","message":"Invalid API key","request_id":"b1c2…"}}}}},"429":{"description":"Rate limit exceeded — see Retry-After.","content":{"application/json":{"example":{"error":{"code":"rate_limited","message":"Too many requests","request_id":"b1c2…"}}}}}},"security":[{"bearerAuth":[]}]}},"/v1/community/members/bulk-add":{"post":{"tags":["Community · Writes"],"summary":"Bulk add members by phone","description":"Add many members by phone number in one call — the initial roster import.\n\n`items` is a list of `{phone_number, key_ids}` objects (at most 100). Key\nscope, phone shape, and in-batch duplicate phone numbers are all checked\nbefore anything is created; any of them rejects the whole batch (422).\n\nThis is the highest-side-effect bulk call on the API: each successful item\nmay create an account, mints keys, sends that member a push notification,\nand fires a `member.approved` webhook — none of which can be undone. An\nalready-accepted member fails with `already_member` and the rest of the\nbatch still runs, so re-submitting after a partial failure does not\ndouble-add anyone.\n\nQuota: one monthly-quota unit **per item**; one call against the per-minute\nlimit. Test mode: validate everything, create nothing.","operationId":"bulk_add_members_v1_community_members_bulk_add_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body","properties":{"items":{"type":"array","maxItems":100,"items":{"type":"object","properties":{"phone_number":{"type":"string","description":"E.164 phone, e.g. +15551234567."},"key_ids":{"type":"array","items":{"type":"string"},"description":"Community key ids to grant."}},"required":["phone_number","key_ids"]},"description":"Up to 100 members. The whole batch is rejected if any item references a key outside this community, or if a phone number repeats."}},"required":["items"]},"example":{"items":[{"phone_number":"+15551234567","key_ids":["{{community_key_id}}"]},{"phone_number":"+15557654321","key_ids":["{{community_key_id}}"]}]}}},"required":true},"responses":{"207":{"description":"Batch processed. Read each item's `ok` — a 207 does NOT mean every item succeeded.","content":{"application/json":{"schema":{},"example":{"result":"batch_processed","request_id":"b1c2…","simulated":false,"summary":{"total":2,"succeeded":1,"failed":1},"results":[{"index":0,"phone_number":"+15551234567","ok":true,"account_community_id":4021,"account_id":"a1…"},{"index":1,"phone_number":"+15557654321","ok":false,"code":"already_member","message":"Account already a member of community"}]}}}},"400":{"description":"Missing items.","content":{"application/json":{"example":{"error":{"code":"missing_items","message":"A non-empty 'items' list is required","request_id":"b1c2…"}}}}},"422":{"description":"Whole batch rejected — nothing was applied (foreign member or key, over-size batch, repeated id, malformed item).","content":{"application/json":{"example":{"error":{"code":"scope_denied","message":"item 12: member 91234 is not in this community","request_id":"b1c2…"}}}}},"403":{"description":"This API key is not bound to a community (`not_community_key`), or its manager no longer has API access to the community (`api_access_revoked`: removed as a manager, API access blocked for the community, or the permission withdrawn). The key itself stays valid and works again if that access is restored.","content":{"application/json":{"example":{"error":{"code":"not_community_key","message":"This API key is not bound to a community","request_id":"b1c2…"}}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"example":{"error":{"code":"unauthorized","message":"Invalid API key","request_id":"b1c2…"}}}}},"429":{"description":"Rate limit exceeded — see Retry-After.","content":{"application/json":{"example":{"error":{"code":"rate_limited","message":"Too many requests","request_id":"b1c2…"}}}}}},"security":[{"bearerAuth":[]}]}},"/v1/community/members/{account_community_id}/approve":{"post":{"tags":["Community · Writes"],"summary":"Approve a pending member","description":"Approve a pending join request and grant the member their keys.\n\nCloses the loop opened by the `member.requested` webhook: the person sitting\nin the `unaccepted` bucket of GET /v1/community/members becomes an accepted\nmember, gets a key on their account for each id in `key_ids` (community key\nids, from /v1/community/key-statuses), receives the approval push, and the\ncommunity's `member.approved` webhook fires — exactly as if a community\nmanager had approved them in the portal.\n\n`move_out_date` is an optional ISO date (`YYYY-MM-DD`) stamped on the\nmembership. Approving an already-approved member is a 409.\n\nTest mode: validate the member, keys, and date, write `test_simulated`,\nreturn 200 — nobody is approved.","operationId":"approve_member_v1_community_members__account_community_id__approve_post","parameters":[{"name":"account_community_id","in":"path","required":true,"schema":{"type":"integer","title":"Account Community Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body","properties":{"key_ids":{"type":"array","items":{"type":"string"},"description":"Community key ids (from key-statuses) to grant on approval."},"move_out_date":{"type":"string","description":"Optional ISO date (YYYY-MM-DD) stamped on the membership."},"dry_run":{"type":"boolean","default":false,"description":"Validate only — approve nobody (always on for a test key)."}},"required":["key_ids"]},"example":{"key_ids":["{{community_key_id}}"]}}},"required":true},"responses":{"200":{"description":"Member approved (live) or validated (test).","content":{"application/json":{"schema":{},"example":{"result":"member_approved","request_id":"b1c2…","account_community_id":4021,"account_id":"a1…","keys":[{"key_id":"k1…"}]}}}},"400":{"description":"Missing key_ids.","content":{"application/json":{"example":{"error":{"code":"missing_key_ids","message":"A non-empty 'key_ids' list is required","request_id":"b1c2…"}}}}},"404":{"description":"No such member in this community.","content":{"application/json":{"example":{"error":{"code":"member_not_found","message":"Member not found in this community","request_id":"b1c2…"}}}}},"409":{"description":"Member is already approved.","content":{"application/json":{"example":{"error":{"code":"already_accepted","message":"Member is already an accepted member of this community","request_id":"b1c2…"}}}}},"422":{"description":"Key ids are not this community's, or move_out_date is not an ISO date.","content":{"application/json":{"example":{"error":{"code":"scope_denied","message":"Key k1… is not in this community","request_id":"b1c2…"}}}}},"403":{"description":"This API key is not bound to a community (`not_community_key`), or its manager no longer has API access to the community (`api_access_revoked`: removed as a manager, API access blocked for the community, or the permission withdrawn). The key itself stays valid and works again if that access is restored.","content":{"application/json":{"example":{"error":{"code":"not_community_key","message":"This API key is not bound to a community","request_id":"b1c2…"}}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"example":{"error":{"code":"unauthorized","message":"Invalid API key","request_id":"b1c2…"}}}}},"429":{"description":"Rate limit exceeded — see Retry-After.","content":{"application/json":{"example":{"error":{"code":"rate_limited","message":"Too many requests","request_id":"b1c2…"}}}}}},"security":[{"bearerAuth":[]}]}},"/v1/community/members/{account_community_id}/grant-keys":{"post":{"tags":["Community · Writes"],"summary":"Grant keys to a member","description":"Grant additional keys to an existing accepted member.\n\n`key_ids` are community key ids (from /v1/community/key-statuses). Each that\nthe member does not already have is granted; a previously disabled key is\nre-enabled; keys they already hold are left unchanged. Use POST\n/v1/community/members to add a brand-new member.\n\nTest mode: validate scope, write `test_simulated`, return 200 — no change.","operationId":"grant_member_keys_v1_community_members__account_community_id__grant_keys_post","parameters":[{"name":"account_community_id","in":"path","required":true,"schema":{"type":"integer","title":"Account Community Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body","properties":{"key_ids":{"type":"array","items":{"type":"string"},"description":"Community key ids to grant."}},"required":["key_ids"]},"example":{"key_ids":["{{community_key_id}}"]}}},"required":true},"responses":{"200":{"description":"Keys granted (live) or validated (test).","content":{"application/json":{"schema":{},"example":{"result":"keys_granted","request_id":"b1c2…","account_community_id":4021,"granted":{"created":["k1…"],"enabled":[],"exists":[]}}}}},"400":{"description":"Missing key_ids.","content":{"application/json":{"example":{"error":{"code":"missing_key_ids","message":"A non-empty 'key_ids' list is required","request_id":"b1c2…"}}}}},"403":{"description":"This API key is not bound to a community (`not_community_key`), or its manager no longer has API access to the community (`api_access_revoked`: removed as a manager, API access blocked for the community, or the permission withdrawn). The key itself stays valid and works again if that access is restored.","content":{"application/json":{"example":{"error":{"code":"not_community_key","message":"This API key is not bound to a community","request_id":"b1c2…"}}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"example":{"error":{"code":"unauthorized","message":"Invalid API key","request_id":"b1c2…"}}}}},"429":{"description":"Rate limit exceeded — see Retry-After.","content":{"application/json":{"example":{"error":{"code":"rate_limited","message":"Too many requests","request_id":"b1c2…"}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"bearerAuth":[]}]}},"/v1/community/members/{account_community_id}/revoke-keys":{"post":{"tags":["Community · Writes"],"summary":"Revoke keys from a member","description":"Revoke community keys from a member.\n\n`key_ids` are community key ids (from /v1/community/key-statuses). By\ndefault only those keys are removed and the member stays active; pass\n`remove_member: true` to remove the member from the community entirely.\n\nTest mode: validate scope, write `test_simulated`, return 200 — no change.","operationId":"revoke_member_keys_v1_community_members__account_community_id__revoke_keys_post","parameters":[{"name":"account_community_id","in":"path","required":true,"schema":{"type":"integer","title":"Account Community Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body","properties":{"key_ids":{"type":"array","items":{"type":"string"},"description":"Community key ids to revoke."},"remove_member":{"type":"boolean","default":false,"description":"True removes the member from the community entirely."}},"required":["key_ids"]},"example":{"key_ids":["{{community_key_id}}"],"remove_member":false}}},"required":true},"responses":{"200":{"description":"Keys revoked (live) or validated (test).","content":{"application/json":{"schema":{},"example":{"result":"keys_revoked","request_id":"b1c2…","account_community_id":4021,"revoked_key_ids":["k1…"],"remove_member":false}}}},"400":{"description":"Missing key_ids.","content":{"application/json":{"example":{"error":{"code":"missing_key_ids","message":"A non-empty 'key_ids' list is required","request_id":"b1c2…"}}}}},"403":{"description":"This API key is not bound to a community (`not_community_key`), or its manager no longer has API access to the community (`api_access_revoked`: removed as a manager, API access blocked for the community, or the permission withdrawn). The key itself stays valid and works again if that access is restored.","content":{"application/json":{"example":{"error":{"code":"not_community_key","message":"This API key is not bound to a community","request_id":"b1c2…"}}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"example":{"error":{"code":"unauthorized","message":"Invalid API key","request_id":"b1c2…"}}}}},"429":{"description":"Rate limit exceeded — see Retry-After.","content":{"application/json":{"example":{"error":{"code":"rate_limited","message":"Too many requests","request_id":"b1c2…"}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"bearerAuth":[]}]}},"/v1/community/members/{account_community_id}/keys-disabled":{"post":{"tags":["Community · Writes"],"summary":"Disable / enable a member's keys","description":"Disable or enable a member's keys (reversible — keys are not removed).\n\n`key_ids` are community key ids (from /v1/community/key-statuses). `disabled`\nis required: true disables the member's keys, false re-enables them.\n\nTest mode: validate scope, write `test_simulated`, return 200 — no change.","operationId":"set_member_keys_disabled_v1_community_members__account_community_id__keys_disabled_post","parameters":[{"name":"account_community_id","in":"path","required":true,"schema":{"type":"integer","title":"Account Community Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body","properties":{"key_ids":{"type":"array","items":{"type":"string"},"description":"Community key ids to toggle."},"disabled":{"type":"boolean","description":"True disables the keys; False re-enables them."}},"required":["key_ids","disabled"]},"example":{"key_ids":["{{community_key_id}}"],"disabled":true}}},"required":true},"responses":{"200":{"description":"Keys toggled (live) or validated (test).","content":{"application/json":{"schema":{},"example":{"result":"keys_disabled","request_id":"b1c2…","account_community_id":4021}}}},"400":{"description":"Missing key_ids or disabled.","content":{"application/json":{"example":{"error":{"code":"missing_disabled","message":"A boolean 'disabled' field is required","request_id":"b1c2…"}}}}},"403":{"description":"This API key is not bound to a community (`not_community_key`), or its manager no longer has API access to the community (`api_access_revoked`: removed as a manager, API access blocked for the community, or the permission withdrawn). The key itself stays valid and works again if that access is restored.","content":{"application/json":{"example":{"error":{"code":"not_community_key","message":"This API key is not bound to a community","request_id":"b1c2…"}}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"example":{"error":{"code":"unauthorized","message":"Invalid API key","request_id":"b1c2…"}}}}},"429":{"description":"Rate limit exceeded — see Retry-After.","content":{"application/json":{"example":{"error":{"code":"rate_limited","message":"Too many requests","request_id":"b1c2…"}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"bearerAuth":[]}]}},"/v1/community/members/{account_community_id}/access-logs":{"get":{"tags":["Community · Logs"],"summary":"Member access logs","description":"A member's access logs (key opens) for a 30-day window.\n\n`window` selects the range: `last_30` (default, the last 30 days), `30_60`\n(30-60 days ago), or `60_90` (60-90 days ago). Scope is the member's key(s)\nplus every descendant key (people they re-shared with); each row names the\nactual opener. Requires the community's Access Log History setting to be on.\nReads behave identically for test and live keys.","operationId":"get_member_access_logs_v1_community_members__account_community_id__access_logs_get","parameters":[{"name":"account_community_id","in":"path","required":true,"schema":{"type":"integer","title":"Account Community Id"}},{"name":"window","in":"query","required":false,"schema":{"type":"string","pattern":"^(last_30|30_60|60_90)$","default":"last_30","title":"Window"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"If-None-Match","in":"header","required":false,"description":"The `ETag` from a previous response to this URL. If the representation has not changed you get `304 Not Modified` with no body — reuse your cached copy. A comma-separated list and `*` are both accepted.","schema":{"type":"string"},"example":"\"6f9a3c1e8b2d4f70a1c5e9b3d7f2a4c8\""}],"responses":{"200":{"description":"A member's opens for the selected 30-day window.","content":{"application/json":{"schema":{},"example":{"result":"ok","account_community_id":4021,"window":"last_30","from":"2026-05-11","to":"2026-06-10","truncated":false,"logs":[{"key_name":"Front Gate","latch_name":"Front Gate","datetime":"2026-06-09T18:02:00+00:00","open_desc":"Opened","open_result":"success","user":"Dana Lee","location":"Front Gate","reason_desc":"","source":"app"}]}}},"headers":{"ETag":{"description":"Validator for this representation. Send it back as `If-None-Match` on the next poll.","schema":{"type":"string"}},"Cache-Control":{"description":"`private, no-cache`. `no-cache` means revalidate before reuse — not \"do not store\".","schema":{"type":"string"}}}},"404":{"description":"No such member.","content":{"application/json":{"example":{"error":{"code":"member_not_found","message":"Member not found","request_id":"b1c2…"}}}}},"403":{"description":"This API key is not bound to a community (`not_community_key`), or its manager no longer has API access to the community (`api_access_revoked`: removed as a manager, API access blocked for the community, or the permission withdrawn). The key itself stays valid and works again if that access is restored.","content":{"application/json":{"example":{"error":{"code":"not_community_key","message":"This API key is not bound to a community","request_id":"b1c2…"}}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"example":{"error":{"code":"unauthorized","message":"Invalid API key","request_id":"b1c2…"}}}}},"429":{"description":"Rate limit exceeded — see Retry-After.","content":{"application/json":{"example":{"error":{"code":"rate_limited","message":"Too many requests","request_id":"b1c2…"}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"304":{"description":"Not modified — your `If-None-Match` matched the current representation. No body. Does not consume monthly quota.","headers":{"ETag":{"description":"The unchanged validator.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]}]}},"/v1/community/access-logs":{"get":{"tags":["Community · Logs"],"summary":"Community access log","description":"The community's access log (gate opens) for a date window, paginated 1000\nper page (`page` is 0-indexed; `has_more` says whether another page exists).\nEach row includes the opener's `phone` when on file. Commercial communities\nname the actual opener; residential communities use a '<owner> Keychain'\ngrouping. Requires the community's Access Log History on.\n\n**Window.** `from`/`to` accept a bare date or a full ISO-8601 datetime. A\nbare date covers the whole day in the direction of its bound —\n`from=2026-08-01` is 00:00:00 UTC, `to=2026-08-01` is 23:59:59.999999 UTC,\nso a single day is `from=2026-08-01&to=2026-08-01`. A datetime without an\noffset is read as UTC. Omit both for the default last-90-days window.\n\n**Retention.** Only the last 90 days are kept. A `from` older than that is\nclamped to the floor (not an error); the response's `from`/`to` always echo\nthe *effective* window, so compare them with what you asked for to detect a\nclamp. A window that lies entirely before the floor is rejected with 400.\n\n**Incremental sync.** Poll with `from` set to the `datetime` of the newest\nrow you already stored (and no `to`) to pull only what is new, instead of\nre-paging the whole 90 days on every run.","operationId":"get_community_access_log_v1_community_access_logs_get","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Page"}},{"name":"from","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Window start — 'YYYY-MM-DD' (00:00:00 UTC that day) or an ISO-8601 datetime. Defaults to 90 days before `to`.","title":"From"},"description":"Window start — 'YYYY-MM-DD' (00:00:00 UTC that day) or an ISO-8601 datetime. Defaults to 90 days before `to`."},{"name":"to","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Window end — 'YYYY-MM-DD' (23:59:59.999999 UTC that day) or an ISO-8601 datetime. Defaults to now.","title":"To"},"description":"Window end — 'YYYY-MM-DD' (23:59:59.999999 UTC that day) or an ISO-8601 datetime. Defaults to now."},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"If-None-Match","in":"header","required":false,"description":"The `ETag` from a previous response to this URL. If the representation has not changed you get `304 Not Modified` with no body — reuse your cached copy. A comma-separated list and `*` are both accepted.","schema":{"type":"string"},"example":"\"6f9a3c1e8b2d4f70a1c5e9b3d7f2a4c8\""}],"responses":{"200":{"description":"Community-wide gate opens, 1000 per page.","content":{"application/json":{"schema":{},"example":{"result":"ok","page":0,"has_more":false,"from":"2026-06-09T00:00:00+00:00","to":"2026-06-09T23:59:59.999999+00:00","logs":[{"key_name":"Front Gate","latch_name":"Front Gate","datetime":"2026-06-09T18:02:00+00:00","open_desc":"Opened","open_result":"success","user":"Dana Lee","phone":"+15551234567","location":"Front Gate","reason_desc":"","source":"app"}]}}},"headers":{"ETag":{"description":"Validator for this representation. Send it back as `If-None-Match` on the next poll.","schema":{"type":"string"}},"Cache-Control":{"description":"`private, no-cache`. `no-cache` means revalidate before reuse — not \"do not store\".","schema":{"type":"string"}}}},"422":{"description":"Malformed date/datetime.","content":{"application/json":{"example":{"error":{"code":"invalid_datetime","message":"from must be 'YYYY-MM-DD' or an ISO-8601 datetime (e.g. 2026-08-01T09:00:00Z)","request_id":"b1c2…"}}}}},"403":{"description":"This API key is not bound to a community (`not_community_key`), or its manager no longer has API access to the community (`api_access_revoked`: removed as a manager, API access blocked for the community, or the permission withdrawn). The key itself stays valid and works again if that access is restored.","content":{"application/json":{"example":{"error":{"code":"not_community_key","message":"This API key is not bound to a community","request_id":"b1c2…"}}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"example":{"error":{"code":"unauthorized","message":"Invalid API key","request_id":"b1c2…"}}}}},"429":{"description":"Rate limit exceeded — see Retry-After.","content":{"application/json":{"example":{"error":{"code":"rate_limited","message":"Too many requests","request_id":"b1c2…"}}}}},"304":{"description":"Not modified — your `If-None-Match` matched the current representation. No body. Does not consume monthly quota.","headers":{"ETag":{"description":"The unchanged validator.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]}]}},"/v1/community/gate-status-log":{"get":{"tags":["Community · Logs"],"summary":"Gate status-change log","description":"The community's gate status-change log (physical open/closed transitions)\nfor a date window, paginated 1000 per page (`page` 0-indexed; `has_more`\nflags another page). Distinct from /v1/community/gate-status (current state).\nRequires the community's Access Log History on.\n\n**Window.** Identical rules to `/v1/community/access-logs`: `from`/`to` take\na bare date (widened to 00:00:00 / 23:59:59.999999 UTC respectively) or a\nfull ISO-8601 datetime (naive is UTC); omitting both means the last 90 days;\na `from` older than the 90-day retention floor is clamped, and the response\nechoes the effective window. Poll with `from` set to your newest stored row\nto sync incrementally.","operationId":"get_community_gate_status_log_v1_community_gate_status_log_get","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Page"}},{"name":"from","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Window start — 'YYYY-MM-DD' (00:00:00 UTC that day) or an ISO-8601 datetime. Defaults to 90 days before `to`.","title":"From"},"description":"Window start — 'YYYY-MM-DD' (00:00:00 UTC that day) or an ISO-8601 datetime. Defaults to 90 days before `to`."},{"name":"to","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Window end — 'YYYY-MM-DD' (23:59:59.999999 UTC that day) or an ISO-8601 datetime. Defaults to now.","title":"To"},"description":"Window end — 'YYYY-MM-DD' (23:59:59.999999 UTC that day) or an ISO-8601 datetime. Defaults to now."},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"If-None-Match","in":"header","required":false,"description":"The `ETag` from a previous response to this URL. If the representation has not changed you get `304 Not Modified` with no body — reuse your cached copy. A comma-separated list and `*` are both accepted.","schema":{"type":"string"},"example":"\"6f9a3c1e8b2d4f70a1c5e9b3d7f2a4c8\""}],"responses":{"200":{"description":"Physical open/closed transitions, 1000 per page.","content":{"application/json":{"schema":{},"example":{"result":"ok","page":0,"has_more":false,"from":"2026-06-09T00:00:00+00:00","to":"2026-06-09T23:59:59.999999+00:00","logs":[{"datetime":"2026-06-09T18:02:05+00:00","latch_name":"Front Gate","status_label":"Opened","sense_line":1,"state":"open"}]}}},"headers":{"ETag":{"description":"Validator for this representation. Send it back as `If-None-Match` on the next poll.","schema":{"type":"string"}},"Cache-Control":{"description":"`private, no-cache`. `no-cache` means revalidate before reuse — not \"do not store\".","schema":{"type":"string"}}}},"422":{"description":"Malformed date/datetime.","content":{"application/json":{"example":{"error":{"code":"invalid_datetime","message":"to must be 'YYYY-MM-DD' or an ISO-8601 datetime (e.g. 2026-08-01T09:00:00Z)","request_id":"b1c2…"}}}}},"403":{"description":"This API key is not bound to a community (`not_community_key`), or its manager no longer has API access to the community (`api_access_revoked`: removed as a manager, API access blocked for the community, or the permission withdrawn). The key itself stays valid and works again if that access is restored.","content":{"application/json":{"example":{"error":{"code":"not_community_key","message":"This API key is not bound to a community","request_id":"b1c2…"}}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"example":{"error":{"code":"unauthorized","message":"Invalid API key","request_id":"b1c2…"}}}}},"429":{"description":"Rate limit exceeded — see Retry-After.","content":{"application/json":{"example":{"error":{"code":"rate_limited","message":"Too many requests","request_id":"b1c2…"}}}}},"304":{"description":"Not modified — your `If-None-Match` matched the current representation. No body. Does not consume monthly quota.","headers":{"ETag":{"description":"The unchanged validator.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]}]}},"/v1/community/change-logs":{"get":{"tags":["Community · Logs"],"summary":"Configuration change log","description":"The community's **configuration** audit trail — who changed what, when.\n\nThis is the *change* log. For the *access* trail (who opened which gate),\nuse `/v1/community/access-logs`; for physical open/closed transitions, use\n`/v1/community/gate-status-log`. The two are easy to confuse: an access log\ntells you a gate opened, this tells you someone rewrote the schedule that\nlet it open.\n\n`type` selects one of four trails:\n\n| `type` | Covers |\n|---|---|\n| `hold_open` | Hold opens: manual on/off, one-time events, recurring schedules, disable-until dates |\n| `key_schedule` | Key access schedules (time-of-day / day-of-week restrictions) |\n| `guest_view` | GuestView / Directory settings, short codes, directory access codes, GuestView Entry windows |\n| `guest_link` | Guest links: creation, revocation, and the community-level link settings |\n\nEvery row carries the same envelope — `log_type`, `log_id`, `datetime`,\n`account_id`, `account_display_name`, `action_type`, `summary` — plus a\n`details` object holding the subject of the change: `latch_id` /\n`latch_name` for `hold_open`, `guest_view` and `guest_link`, and `key_id`\nfor `key_schedule`. `log_id` is unique only within its own `log_type`.\n\n**Retention:** every trail is pruned at 30 days, so `days` is capped at 30\nand nothing older is recoverable through this endpoint. Export on a\nschedule if you need a longer archive. The effective window comes back as\n`from`/`to`.\n\n**Ordering:** newest first, by `datetime`.\n\n**Timestamps:** ISO-8601 with an explicit UTC offset (`+00:00`), always\nUTC — not the community's local time zone.\n\n**Personal data:** `account_display_name` names the manager or admin who\nmade the change. `key_schedule` summaries are prefixed with the key's name,\nwhich for a member key is usually that member's name. Guest names and phone\nnumbers do not appear in any of these trails.","operationId":"get_community_change_log_v1_community_change_logs_get","parameters":[{"name":"type","in":"query","required":true,"schema":{"enum":["hold_open","key_schedule","guest_view","guest_link"],"type":"string","description":"Which configuration area's audit trail to read.","title":"Type"},"description":"Which configuration area's audit trail to read."},{"name":"days","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Look-back window in days. Values above the 30-day retention cap are clamped, not rejected; the window actually used comes back as days/from/to.","default":30,"title":"Days"},"description":"Look-back window in days. Values above the 30-day retention cap are clamped, not rejected; the window actually used comes back as days/from/to."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"description":"Rows per page.","default":500,"title":"Limit"},"description":"Rows per page."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Rows to skip, for paging.","default":0,"title":"Offset"},"description":"Rows to skip, for paging."},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"If-None-Match","in":"header","required":false,"description":"The `ETag` from a previous response to this URL. If the representation has not changed you get `304 Not Modified` with no body — reuse your cached copy. A comma-separated list and `*` are both accepted.","schema":{"type":"string"},"example":"\"6f9a3c1e8b2d4f70a1c5e9b3d7f2a4c8\""}],"responses":{"200":{"description":"Configuration changes, newest first. One example per log type.","content":{"application/json":{"schema":{},"examples":{"hold_open":{"summary":"Hold-open schedule changes","value":{"result":"ok","log_type":"hold_open","days":30,"from":"2026-05-11T17:04:03+00:00","to":"2026-06-10T17:04:03+00:00","limit":500,"offset":0,"total":2,"has_more":false,"logs":[{"log_type":"hold_open","log_id":8814,"datetime":"2026-06-09T18:02:00+00:00","account_id":"a1b2…","account_display_name":"Dana Lee","action_type":"recurring_added","summary":"Added recurring hold open (days=MTWHF, week=every)","details":{"latch_id":"3f9c…","latch_name":"Front Gate"}},{"log_type":"hold_open","log_id":8802,"datetime":"2026-06-08T09:15:41+00:00","account_id":"a1b2…","account_display_name":"Dana Lee","action_type":"manual_on","summary":"Indefinite hold open turned on","details":{"latch_id":"3f9c…","latch_name":"Front Gate"}}]}},"key_schedule":{"summary":"Key access-schedule changes","value":{"result":"ok","log_type":"key_schedule","days":30,"from":"2026-05-11T17:04:03+00:00","to":"2026-06-10T17:04:03+00:00","limit":500,"offset":0,"total":1,"has_more":false,"logs":[{"log_type":"key_schedule","log_id":412,"datetime":"2026-06-09T21:40:12+00:00","account_id":"a1b2…","account_display_name":"Dana Lee","action_type":"schedule_set","summary":"Cleaning Crew: MTWHF 08:00-17:00","details":{"key_id":"7c1d…"}}]}},"guest_view":{"summary":"GuestView / Directory setting changes","value":{"result":"ok","log_type":"guest_view","days":30,"from":"2026-05-11T17:04:03+00:00","to":"2026-06-10T17:04:03+00:00","limit":500,"offset":0,"total":1,"has_more":false,"logs":[{"log_type":"guest_view","log_id":1290,"datetime":"2026-06-07T14:22:08+00:00","account_id":"a1b2…","account_display_name":"Dana Lee","action_type":"directory_settings_updated","summary":"Updated directory settings: show_unit_numbers, sort_order","details":{}}]}},"guest_link":{"summary":"Guest-link changes","value":{"result":"ok","log_type":"guest_link","days":30,"from":"2026-05-11T17:04:03+00:00","to":"2026-06-10T17:04:03+00:00","limit":500,"offset":0,"total":1,"has_more":false,"logs":[{"log_type":"guest_link","log_id":733,"datetime":"2026-06-06T11:05:55+00:00","account_id":"a1b2…","account_display_name":"Dana Lee","action_type":"link_created","summary":"Created event link #733 \"Spring Open House\" on 2 gate(s)","details":{}}]}}}}},"headers":{"ETag":{"description":"Validator for this representation. Send it back as `If-None-Match` on the next poll.","schema":{"type":"string"}},"Cache-Control":{"description":"`private, no-cache`. `no-cache` means revalidate before reuse — not \"do not store\".","schema":{"type":"string"}}}},"403":{"description":"This API key is not bound to a community (`not_community_key`), or its manager no longer has API access to the community (`api_access_revoked`: removed as a manager, API access blocked for the community, or the permission withdrawn). The key itself stays valid and works again if that access is restored.","content":{"application/json":{"example":{"error":{"code":"not_community_key","message":"This API key is not bound to a community","request_id":"b1c2…"}}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"example":{"error":{"code":"unauthorized","message":"Invalid API key","request_id":"b1c2…"}}}}},"429":{"description":"Rate limit exceeded — see Retry-After.","content":{"application/json":{"example":{"error":{"code":"rate_limited","message":"Too many requests","request_id":"b1c2…"}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"304":{"description":"Not modified — your `If-None-Match` matched the current representation. No body. Does not consume monthly quota.","headers":{"ETag":{"description":"The unchanged validator.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]}]}},"/v1/community/key-usage":{"get":{"tags":["Community · Logs"],"summary":"Key usage history report","description":"Per-key usage history for the community over a date window — the same\nreport a Community Manager sees on the portal's Access Logs page.\n\n**Commercial vs residential.** Nimbio attributes an open differently\ndepending on the community's property type, and *the server decides which\nrule applies* — there is no parameter for it, because getting it wrong would\nmisreport who opened a gate. Read `report_type` to interpret `user`:\n\n* `\"commercial\"` — `user` is the **actual opener's** name.\n* `\"residential\"` — `user` is `\"<master key owner> Keychain\"`. Every open on\n  a household's keys is attributed to the account holder, so you cannot tell\n  which member of the household opened the gate. This groups; it does not\n  anonymize — the account holder is named.\n\nRows carry personal data beyond `user`: `phone` and `location`. Note that\n`phone` here does **not** mean what it means on `/v1/community/access-logs`\n— there it is the account holder's number, looked up from the key; here it\nis whatever the open itself recorded, which is the **visitor's** number on\nguest-link, GuestView-entry, and access-code opens, and `null` on ordinary\nmember opens. `location` is the opener's GPS coordinates as `\"(x,y)\"` when\nthe client sent them.\n\n**Dates and timezone.** `from` and `to` are inclusive `YYYY-MM-DD` calendar\ndays interpreted in the **community's local timezone** (the timezone of its\nlatches), echoed back in `timezone`. The `datetime` on each row is local time\nfor that same zone, with no offset attached.\n\n**Window cap.** The window may span at most `max_range_days` (14) days. A\nwider request is **clamped** to the most recent allowed span rather than\nrejected: `from`/`to` are the *effective* window, `requested_from` /\n`requested_to` are what you asked for, and `clamped` is `true` when they\ndiffer — so walk a long period in ≤14-day steps. This is a cap on the\n*width* of one request, not a lookback limit: the window may sit as far back\nas you like. Paginated 1000 rows per page (`page` 0-indexed); `has_more` is\n`true` when the page came back full.\n\n**When to use this instead of `/v1/community/access-logs`.** The access log\nis the raw event feed: a rolling 90 days, UTC timestamps, no date window.\nThis endpoint is the CM-facing *report*: any window you name (including\nolder than 90 days), local-time day boundaries, and the property-type\nattribution rule applied and declared. Use the access log for incremental\nsyncing of events; use this for billing, occupancy, and audit reporting that\nmust match what the Community Manager sees.\n\nRequires the community's Access Log History setting to be on.","operationId":"get_community_key_usage_v1_community_key_usage_get","parameters":[{"name":"from","in":"query","required":true,"schema":{"type":"string","description":"Window start, inclusive, 'YYYY-MM-DD' in the community's local timezone","example":"2026-06-01","title":"From"},"description":"Window start, inclusive, 'YYYY-MM-DD' in the community's local timezone"},{"name":"to","in":"query","required":true,"schema":{"type":"string","description":"Window end, inclusive, same format","example":"2026-06-10","title":"To"},"description":"Window end, inclusive, same format"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Page"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"If-None-Match","in":"header","required":false,"description":"The `ETag` from a previous response to this URL. If the representation has not changed you get `304 Not Modified` with no body — reuse your cached copy. A comma-separated list and `*` are both accepted.","schema":{"type":"string"},"example":"\"6f9a3c1e8b2d4f70a1c5e9b3d7f2a4c8\""}],"responses":{"200":{"description":"The usage report for the window. The shape is the same either way; `report_type` says how `user` was attributed.","content":{"application/json":{"schema":{},"examples":{"commercial":{"summary":"Commercial community — names the actual opener","value":{"result":"ok","report_type":"commercial","page":0,"has_more":false,"from":"2026-06-01","to":"2026-06-10","requested_from":"2026-06-01","requested_to":"2026-06-10","clamped":false,"max_range_days":14,"timezone":"America/Los_Angeles","logs":[{"key_name":"Front Gate","latch_name":"Front Gate","datetime":"2026-06-09T11:02:00","open_desc":"Open","open_result":"Opened","user":"Dana Lee","reason_desc":"Master","source":"Mobile"}]}},"residential":{"summary":"Residential community — groups under '<owner> Keychain'; here the request was clamped to 14 days","value":{"result":"ok","report_type":"residential","page":0,"has_more":false,"from":"2026-05-28","to":"2026-06-10","requested_from":"2026-01-01","requested_to":"2026-06-10","clamped":true,"max_range_days":14,"timezone":"America/Los_Angeles","logs":[{"key_name":"Front Gate","latch_name":"Front Gate","datetime":"2026-06-09T11:02:00","open_desc":"Open","open_result":"Opened","user":"Dana Lee Keychain","phone":"+15551234567","reason_desc":"Sub Key","source":"Event Key: \"Block Party\""}]}}}}},"headers":{"ETag":{"description":"Validator for this representation. Send it back as `If-None-Match` on the next poll.","schema":{"type":"string"}},"Cache-Control":{"description":"`private, no-cache`. `no-cache` means revalidate before reuse — not \"do not store\".","schema":{"type":"string"}}}},"422":{"description":"Malformed or inverted dates.","content":{"application/json":{"example":{"error":{"code":"invalid_date","message":"from/to must be calendar dates formatted 'YYYY-MM-DD'","request_id":"b1c2…"}}}}},"403":{"description":"This API key is not bound to a community (`not_community_key`), or its manager no longer has API access to the community (`api_access_revoked`: removed as a manager, API access blocked for the community, or the permission withdrawn). The key itself stays valid and works again if that access is restored.","content":{"application/json":{"example":{"error":{"code":"not_community_key","message":"This API key is not bound to a community","request_id":"b1c2…"}}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"example":{"error":{"code":"unauthorized","message":"Invalid API key","request_id":"b1c2…"}}}}},"429":{"description":"Rate limit exceeded — see Retry-After.","content":{"application/json":{"example":{"error":{"code":"rate_limited","message":"Too many requests","request_id":"b1c2…"}}}}},"304":{"description":"Not modified — your `If-None-Match` matched the current representation. No body. Does not consume monthly quota.","headers":{"ETag":{"description":"The unchanged validator.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]}]}},"/v1/community/hold-opens":{"get":{"tags":["Community · Hold Opens"],"summary":"Get hold opens","description":"Hold-open state per latch: `held_open` (any source), the `manual` flag,\none-time `events`, `recurring` schedules, and `disabled_until`.\nQuota-exempt: never counts against the monthly quota.","operationId":"get_hold_opens_v1_community_hold_opens_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"If-None-Match","in":"header","required":false,"description":"The `ETag` from a previous response to this URL. If the representation has not changed you get `304 Not Modified` with no body — reuse your cached copy. A comma-separated list and `*` are both accepted.","schema":{"type":"string"},"example":"\"6f9a3c1e8b2d4f70a1c5e9b3d7f2a4c8\""}],"responses":{"200":{"description":"Hold-open state per latch.","content":{"application/json":{"schema":{},"example":{"result":"ok","hold_opens":{"l1…":{"latch_id":"l1…","latch_name":"Front Gate","held_open":false,"events":[],"recurring":[],"manual":false,"timezone":"America/Los_Angeles"}}}}},"headers":{"ETag":{"description":"Validator for this representation. Send it back as `If-None-Match` on the next poll.","schema":{"type":"string"}},"Cache-Control":{"description":"`private, no-cache`. `no-cache` means revalidate before reuse — not \"do not store\".","schema":{"type":"string"}}}},"403":{"description":"This API key is not bound to a community (`not_community_key`), or its manager no longer has API access to the community (`api_access_revoked`: removed as a manager, API access blocked for the community, or the permission withdrawn). The key itself stays valid and works again if that access is restored.","content":{"application/json":{"example":{"error":{"code":"not_community_key","message":"This API key is not bound to a community","request_id":"b1c2…"}}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"example":{"error":{"code":"unauthorized","message":"Invalid API key","request_id":"b1c2…"}}}}},"429":{"description":"Rate limit exceeded — see Retry-After.","content":{"application/json":{"example":{"error":{"code":"rate_limited","message":"Too many requests","request_id":"b1c2…"}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"304":{"description":"Not modified — your `If-None-Match` matched the current representation. No body. Does not consume monthly quota.","headers":{"ETag":{"description":"The unchanged validator.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]}]}},"/v1/community/latches/{latch_id}/hold-open":{"put":{"tags":["Community · Hold Opens"],"summary":"Set indefinite hold open","description":"Turn the \"hold open until turned off\" state on or off for a latch.\n\nImplemented as the CM portal's indefinite hold-open window, so a hold\nstarted here appears on the portal's Hold Opens page (and can be ended\nthere with \"End Hold Open\") — and a portal-started indefinite hold can be\nended here with `state: false`. The switch semantic: `manual` is true\nwhile an indefinite hold is active (from either source); `held_open` is\nthe combined truth (indefinite OR an active timed/recurring window).\nTurning the toggle off does not cancel an active timed window.\nTurning it on requires the latch to have a configured timezone.\nTest mode: validated, never moves the gate.","operationId":"set_manual_hold_open_v1_community_latches__latch_id__hold_open_put","parameters":[{"name":"latch_id","in":"path","required":true,"schema":{"type":"string","title":"Latch Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body","properties":{"state":{"type":"boolean","description":"true = hold the gate open until turned off (shows on the CM portal's Hold Opens page as an indefinite hold)"}},"required":["state"]},"example":{"state":true}}},"required":false},"responses":{"200":{"description":"Set (live) or validated (test).","content":{"application/json":{"schema":{},"example":{"result":"ok","latch_id":"l1…","manual":true,"held_open":true,"request_id":"b1c2…"}}}},"400":{"description":"Missing/invalid state.","content":{"application/json":{"example":{"error":{"code":"missing_state","message":"'state' must be a boolean","request_id":"b1c2…"}}}}},"403":{"description":"This API key is not bound to a community (`not_community_key`), or its manager no longer has API access to the community (`api_access_revoked`: removed as a manager, API access blocked for the community, or the permission withdrawn). The key itself stays valid and works again if that access is restored.","content":{"application/json":{"example":{"error":{"code":"not_community_key","message":"This API key is not bound to a community","request_id":"b1c2…"}}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"example":{"error":{"code":"unauthorized","message":"Invalid API key","request_id":"b1c2…"}}}}},"429":{"description":"Rate limit exceeded — see Retry-After.","content":{"application/json":{"example":{"error":{"code":"rate_limited","message":"Too many requests","request_id":"b1c2…"}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"bearerAuth":[]}]}},"/v1/community/latches/{latch_id}/hold-open/events":{"post":{"tags":["Community · Hold Opens"],"summary":"Add a timed hold-open window","description":"Add a one-time hold-open window to a latch (e.g. \"hold open for the next\nhour\"). Returns the `event_id` needed to end the window early via DELETE.\nDatetimes are naive local time for the latch's timezone.\nTest mode: validated, nothing is scheduled.","operationId":"add_hold_open_event_v1_community_latches__latch_id__hold_open_events_post","parameters":[{"name":"latch_id","in":"path","required":true,"schema":{"type":"string","title":"Latch Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body","properties":{"start":{"type":"string","description":"Window start, 'YYYY-MM-DD HH:MM' in the latch's local timezone"},"end":{"type":"string","description":"Window end, same format (a year-9990 end means open-ended)"}},"required":["start","end"]},"example":{"start":"2026-08-01 09:00","end":"2026-08-01 17:00"}}},"required":false},"responses":{"200":{"description":"Created (live) or validated (test).","content":{"application/json":{"schema":{},"example":{"result":"ok","event_id":"e1…","latch_id":"l1…","request_id":"b1c2…"}}}},"422":{"description":"Malformed datetime.","content":{"application/json":{"example":{"error":{"code":"invalid_datetime","message":"start/end must be 'YYYY-MM-DD HH:MM'","request_id":"b1c2…"}}}}},"403":{"description":"This API key is not bound to a community (`not_community_key`), or its manager no longer has API access to the community (`api_access_revoked`: removed as a manager, API access blocked for the community, or the permission withdrawn). The key itself stays valid and works again if that access is restored.","content":{"application/json":{"example":{"error":{"code":"not_community_key","message":"This API key is not bound to a community","request_id":"b1c2…"}}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"example":{"error":{"code":"unauthorized","message":"Invalid API key","request_id":"b1c2…"}}}}},"429":{"description":"Rate limit exceeded — see Retry-After.","content":{"application/json":{"example":{"error":{"code":"rate_limited","message":"Too many requests","request_id":"b1c2…"}}}}}},"security":[{"bearerAuth":[]}]}},"/v1/community/latches/{latch_id}/hold-open/events/{event_id}":{"delete":{"tags":["Community · Hold Opens"],"summary":"Remove a timed hold-open window","description":"Remove a one-time hold-open window early. Idempotent: re-removing an\nalready-gone window returns `removed: false` instead of an error.\nTest mode: validated, nothing is removed.","operationId":"remove_hold_open_event_v1_community_latches__latch_id__hold_open_events__event_id__delete","parameters":[{"name":"latch_id","in":"path","required":true,"schema":{"type":"string","title":"Latch Id"}},{"name":"event_id","in":"path","required":true,"schema":{"type":"string","title":"Event Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Removed (live) or validated (test). removed=false on an idempotent re-remove.","content":{"application/json":{"schema":{},"example":{"result":"ok","removed":true,"request_id":"b1c2…"}}}},"403":{"description":"This API key is not bound to a community (`not_community_key`), or its manager no longer has API access to the community (`api_access_revoked`: removed as a manager, API access blocked for the community, or the permission withdrawn). The key itself stays valid and works again if that access is restored.","content":{"application/json":{"example":{"error":{"code":"not_community_key","message":"This API key is not bound to a community","request_id":"b1c2…"}}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"example":{"error":{"code":"unauthorized","message":"Invalid API key","request_id":"b1c2…"}}}}},"429":{"description":"Rate limit exceeded — see Retry-After.","content":{"application/json":{"example":{"error":{"code":"rate_limited","message":"Too many requests","request_id":"b1c2…"}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"bearerAuth":[]}]}},"/v1/community/latches/{latch_id}/hold-open/recurring":{"post":{"tags":["Community · Hold Opens"],"summary":"Add a recurring hold-open schedule","description":"Hold a gate open on a repeating weekly schedule — business hours, trash\nday, a standing delivery window.\n\n**Timezone:** times are **the latch's local time**, the `timezone` GET\n/v1/community/hold-opens reports for that latch. Never UTC, and no offset\nis accepted: `\"08:00\"` means 08:00 at the gate.\n\n**Days:** letters from `MTWHFSU`, where **H is Thursday, S is Saturday and\nU is Sunday** — the same string the read emits.\n\nOmit `start_time` and `end_time` for an **all-day** schedule (held open for\nthe whole of each selected day). A window may not wrap past midnight;\nsplit `22:00–06:00` into `22:00–24:00` plus `00:00–06:00` on the following\nday.\n\nReturns the `temporal_date_id` used to change or delete the schedule — the\nsame id that appears under `recurring[]` in GET /v1/community/hold-opens.\nTest mode: validated, nothing is scheduled.","operationId":"add_recurring_hold_open_v1_community_latches__latch_id__hold_open_recurring_post","parameters":[{"name":"latch_id","in":"path","required":true,"schema":{"type":"string","title":"Latch Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body","properties":{"days_of_the_week":{"type":"string","description":"Days the schedule runs, as letters from MTWHFSU — **H is Thursday, S is Saturday, U is Sunday**. This is the same string GET /v1/community/hold-opens returns, so a schedule can be read and posted back unchanged. A 1-127 bitmask is also accepted (1=Mon … 64=Sun)."},"recurring_week":{"type":"integer","description":"1 = every week (default), 2 = every other week, up to 52."},"start_time":{"type":["string","null"],"description":"Window start 'HH:MM' **in the latch's local timezone**. Omit both times for an all-day schedule."},"end_time":{"type":["string","null"],"description":"Window end 'HH:MM' in the latch's local timezone. Must be later than start_time — a window cannot wrap past midnight. Use '24:00' for end of day; '23:59' would leave the last minute uncovered."}},"required":["days_of_the_week"]},"example":{"days_of_the_week":"MTWHF","recurring_week":1,"start_time":"08:00","end_time":"09:00"}}},"required":false},"responses":{"200":{"description":"Created (live) or validated (test).","content":{"application/json":{"schema":{},"example":{"result":"ok","latch_id":"l1…","temporal_date_id":"t1…","schedule":{"temporal_date_id":"t1…","days_of_the_week":"MTWHF","recurring_week":1,"temporal_times":[{"temporal_time_id":"tt1…","start":"08:00:00","end":"09:00:00"}],"active":false},"request_id":"b1c2…"}}}},"422":{"description":"Malformed days, recurring_week, or time window.","content":{"application/json":{"example":{"error":{"code":"invalid_days","message":"'X' is not a valid day. Use letters from MTWHFSU (H=Thursday, S=Saturday, U=Sunday).","request_id":"b1c2…"}}}}},"403":{"description":"This API key is not bound to a community (`not_community_key`), or its manager no longer has API access to the community (`api_access_revoked`: removed as a manager, API access blocked for the community, or the permission withdrawn). The key itself stays valid and works again if that access is restored.","content":{"application/json":{"example":{"error":{"code":"not_community_key","message":"This API key is not bound to a community","request_id":"b1c2…"}}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"example":{"error":{"code":"unauthorized","message":"Invalid API key","request_id":"b1c2…"}}}}},"429":{"description":"Rate limit exceeded — see Retry-After.","content":{"application/json":{"example":{"error":{"code":"rate_limited","message":"Too many requests","request_id":"b1c2…"}}}}}},"security":[{"bearerAuth":[]}]}},"/v1/community/latches/{latch_id}/hold-open/recurring/{temporal_date_id}":{"patch":{"tags":["Community · Hold Opens"],"summary":"Change a recurring hold-open schedule","description":"Change an existing recurring schedule. Partial update: any field left\nout keeps its current value.\n\n**Timezone:** times are **the latch's local time** (the `timezone` from GET\n/v1/community/hold-opens), never UTC. **Days** are `MTWHFSU` letters —\nH=Thursday, S=Saturday, U=Sunday.\n\nTime handling is explicit rather than inferred:\n\n* `start_time` + `end_time` **replace** the schedule's window,\n* `clear_times: true` removes the window, making the schedule all-day,\n* sending neither leaves the times alone.\n\nTest mode: validated, nothing changes.","operationId":"modify_recurring_hold_open_v1_community_latches__latch_id__hold_open_recurring__temporal_date_id__patch","parameters":[{"name":"latch_id","in":"path","required":true,"schema":{"type":"string","title":"Latch Id"}},{"name":"temporal_date_id","in":"path","required":true,"schema":{"type":"string","title":"Temporal Date Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body","properties":{"days_of_the_week":{"type":"string","description":"Days the schedule runs, as letters from MTWHFSU — **H is Thursday, S is Saturday, U is Sunday**. This is the same string GET /v1/community/hold-opens returns, so a schedule can be read and posted back unchanged. A 1-127 bitmask is also accepted (1=Mon … 64=Sun)."},"recurring_week":{"type":"integer","description":"1 = every week (default), 2 = every other week, up to 52."},"start_time":{"type":["string","null"],"description":"Window start 'HH:MM' **in the latch's local timezone**. Omit both times for an all-day schedule."},"end_time":{"type":["string","null"],"description":"Window end 'HH:MM' in the latch's local timezone. Must be later than start_time — a window cannot wrap past midnight. Use '24:00' for end of day; '23:59' would leave the last minute uncovered."},"clear_times":{"type":"boolean","description":"true removes the schedule's time window, making it an all-day schedule. Cannot be combined with start_time/end_time."}}},"example":{"days_of_the_week":"MTWHFS","start_time":"07:30","end_time":"09:30"}}},"required":false},"responses":{"200":{"description":"Updated (live) or validated (test).","content":{"application/json":{"schema":{},"example":{"result":"ok","latch_id":"l1…","temporal_date_id":"t1…","schedule":{"temporal_date_id":"t1…","days_of_the_week":"MTWHFS","recurring_week":1,"temporal_times":[{"temporal_time_id":"tt1…","start":"07:30:00","end":"09:30:00"}],"active":false},"request_id":"b1c2…"}}}},"404":{"description":"No such recurring schedule on this latch.","content":{"application/json":{"example":{"error":{"code":"unknown_schedule","message":"No such recurring hold open on this latch","request_id":"b1c2…"}}}}},"422":{"description":"Malformed days, recurring_week, or time window.","content":{"application/json":{"example":{"error":{"code":"invalid_days","message":"'X' is not a valid day. Use letters from MTWHFSU (H=Thursday, S=Saturday, U=Sunday).","request_id":"b1c2…"}}}}},"403":{"description":"This API key is not bound to a community (`not_community_key`), or its manager no longer has API access to the community (`api_access_revoked`: removed as a manager, API access blocked for the community, or the permission withdrawn). The key itself stays valid and works again if that access is restored.","content":{"application/json":{"example":{"error":{"code":"not_community_key","message":"This API key is not bound to a community","request_id":"b1c2…"}}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"example":{"error":{"code":"unauthorized","message":"Invalid API key","request_id":"b1c2…"}}}}},"429":{"description":"Rate limit exceeded — see Retry-After.","content":{"application/json":{"example":{"error":{"code":"rate_limited","message":"Too many requests","request_id":"b1c2…"}}}}}},"security":[{"bearerAuth":[]}]},"delete":{"tags":["Community · Hold Opens"],"summary":"Delete a recurring hold-open schedule","description":"Delete a recurring hold-open schedule.\n\nDeliberately **not** idempotent: a `temporal_date_id` that is not on this\nlatch returns 404 rather than a cheerful success, because silently\nsucceeding would let a caller believe it had cancelled a schedule that is\nstill holding a gate open.\nTest mode: validated, nothing is deleted.","operationId":"remove_recurring_hold_open_v1_community_latches__latch_id__hold_open_recurring__temporal_date_id__delete","parameters":[{"name":"latch_id","in":"path","required":true,"schema":{"type":"string","title":"Latch Id"}},{"name":"temporal_date_id","in":"path","required":true,"schema":{"type":"string","title":"Temporal Date Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Deleted (live) or validated (test).","content":{"application/json":{"schema":{},"example":{"result":"ok","removed":true,"latch_id":"l1…","temporal_date_id":"t1…","request_id":"b1c2…"}}}},"404":{"description":"No such recurring schedule on this latch.","content":{"application/json":{"example":{"error":{"code":"unknown_schedule","message":"No such recurring hold open on this latch","request_id":"b1c2…"}}}}},"403":{"description":"This API key is not bound to a community (`not_community_key`), or its manager no longer has API access to the community (`api_access_revoked`: removed as a manager, API access blocked for the community, or the permission withdrawn). The key itself stays valid and works again if that access is restored.","content":{"application/json":{"example":{"error":{"code":"not_community_key","message":"This API key is not bound to a community","request_id":"b1c2…"}}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"example":{"error":{"code":"unauthorized","message":"Invalid API key","request_id":"b1c2…"}}}}},"429":{"description":"Rate limit exceeded — see Retry-After.","content":{"application/json":{"example":{"error":{"code":"rate_limited","message":"Too many requests","request_id":"b1c2…"}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"bearerAuth":[]}]}},"/v1/community/latches/{latch_id}/hold-open/disabled-until":{"put":{"tags":["Community · Hold Opens"],"summary":"Suspend or resume a latch's hold opens","description":"Temporarily suspend **every** scheduled hold open on a latch — the\nholiday / special-event override — or resume them.\n\nWhile the suspension is in force the scheduler skips all recurring and\none-time windows on this latch and releases any hold already active. It\nclears itself once the moment passes; send `until: null` to resume sooner.\nThe value is what GET /v1/community/hold-opens reports as `disabled_until`.\n\n**Timezone:** `until` is **the latch's local time** (the `timezone` from\nGET /v1/community/hold-opens), never UTC.\n\nPer latch, not per community: suspending one gate's schedules leaves the\nothers running. `until` is required — send an explicit `null` to resume,\nso an empty body can never resume by accident.\nTest mode: validated, nothing is suspended.","operationId":"set_hold_opens_disabled_until_v1_community_latches__latch_id__hold_open_disabled_until_put","parameters":[{"name":"latch_id","in":"path","required":true,"schema":{"type":"string","title":"Latch Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body","properties":{"until":{"type":["string","null"],"description":"'YYYY-MM-DD HH:MM' **in the latch's local timezone** — every scheduled hold open on this latch is suspended until then. `null` resumes immediately."}},"required":["until"]},"example":{"until":"2026-12-25 23:59"}}},"required":false},"responses":{"200":{"description":"Set (live) or validated (test).","content":{"application/json":{"schema":{},"example":{"result":"ok","latch_id":"l1…","disabled_until":"2026-12-25 23:59:00","held_open":false,"request_id":"b1c2…"}}}},"400":{"description":"Body has no 'until' field.","content":{"application/json":{"example":{"error":{"code":"missing_until","message":"'until' is required (send null to resume)","request_id":"b1c2…"}}}}},"422":{"description":"Malformed datetime.","content":{"application/json":{"example":{"error":{"code":"invalid_datetime","message":"until must look like 'YYYY-MM-DD HH:MM'","request_id":"b1c2…"}}}}},"403":{"description":"This API key is not bound to a community (`not_community_key`), or its manager no longer has API access to the community (`api_access_revoked`: removed as a manager, API access blocked for the community, or the permission withdrawn). The key itself stays valid and works again if that access is restored.","content":{"application/json":{"example":{"error":{"code":"not_community_key","message":"This API key is not bound to a community","request_id":"b1c2…"}}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"example":{"error":{"code":"unauthorized","message":"Invalid API key","request_id":"b1c2…"}}}}},"429":{"description":"Rate limit exceeded — see Retry-After.","content":{"application/json":{"example":{"error":{"code":"rate_limited","message":"Too many requests","request_id":"b1c2…"}}}}}},"security":[{"bearerAuth":[]}]}},"/v1/community/key-schedules":{"get":{"tags":["Community · Access Schedules"],"summary":"List access schedules","description":"Access schedules for the community's own keys.\n\nReturns the community's key(s) — always, so the community-wide restriction\ncan be seen and set even when unset — and nothing else. Revoked and hidden\ncommunity keys are omitted.\n\n**Member keys are not listed, and cannot be scheduled through this API.** A\nschedule on the community key *is* the community-wide rule: it cascades to\nevery member key beneath it. An individual member's own schedule is not a\ncommunity manager's to read or rewrite, so the single-key endpoints refuse\none with `not_a_community_key`. Use `descendant_key_count` to see how many\nmembers a change would reach.\n\nEach entry's `windows` holds only the windows **in force today** — a window\nwhose date range has passed is omitted and counted in\n`inactive_window_count` instead, so an expired schedule is never rendered as\n\"no restriction\". `GET /v1/community/keys/{key_id}/schedule` returns every\nwindow, expired ones included, because a write replaces the whole schedule.\n\n`restricted` is true when the key is genuinely time-limited.\n`permanently_blocked` is true for a key that has windows saved but the\nrestriction switched off — that key is denied at **every** hour of every\nday, which is a fault to repair rather than a working schedule. Saving a\nschedule through this API clears that state.\n\nDoes not consume the monthly quota.","operationId":"list_key_schedules_v1_community_key_schedules_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"If-None-Match","in":"header","required":false,"description":"The `ETag` from a previous response to this URL. If the representation has not changed you get `304 Not Modified` with no body — reuse your cached copy. A comma-separated list and `*` are both accepted.","schema":{"type":"string"},"example":"\"6f9a3c1e8b2d4f70a1c5e9b3d7f2a4c8\""}],"responses":{"200":{"description":"Schedules for the community's own keys.","content":{"application/json":{"schema":{},"example":{"keys":[{"key_id":"k1…","key_name":"Main Gate Key","is_temporal_enabled":true,"restricted":true,"permanently_blocked":false,"windows":[{"temporal_date_id":"t1…","days_of_the_week":"MTWHF","start_time":"06:00","end_time":"18:00"}],"latch_count":1,"latches":[{"latch_id":"l1…","name":"Main Gate"}],"is_community_key":true,"descendant_key_count":42,"inactive_window_count":0}],"request_id":"b1c2…"}}},"headers":{"ETag":{"description":"Validator for this representation. Send it back as `If-None-Match` on the next poll.","schema":{"type":"string"}},"Cache-Control":{"description":"`private, no-cache`. `no-cache` means revalidate before reuse — not \"do not store\".","schema":{"type":"string"}}}},"403":{"description":"This API key is not bound to a community (`not_community_key`), or its manager no longer has API access to the community (`api_access_revoked`: removed as a manager, API access blocked for the community, or the permission withdrawn). The key itself stays valid and works again if that access is restored.","content":{"application/json":{"example":{"error":{"code":"not_community_key","message":"This API key is not bound to a community","request_id":"b1c2…"}}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"example":{"error":{"code":"unauthorized","message":"Invalid API key","request_id":"b1c2…"}}}}},"429":{"description":"Rate limit exceeded — see Retry-After.","content":{"application/json":{"example":{"error":{"code":"rate_limited","message":"Too many requests","request_id":"b1c2…"}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"304":{"description":"Not modified — your `If-None-Match` matched the current representation. No body. Does not consume monthly quota.","headers":{"ETag":{"description":"The unchanged validator.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]}]}},"/v1/community/keys/{key_id}/schedule":{"get":{"tags":["Community · Access Schedules"],"summary":"Get one key's access schedule","description":"One community key's access schedule.\n\nThe key must be one of **this community's own keys**. A member key beneath\nit — even a member of this same community — is refused with\n`not_a_community_key` (403): a member's individual schedule is not a\ncommunity manager's to read. A key belonging to another community is refused\nas `not_in_scope`.\n\nReturns **every** window, including any whose date range has passed, because\n`PUT` replaces the whole schedule and a caller must see what it is about to\noverwrite. The list endpoint filters those out instead.\n\nDoes not consume the monthly quota.","operationId":"get_key_schedule_v1_community_keys__key_id__schedule_get","parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","title":"Key Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"If-None-Match","in":"header","required":false,"description":"The `ETag` from a previous response to this URL. If the representation has not changed you get `304 Not Modified` with no body — reuse your cached copy. A comma-separated list and `*` are both accepted.","schema":{"type":"string"},"example":"\"6f9a3c1e8b2d4f70a1c5e9b3d7f2a4c8\""}],"responses":{"200":{"description":"The key's schedule.","content":{"application/json":{"schema":{},"example":{"key_id":"k1…","key_name":"Main Gate Key","is_temporal_enabled":true,"restricted":true,"permanently_blocked":false,"windows":[{"temporal_date_id":"t1…","days_of_the_week":"MTWHF","start_time":"06:00","end_time":"18:00"}],"latch_count":1,"latches":[{"latch_id":"l1…","name":"Main Gate"}],"is_community_key":true,"descendant_key_count":42,"inactive_window_count":0,"request_id":"b1c2…"}}},"headers":{"ETag":{"description":"Validator for this representation. Send it back as `If-None-Match` on the next poll.","schema":{"type":"string"}},"Cache-Control":{"description":"`private, no-cache`. `no-cache` means revalidate before reuse — not \"do not store\".","schema":{"type":"string"}}}},"403":{"description":"This API key is not bound to a community (`not_community_key`), or its manager no longer has API access to the community (`api_access_revoked`: removed as a manager, API access blocked for the community, or the permission withdrawn). The key itself stays valid and works again if that access is restored.","content":{"application/json":{"example":{"error":{"code":"not_community_key","message":"This API key is not bound to a community","request_id":"b1c2…"}}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"example":{"error":{"code":"unauthorized","message":"Invalid API key","request_id":"b1c2…"}}}}},"429":{"description":"Rate limit exceeded — see Retry-After.","content":{"application/json":{"example":{"error":{"code":"rate_limited","message":"Too many requests","request_id":"b1c2…"}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"304":{"description":"Not modified — your `If-None-Match` matched the current representation. No body. Does not consume monthly quota.","headers":{"ETag":{"description":"The unchanged validator.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]}]},"put":{"tags":["Community · Access Schedules"],"summary":"Replace a key's access schedule","description":"Replace a community key's access schedule.\n\nSend the **complete** schedule: the windows you send become the whole\nschedule, and `\"windows\": []` removes the restriction entirely so the key\nmay open at any time.\n\n**Community keys only.** A member key is refused with `not_a_community_key`\n(403), even one belonging to this community — an individual member's\nschedule is not a community manager's to rewrite. The community-wide rule is\nwhat this API sets, and it applies to every member key beneath the community\nkey, so check `descendant_key_count` (live members only) before writing one.\nA schedule applies to every gate the key opens; there is no per-gate\noverride.\n\nWindows are evaluated in each gate's own local time and cannot run past\nmidnight — for overnight access send two windows, the first ending at\n`24:00` and the second starting at `00:00` on the following day. Use\n`24:00` rather than `23:59`: the comparison is `now < end`, so `23:59`\nexcludes 23:59:00–23:59:59 and the two halves would leave a one-minute gap\nevery night. `24:00` is valid as an end only, and reads back as `24:00`.\n\nTest mode: validated and scope-checked, never changes who can open a gate.","operationId":"set_key_schedule_v1_community_keys__key_id__schedule_put","parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","title":"Key Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body","properties":{"windows":{"type":"array","description":"The complete schedule. An empty array removes every restriction (the key may open at any time). Replaces the whole schedule — it is not additive.","items":{"type":"object","properties":{"days_of_the_week":{"type":"string","description":"Letters from MTWHFSU — H is Thursday, S is Saturday, U is Sunday. At least one required."},"start_time":{"type":["string","null"],"description":"'HH:MM' in the gate's local time. Null (with a null end_time) means all day on those days."},"end_time":{"type":["string","null"],"description":"'HH:MM', must be later than start_time — a window cannot run past midnight. Use '24:00' for end-of-day; '23:59' would exclude the last minute of the day."}}}}},"required":["windows"]},"example":{"windows":[{"days_of_the_week":"MTWHF","start_time":"06:00","end_time":"18:00"}]}}},"required":false},"responses":{"200":{"description":"Saved (live) or validated (test).","content":{"application/json":{"schema":{},"example":{"key_id":"k1…","key_name":"Main Gate Key","is_temporal_enabled":true,"restricted":true,"permanently_blocked":false,"windows":[{"temporal_date_id":"t1…","days_of_the_week":"MTWHF","start_time":"06:00","end_time":"18:00"}],"latch_count":1,"latches":[{"latch_id":"l1…","name":"Main Gate"}],"is_community_key":true,"descendant_key_count":42,"inactive_window_count":0,"request_id":"b1c2…"}}}},"400":{"description":"A window cannot run past midnight — split it in two (first ending 24:00, second starting 00:00).","content":{"application/json":{"example":{"error":{"code":"overnight_not_supported","message":"Window 1 ends before it starts. Key schedules do not wrap past midnight","request_id":"b1c2…"}}}}},"403":{"description":"This API key is not bound to a community (`not_community_key`), or its manager no longer has API access to the community (`api_access_revoked`: removed as a manager, API access blocked for the community, or the permission withdrawn). The key itself stays valid and works again if that access is restored.","content":{"application/json":{"example":{"error":{"code":"not_community_key","message":"This API key is not bound to a community","request_id":"b1c2…"}}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"example":{"error":{"code":"unauthorized","message":"Invalid API key","request_id":"b1c2…"}}}}},"429":{"description":"Rate limit exceeded — see Retry-After.","content":{"application/json":{"example":{"error":{"code":"rate_limited","message":"Too many requests","request_id":"b1c2…"}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"bearerAuth":[]}]}},"/v1/community/webhook-events":{"get":{"tags":["Community · Webhooks"],"summary":"List subscribable webhook event types","description":"The catalog of event types a webhook can subscribe to.","operationId":"list_webhook_events_v1_community_webhook_events_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"If-None-Match","in":"header","required":false,"description":"The `ETag` from a previous response to this URL. If the representation has not changed you get `304 Not Modified` with no body — reuse your cached copy. A comma-separated list and `*` are both accepted.","schema":{"type":"string"},"example":"\"6f9a3c1e8b2d4f70a1c5e9b3d7f2a4c8\""}],"responses":{"200":{"description":"The event-type catalog.","content":{"application/json":{"schema":{},"example":{"result":"ok","events":["sense_line.changed","open.succeeded","open.failed","device.online","device.offline","hold_open.changed","member.requested","member.approved","member.removed","directory.call"]}}},"headers":{"ETag":{"description":"Validator for this representation. Send it back as `If-None-Match` on the next poll.","schema":{"type":"string"}},"Cache-Control":{"description":"`private, max-age=300`. `no-cache` means revalidate before reuse — not \"do not store\".","schema":{"type":"string"}}}},"403":{"description":"This API key is not bound to a community (`not_community_key`), or its manager no longer has API access to the community (`api_access_revoked`: removed as a manager, API access blocked for the community, or the permission withdrawn). The key itself stays valid and works again if that access is restored.","content":{"application/json":{"example":{"error":{"code":"not_community_key","message":"This API key is not bound to a community","request_id":"b1c2…"}}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"example":{"error":{"code":"unauthorized","message":"Invalid API key","request_id":"b1c2…"}}}}},"429":{"description":"Rate limit exceeded — see Retry-After.","content":{"application/json":{"example":{"error":{"code":"rate_limited","message":"Too many requests","request_id":"b1c2…"}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"304":{"description":"Not modified — your `If-None-Match` matched the current representation. No body. Does not consume monthly quota.","headers":{"ETag":{"description":"The unchanged validator.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]}]}},"/v1/community/webhooks":{"get":{"tags":["Community · Webhooks"],"summary":"List webhooks","description":"All webhooks registered on the key's community. Secrets are never listed.","operationId":"list_webhooks_v1_community_webhooks_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"If-None-Match","in":"header","required":false,"description":"The `ETag` from a previous response to this URL. If the representation has not changed you get `304 Not Modified` with no body — reuse your cached copy. A comma-separated list and `*` are both accepted.","schema":{"type":"string"},"example":"\"6f9a3c1e8b2d4f70a1c5e9b3d7f2a4c8\""}],"responses":{"200":{"description":"The community's webhooks (never the secrets).","content":{"application/json":{"schema":{},"example":{"result":"ok","webhooks":[{"webhook_id":"w1…","url":"https://hooks.example.com/nimbio","events":["sense_line.changed"],"description":"Home Assistant","active":true,"disabled":false}]}}},"headers":{"ETag":{"description":"Validator for this representation. Send it back as `If-None-Match` on the next poll.","schema":{"type":"string"}},"Cache-Control":{"description":"`private, no-cache`. `no-cache` means revalidate before reuse — not \"do not store\".","schema":{"type":"string"}}}},"403":{"description":"This API key is not bound to a community (`not_community_key`), or its manager no longer has API access to the community (`api_access_revoked`: removed as a manager, API access blocked for the community, or the permission withdrawn). The key itself stays valid and works again if that access is restored.","content":{"application/json":{"example":{"error":{"code":"not_community_key","message":"This API key is not bound to a community","request_id":"b1c2…"}}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"example":{"error":{"code":"unauthorized","message":"Invalid API key","request_id":"b1c2…"}}}}},"429":{"description":"Rate limit exceeded — see Retry-After.","content":{"application/json":{"example":{"error":{"code":"rate_limited","message":"Too many requests","request_id":"b1c2…"}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"304":{"description":"Not modified — your `If-None-Match` matched the current representation. No body. Does not consume monthly quota.","headers":{"ETag":{"description":"The unchanged validator.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]}]},"post":{"tags":["Community · Webhooks"],"summary":"Register a webhook","description":"Register a webhook on the key's community.\n\nThe URL must be public https (private/internal addresses are rejected).\nThe HMAC signing secret is returned once here and never again — store it;\nrotate it via /rotate-secret if lost. Test mode: validated, nothing stored.","operationId":"create_webhook_v1_community_webhooks_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body","properties":{"url":{"type":"string","description":"Public https URL to POST deliveries to"},"events":{"type":"array","items":{"type":"string"},"description":"Event types to subscribe (see /v1/community/webhook-events)"},"description":{"type":"string","description":"Optional label"}},"required":["url","events"]},"example":{"url":"https://hooks.example.com/nimbio","events":["sense_line.changed","hold_open.changed"],"description":"Home Assistant"}}},"required":false},"responses":{"200":{"description":"Created (live) or validated (test). The signing secret is returned ONCE.","content":{"application/json":{"schema":{},"example":{"result":"ok","webhook":{"webhook_id":"w1…","url":"https://hooks.example.com/nimbio","events":["sense_line.changed"],"secret":"whsec_…"},"request_id":"b1c2…"}}}},"422":{"description":"Bad URL or event list.","content":{"application/json":{"example":{"error":{"code":"invalid_url","message":"Webhook URL must use https","request_id":"b1c2…"}}}}},"403":{"description":"This API key is not bound to a community (`not_community_key`), or its manager no longer has API access to the community (`api_access_revoked`: removed as a manager, API access blocked for the community, or the permission withdrawn). The key itself stays valid and works again if that access is restored.","content":{"application/json":{"example":{"error":{"code":"not_community_key","message":"This API key is not bound to a community","request_id":"b1c2…"}}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"example":{"error":{"code":"unauthorized","message":"Invalid API key","request_id":"b1c2…"}}}}},"429":{"description":"Rate limit exceeded — see Retry-After.","content":{"application/json":{"example":{"error":{"code":"rate_limited","message":"Too many requests","request_id":"b1c2…"}}}}}},"security":[{"bearerAuth":[]}]}},"/v1/community/webhooks/{webhook_id}":{"patch":{"tags":["Community · Webhooks"],"summary":"Update a webhook","description":"Edit a webhook: any of `url`, `events`, `active`, `description`.\nPassing `active: true` revives a webhook that was auto-disabled after\nrepeated delivery failures. Test mode: validated, nothing changes.","operationId":"update_webhook_v1_community_webhooks__webhook_id__patch","parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","title":"Webhook Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body","properties":{"url":{"type":"string"},"events":{"type":"array","items":{"type":"string"}},"active":{"type":"boolean","description":"true revives an auto-disabled webhook"},"description":{"type":"string"}}},"example":{"active":true}}},"required":false},"responses":{"200":{"description":"Updated (live) or validated (test).","content":{"application/json":{"schema":{},"example":{"result":"ok","webhook":{"webhook_id":"w1…","active":true},"request_id":"b1c2…"}}}},"404":{"description":"No such webhook on this community.","content":{"application/json":{"example":{"error":{"code":"webhook_not_found","message":"Webhook not found for this community","request_id":"b1c2…"}}}}},"403":{"description":"This API key is not bound to a community (`not_community_key`), or its manager no longer has API access to the community (`api_access_revoked`: removed as a manager, API access blocked for the community, or the permission withdrawn). The key itself stays valid and works again if that access is restored.","content":{"application/json":{"example":{"error":{"code":"not_community_key","message":"This API key is not bound to a community","request_id":"b1c2…"}}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"example":{"error":{"code":"unauthorized","message":"Invalid API key","request_id":"b1c2…"}}}}},"429":{"description":"Rate limit exceeded — see Retry-After.","content":{"application/json":{"example":{"error":{"code":"rate_limited","message":"Too many requests","request_id":"b1c2…"}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"bearerAuth":[]}]},"delete":{"tags":["Community · Webhooks"],"summary":"Delete a webhook","description":"Delete a webhook and its subscriptions. Test mode: validated, nothing\nis deleted.","operationId":"delete_webhook_v1_community_webhooks__webhook_id__delete","parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","title":"Webhook Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Deleted (live) or validated (test).","content":{"application/json":{"schema":{},"example":{"result":"ok","webhook_id":"w1…","request_id":"b1c2…"}}}},"404":{"description":"No such webhook on this community.","content":{"application/json":{"example":{"error":{"code":"webhook_not_found","message":"Webhook not found for this community","request_id":"b1c2…"}}}}},"403":{"description":"This API key is not bound to a community (`not_community_key`), or its manager no longer has API access to the community (`api_access_revoked`: removed as a manager, API access blocked for the community, or the permission withdrawn). The key itself stays valid and works again if that access is restored.","content":{"application/json":{"example":{"error":{"code":"not_community_key","message":"This API key is not bound to a community","request_id":"b1c2…"}}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"example":{"error":{"code":"unauthorized","message":"Invalid API key","request_id":"b1c2…"}}}}},"429":{"description":"Rate limit exceeded — see Retry-After.","content":{"application/json":{"example":{"error":{"code":"rate_limited","message":"Too many requests","request_id":"b1c2…"}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"bearerAuth":[]}]}},"/v1/community/webhooks/{webhook_id}/rotate-secret":{"post":{"tags":["Community · Webhooks"],"summary":"Rotate a webhook's signing secret","description":"Mint a new HMAC signing secret for a webhook. The old secret stops\nworking immediately; the new one is returned once here. Test mode:\nvalidated, the secret is unchanged (and not returned).","operationId":"rotate_webhook_secret_v1_community_webhooks__webhook_id__rotate_secret_post","parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","title":"Webhook Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Rotated (live) or validated (test). The new secret is returned ONCE.","content":{"application/json":{"schema":{},"example":{"result":"ok","webhook_id":"w1…","secret":"whsec_…","request_id":"b1c2…"}}}},"404":{"description":"No such webhook on this community.","content":{"application/json":{"example":{"error":{"code":"webhook_not_found","message":"Webhook not found for this community","request_id":"b1c2…"}}}}},"403":{"description":"This API key is not bound to a community (`not_community_key`), or its manager no longer has API access to the community (`api_access_revoked`: removed as a manager, API access blocked for the community, or the permission withdrawn). The key itself stays valid and works again if that access is restored.","content":{"application/json":{"example":{"error":{"code":"not_community_key","message":"This API key is not bound to a community","request_id":"b1c2…"}}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"example":{"error":{"code":"unauthorized","message":"Invalid API key","request_id":"b1c2…"}}}}},"429":{"description":"Rate limit exceeded — see Retry-After.","content":{"application/json":{"example":{"error":{"code":"rate_limited","message":"Too many requests","request_id":"b1c2…"}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"bearerAuth":[]}]}},"/v1/community/webhooks/{webhook_id}/test":{"post":{"tags":["Community · Webhooks"],"summary":"Send a test ping","description":"Queue a synthetic `ping` delivery so the receiver can verify\nconnectivity and its HMAC verification end-to-end. Works for test and\nlive keys — a ping has no physical side effects.","operationId":"test_webhook_v1_community_webhooks__webhook_id__test_post","parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","title":"Webhook Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Queued.","content":{"application/json":{"schema":{},"example":{"result":"ok","message":"Test delivery queued","request_id":"b1c2…"}}}},"404":{"description":"No such webhook on this community.","content":{"application/json":{"example":{"error":{"code":"webhook_not_found","message":"Webhook not found for this community","request_id":"b1c2…"}}}}},"403":{"description":"This API key is not bound to a community (`not_community_key`), or its manager no longer has API access to the community (`api_access_revoked`: removed as a manager, API access blocked for the community, or the permission withdrawn). The key itself stays valid and works again if that access is restored.","content":{"application/json":{"example":{"error":{"code":"not_community_key","message":"This API key is not bound to a community","request_id":"b1c2…"}}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"example":{"error":{"code":"unauthorized","message":"Invalid API key","request_id":"b1c2…"}}}}},"429":{"description":"Rate limit exceeded — see Retry-After.","content":{"application/json":{"example":{"error":{"code":"rate_limited","message":"Too many requests","request_id":"b1c2…"}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"bearerAuth":[]}]}},"/v1/community/nfc-tags":{"get":{"tags":["Community · NFC Tags"],"summary":"List NFC tags","description":"Every NFC tag issued to the key's community, newest first.\n\nAlways returns the `{items, page, results_per_page, total}` envelope — the\nshape does not change with the query parameters. `page` is 1-based and\nfloored at 1; `results_per_page` is clamped to 1..200.\n\nCryptographic tag material is never returned by this API. `tag_uid_hex` is\nthe fob's physical (publicly readable) UID, not a secret, and is how you\njoin a tag to its rows in the scan log.","operationId":"list_nfc_tags_v1_community_nfc_tags_get","parameters":[{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Match on tag serial, physical UID, or notes","title":"Search"},"description":"Match on tag serial, physical UID, or notes"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","description":"1-based page number (floored at 1)","default":1,"title":"Page"},"description":"1-based page number (floored at 1)"},{"name":"results_per_page","in":"query","required":false,"schema":{"type":"integer","description":"1..200","default":50,"title":"Results Per Page"},"description":"1..200"},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"If-None-Match","in":"header","required":false,"description":"The `ETag` from a previous response to this URL. If the representation has not changed you get `304 Not Modified` with no body — reuse your cached copy. A comma-separated list and `*` are both accepted.","schema":{"type":"string"},"example":"\"6f9a3c1e8b2d4f70a1c5e9b3d7f2a4c8\""}],"responses":{"200":{"description":"The community's tags, newest first, always as this envelope.","content":{"application/json":{"schema":{},"example":{"result":"ok","items":[{"tag_id":4182,"tag_uid_hex":"04a1b2c3d4e580","tag_serial":"NFC-7K2MQ9XA","latch_id":"3f1c…","disabled":false,"notes":"Unit 214 — resident fob","last_scan_at":"2026-08-17T18:42:11+00:00","created_at":"2026-05-02T09:15:00+00:00","last_updated_datetime":"2026-08-17T18:42:11+00:00"}],"page":1,"results_per_page":50,"total":1}}},"headers":{"ETag":{"description":"Validator for this representation. Send it back as `If-None-Match` on the next poll.","schema":{"type":"string"}},"Cache-Control":{"description":"`private, no-cache`. `no-cache` means revalidate before reuse — not \"do not store\".","schema":{"type":"string"}}}},"403":{"description":"This API key is not bound to a community (`not_community_key`), or its manager no longer has API access to the community (`api_access_revoked`: removed as a manager, API access blocked for the community, or the permission withdrawn). The key itself stays valid and works again if that access is restored.","content":{"application/json":{"example":{"error":{"code":"not_community_key","message":"This API key is not bound to a community","request_id":"b1c2…"}}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"example":{"error":{"code":"unauthorized","message":"Invalid API key","request_id":"b1c2…"}}}}},"429":{"description":"Rate limit exceeded — see Retry-After.","content":{"application/json":{"example":{"error":{"code":"rate_limited","message":"Too many requests","request_id":"b1c2…"}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"304":{"description":"Not modified — your `If-None-Match` matched the current representation. No body. Does not consume monthly quota.","headers":{"ETag":{"description":"The unchanged validator.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]}]}},"/v1/community/nfc-tags/scan-log":{"get":{"tags":["Community · NFC Tags"],"summary":"Read the NFC scan log","description":"Every NFC tap recorded for the key's community, newest first.\n\n`limit` is clamped to 1..200 and `offset` floored at 0. Rows carry the\ntapping member's first and last name where the tap resolved to one, so a\nsecurity review can attribute a tap to a person; the device's IP address\nand Nimbio-internal record ids are not exposed.","operationId":"nfc_scan_log_v1_community_nfc_tags_scan_log_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","description":"1..200","default":50,"title":"Limit"},"description":"1..200"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","description":"Rows to skip (floored at 0)","default":0,"title":"Offset"},"description":"Rows to skip (floored at 0)"},{"name":"result","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Only rows with this scan result","title":"Result"},"description":"Only rows with this scan result"},{"name":"tag_uid_hex","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Only rows for this physical tag UID","title":"Tag Uid Hex"},"description":"Only rows for this physical tag UID"},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"If-None-Match","in":"header","required":false,"description":"The `ETag` from a previous response to this URL. If the representation has not changed you get `304 Not Modified` with no body — reuse your cached copy. A comma-separated list and `*` are both accepted.","schema":{"type":"string"},"example":"\"6f9a3c1e8b2d4f70a1c5e9b3d7f2a4c8\""}],"responses":{"200":{"description":"Tap history, newest first.","content":{"application/json":{"schema":{},"example":{"result":"ok","items":[{"scan_log_id":90211,"tag_id":4182,"tag_serial":"NFC-7K2MQ9XA","tag_uid_hex":"04a1b2c3d4e580","latch_id":"3f1c…","latch_name":"Pedestrian Gate","result":"ok","open_outcome":"opened","first_name":"Dana","last_name":"Lee","scanned_at":"2026-08-17T18:42:11+00:00"}],"limit":50,"offset":0,"total":1}}},"headers":{"ETag":{"description":"Validator for this representation. Send it back as `If-None-Match` on the next poll.","schema":{"type":"string"}},"Cache-Control":{"description":"`private, no-cache`. `no-cache` means revalidate before reuse — not \"do not store\".","schema":{"type":"string"}}}},"403":{"description":"This API key is not bound to a community (`not_community_key`), or its manager no longer has API access to the community (`api_access_revoked`: removed as a manager, API access blocked for the community, or the permission withdrawn). The key itself stays valid and works again if that access is restored.","content":{"application/json":{"example":{"error":{"code":"not_community_key","message":"This API key is not bound to a community","request_id":"b1c2…"}}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"example":{"error":{"code":"unauthorized","message":"Invalid API key","request_id":"b1c2…"}}}}},"429":{"description":"Rate limit exceeded — see Retry-After.","content":{"application/json":{"example":{"error":{"code":"rate_limited","message":"Too many requests","request_id":"b1c2…"}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"304":{"description":"Not modified — your `If-None-Match` matched the current representation. No body. Does not consume monthly quota.","headers":{"ETag":{"description":"The unchanged validator.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]}]}},"/v1/community/nfc-tags/{tag_id}":{"get":{"tags":["Community · NFC Tags"],"summary":"Get one NFC tag","description":"One tag of the key's community. A tag belonging to another community is\nreported as not found — the API never confirms that it exists.","operationId":"get_nfc_tag_v1_community_nfc_tags__tag_id__get","parameters":[{"name":"tag_id","in":"path","required":true,"schema":{"type":"string","title":"Tag Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"If-None-Match","in":"header","required":false,"description":"The `ETag` from a previous response to this URL. If the representation has not changed you get `304 Not Modified` with no body — reuse your cached copy. A comma-separated list and `*` are both accepted.","schema":{"type":"string"},"example":"\"6f9a3c1e8b2d4f70a1c5e9b3d7f2a4c8\""}],"responses":{"200":{"description":"The tag.","content":{"application/json":{"schema":{},"example":{"result":"ok","tag":{"tag_id":4182,"tag_uid_hex":"04a1b2c3d4e580","tag_serial":"NFC-7K2MQ9XA","latch_id":"3f1c…","disabled":false,"notes":"Unit 214 — resident fob","last_scan_at":"2026-08-17T18:42:11+00:00","created_at":"2026-05-02T09:15:00+00:00","last_updated_datetime":"2026-08-17T18:42:11+00:00"}}}},"headers":{"ETag":{"description":"Validator for this representation. Send it back as `If-None-Match` on the next poll.","schema":{"type":"string"}},"Cache-Control":{"description":"`private, no-cache`. `no-cache` means revalidate before reuse — not \"do not store\".","schema":{"type":"string"}}}},"404":{"description":"No such tag on this community.","content":{"application/json":{"example":{"error":{"code":"tag_not_found","message":"Tag not found for this community","request_id":"b1c2…"}}}}},"403":{"description":"This API key is not bound to a community (`not_community_key`), or its manager no longer has API access to the community (`api_access_revoked`: removed as a manager, API access blocked for the community, or the permission withdrawn). The key itself stays valid and works again if that access is restored.","content":{"application/json":{"example":{"error":{"code":"not_community_key","message":"This API key is not bound to a community","request_id":"b1c2…"}}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"example":{"error":{"code":"unauthorized","message":"Invalid API key","request_id":"b1c2…"}}}}},"429":{"description":"Rate limit exceeded — see Retry-After.","content":{"application/json":{"example":{"error":{"code":"rate_limited","message":"Too many requests","request_id":"b1c2…"}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"304":{"description":"Not modified — your `If-None-Match` matched the current representation. No body. Does not consume monthly quota.","headers":{"ETag":{"description":"The unchanged validator.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]}]},"patch":{"tags":["Community · NFC Tags"],"summary":"Assign, unassign, or disable an NFC tag","description":"Edit one tag: bind it to a gate, detach it, or disable/re-enable it.\n\nSend `disabled` and/or `latch_id`; at least one is required.\n\n* `{\"disabled\": true}` — kill a lost fob. **This takes effect for physical\n  gate taps**: the next tap on any gate is refused.\n* `{\"disabled\": false}` — revive it.\n* `{\"latch_id\": \"<gate uuid>\"}` — bind the tag to one of the community's\n  gates. A tag opens the gate it is bound to, not a member's key.\n* `{\"latch_id\": null}` — detach it. The tag stays in your community and can\n  be re-assigned later.\n\n`disabled` is an explicit setter, never a toggle: revoking a stolen fob must\nnot depend on state you read a moment ago. Sending `disabled: true` together\nwith a non-null `latch_id` is rejected — a dead fob cannot be routed to a\ngate. When both fields are sent, `disabled` is applied first, so\n`{\"disabled\": false, \"latch_id\": \"…\"}` revives and then binds in one call.\n\nA 409 means this write would leave a Scan Only gate with no working tag.\nIt is a warning, not a veto — repeat with `\"confirm\": true` to proceed\n(revoking a stolen fob has to stay possible), or bind another tag first.\n\nTest-mode keys validate everything and return `simulated`; they never\nenable or disable a real physical credential.\n\nProgramming a blank fob is a separate, operator-side job done with the\n`nimbio nfc` tooling and a card reader — this endpoint manages tags that\nalready exist.","operationId":"update_nfc_tag_v1_community_nfc_tags__tag_id__patch","parameters":[{"name":"tag_id","in":"path","required":true,"schema":{"type":"string","title":"Tag Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body","properties":{"disabled":{"type":"boolean","description":"true kills the fob for real gate taps; false revives it"},"latch_id":{"type":["string","null"],"description":"Gate to bind the tag to; null detaches it"},"confirm":{"type":"boolean","description":"Proceed even if this leaves a Scan Only gate with no working tag (see 409)"}}},"example":{"disabled":true}}},"required":false},"responses":{"200":{"description":"The updated tag.","content":{"application/json":{"schema":{},"example":{"result":"ok","tag":{"tag_id":4182,"tag_uid_hex":"04a1b2c3d4e580","tag_serial":"NFC-7K2MQ9XA","latch_id":"3f1c…","disabled":true,"notes":"Unit 214 — resident fob","last_scan_at":"2026-08-17T18:42:11+00:00","created_at":"2026-05-02T09:15:00+00:00","last_updated_datetime":"2026-08-17T18:42:11+00:00"},"request_id":"b1c2…"}}}},"404":{"description":"No such tag (or gate) on this community.","content":{"application/json":{"example":{"error":{"code":"tag_not_found","message":"Tag not found for this community","request_id":"b1c2…"}}}}},"409":{"description":"Would leave a Scan Only gate with no working tag. Repeat with confirm=true.","content":{"application/json":{"example":{"error":{"code":"requires_confirmation","message":"This is the last active NFC tag on a Scan Only gate.","request_id":"b1c2…"}}}}},"422":{"description":"Nothing to change, or a bad field.","content":{"application/json":{"example":{"error":{"code":"empty_patch","message":"Provide 'disabled' and/or 'latch_id'","request_id":"b1c2…"}}}}},"403":{"description":"This API key is not bound to a community (`not_community_key`), or its manager no longer has API access to the community (`api_access_revoked`: removed as a manager, API access blocked for the community, or the permission withdrawn). The key itself stays valid and works again if that access is restored.","content":{"application/json":{"example":{"error":{"code":"not_community_key","message":"This API key is not bound to a community","request_id":"b1c2…"}}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"example":{"error":{"code":"unauthorized","message":"Invalid API key","request_id":"b1c2…"}}}}},"429":{"description":"Rate limit exceeded — see Retry-After.","content":{"application/json":{"example":{"error":{"code":"rate_limited","message":"Too many requests","request_id":"b1c2…"}}}}}},"security":[{"bearerAuth":[]}]}},"/v1/community/sense-lines":{"get":{"tags":["Community · Devices"],"summary":"List sense lines","description":"Every sense line on the community's boxes.\n\nA **sense line** is a physical input on a Nimbio box that reports whether a\ngate actually moved — the feedback loop behind `GET /v1/community/gate-status`,\nthe gate-status-change log, and the `sense_line.changed` webhook event.\n\nEach sense line carries two configuration flags:\n\n* **`sense_line_online`** — whether this input is switched on. When it is\n  off, the box's raw transitions are still recorded (see\n  `GET /v1/community/sense-lines/records`) but the server acts on none of\n  them, and this input is not considered when deciding a gate's status.\n* **`latch_data_online`** — whether this input's readings are allowed to\n  drive the gate status reported to the apps and to this API.\n\n**`reporting`** is the derived answer you usually want: it is true only when\nboth flags are on, which is exactly the condition the backend requires\nbefore a transition updates gate status or fires `sense_line.changed`. A\ngate stuck on one status with `reporting: false` is a configuration problem,\nnot a stuck gate.\n\n`boxes` lists the boxes in scope with their latches, using the same\n`latch_id` / `latch_name` vocabulary as `GET /v1/community/gate-status`.\n\nDoes not consume the monthly quota.","operationId":"list_sense_lines_v1_community_sense_lines_get","parameters":[{"name":"box_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Restrict to one box. Omit for every box in the community.","title":"Box Id"},"description":"Restrict to one box. Omit for every box in the community."},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"If-None-Match","in":"header","required":false,"description":"The `ETag` from a previous response to this URL. If the representation has not changed you get `304 Not Modified` with no body — reuse your cached copy. A comma-separated list and `*` are both accepted.","schema":{"type":"string"},"example":"\"6f9a3c1e8b2d4f70a1c5e9b3d7f2a4c8\""}],"responses":{"200":{"description":"Sense lines for the community (or one box).","content":{"application/json":{"schema":{},"example":{"result":"ok","sense_lines":[{"box_id":"b1c2d3e4-…","box_name":"Front Entrance Box","sense_line_id":1,"sense_line_online":true,"latch_data_online":true,"reporting":true,"latches":[{"latch_id":"l1…","latch_name":"Main Gate"}],"created_at":"2026-01-04T18:02:11+00:00","updated_at":"2026-06-30T09:14:52+00:00"}],"boxes":[{"box_id":"b1c2d3e4-…","box_name":"Front Entrance Box","latches":[{"latch_id":"l1…","latch_name":"Main Gate"}]}]}}},"headers":{"ETag":{"description":"Validator for this representation. Send it back as `If-None-Match` on the next poll.","schema":{"type":"string"}},"Cache-Control":{"description":"`private, no-cache`. `no-cache` means revalidate before reuse — not \"do not store\".","schema":{"type":"string"}}}},"404":{"description":"Unknown box, or a box in another community.","content":{"application/json":{"example":{"error":{"code":"box_not_found","message":"Box is not in this community","request_id":"b1c2…"}}}}},"403":{"description":"This API key is not bound to a community (`not_community_key`), or its manager no longer has API access to the community (`api_access_revoked`: removed as a manager, API access blocked for the community, or the permission withdrawn). The key itself stays valid and works again if that access is restored.","content":{"application/json":{"example":{"error":{"code":"not_community_key","message":"This API key is not bound to a community","request_id":"b1c2…"}}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"example":{"error":{"code":"unauthorized","message":"Invalid API key","request_id":"b1c2…"}}}}},"429":{"description":"Rate limit exceeded — see Retry-After.","content":{"application/json":{"example":{"error":{"code":"rate_limited","message":"Too many requests","request_id":"b1c2…"}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"304":{"description":"Not modified — your `If-None-Match` matched the current representation. No body. Does not consume monthly quota.","headers":{"ETag":{"description":"The unchanged validator.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]}]}},"/v1/community/sense-lines/records":{"get":{"tags":["Community · Devices"],"summary":"List observed sense-line transitions","description":"What the boxes actually reported, newest first.\n\nThese are the **raw** transitions read off the physical inputs, not the\nderived gate status. Two properties make this the endpoint to reach for when\na gate misreports:\n\n* Records are written **even when a sense line is switched off**, so a\n  healthy stream here alongside a stale `GET /v1/community/gate-status` is\n  proof the wiring is fine and the configuration is not.\n* `status` is the configured label for that `(sense_line_id, state)` pair,\n  or `null` when the state has no configured meaning — an unmapped state is\n  itself a finding, so these rows are returned rather than dropped.\n\nFor the human-readable, latch-oriented version of the same history, see\n`GET /v1/community/gate-status-log`.\n\nDoes not consume the monthly quota.","operationId":"list_sense_line_records_v1_community_sense_lines_records_get","parameters":[{"name":"box_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Restrict to one box.","title":"Box Id"},"description":"Restrict to one box."},{"name":"sense_line_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Restrict to one input number.","title":"Sense Line Id"},"description":"Restrict to one input number."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","description":"1–200; values outside the range are clamped.","default":50,"title":"Limit"},"description":"1–200; values outside the range are clamped."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","description":"Rows to skip. Negative values floor at 0.","default":0,"title":"Offset"},"description":"Rows to skip. Negative values floor at 0."},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"If-None-Match","in":"header","required":false,"description":"The `ETag` from a previous response to this URL. If the representation has not changed you get `304 Not Modified` with no body — reuse your cached copy. A comma-separated list and `*` are both accepted.","schema":{"type":"string"},"example":"\"6f9a3c1e8b2d4f70a1c5e9b3d7f2a4c8\""}],"responses":{"200":{"description":"Raw transitions, newest first.","content":{"application/json":{"schema":{},"example":{"result":"ok","records":[{"box_id":"b1c2d3e4-…","box_name":"Front Entrance Box","sense_line_id":1,"state":1,"status":"Open","logged_at":"2026-08-17T22:41:07+00:00"},{"box_id":"b1c2d3e4-…","box_name":"Front Entrance Box","sense_line_id":1,"state":0,"status":"Closed","logged_at":"2026-08-17T22:40:12+00:00"}],"limit":50,"offset":0,"has_more":true}}},"headers":{"ETag":{"description":"Validator for this representation. Send it back as `If-None-Match` on the next poll.","schema":{"type":"string"}},"Cache-Control":{"description":"`private, no-cache`. `no-cache` means revalidate before reuse — not \"do not store\".","schema":{"type":"string"}}}},"404":{"description":"Unknown box, or a box in another community.","content":{"application/json":{"example":{"error":{"code":"box_not_found","message":"Box is not in this community","request_id":"b1c2…"}}}}},"403":{"description":"This API key is not bound to a community (`not_community_key`), or its manager no longer has API access to the community (`api_access_revoked`: removed as a manager, API access blocked for the community, or the permission withdrawn). The key itself stays valid and works again if that access is restored.","content":{"application/json":{"example":{"error":{"code":"not_community_key","message":"This API key is not bound to a community","request_id":"b1c2…"}}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"example":{"error":{"code":"unauthorized","message":"Invalid API key","request_id":"b1c2…"}}}}},"429":{"description":"Rate limit exceeded — see Retry-After.","content":{"application/json":{"example":{"error":{"code":"rate_limited","message":"Too many requests","request_id":"b1c2…"}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"304":{"description":"Not modified — your `If-None-Match` matched the current representation. No body. Does not consume monthly quota.","headers":{"ETag":{"description":"The unchanged validator.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]}]}},"/v1/community/sense-lines/{sense_line_id}":{"get":{"tags":["Community · Devices"],"summary":"Get one sense line","description":"One sense line, with everything needed to explain a gate's status.\n\nBeyond the two flags (see `GET /v1/community/sense-lines` for what\n`sense_line_online` and `latch_data_online` mean), this returns:\n\n* **`status_map`** — the configured meaning of each raw state on this input:\n  which latch the state describes, the label the apps show for it\n  (`\"Open\"` / `\"Closed\"` / `\"Locked\"` …), and `transient_ms`, a non-zero\n  value meaning the label is shown briefly and then reverts. This mapping is\n  set when the hardware is installed and is **read-only** here.\n* **`last_record`** — the most recent transition the box actually reported.\n  A `last_record` that is weeks old on a gate that moves daily points at the\n  wiring or the box, not at the configuration.\n\n`box_id` is required: sense line ids are input numbers unique to a box, so\n\"sense line 1\" is ambiguous without it.\n\nDoes not consume the monthly quota.","operationId":"get_sense_line_v1_community_sense_lines__sense_line_id__get","parameters":[{"name":"sense_line_id","in":"path","required":true,"schema":{"type":"integer","title":"Sense Line Id"}},{"name":"box_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Required — the box this input belongs to.","title":"Box Id"},"description":"Required — the box this input belongs to."},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"If-None-Match","in":"header","required":false,"description":"The `ETag` from a previous response to this URL. If the representation has not changed you get `304 Not Modified` with no body — reuse your cached copy. A comma-separated list and `*` are both accepted.","schema":{"type":"string"},"example":"\"6f9a3c1e8b2d4f70a1c5e9b3d7f2a4c8\""}],"responses":{"200":{"description":"The sense line, its state vocabulary, and its last observed transition.","content":{"application/json":{"schema":{},"example":{"result":"ok","box_id":"b1c2d3e4-…","box_name":"Front Entrance Box","sense_line_id":1,"sense_line_online":true,"latch_data_online":true,"reporting":true,"latches":[{"latch_id":"l1…","latch_name":"Main Gate"}],"created_at":"2026-01-04T18:02:11+00:00","updated_at":"2026-06-30T09:14:52+00:00","status_map":[{"sense_line_state":0,"latch_id":"l1…","latch_name":"Main Gate","status":"Closed","transient_ms":0},{"sense_line_state":1,"latch_id":"l1…","latch_name":"Main Gate","status":"Open","transient_ms":0}],"last_record":{"state":0,"logged_at":"2026-08-17T22:41:07+00:00"}}}},"headers":{"ETag":{"description":"Validator for this representation. Send it back as `If-None-Match` on the next poll.","schema":{"type":"string"}},"Cache-Control":{"description":"`private, no-cache`. `no-cache` means revalidate before reuse — not \"do not store\".","schema":{"type":"string"}}}},"404":{"description":"No such sense line on that box.","content":{"application/json":{"example":{"error":{"code":"sense_line_not_found","message":"Sense line is not on this box","request_id":"b1c2…"}}}}},"422":{"description":"box_id query parameter missing.","content":{"application/json":{"example":{"error":{"code":"box_id_required","message":"box_id is required: sense line numbers are unique per box, not per community","request_id":"b1c2…"}}}}},"403":{"description":"This API key is not bound to a community (`not_community_key`), or its manager no longer has API access to the community (`api_access_revoked`: removed as a manager, API access blocked for the community, or the permission withdrawn). The key itself stays valid and works again if that access is restored.","content":{"application/json":{"example":{"error":{"code":"not_community_key","message":"This API key is not bound to a community","request_id":"b1c2…"}}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"example":{"error":{"code":"unauthorized","message":"Invalid API key","request_id":"b1c2…"}}}}},"429":{"description":"Rate limit exceeded — see Retry-After.","content":{"application/json":{"example":{"error":{"code":"rate_limited","message":"Too many requests","request_id":"b1c2…"}}}}},"304":{"description":"Not modified — your `If-None-Match` matched the current representation. No body. Does not consume monthly quota.","headers":{"ETag":{"description":"The unchanged validator.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]}]},"patch":{"tags":["Community · Devices"],"summary":"Reconfigure a sense line","description":"Switch a sense line's two flags on or off.\n\nSend only the flags you want to change — an omitted flag is left exactly as\nit was. Each value is an **explicit set**, never a toggle, so re-sending the\nsame request is a no-op.\n\n**This changes what a real gate reports.** Turning `sense_line_online` or\n`latch_data_online` off makes the gate's status freeze at its last known\nvalue for every app, this API's `GET /v1/community/gate-status`, and the\n`sense_line.changed` webhook; hold-open logic that reads gate state is\naffected too. Turning a miswired input off is a legitimate repair — do it\nknowing the gate will stop reporting, not by accident.\n\nThe state → label wiring (`status_map`) and the creation of sense lines are\ninstaller/admin operations and are not writable here.\n\nReturns the sense line as it now stands. Test mode (`nimbio_test_…`) is\nvalidated and scope-checked but never reconfigures real hardware — the\nresponse echoes `would_set` instead.","operationId":"patch_sense_line_v1_community_sense_lines__sense_line_id__patch","parameters":[{"name":"sense_line_id","in":"path","required":true,"schema":{"type":"integer","title":"Sense Line Id"}},{"name":"box_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Required — the box this input belongs to.","title":"Box Id"},"description":"Required — the box this input belongs to."},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body","properties":{"sense_line_online":{"type":"boolean","description":"Whether this input is switched on. Off means the server keeps logging the input's raw transitions but acts on none of them."},"latch_data_online":{"type":"boolean","description":"Whether this input's readings are allowed to drive the gate status reported to apps and this API."}}},"example":{"sense_line_online":true,"latch_data_online":true}}},"required":false},"responses":{"200":{"description":"Saved (live) or validated (test).","content":{"application/json":{"schema":{},"example":{"result":"ok","box_id":"b1c2d3e4-…","box_name":"Front Entrance Box","sense_line_id":1,"sense_line_online":true,"latch_data_online":true,"reporting":true,"latches":[{"latch_id":"l1…","latch_name":"Main Gate"}],"created_at":"2026-01-04T18:02:11+00:00","updated_at":"2026-06-30T09:14:52+00:00","status_map":[{"sense_line_state":0,"latch_id":"l1…","latch_name":"Main Gate","status":"Closed","transient_ms":0},{"sense_line_state":1,"latch_id":"l1…","latch_name":"Main Gate","status":"Open","transient_ms":0}],"last_record":{"state":0,"logged_at":"2026-08-17T22:41:07+00:00"}}}}},"404":{"description":"No such sense line on that box.","content":{"application/json":{"example":{"error":{"code":"sense_line_not_found","message":"Sense line is not on this box","request_id":"b1c2…"}}}}},"422":{"description":"Nothing to change.","content":{"application/json":{"example":{"error":{"code":"no_fields","message":"Supply sense_line_online and/or latch_data_online","request_id":"b1c2…"}}}}},"403":{"description":"This API key is not bound to a community (`not_community_key`), or its manager no longer has API access to the community (`api_access_revoked`: removed as a manager, API access blocked for the community, or the permission withdrawn). The key itself stays valid and works again if that access is restored.","content":{"application/json":{"example":{"error":{"code":"not_community_key","message":"This API key is not bound to a community","request_id":"b1c2…"}}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"example":{"error":{"code":"unauthorized","message":"Invalid API key","request_id":"b1c2…"}}}}},"429":{"description":"Rate limit exceeded — see Retry-After.","content":{"application/json":{"example":{"error":{"code":"rate_limited","message":"Too many requests","request_id":"b1c2…"}}}}}},"security":[{"bearerAuth":[]}]}},"/v1/community/settings":{"get":{"tags":["Community · Settings"],"summary":"Get community settings","description":"Read the key's community configuration.\n\n`settings` holds everything you may change with `PATCH\n/v1/community/settings`. `read_only` holds the flags Nimbio provisions for\nyou — you can *detect* them here, which is the point: several endpoint\nfamilies are gated on them, and without this read the only way to discover\na feature is off is to call it and get a 403.\n\n  * `read_only.allow_hold_opens` false -> `/v1/community/hold-opens` and the\n    hold-open writes return 403.\n  * `read_only.is_open_log_history_enabled` false -> `/v1/community/access-log`\n    and `/v1/community/gate-status-log` return 403.\n  * `read_only.event_keys_enabled` is the *resolved* answer for event keys:\n    `settings.event_keys_override` ('inherit'/'allow'/'deny') combined with\n    the property type's default.\n  * `read_only.access_code_mode` (`per_member` / `single_entry`) is the\n    one read-only value an API key *can* change — but only through\n    `PUT /v1/community/access-codes/mode`, because switching it deletes\n    every access code in the community and needs an explicit confirm.\n\nTo change any other read-only flag, contact Nimbio — an API key cannot\nenable a feature the business provisions.","operationId":"get_community_settings_v1_community_settings_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"If-None-Match","in":"header","required":false,"description":"The `ETag` from a previous response to this URL. If the representation has not changed you get `304 Not Modified` with no body — reuse your cached copy. A comma-separated list and `*` are both accepted.","schema":{"type":"string"},"example":"\"6f9a3c1e8b2d4f70a1c5e9b3d7f2a4c8\""}],"responses":{"200":{"description":"Every settable setting, the read-only flags that gate other endpoints, and the resolved terminology.","content":{"application/json":{"schema":{},"example":{"result":"ok","community_id":2585,"settings":{"allow_directory_viewing":true,"allow_directory_access_codes":false,"is_new_member_request_home_enabled":true,"limited_use_links_members_only":false,"limited_use_links_require_account":true,"event_keys_require_account":false,"event_keys_override":"inherit","member_term_custom":"Tenant","member_term_custom_plural":"Tenants","member_icon":"person","home_terminology_option_id":12},"read_only":{"allow_hold_opens":true,"is_open_log_history_enabled":true,"allow_guest_view_entry":false,"event_keys_enabled":true,"community_type":3,"access_code_mode":"per_member"},"terminology":{"member":{"singular":"Tenant","plural":"Tenants","icon":"person"},"home":{"singular":"Suite","plural":"Suites","icon":"home"}},"terminology_options":{"member":[{"terminology_option_id":7,"label_singular":"Resident","label_plural":"Residents","icon":"person"}],"home":[{"terminology_option_id":12,"label_singular":"Suite","label_plural":"Suites","icon":"home"}]}}}},"headers":{"ETag":{"description":"Validator for this representation. Send it back as `If-None-Match` on the next poll.","schema":{"type":"string"}},"Cache-Control":{"description":"`private, no-cache`. `no-cache` means revalidate before reuse — not \"do not store\".","schema":{"type":"string"}}}},"403":{"description":"This API key is not bound to a community (`not_community_key`), or its manager no longer has API access to the community (`api_access_revoked`: removed as a manager, API access blocked for the community, or the permission withdrawn). The key itself stays valid and works again if that access is restored.","content":{"application/json":{"example":{"error":{"code":"not_community_key","message":"This API key is not bound to a community","request_id":"b1c2…"}}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"example":{"error":{"code":"unauthorized","message":"Invalid API key","request_id":"b1c2…"}}}}},"429":{"description":"Rate limit exceeded — see Retry-After.","content":{"application/json":{"example":{"error":{"code":"rate_limited","message":"Too many requests","request_id":"b1c2…"}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"304":{"description":"Not modified — your `If-None-Match` matched the current representation. No body. Does not consume monthly quota.","headers":{"ETag":{"description":"The unchanged validator.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]}]},"patch":{"tags":["Community · Settings"],"summary":"Update community settings","description":"Change the key's community configuration — a partial update.\n\nSend `{\"settings\": {...}}` with only the keys you want to change;\neverything else is left alone. The whole patch is validated before anything\nis written, so a batch containing one bad value applies **nothing** — you\nnever have to reason about a half-applied profile. An unknown key is\nrejected with a 422 naming it, never silently ignored.\n\n**These settings change what the rest of the API does.** Turning\n`allow_directory_viewing` off makes the directory disappear for members and\nguests. Setting `event_keys_override` to `deny` stops event keys working\nfor the whole community regardless of the property type's default. The\nread-only counterparts behave the same way in reverse: with\n`allow_hold_opens` false, `/v1/community/hold-opens` returns 403 — but you\ncannot change that one here. Nor `access_code_mode`: sending it here is a\n422 pointing you at `PUT /v1/community/access-codes/mode`, which is\ndestructive (it deletes every access code) and so demands its own\nconfirmation step rather than riding along in a settings batch.\n\nTerminology labels are free text shown to members. A custom label and a\npicker option are mutually exclusive per side: setting one clears the\nother. Send an empty string or null to clear a custom label back to the\ndefault. Labels are capped at 255 characters (icons at 64) and may not\ncontain control characters.\n\nTest-mode keys (`nimbio_test_…`) validate the whole patch and return\n`result: simulated` with the community's *unchanged* settings — real\ncommunity configuration is never touched by a test key.","operationId":"update_community_settings_v1_community_settings_patch","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body","properties":{"settings":{"type":"object","description":"Only the keys you supply are applied. An unknown key is rejected, never ignored.","properties":{"allow_directory_viewing":{"type":"boolean","description":"Whether members can view the community directory (GuestView). Off hides the directory from members and guests."},"allow_directory_access_codes":{"type":"boolean","description":"Whether keypad access codes may be issued from the directory."},"is_new_member_request_home_enabled":{"type":"boolean","description":"Whether a person requesting membership is asked to pick their home/unit as part of the request."},"limited_use_links_members_only":{"type":"boolean","description":"Restrict creating limited-use guest links to members only."},"limited_use_links_require_account":{"type":"boolean","description":"Require a visitor to verify a phone number before a limited-use guest link will open a gate."},"event_keys_require_account":{"type":"boolean","description":"Same requirement, for event keys."},"event_keys_override":{"type":"string","enum":["inherit","allow","deny"],"description":"Event keys for this community: 'inherit' uses the property type's default, 'allow'/'deny' force it. The resolved answer is read_only.event_keys_enabled."},"member_terminology_option_id":{"type":["integer","null"],"description":"Pick a member label from the property type's list (see terminology_options.member). Mutually exclusive with member_term_custom — setting one clears the other."},"member_term_custom":{"type":["string","null"],"description":"Custom singular member label, e.g. 'Tenant'. Max 255 characters, no control characters. Empty string or null clears it back to the default ('Resident')."},"member_term_custom_plural":{"type":["string","null"],"description":"Plural form of member_term_custom, e.g. 'Tenants'. Only kept while a custom singular is set."},"member_icon":{"type":["string","null"],"description":"Icon name shown beside the member label. Max 64 characters."},"home_terminology_option_id":{"type":["integer","null"],"description":"Pick a home/unit label from the property type's list (see terminology_options.home). Mutually exclusive with home_term_custom."},"home_term_custom":{"type":["string","null"],"description":"Custom singular home label, e.g. 'Suite'. Max 255 characters, no control characters. Empty string or null clears it back to the default ('Home')."},"home_term_custom_plural":{"type":["string","null"],"description":"Plural form of home_term_custom, e.g. 'Suites'."},"home_icon":{"type":["string","null"],"description":"Icon name shown beside the home label. Max 64 characters."}}}},"required":["settings"]},"example":{"settings":{"allow_directory_viewing":true,"event_keys_override":"allow","member_term_custom":"Tenant","member_term_custom_plural":"Tenants"}}}},"required":true},"responses":{"200":{"description":"The full updated settings object, plus `changed` listing the keys applied. A test-mode key returns `result: simulated` and the unchanged settings.","content":{"application/json":{"schema":{},"example":{"result":"ok","community_id":2585,"settings":{"allow_directory_viewing":true,"allow_directory_access_codes":false,"is_new_member_request_home_enabled":true,"limited_use_links_members_only":false,"limited_use_links_require_account":true,"event_keys_require_account":false,"event_keys_override":"inherit","member_term_custom":"Tenant","member_term_custom_plural":"Tenants","member_icon":"person","home_terminology_option_id":12},"read_only":{"allow_hold_opens":true,"is_open_log_history_enabled":true,"allow_guest_view_entry":false,"event_keys_enabled":true,"community_type":3,"access_code_mode":"per_member"},"terminology":{"member":{"singular":"Tenant","plural":"Tenants","icon":"person"},"home":{"singular":"Suite","plural":"Suites","icon":"home"}},"terminology_options":{"member":[{"terminology_option_id":7,"label_singular":"Resident","label_plural":"Residents","icon":"person"}],"home":[{"terminology_option_id":12,"label_singular":"Suite","label_plural":"Suites","icon":"home"}]},"changed":["allow_directory_viewing"],"request_id":"b1c2…"}}}},"422":{"description":"Unknown settings key, wrong type, a read-only key such as `access_code_mode`, or an empty patch. The message names the offending key.","content":{"application/json":{"example":{"error":{"code":"invalid_setting","message":"Unknown setting 'allow_everything'. Settable: …","request_id":"b1c2…"}}}}},"403":{"description":"This API key is not bound to a community (`not_community_key`), or its manager no longer has API access to the community (`api_access_revoked`: removed as a manager, API access blocked for the community, or the permission withdrawn). The key itself stays valid and works again if that access is restored.","content":{"application/json":{"example":{"error":{"code":"not_community_key","message":"This API key is not bound to a community","request_id":"b1c2…"}}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"example":{"error":{"code":"unauthorized","message":"Invalid API key","request_id":"b1c2…"}}}}},"429":{"description":"Rate limit exceeded — see Retry-After.","content":{"application/json":{"example":{"error":{"code":"rate_limited","message":"Too many requests","request_id":"b1c2…"}}}}}},"security":[{"bearerAuth":[]}]}},"/v1/community/my-notification-settings":{"get":{"tags":["Community · My Notifications"],"summary":"Get my member-open notification settings","description":"Member-open notification settings for **the community manager who owns\nthis API key** — not a community-wide setting.\n\nA community may have several managers, each with their own alert preference\nand their own quiet hours. This endpoint always reads the settings of the\naccount that owns the key you authenticated with, so two keys owned by two\nmanagers of the same community return two different objects here.\n\n`enabled` is whether that manager receives a push notification when one of\nthe community's members opens a gate. `feature_available` is whether the\ncommunity allows the feature at all — when it is false the writes below all\nreturn 403, and `enabled` has no effect.\n\n`quiet_hours` are the windows during which that manager's alerts are\nsuppressed. **Each window is evaluated in the local timezone of the gate\nthat was opened**, not the manager's timezone and not UTC — a community with\ngates in two timezones suppresses each gate's alerts on that gate's clock.\n\nDoes not consume the monthly quota.","operationId":"get_my_notification_settings_v1_community_my_notification_settings_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"If-None-Match","in":"header","required":false,"description":"The `ETag` from a previous response to this URL. If the representation has not changed you get `304 Not Modified` with no body — reuse your cached copy. A comma-separated list and `*` are both accepted.","schema":{"type":"string"},"example":"\"6f9a3c1e8b2d4f70a1c5e9b3d7f2a4c8\""}],"responses":{"200":{"description":"This key owner's own notification settings.","content":{"application/json":{"schema":{},"example":{"result":"ok","enabled":true,"feature_available":true,"quiet_hours":[{"quiet_hours_id":41,"days_of_the_week":"MTWHF","start_time":"22:00","end_time":"06:00"}],"request_id":"b1c2…"}}},"headers":{"ETag":{"description":"Validator for this representation. Send it back as `If-None-Match` on the next poll.","schema":{"type":"string"}},"Cache-Control":{"description":"`private, no-cache`. `no-cache` means revalidate before reuse — not \"do not store\".","schema":{"type":"string"}}}},"403":{"description":"This API key is not bound to a community (`not_community_key`), or its manager no longer has API access to the community (`api_access_revoked`: removed as a manager, API access blocked for the community, or the permission withdrawn). The key itself stays valid and works again if that access is restored.","content":{"application/json":{"example":{"error":{"code":"not_community_key","message":"This API key is not bound to a community","request_id":"b1c2…"}}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"example":{"error":{"code":"unauthorized","message":"Invalid API key","request_id":"b1c2…"}}}}},"429":{"description":"Rate limit exceeded — see Retry-After.","content":{"application/json":{"example":{"error":{"code":"rate_limited","message":"Too many requests","request_id":"b1c2…"}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"304":{"description":"Not modified — your `If-None-Match` matched the current representation. No body. Does not consume monthly quota.","headers":{"ETag":{"description":"The unchanged validator.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]}]},"put":{"tags":["Community · My Notifications"],"summary":"Turn my member-open alerts on or off","description":"Turn member-open alerts on or off for **the community manager who owns\nthis API key** — not for the community, and not for its other managers.\n\nReturns the full updated settings object, including the quiet-hours list,\nso no follow-up GET is needed.\n\nRequires the community's member-open notifications feature to be enabled\n(`feature_available`); otherwise 403 `open_notifications_disabled`.\n\nTest mode: validated and scope-checked, never saved — matching the other\nconfiguration writes on this surface (`result` comes back `\"simulated\"`).","operationId":"set_my_notification_enabled_v1_community_my_notification_settings_put","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body","properties":{"enabled":{"type":"boolean","description":"True to receive member-open alerts, false to stop."}},"required":["enabled"]},"example":{"enabled":true}}},"required":true},"responses":{"200":{"description":"Saved (live) or validated (test) — the full updated settings.","content":{"application/json":{"schema":{},"example":{"result":"ok","enabled":true,"feature_available":true,"quiet_hours":[{"quiet_hours_id":41,"days_of_the_week":"MTWHF","start_time":"22:00","end_time":"06:00"}],"request_id":"b1c2…"}}}},"422":{"description":"'enabled' must be a boolean.","content":{"application/json":{"example":{"error":{"code":"invalid_enabled","message":"enabled must be a boolean","request_id":"b1c2…"}}}}},"403":{"description":"This API key is not bound to a community (`not_community_key`), or its manager no longer has API access to the community (`api_access_revoked`: removed as a manager, API access blocked for the community, or the permission withdrawn). The key itself stays valid and works again if that access is restored.","content":{"application/json":{"example":{"error":{"code":"not_community_key","message":"This API key is not bound to a community","request_id":"b1c2…"}}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"example":{"error":{"code":"unauthorized","message":"Invalid API key","request_id":"b1c2…"}}}}},"429":{"description":"Rate limit exceeded — see Retry-After.","content":{"application/json":{"example":{"error":{"code":"rate_limited","message":"Too many requests","request_id":"b1c2…"}}}}}},"security":[{"bearerAuth":[]}]}},"/v1/community/my-notification-settings/quiet-hours":{"post":{"tags":["Community · My Notifications"],"summary":"Add one of my quiet-hours windows","description":"Add one quiet-hours window to **the settings of the community manager\nwho owns this API key** — it suppresses that manager's alerts only, not\nthose of the community's other managers.\n\nThis is additive: each call appends one window. To replace a schedule,\ndelete the windows you no longer want.\n\n**Timezone:** a window is evaluated in the local timezone of the gate that\nwas opened (each device carries its own), not the manager's timezone and\nnot UTC. A window with gates in two timezones therefore suppresses each\ngate's alerts on that gate's own clock. Getting this backwards is how a\nwindow silently fails to suppress real alerts, so it is worth stating in\nyour own integration's UI too.\n\nTimes are `'HH:MM'`, 24-hour. `start_time` later than `end_time` wraps past\nmidnight — `22:00` to `06:00` is one window, and its `days_of_the_week`\nnames the day the window *starts* on. Omit both times for an all-day window\non the named days. `'24:00'` is not accepted here (it is a key-schedule\nidiom, needed there only because schedules cannot wrap).\n\nReturns the full updated settings object. Requires the community's\nmember-open notifications feature to be enabled; otherwise 403. Test mode\nvalidates but never saves.","operationId":"add_my_quiet_hours_v1_community_my_notification_settings_quiet_hours_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body","properties":{"days_of_the_week":{"type":"string","description":"Letters from MTWHFSU — H is Thursday, S is Saturday, U is Sunday. At least one required. This is the day the window *starts* on."},"start_time":{"type":["string","null"],"description":"'HH:MM', 24-hour, in the opened gate's local time. Null (with a null end_time) means all day on those days."},"end_time":{"type":["string","null"],"description":"'HH:MM', 24-hour. May be earlier than start_time — a quiet-hours window wraps past midnight, so 22:00 to 06:00 is a single window. '24:00' is not accepted here."}},"required":["days_of_the_week"]},"example":{"days_of_the_week":"MTWHF","start_time":"22:00","end_time":"06:00"}}},"required":true},"responses":{"200":{"description":"Added (live) or validated (test) — the full updated settings.","content":{"application/json":{"schema":{},"example":{"result":"ok","enabled":true,"feature_available":true,"quiet_hours":[{"quiet_hours_id":41,"days_of_the_week":"MTWHF","start_time":"22:00","end_time":"06:00"}],"request_id":"b1c2…"}}}},"422":{"description":"Bad day letters or a malformed time.","content":{"application/json":{"example":{"error":{"code":"invalid_days","message":"Invalid day 'X' in days_of_the_week — use letters from MTWHFSU (H=Thursday, S=Saturday, U=Sunday)","request_id":"b1c2…"}}}}},"403":{"description":"This API key is not bound to a community (`not_community_key`), or its manager no longer has API access to the community (`api_access_revoked`: removed as a manager, API access blocked for the community, or the permission withdrawn). The key itself stays valid and works again if that access is restored.","content":{"application/json":{"example":{"error":{"code":"not_community_key","message":"This API key is not bound to a community","request_id":"b1c2…"}}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"example":{"error":{"code":"unauthorized","message":"Invalid API key","request_id":"b1c2…"}}}}},"429":{"description":"Rate limit exceeded — see Retry-After.","content":{"application/json":{"example":{"error":{"code":"rate_limited","message":"Too many requests","request_id":"b1c2…"}}}}}},"security":[{"bearerAuth":[]}]}},"/v1/community/my-notification-settings/quiet-hours/{quiet_hours_id}":{"delete":{"tags":["Community · My Notifications"],"summary":"Delete one of my quiet-hours windows","description":"Delete one quiet-hours window from **the settings of the community\nmanager who owns this API key**.\n\nThe window must belong to that manager. An id belonging to a different\nmanager — including another manager of the same community — returns 404\nand deletes nothing; the API deliberately does not distinguish \"not yours\"\nfrom \"does not exist\".\n\nReturns the full updated settings object. Test mode validates ownership but\nnever deletes.","operationId":"delete_my_quiet_hours_v1_community_my_notification_settings_quiet_hours__quiet_hours_id__delete","parameters":[{"name":"quiet_hours_id","in":"path","required":true,"schema":{"type":"string","title":"Quiet Hours Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Deleted (live) or validated (test) — the full updated settings.","content":{"application/json":{"schema":{},"example":{"result":"ok","enabled":true,"feature_available":true,"quiet_hours":[],"request_id":"b1c2…"}}}},"404":{"description":"No such quiet-hours window belonging to this community manager.","content":{"application/json":{"example":{"error":{"code":"quiet_hours_not_found","message":"Quiet-hours window not found for this community manager","request_id":"b1c2…"}}}}},"403":{"description":"This API key is not bound to a community (`not_community_key`), or its manager no longer has API access to the community (`api_access_revoked`: removed as a manager, API access blocked for the community, or the permission withdrawn). The key itself stays valid and works again if that access is restored.","content":{"application/json":{"example":{"error":{"code":"not_community_key","message":"This API key is not bound to a community","request_id":"b1c2…"}}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"example":{"error":{"code":"unauthorized","message":"Invalid API key","request_id":"b1c2…"}}}}},"429":{"description":"Rate limit exceeded — see Retry-After.","content":{"application/json":{"example":{"error":{"code":"rate_limited","message":"Too many requests","request_id":"b1c2…"}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"bearerAuth":[]}]}},"/v1/community/map":{"get":{"tags":["Community · Map & Geofences"],"summary":"Read the community map and gate geofences","description":"Where this community's gates are, and the geofence each one advertises.\n\nReturns the community centre, one entry per Nimbio device (`box`) with its\nown location, and every gate on that device with its geofence config.\nCoordinates are **WGS84 decimal degrees** (`latitude`, `longitude`);\n`radius_meters` is **metres**.\n\nA gate with `center: null` has never had a fence configured — use its\n`box_location` as the suggested centre. `min_radius_meters` is the smallest\nradius the mobile apps can honour, and `geofence_modes` is the legal set for\n`mode`.\n\nGate coordinates are physical-security information: this response says\nexactly where a property's entrances are. It is scoped to your community\nkey, and treating it as sensitive downstream is on you.\n\nThis read consumes monthly quota (unlike gate status): a map is setup-time\nconfiguration, not something to poll.","operationId":"get_community_map_v1_community_map_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"If-None-Match","in":"header","required":false,"description":"The `ETag` from a previous response to this URL. If the representation has not changed you get `304 Not Modified` with no body — reuse your cached copy. A comma-separated list and `*` are both accepted.","schema":{"type":"string"},"example":"\"6f9a3c1e8b2d4f70a1c5e9b3d7f2a4c8\""}],"responses":{"200":{"description":"The community centre, its devices, and every gate's geofence.","content":{"application/json":{"schema":{},"example":{"result":"ok","community_location":{"latitude":36.1699,"longitude":-115.1398},"min_radius_meters":100,"geofence_modes":["prompt","auto_open"],"boxes":[{"box_id":"b1…","box_name":"Front Entry","location":{"latitude":36.1699,"longitude":-115.1398},"latches":[{"latch_id":"l1…","latch_name":"Main Gate","box_id":"b1…","box_location":{"latitude":36.1699,"longitude":-115.1398},"geofence":{"enabled":true,"center":{"latitude":36.1699,"longitude":-115.1398},"radius_meters":150,"mode":"prompt","min_radius_meters":100,"updated_datetime":"2026-08-18T17:04:11+00:00","updated_by_account_id":"a1b2…"}}]}],"request_id":"b1c2…"}}},"headers":{"ETag":{"description":"Validator for this representation. Send it back as `If-None-Match` on the next poll.","schema":{"type":"string"}},"Cache-Control":{"description":"`private, no-cache`. `no-cache` means revalidate before reuse — not \"do not store\".","schema":{"type":"string"}}}},"403":{"description":"This API key is not bound to a community (`not_community_key`), or its manager no longer has API access to the community (`api_access_revoked`: removed as a manager, API access blocked for the community, or the permission withdrawn). The key itself stays valid and works again if that access is restored.","content":{"application/json":{"example":{"error":{"code":"not_community_key","message":"This API key is not bound to a community","request_id":"b1c2…"}}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"example":{"error":{"code":"unauthorized","message":"Invalid API key","request_id":"b1c2…"}}}}},"429":{"description":"Rate limit exceeded — see Retry-After.","content":{"application/json":{"example":{"error":{"code":"rate_limited","message":"Too many requests","request_id":"b1c2…"}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"304":{"description":"Not modified — your `If-None-Match` matched the current representation. No body. Does not consume monthly quota.","headers":{"ETag":{"description":"The unchanged validator.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]}]}},"/v1/community/latches/{latch_id}/geofence":{"patch":{"tags":["Community · Map & Geofences"],"summary":"Update a gate's geofence","description":"Change one gate's proximity geofence.\n\n**Partial update.** Only the fields you send change; everything you omit\nkeeps its stored value. That is why this is a `PATCH` — there is no way to\nclear a configured centre here, because doing so by accident would stop a\nreal gate's proximity behaviour with nothing to show for it.\n\n`latitude` and `longitude` move together: send both or neither. They are\nWGS84 decimal degrees, and out-of-range values are rejected rather than\nstored.\n\n`radius_meters` is in **metres** and must be at least `min_radius_meters`\n(100). A smaller radius is **rejected with 422, not silently raised** —\nAndroid's Geofence API and iOS region monitoring both degrade below ~100 m,\nso a smaller fence would look configured and never fire. The response always\nechoes the effective `radius_meters`, so you can confirm what is in force.\n\n`mode` is `prompt` (the app notifies the member when they arrive, and they\ntap to open) or `auto_open` (the app opens the gate on arrival). `enabled`\nturns the fence on or off; enabling requires a centre — the gate's own, or\nits device's location as a fallback.\n\nThe change is stamped with your key's owning account and the time, and shows\nup on the CM portal's Map screen. Test mode: validated and scope-checked,\nbut a real gate's geofence never moves.","operationId":"set_latch_geofence_v1_community_latches__latch_id__geofence_patch","parameters":[{"name":"latch_id","in":"path","required":true,"schema":{"type":"string","title":"Latch Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body","properties":{"latitude":{"type":"number","description":"Centre latitude, WGS84 decimal degrees (-90 to 90). Send with `longitude`."},"longitude":{"type":"number","description":"Centre longitude, WGS84 decimal degrees (-180 to 180). Send with `latitude`."},"radius_meters":{"type":"integer","description":"Fence radius in METRES. Minimum 100 (`min_radius_meters`); smaller values are rejected, not rounded up."},"enabled":{"type":"boolean","description":"Whether the apps register this fence at all."},"mode":{"type":"string","enum":["prompt","auto_open"],"description":"'prompt' notifies the member on arrival; 'auto_open' opens the gate on arrival."}}},"example":{"latitude":36.1699,"longitude":-115.1398,"radius_meters":150,"enabled":true,"mode":"prompt"}}},"required":false},"responses":{"200":{"description":"Updated (live) or validated (test). Echoes the effective geofence.","content":{"application/json":{"schema":{},"example":{"result":"ok","latch":{"latch_id":"l1…","latch_name":"Main Gate","box_id":"b1…","box_location":{"latitude":36.1699,"longitude":-115.1398},"geofence":{"enabled":true,"center":{"latitude":36.1699,"longitude":-115.1398},"radius_meters":150,"mode":"prompt","min_radius_meters":100,"updated_datetime":"2026-08-18T17:04:11+00:00","updated_by_account_id":"a1b2…"}},"request_id":"b1c2…"}}}},"400":{"description":"Nothing to change in the body.","content":{"application/json":{"example":{"error":{"code":"nothing_to_update","message":"Supply at least one of: lat+long, radius, enabled, mode","request_id":"b1c2…"}}}}},"404":{"description":"No such gate in this community.","content":{"application/json":{"example":{"error":{"code":"latch_not_found","message":"Latch not found in this community","request_id":"b1c2…"}}}}},"422":{"description":"Radius below the minimum the mobile apps can honour.","content":{"application/json":{"example":{"error":{"code":"radius_below_minimum","message":"radius must be at least 100 meters","request_id":"b1c2…"}}}}},"403":{"description":"This API key is not bound to a community (`not_community_key`), or its manager no longer has API access to the community (`api_access_revoked`: removed as a manager, API access blocked for the community, or the permission withdrawn). The key itself stays valid and works again if that access is restored.","content":{"application/json":{"example":{"error":{"code":"not_community_key","message":"This API key is not bound to a community","request_id":"b1c2…"}}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"example":{"error":{"code":"unauthorized","message":"Invalid API key","request_id":"b1c2…"}}}}},"429":{"description":"Rate limit exceeded — see Retry-After.","content":{"application/json":{"example":{"error":{"code":"rate_limited","message":"Too many requests","request_id":"b1c2…"}}}}}},"security":[{"bearerAuth":[]}]}},"/v1/community/guest-links/logs":{"get":{"tags":["Community · Guest Links"],"summary":"Guest-link attempt history","description":"Every attempt against the community's guest links, newest first —\nsuccesses, refusals, and rate-limited hits alike.\n\n**This is guest PII.** Rows carry the redeemer's IP address and user agent,\nand the display name of a signed-in account when the community requires one.\nHandle and retain accordingly.\n\n`guest_link_id` narrows to one link; a link belonging to another community\nis a 404, the same answer an unknown id gets.","operationId":"get_guest_link_logs_v1_community_guest_links_logs_get","parameters":[{"name":"guest_link_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Limit to one link. Must belong to this community.","title":"Guest Link Id"},"description":"Limit to one link. Must belong to this community."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"If-None-Match","in":"header","required":false,"description":"The `ETag` from a previous response to this URL. If the representation has not changed you get `304 Not Modified` with no body — reuse your cached copy. A comma-separated list and `*` are both accepted.","schema":{"type":"string"},"example":"\"6f9a3c1e8b2d4f70a1c5e9b3d7f2a4c8\""}],"responses":{"200":{"description":"Attempts, newest first.","content":{"application/json":{"schema":{},"example":{"result":"ok","limit":50,"offset":0,"logs":[{"guest_link_log_id":91002,"guest_link_id":4417,"log_datetime":"2026-08-19T14:02:11+00:00","result":"opened","use_number":2,"latch_id":"l1…","latch_name":"Main Entrance","client_ip":"203.0.113.7","user_agent":"Mozilla/5.0 (iPhone…)","link_type":"limited_use","link_title":"Booking 8841 — Unit 4"}]}}},"headers":{"ETag":{"description":"Validator for this representation. Send it back as `If-None-Match` on the next poll.","schema":{"type":"string"}},"Cache-Control":{"description":"`private, no-cache`. `no-cache` means revalidate before reuse — not \"do not store\".","schema":{"type":"string"}}}},"404":{"description":"No such guest link on this community.","content":{"application/json":{"example":{"error":{"code":"guest_link_not_found","message":"Guest link not found for this community","request_id":"b1c2…"}}}}},"403":{"description":"This API key is not bound to a community (`not_community_key`), or its manager no longer has API access to the community (`api_access_revoked`: removed as a manager, API access blocked for the community, or the permission withdrawn). The key itself stays valid and works again if that access is restored.","content":{"application/json":{"example":{"error":{"code":"not_community_key","message":"This API key is not bound to a community","request_id":"b1c2…"}}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"example":{"error":{"code":"unauthorized","message":"Invalid API key","request_id":"b1c2…"}}}}},"429":{"description":"Rate limit exceeded — see Retry-After.","content":{"application/json":{"example":{"error":{"code":"rate_limited","message":"Too many requests","request_id":"b1c2…"}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"304":{"description":"Not modified — your `If-None-Match` matched the current representation. No body. Does not consume monthly quota.","headers":{"ETag":{"description":"The unchanged validator.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]}]}},"/v1/community/guest-links/latch-exclusions":{"get":{"tags":["Community · Guest Links"],"summary":"Gates excluded from guest links","description":"Gates the community has taken out of each link type.\n\nAbsence is permission: a gate that is not listed may back a link of that\ntype, so an empty answer means every gate the community key opens is\nofferable. Check this before creating — naming an excluded gate is a 422,\nand the exclusion list is per link type, so a gate barred from `event`\nlinks may still be fine for `limited_use` ones.","operationId":"get_guest_link_latch_exclusions_v1_community_guest_links_latch_exclusions_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"If-None-Match","in":"header","required":false,"description":"The `ETag` from a previous response to this URL. If the representation has not changed you get `304 Not Modified` with no body — reuse your cached copy. A comma-separated list and `*` are both accepted.","schema":{"type":"string"},"example":"\"6f9a3c1e8b2d4f70a1c5e9b3d7f2a4c8\""}],"responses":{"200":{"description":"Excluded gates, per link type.","content":{"application/json":{"schema":{},"example":{"result":"ok","excluded_latch_ids":{"event":["l9…"],"limited_use":[]}}}},"headers":{"ETag":{"description":"Validator for this representation. Send it back as `If-None-Match` on the next poll.","schema":{"type":"string"}},"Cache-Control":{"description":"`private, no-cache`. `no-cache` means revalidate before reuse — not \"do not store\".","schema":{"type":"string"}}}},"403":{"description":"This API key is not bound to a community (`not_community_key`), or its manager no longer has API access to the community (`api_access_revoked`: removed as a manager, API access blocked for the community, or the permission withdrawn). The key itself stays valid and works again if that access is restored.","content":{"application/json":{"example":{"error":{"code":"not_community_key","message":"This API key is not bound to a community","request_id":"b1c2…"}}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"example":{"error":{"code":"unauthorized","message":"Invalid API key","request_id":"b1c2…"}}}}},"429":{"description":"Rate limit exceeded — see Retry-After.","content":{"application/json":{"example":{"error":{"code":"rate_limited","message":"Too many requests","request_id":"b1c2…"}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"304":{"description":"Not modified — your `If-None-Match` matched the current representation. No body. Does not consume monthly quota.","headers":{"ETag":{"description":"The unchanged validator.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]}]}},"/v1/community/guest-links":{"get":{"tags":["Community · Guest Links"],"summary":"List guest links","description":"Every guest link on the key's community, newest first.\n\n`state` is computed live and is one of `active`, `upcoming` (an event link\nwhose window has not opened yet), `expired`, `spent` (a limited-use link\nthat ran out of opens), `revoked`, or `feature_disabled`.\n\nThe `token` and the ready-to-send `url` are listed here, not only at\ncreation — a link recovered from this list is exactly as usable as the one\nthe create call returned, so treat this response as secret material.","operationId":"list_guest_links_v1_community_guest_links_get","parameters":[{"name":"include_inactive","in":"query","required":false,"schema":{"type":"boolean","description":"False narrows to active and upcoming links.","default":true,"title":"Include Inactive"},"description":"False narrows to active and upcoming links."},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"If-None-Match","in":"header","required":false,"description":"The `ETag` from a previous response to this URL. If the representation has not changed you get `304 Not Modified` with no body — reuse your cached copy. A comma-separated list and `*` are both accepted.","schema":{"type":"string"},"example":"\"6f9a3c1e8b2d4f70a1c5e9b3d7f2a4c8\""}],"responses":{"200":{"description":"The community's guest links, newest first, with their tokens and URLs.","content":{"application/json":{"schema":{},"example":{"result":"ok","guest_links":[{"guest_link_id":4417,"link_type":"limited_use","state":"active","title":"Booking 8841 — Unit 4","subtitle":"Front gate access","community_id":2585,"key_id":"k1a2…","key_name":"Main Entrance","created_by_cm":true,"created_by_account_id":"a1b2…","created_by_name":"Dana Lee","max_uses":6,"uses_consumed":2,"expires_at":"2026-08-25T11:00:00+00:00","revoked":false,"notify_on_use":false,"created_at":"2026-08-18T09:15:00+00:00","latches":[{"latch_id":"l1…","latch_name":"Main Entrance"}],"last_used_at":"2026-08-19T14:02:11+00:00","total_opens":2,"token":"Q1w2E3r4T5y6U7i8O9p0aA","url":"https://d.nimbio.com/l/Q1w2E3r4T5y6U7i8O9p0aA"}]}}},"headers":{"ETag":{"description":"Validator for this representation. Send it back as `If-None-Match` on the next poll.","schema":{"type":"string"}},"Cache-Control":{"description":"`private, no-cache`. `no-cache` means revalidate before reuse — not \"do not store\".","schema":{"type":"string"}}}},"403":{"description":"This API key is not bound to a community (`not_community_key`), or its manager no longer has API access to the community (`api_access_revoked`: removed as a manager, API access blocked for the community, or the permission withdrawn). The key itself stays valid and works again if that access is restored.","content":{"application/json":{"example":{"error":{"code":"not_community_key","message":"This API key is not bound to a community","request_id":"b1c2…"}}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"example":{"error":{"code":"unauthorized","message":"Invalid API key","request_id":"b1c2…"}}}}},"429":{"description":"Rate limit exceeded — see Retry-After.","content":{"application/json":{"example":{"error":{"code":"rate_limited","message":"Too many requests","request_id":"b1c2…"}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"304":{"description":"Not modified — your `If-None-Match` matched the current representation. No body. Does not consume monthly quota.","headers":{"ETag":{"description":"The unchanged validator.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]}]},"post":{"tags":["Community · Guest Links"],"summary":"Create a guest link","description":"Mint a guest link on the key's community and return it with its URL.\n\n`link_type` is `event` or `limited_use`, and the two take different limits:\n\n- **event** — requires `title`, `window_start` and `window_end`. Live\n  between those two instants, unlimited opens inside them. The window may\n  not exceed the community's maximum (8 hours unless the community raised\n  it) and may not have already ended.\n- **limited_use** — requires `max_uses` (1 to the community's cap, 20 by\n  default). Optional `expires_at` is a wall-clock backstop; it defaults to,\n  and may not exceed, 30 days from now.\n\nAll datetimes are ISO-8601. An offset (including `Z`) is honored; a naive\nstring is read as **UTC** — communities carry no timezone of their own.\nEverything returned is UTC.\n\n`latch_ids` must all be opened by the backing key and none may appear in\n`/v1/community/guest-links/latch-exclusions` for this link type.\n\n`key_id` names the community key behind the link. It may be omitted only\nwhen the community has exactly one; with several you must choose, because\nthe choice decides which gates the link could ever reach.\n\nThe response carries `token` and `url` — the URL is what you hand the\nguest. It is not one-time: `GET /v1/community/guest-links` returns it\nagain, so a lost URL is recoverable and a leaked list is a leaked key.\n\n**Test mode:** every rule above is checked and then nothing is created —\n`{\"result\": \"simulated\"}` with no token, no URL, and no new row on the\nlist. A test key can never hand someone a working gate.","operationId":"create_guest_link_v1_community_guest_links_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body","properties":{"link_type":{"type":"string","enum":["event","limited_use"],"description":"'event' (absolute window) or 'limited_use' (open count)"},"latch_ids":{"type":"array","items":{"type":"string"},"description":"Gates the link opens. Must all be opened by the backing key and none may be excluded for this link type."},"key_id":{"type":"string","description":"Community key backing the link. Optional when the community has exactly one."},"title":{"type":"string","description":"Required for event links; shown on the landing page."},"subtitle":{"type":"string","description":"Optional second line on the landing page."},"extra_info":{"type":"string","description":"Optional longer note on the landing page."},"window_start":{"type":"string","format":"date-time","description":"event only — ISO-8601 instant the link goes live."},"window_end":{"type":"string","format":"date-time","description":"event only — ISO-8601 instant the link dies."},"max_uses":{"type":"integer","description":"limited_use only — opens allowed before the link is spent."},"expires_at":{"type":"string","format":"date-time","description":"limited_use only — ISO-8601 backstop expiry (defaults to 30 days, the maximum)."},"notify_on_use":{"type":"boolean","default":false,"description":"Push the key's owning CM when the link is used."}},"required":["link_type","latch_ids"]},"example":{"link_type":"limited_use","latch_ids":["{{latch_id}}"],"title":"Booking 8841 — Unit 4","max_uses":6,"expires_at":"2026-08-25T11:00:00Z"}}},"required":true},"responses":{"200":{"description":"Created (live). A test-mode key returns {\"result\": \"simulated\", \"would_create\": {…}} with no token and no URL — nothing is created and no gate becomes reachable.","content":{"application/json":{"schema":{},"example":{"result":"ok","guest_link":{"guest_link_id":4417,"link_type":"limited_use","state":"active","title":"Booking 8841 — Unit 4","subtitle":"Front gate access","community_id":2585,"key_id":"k1a2…","key_name":"Main Entrance","created_by_cm":true,"created_by_account_id":"a1b2…","created_by_name":"Dana Lee","max_uses":6,"uses_consumed":2,"expires_at":"2026-08-25T11:00:00+00:00","revoked":false,"notify_on_use":false,"created_at":"2026-08-18T09:15:00+00:00","latches":[{"latch_id":"l1…","latch_name":"Main Entrance"}],"last_used_at":"2026-08-19T14:02:11+00:00","total_opens":2,"token":"Q1w2E3r4T5y6U7i8O9p0aA","url":"https://d.nimbio.com/l/Q1w2E3r4T5y6U7i8O9p0aA"},"request_id":"b1c2…"}}}},"409":{"description":"The creating account already holds the maximum live links here.","content":{"application/json":{"example":{"error":{"code":"guest_link_limit_reached","message":"You already have 25 active links for this community.","request_id":"b1c2…"}}}}},"422":{"description":"Bad link type, gate, window, or use count.","content":{"application/json":{"example":{"error":{"code":"invalid_guest_link","message":"One or more of the selected gates is not available for this link type","request_id":"b1c2…"}}}}},"403":{"description":"This API key is not bound to a community (`not_community_key`), or its manager no longer has API access to the community (`api_access_revoked`: removed as a manager, API access blocked for the community, or the permission withdrawn). The key itself stays valid and works again if that access is restored.","content":{"application/json":{"example":{"error":{"code":"not_community_key","message":"This API key is not bound to a community","request_id":"b1c2…"}}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"example":{"error":{"code":"unauthorized","message":"Invalid API key","request_id":"b1c2…"}}}}},"429":{"description":"Rate limit exceeded — see Retry-After.","content":{"application/json":{"example":{"error":{"code":"rate_limited","message":"Too many requests","request_id":"b1c2…"}}}}}},"security":[{"bearerAuth":[]}]}},"/v1/community/guest-links/{guest_link_id}":{"delete":{"tags":["Community · Guest Links"],"summary":"Revoke a guest link","description":"Kill a guest link. **Terminal — there is no un-revoke**; mint a new link\ninstead. Revoking an already-revoked link is a no-op success.\n\nThe id must belong to this key's community. One that does not is a 404,\nidentical to an unknown id — an API key cannot probe another community's\nids.\n\nTest mode: reports what it would have revoked and leaves the link live.","operationId":"revoke_guest_link_v1_community_guest_links__guest_link_id__delete","parameters":[{"name":"guest_link_id","in":"path","required":true,"schema":{"type":"string","title":"Guest Link Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Revoked (live) or validated (test).","content":{"application/json":{"schema":{},"example":{"result":"ok","guest_link":{"guest_link_id":4417,"link_type":"limited_use","state":"revoked","title":"Booking 8841 — Unit 4","subtitle":"Front gate access","community_id":2585,"key_id":"k1a2…","key_name":"Main Entrance","created_by_cm":true,"created_by_account_id":"a1b2…","created_by_name":"Dana Lee","max_uses":6,"uses_consumed":2,"expires_at":"2026-08-25T11:00:00+00:00","revoked":true,"revoked_datetime":"2026-08-20T10:00:00+00:00","notify_on_use":false,"created_at":"2026-08-18T09:15:00+00:00","latches":[{"latch_id":"l1…","latch_name":"Main Entrance"}],"last_used_at":"2026-08-19T14:02:11+00:00","total_opens":2,"token":"Q1w2E3r4T5y6U7i8O9p0aA","url":"https://d.nimbio.com/l/Q1w2E3r4T5y6U7i8O9p0aA"},"request_id":"b1c2…"}}}},"404":{"description":"No such guest link on this community.","content":{"application/json":{"example":{"error":{"code":"guest_link_not_found","message":"Guest link not found for this community","request_id":"b1c2…"}}}}},"403":{"description":"This API key is not bound to a community (`not_community_key`), or its manager no longer has API access to the community (`api_access_revoked`: removed as a manager, API access blocked for the community, or the permission withdrawn). The key itself stays valid and works again if that access is restored.","content":{"application/json":{"example":{"error":{"code":"not_community_key","message":"This API key is not bound to a community","request_id":"b1c2…"}}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"example":{"error":{"code":"unauthorized","message":"Invalid API key","request_id":"b1c2…"}}}}},"429":{"description":"Rate limit exceeded — see Retry-After.","content":{"application/json":{"example":{"error":{"code":"rate_limited","message":"Too many requests","request_id":"b1c2…"}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"bearerAuth":[]}]}},"/v1/community/access-codes/logs":{"get":{"tags":["Community · Access Codes"],"summary":"List access-code redemption attempts","description":"Every access-code entry attempt in the community, newest first.\n\n`limit` is clamped to 1-200 (default 50) and `offset` floored at 0.\n`result` names the outcome — `opened`, `code_not_found`, `code_disabled`,\n`code_expired`, `temporal_blocked`, `latch_not_assigned`, `open_failed`, …\n\n`code_entered_masked` is asterisks, never the typed digits: a successful\nattempt's entered code *is* a working PIN. Correlate a row to a code you\nminted through `directory_access_code_id`, which is set whenever the entry\nmatched an existing code. Rows carry the visitor's `client_ip` and the code\nowner's name — this is the community's own log, same as the CM portal's.","operationId":"list_access_code_logs_v1_community_access_codes_logs_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"If-None-Match","in":"header","required":false,"description":"The `ETag` from a previous response to this URL. If the representation has not changed you get `304 Not Modified` with no body — reuse your cached copy. A comma-separated list and `*` are both accepted.","schema":{"type":"string"},"example":"\"6f9a3c1e8b2d4f70a1c5e9b3d7f2a4c8\""}],"responses":{"200":{"description":"Redemption attempts, newest first. Entered codes are masked.","content":{"application/json":{"schema":{},"example":{"result":"ok","limit":50,"offset":0,"logs":[{"directory_access_code_log_id":9001,"directory_access_code_id":412,"code_entered_masked":"****","result":"opened","log_datetime":"2026-08-18T17:04:11+00:00","latch_id":"l1…","client_ip":"203.0.113.9","account_id":"a1…","owner_name":"Front Desk"}]}}},"headers":{"ETag":{"description":"Validator for this representation. Send it back as `If-None-Match` on the next poll.","schema":{"type":"string"}},"Cache-Control":{"description":"`private, no-cache`. `no-cache` means revalidate before reuse — not \"do not store\".","schema":{"type":"string"}}}},"403":{"description":"This API key is not bound to a community (`not_community_key`), or its manager no longer has API access to the community (`api_access_revoked`: removed as a manager, API access blocked for the community, or the permission withdrawn). The key itself stays valid and works again if that access is restored.","content":{"application/json":{"example":{"error":{"code":"not_community_key","message":"This API key is not bound to a community","request_id":"b1c2…"}}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"example":{"error":{"code":"unauthorized","message":"Invalid API key","request_id":"b1c2…"}}}}},"429":{"description":"Rate limit exceeded — see Retry-After.","content":{"application/json":{"example":{"error":{"code":"rate_limited","message":"Too many requests","request_id":"b1c2…"}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"304":{"description":"Not modified — your `If-None-Match` matched the current representation. No body. Does not consume monthly quota.","headers":{"ETag":{"description":"The unchanged validator.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]}]}},"/v1/community/access-codes/eligible-latches":{"get":{"tags":["Community · Access Codes"],"summary":"List gates access codes may open","description":"The gates a community manager has allowed access codes to open.\n\nEvery `latch_ids` entry you pass to create or update must appear here, or\nthe call is rejected with `invalid_latch`. This allowlist is set in the CM\nportal only — the API can read it, not change it. `feature_enabled` mirrors\nthe community's Directory Access Codes setting; when it is false, writes\nreturn 403 `access_codes_disabled`.","operationId":"list_access_code_eligible_latches_v1_community_access_codes_eligible_latches_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"If-None-Match","in":"header","required":false,"description":"The `ETag` from a previous response to this URL. If the representation has not changed you get `304 Not Modified` with no body — reuse your cached copy. A comma-separated list and `*` are both accepted.","schema":{"type":"string"},"example":"\"6f9a3c1e8b2d4f70a1c5e9b3d7f2a4c8\""}],"responses":{"200":{"description":"The CM's access-code gate allowlist.","content":{"application/json":{"schema":{},"example":{"result":"ok","feature_enabled":true,"latches":[{"latch_id":"l1…","latch_name":"Service Entrance"}]}}},"headers":{"ETag":{"description":"Validator for this representation. Send it back as `If-None-Match` on the next poll.","schema":{"type":"string"}},"Cache-Control":{"description":"`private, no-cache`. `no-cache` means revalidate before reuse — not \"do not store\".","schema":{"type":"string"}}}},"403":{"description":"This API key is not bound to a community (`not_community_key`), or its manager no longer has API access to the community (`api_access_revoked`: removed as a manager, API access blocked for the community, or the permission withdrawn). The key itself stays valid and works again if that access is restored.","content":{"application/json":{"example":{"error":{"code":"not_community_key","message":"This API key is not bound to a community","request_id":"b1c2…"}}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"example":{"error":{"code":"unauthorized","message":"Invalid API key","request_id":"b1c2…"}}}}},"429":{"description":"Rate limit exceeded — see Retry-After.","content":{"application/json":{"example":{"error":{"code":"rate_limited","message":"Too many requests","request_id":"b1c2…"}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"304":{"description":"Not modified — your `If-None-Match` matched the current representation. No body. Does not consume monthly quota.","headers":{"ETag":{"description":"The unchanged validator.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]}]}},"/v1/community/access-codes/mode":{"get":{"tags":["Community · Access Codes"],"summary":"Get the access-code mode","description":"Which of the two access-code systems the community runs, and what a\nswitch would cost.\n\n* `per_member` — the default. A visitor at the GuestView directory finds\n  the member they are visiting, taps the lock on that row and types that\n  member's code. Codes are unique *per member*, so two members may hold\n  the same digits.\n* `single_entry` — one \"Enter access code\" field for the whole community,\n  no member picking. Every member carries a 3-letter **preamble** (A-Z,\n  derived from their name, unique within the community) and the visitor\n  types preamble followed by code, e.g. `ESM481502`. Codes minted through\n  this API carry the key owner's preamble; the list and create responses\n  report it, and `POST` returns the full `entry_code` once.\n\n`flip_preview` is a read-only dry run of `PUT /v1/community/access-codes/mode`\nto the *other* mode: `codes_to_delete` — **every** code in the community\ngoes, residents' own included, because the strings change meaning;\n`members_affected` — how many members lose at least one code and will be\nnotified; `members_to_assign_preamble` — how many members would be given\na preamble (zero when switching back to `per_member`). Read this before\nyou flip, so you can show the cost to a human first.\n\nThe mode is configuration, not a feature: it can be read (and switched)\nwhile the community's Directory Access Codes feature is off, which is how\na manager picks the system before turning codes on.","operationId":"get_access_code_mode_v1_community_access_codes_mode_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"If-None-Match","in":"header","required":false,"description":"The `ETag` from a previous response to this URL. If the representation has not changed you get `304 Not Modified` with no body — reuse your cached copy. A comma-separated list and `*` are both accepted.","schema":{"type":"string"},"example":"\"6f9a3c1e8b2d4f70a1c5e9b3d7f2a4c8\""}],"responses":{"200":{"description":"The mode in force, plus what switching to the other one would do.","content":{"application/json":{"schema":{},"example":{"result":"ok","mode":"per_member","flip_preview":{"new_mode":"single_entry","codes_to_delete":14,"members_affected":9,"members_to_assign_preamble":112}}}},"headers":{"ETag":{"description":"Validator for this representation. Send it back as `If-None-Match` on the next poll.","schema":{"type":"string"}},"Cache-Control":{"description":"`private, no-cache`. `no-cache` means revalidate before reuse — not \"do not store\".","schema":{"type":"string"}}}},"404":{"description":"The single-entry access-code system is not released for this community yet. Feature-detect on the `access_code_mode` capability in `GET /v1/me` rather than probing this route.","content":{"application/json":{"example":{"error":{"code":"feature_not_enabled","message":"This feature is not enabled.","request_id":"b1c2…"}}}}},"403":{"description":"This API key is not bound to a community (`not_community_key`), or its manager no longer has API access to the community (`api_access_revoked`: removed as a manager, API access blocked for the community, or the permission withdrawn). The key itself stays valid and works again if that access is restored.","content":{"application/json":{"example":{"error":{"code":"not_community_key","message":"This API key is not bound to a community","request_id":"b1c2…"}}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"example":{"error":{"code":"unauthorized","message":"Invalid API key","request_id":"b1c2…"}}}}},"429":{"description":"Rate limit exceeded — see Retry-After.","content":{"application/json":{"example":{"error":{"code":"rate_limited","message":"Too many requests","request_id":"b1c2…"}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"304":{"description":"Not modified — your `If-None-Match` matched the current representation. No body. Does not consume monthly quota.","headers":{"ETag":{"description":"The unchanged validator.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]}]},"put":{"tags":["Community · Access Codes"],"summary":"Switch the access-code mode","description":"Switch the community between `per_member` and `single_entry` codes.\n\n**This is destructive.** Switching in either direction deletes **every**\naccess code in the community — the ones this key minted, the ones other\nintegrations minted, and the ones residents made for themselves in the\napp — because a code's meaning changes with the mode (`481502` versus\n`ESM481502`). Every member who lost a code is notified by push and a\ncommunity-wide message explains the new system. Switching to\n`single_entry` also assigns a preamble to every member who lacks one.\nRedemption log rows are kept.\n\nSo the call is a two-step handshake, the same one the NFC-tag writes use:\n\n1. Send `{\"mode\": \"single_entry\"}`. If the community is already in that\n   mode you get `200` with `changed: false` and nothing happens. Otherwise\n   you get **`409 requires_confirmation`** and `error.preview` — the same\n   counts as `GET /v1/community/access-codes/mode` reports — and, again,\n   nothing happens.\n2. Show the preview to a human, then re-send with `\"confirm\": true`. The\n   live response reports `deleted_codes` and `notified_members`.\n\n`confirm` is only honoured as the JSON boolean `true`; a string is not.\nA caller that always sends `confirm: true` has opted out of the safety\nnet — do that only behind your own confirmation step.\n\n`mode` is also reported, read-only, as `read_only.access_code_mode` in\n`GET /v1/community/settings`; sending it to `PATCH /v1/community/settings`\nis refused with 422, precisely so a generic settings write can never wipe\nevery code by accident.\n\nThe mode can be switched while the Directory Access Codes feature is off\n(there is nothing to delete then, and it lets you pick the system before\nenabling codes) — this endpoint does not answer `access_codes_disabled`.\n\n**Test mode** (`nimbio_test_…`): the 409 handshake runs exactly as above,\nand `confirm: true` then answers `{\"result\": \"simulated\", \"would_change\":\n{...}}` — the same preview — without deleting or notifying anything,\nunless the community is already in that mode, which answers `result: ok`,\n`changed: false` exactly as a live key would.","operationId":"set_access_code_mode_v1_community_access_codes_mode_put","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body","properties":{"mode":{"type":"string","enum":["per_member","single_entry"],"description":"The system to switch to."},"confirm":{"type":"boolean","description":"Must be true to actually switch. Without it the call answers 409 with a preview of what the flip would delete, and changes nothing."}},"required":["mode"]},"example":{"mode":"single_entry","confirm":true}}},"required":false},"responses":{"200":{"description":"Switched (live), already in that mode (`changed: false`, nothing deleted), or validated (test: `result: simulated` with `would_change`).","content":{"application/json":{"schema":{},"example":{"result":"ok","mode":"single_entry","changed":true,"deleted_codes":14,"notified_members":9,"request_id":"b1c2…"}}}},"400":{"description":"`mode` missing or not a string.","content":{"application/json":{"example":{"error":{"code":"missing_fields","message":"'mode' (string) is required: per_member or single_entry","request_id":"b1c2…"}}}}},"409":{"description":"The switch would delete codes and `confirm` was not true. Nothing changed; `preview` says what will. Repeat with `confirm: true`.","content":{"application/json":{"example":{"error":{"code":"requires_confirmation","message":"Switching access code mode deletes every existing access code in the community and notifies the affected members. Re-send with confirm: true.","preview":{"mode":"per_member","new_mode":"single_entry","codes_to_delete":14,"members_affected":9,"members_to_assign_preamble":112},"request_id":"b1c2…"}}}}},"422":{"description":"Not one of the two modes.","content":{"application/json":{"example":{"error":{"code":"invalid_mode","message":"Unknown access code mode 'keypad'; expected per_member or single_entry","request_id":"b1c2…"}}}}},"404":{"description":"The single-entry access-code system is not released for this community yet. Feature-detect on the `access_code_mode` capability in `GET /v1/me` rather than probing this route.","content":{"application/json":{"example":{"error":{"code":"feature_not_enabled","message":"This feature is not enabled.","request_id":"b1c2…"}}}}},"403":{"description":"This API key is not bound to a community (`not_community_key`), or its manager no longer has API access to the community (`api_access_revoked`: removed as a manager, API access blocked for the community, or the permission withdrawn). The key itself stays valid and works again if that access is restored.","content":{"application/json":{"example":{"error":{"code":"not_community_key","message":"This API key is not bound to a community","request_id":"b1c2…"}}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"example":{"error":{"code":"unauthorized","message":"Invalid API key","request_id":"b1c2…"}}}}},"429":{"description":"Rate limit exceeded — see Retry-After.","content":{"application/json":{"example":{"error":{"code":"rate_limited","message":"Too many requests","request_id":"b1c2…"}}}}}},"security":[{"bearerAuth":[]}]}},"/v1/community/access-codes":{"get":{"tags":["Community · Access Codes"],"summary":"List access codes","description":"Every access code in the community — including codes residents made\nthemselves, matching what the CM portal shows.\n\n**The PIN is never returned here.** `code_masked` is a run of asterisks and\n`code_length` its length; the cleartext code is returned exactly once, by\n`POST /v1/community/access-codes`. If you lose a PIN, delete the code and\ncreate a new one — there is no way to read it back.\n\n`api_managed` is true for the codes this API key created. Those are the\nonly ones `PATCH` and `DELETE` will touch; anything else answers 404.\n\n`access_code_mode` says which system the community runs (see\n`GET /v1/community/access-codes/mode`). In `single_entry` mode each row\nalso carries the owner's 3-letter `preamble` and `entry_code_masked` — the\npreamble in clear, the code masked (`ESM******`) — which is what the\nvisitor types. In `per_member` mode both keys are present and null.","operationId":"list_access_codes_v1_community_access_codes_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"If-None-Match","in":"header","required":false,"description":"The `ETag` from a previous response to this URL. If the representation has not changed you get `304 Not Modified` with no body — reuse your cached copy. A comma-separated list and `*` are both accepted.","schema":{"type":"string"},"example":"\"6f9a3c1e8b2d4f70a1c5e9b3d7f2a4c8\""}],"responses":{"200":{"description":"The community's access codes. PINs are always masked.","content":{"application/json":{"schema":{},"example":{"result":"ok","feature_enabled":true,"access_code_mode":"single_entry","access_codes":[{"directory_access_code_id":412,"code_masked":"******","code_length":6,"disabled":false,"expires_at":"2026-08-19T17:00:00+00:00","has_schedule":false,"created_at":"2026-08-18T16:12:00+00:00","account_id":"a1…","owner_name":"Front Desk","api_managed":true,"preamble":"ESM","entry_code_masked":"ESM******","latch_ids":["l1…"],"latches":[{"id":"l1…","name":"Service Entrance"}]}]}}},"headers":{"ETag":{"description":"Validator for this representation. Send it back as `If-None-Match` on the next poll.","schema":{"type":"string"}},"Cache-Control":{"description":"`private, no-cache`. `no-cache` means revalidate before reuse — not \"do not store\".","schema":{"type":"string"}}}},"403":{"description":"This API key is not bound to a community (`not_community_key`), or its manager no longer has API access to the community (`api_access_revoked`: removed as a manager, API access blocked for the community, or the permission withdrawn). The key itself stays valid and works again if that access is restored.","content":{"application/json":{"example":{"error":{"code":"not_community_key","message":"This API key is not bound to a community","request_id":"b1c2…"}}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"example":{"error":{"code":"unauthorized","message":"Invalid API key","request_id":"b1c2…"}}}}},"429":{"description":"Rate limit exceeded — see Retry-After.","content":{"application/json":{"example":{"error":{"code":"rate_limited","message":"Too many requests","request_id":"b1c2…"}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"304":{"description":"Not modified — your `If-None-Match` matched the current representation. No body. Does not consume monthly quota.","headers":{"ETag":{"description":"The unchanged validator.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]}]},"post":{"tags":["Community · Access Codes"],"summary":"Create an access code","description":"Mint a keypad / GuestView PIN on the key's community.\n\n**The PIN comes back exactly once — in this response.** Deliver it to the\nvisitor now; no later call will reveal it.\n\nWhat the visitor types depends on the community's access-code mode\n(`GET /v1/community/access-codes/mode`). In `per_member` mode it is `code`\nas given, after picking the code owner in the GuestView directory. In\n`single_entry` mode it is `entry_code` — the key owner's 3-letter\n`preamble` followed by the code, e.g. `ESM481502` — typed into the\ncommunity's single entry field. Hand the visitor `entry_code` in that\nmode, not `code`; it too is returned only here.\n\nThree independent limits, which do different things:\n\n* `expires_in_hours` / `expires_in_days` — **mutually exclusive**; passing\n  both is a 422. Either sets one absolute cutoff, computed **in UTC from\n  the moment of this call**. After it passes the code is dead.\n* `temporal` — a **recurring weekly window** (e.g. weekdays 09:00-17:00).\n  It is evaluated in the **gate's own local timezone** at redemption, not\n  UTC and not the caller's timezone. It never expires on its own.\n\nA code may carry both, and then must satisfy both: inside the weekly window\n*and* before the cutoff. Omitting both makes a code that works until it is\ndisabled or deleted.\n\n`latch_ids` must all be on the community's access-code allowlist\n(`/v1/community/access-codes/eligible-latches`) and must all be openable by\na single community key — if no one key covers them, split them across two\ncodes (422 `no_key_for_latches`).\n\n**Test mode** (`nimbio_test_…`): every rule above is validated and then\n*nothing is stored*. A test key can never leave a working PIN on a real\ngate, so the response is `{\"result\": \"simulated\"}` with no code id.","operationId":"create_access_code_v1_community_access_codes_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body","properties":{"code":{"type":"string","description":"The PIN. Letters and digits only, 4-50 characters. Matched case-insensitively, spaces ignored."},"latch_ids":{"type":"array","items":{"type":"string"},"description":"Gates this code opens. Each must appear in /v1/community/access-codes/eligible-latches."},"expires_in_hours":{"type":"integer","description":"Absolute cutoff, 1-8760 hours from now (UTC)."},"expires_in_days":{"type":"integer","description":"Absolute cutoff, 1-365 days from now (UTC). Mutually exclusive with expires_in_hours."},"temporal":{"type":"object","description":"Recurring weekly window, checked in the GATE's local timezone. Independent of the cutoff.","properties":{"days_of_the_week":{"type":"string","description":"Letters from MTWHFSU"},"start":{"type":"string","description":"HH:MM"},"end":{"type":"string","description":"HH:MM"},"recurring_week":{"type":"integer","description":"1 = every week, 2 = every other"}}}},"required":["code","latch_ids"]},"example":{"code":"481502","latch_ids":["l1…"],"expires_in_hours":4}}},"required":false},"responses":{"200":{"description":"Created (live) — the PIN is returned ONCE — or validated (test).","content":{"application/json":{"schema":{},"example":{"result":"ok","access_code":{"directory_access_code_id":412,"code":"481502","code_normalized":"481502","preamble":"ESM","entry_code":"ESM481502","latch_ids":["l1…"],"key_id":"k1…","account_id":"a1…"},"request_id":"b1c2…"}}}},"409":{"description":"This key already has a code with this value in this community.","content":{"application/json":{"example":{"error":{"code":"duplicate_code","message":"You already have a code with this value in this community","request_id":"b1c2…"}}}}},"422":{"description":"Bad PIN, gate, or expiry.","content":{"application/json":{"example":{"error":{"code":"invalid_code","message":"code must be at least 4 characters","request_id":"b1c2…"}}}}},"403":{"description":"This API key is not bound to a community (`not_community_key`), or its manager no longer has API access to the community (`api_access_revoked`: removed as a manager, API access blocked for the community, or the permission withdrawn). The key itself stays valid and works again if that access is restored.","content":{"application/json":{"example":{"error":{"code":"not_community_key","message":"This API key is not bound to a community","request_id":"b1c2…"}}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"example":{"error":{"code":"unauthorized","message":"Invalid API key","request_id":"b1c2…"}}}}},"429":{"description":"Rate limit exceeded — see Retry-After.","content":{"application/json":{"example":{"error":{"code":"rate_limited","message":"Too many requests","request_id":"b1c2…"}}}}}},"security":[{"bearerAuth":[]}]}},"/v1/community/access-codes/{directory_access_code_id}":{"patch":{"tags":["Community · Access Codes"],"summary":"Update an access code","description":"Change a code **this key created**: switch it off after the visit\n(`disabled: true`), re-point it at different gates, push out its cutoff, or\nreplace its weekly window.\n\nA code created by a resident in the app, or one belonging to another\ncommunity, answers 404 — this endpoint does not reach either. Use the CM\nportal for a resident's own PIN.\n\nThe PIN itself cannot be changed; delete the code and create a new one.\nOmitted fields are left as they are, and there is no way to *clear* an\nexisting cutoff or weekly window — to stop a code working, disable or\ndelete it. Sending an empty body is a 400.\n\nExpiry and `temporal` mean exactly what they mean on create: a UTC cutoff\nrecomputed from *now*, and a recurring window evaluated in the gate's local\ntimezone. Test mode validates and changes nothing.","operationId":"update_access_code_v1_community_access_codes__directory_access_code_id__patch","parameters":[{"name":"directory_access_code_id","in":"path","required":true,"schema":{"type":"string","title":"Directory Access Code Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body","properties":{"disabled":{"type":"boolean","description":"true switches the PIN off, false switches it back on"},"latch_ids":{"type":"array","items":{"type":"string"}},"expires_in_hours":{"type":"integer","description":"New cutoff, measured from now"},"expires_in_days":{"type":"integer"},"temporal":{"type":"object","description":"Replaces the recurring weekly window"}}},"example":{"disabled":true}}},"required":false},"responses":{"200":{"description":"Updated (live) or validated (test).","content":{"application/json":{"schema":{},"example":{"result":"ok","access_code":{"directory_access_code_id":412,"disabled":true},"request_id":"b1c2…"}}}},"404":{"description":"No such code, or not one this key created.","content":{"application/json":{"example":{"error":{"code":"access_code_not_found","message":"Access code not found","request_id":"b1c2…"}}}}},"422":{"description":"Bad gate or expiry.","content":{"application/json":{"example":{"error":{"code":"invalid_expiry","message":"Pass at most one of expires_in_hours / expires_in_days","request_id":"b1c2…"}}}}},"403":{"description":"This API key is not bound to a community (`not_community_key`), or its manager no longer has API access to the community (`api_access_revoked`: removed as a manager, API access blocked for the community, or the permission withdrawn). The key itself stays valid and works again if that access is restored.","content":{"application/json":{"example":{"error":{"code":"not_community_key","message":"This API key is not bound to a community","request_id":"b1c2…"}}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"example":{"error":{"code":"unauthorized","message":"Invalid API key","request_id":"b1c2…"}}}}},"429":{"description":"Rate limit exceeded — see Retry-After.","content":{"application/json":{"example":{"error":{"code":"rate_limited","message":"Too many requests","request_id":"b1c2…"}}}}}},"security":[{"bearerAuth":[]}]},"delete":{"tags":["Community · Access Codes"],"summary":"Delete an access code","description":"Delete a code **this key created**. The PIN stops working immediately\nand its gate assignments go with it; the redemption log rows stay, so the\nhistory of who came through is preserved.\n\nA resident's code, or a code in another community, answers 404. Test mode\nvalidates and deletes nothing.","operationId":"delete_access_code_v1_community_access_codes__directory_access_code_id__delete","parameters":[{"name":"directory_access_code_id","in":"path","required":true,"schema":{"type":"string","title":"Directory Access Code Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Deleted (live) or validated (test).","content":{"application/json":{"schema":{},"example":{"result":"ok","directory_access_code_id":412,"request_id":"b1c2…"}}}},"404":{"description":"No such code, or not one this key created.","content":{"application/json":{"example":{"error":{"code":"access_code_not_found","message":"Access code not found","request_id":"b1c2…"}}}}},"403":{"description":"This API key is not bound to a community (`not_community_key`), or its manager no longer has API access to the community (`api_access_revoked`: removed as a manager, API access blocked for the community, or the permission withdrawn). The key itself stays valid and works again if that access is restored.","content":{"application/json":{"example":{"error":{"code":"not_community_key","message":"This API key is not bound to a community","request_id":"b1c2…"}}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"example":{"error":{"code":"unauthorized","message":"Invalid API key","request_id":"b1c2…"}}}}},"429":{"description":"Rate limit exceeded — see Retry-After.","content":{"application/json":{"example":{"error":{"code":"rate_limited","message":"Too many requests","request_id":"b1c2…"}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"bearerAuth":[]}]}},"/v1/community/guest-view-entry":{"get":{"tags":["Community · GuestView Entry"],"summary":"Read GuestView Entry settings","description":"The complete GuestView Entry configuration in one read.\n\n- `allowed` — the community master switch.\n- `eligible_latches` — the gates a visitor may open. Nothing outside this\n  set is reachable via GuestView Entry, whatever the schedule says.\n- `schedule` — the recurring windows. **Each window is evaluated in its\n  latch's own local timezone**, not UTC and not yours. A latch with NO\n  windows is available to guests at any hour; the first window you add is\n  what starts restricting it.\n- `directory_viewing_enabled` — read-only context: whether the GuestView\n  *directory listing* is on. That is a separate feature; guest entry does\n  not require it.\n\nQuota-exempt (the per-minute limit still applies).","operationId":"get_guest_view_entry_v1_community_guest_view_entry_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"If-None-Match","in":"header","required":false,"description":"The `ETag` from a previous response to this URL. If the representation has not changed you get `304 Not Modified` with no body — reuse your cached copy. A comma-separated list and `*` are both accepted.","schema":{"type":"string"},"example":"\"6f9a3c1e8b2d4f70a1c5e9b3d7f2a4c8\""}],"responses":{"200":{"description":"The master switch, the covered gates, and every schedule window.","content":{"application/json":{"schema":{},"example":{"result":"ok","guest_view_entry":{"allowed":true,"directory_viewing_enabled":true,"eligible_latches":[{"latch_id":"3f2a…","latch_name":"Front Gate"}],"schedule":[{"schedule_id":41,"latch_id":"3f2a…","latch_name":"Front Gate","days_of_the_week":"MTWHF","start_time":"09:00","end_time":"17:00"}],"schedule_timezone":"latch_local"}}}},"headers":{"ETag":{"description":"Validator for this representation. Send it back as `If-None-Match` on the next poll.","schema":{"type":"string"}},"Cache-Control":{"description":"`private, no-cache`. `no-cache` means revalidate before reuse — not \"do not store\".","schema":{"type":"string"}}}},"403":{"description":"This API key is not bound to a community (`not_community_key`), or its manager no longer has API access to the community (`api_access_revoked`: removed as a manager, API access blocked for the community, or the permission withdrawn). The key itself stays valid and works again if that access is restored.","content":{"application/json":{"example":{"error":{"code":"not_community_key","message":"This API key is not bound to a community","request_id":"b1c2…"}}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"example":{"error":{"code":"unauthorized","message":"Invalid API key","request_id":"b1c2…"}}}}},"429":{"description":"Rate limit exceeded — see Retry-After.","content":{"application/json":{"example":{"error":{"code":"rate_limited","message":"Too many requests","request_id":"b1c2…"}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"304":{"description":"Not modified — your `If-None-Match` matched the current representation. No body. Does not consume monthly quota.","headers":{"ETag":{"description":"The unchanged validator.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]}]},"put":{"tags":["Community · GuestView Entry"],"summary":"Turn GuestView Entry on or off","description":"Permit or forbid GuestView Entry for the community.\n\nAn explicit setter, deliberately not a toggle: this endpoint is retryable,\nand a retried toggle would flip a gate's guest access back open. Sending\nthe value it already has is a successful no-op.\n\nTurning it off leaves the eligible-latch set and the schedule intact, so\nturning it back on restores the same configuration. Returns the full\nupdated settings, so no follow-up GET is needed. Test-mode keys validate\nand report but change nothing.","operationId":"set_guest_view_entry_allowed_v1_community_guest_view_entry_put","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body","properties":{"allowed":{"type":"boolean","description":"true permits GuestView Entry, false forbids it. An explicit setter, never a toggle."}},"required":["allowed"]},"example":{"allowed":true}}},"required":true},"responses":{"200":{"description":"Updated (live) or validated (test).","content":{"application/json":{"schema":{},"example":{"result":"ok","guest_view_entry":{"allowed":true,"directory_viewing_enabled":true,"eligible_latches":[{"latch_id":"3f2a…","latch_name":"Front Gate"}],"schedule":[{"schedule_id":41,"latch_id":"3f2a…","latch_name":"Front Gate","days_of_the_week":"MTWHF","start_time":"09:00","end_time":"17:00"}],"schedule_timezone":"latch_local"},"request_id":"b1c2…"}}}},"403":{"description":"This API key is not bound to a community (`not_community_key`), or its manager no longer has API access to the community (`api_access_revoked`: removed as a manager, API access blocked for the community, or the permission withdrawn). The key itself stays valid and works again if that access is restored.","content":{"application/json":{"example":{"error":{"code":"not_community_key","message":"This API key is not bound to a community","request_id":"b1c2…"}}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"example":{"error":{"code":"unauthorized","message":"Invalid API key","request_id":"b1c2…"}}}}},"429":{"description":"Rate limit exceeded — see Retry-After.","content":{"application/json":{"example":{"error":{"code":"rate_limited","message":"Too many requests","request_id":"b1c2…"}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"bearerAuth":[]}]}},"/v1/community/guest-view-entry/eligible-latches":{"put":{"tags":["Community · GuestView Entry"],"summary":"Replace the gates GuestView Entry covers","description":"Set which gates a GuestView visitor may open.\n\n**This REPLACES the whole set** — that is why it is a PUT. Send the\ncomplete list every time: any currently-eligible latch you leave out loses\nguest eligibility, and **its schedule windows are deleted along with it**\n(an ineligible latch never opens, so its windows would be dead rows).\nSending `[]` removes GuestView Entry from every gate. A caller that sends\na partial list silently removes the latches it omitted.\n\nEvery id must belong to this key's community; a foreign latch is a 404 and\nnothing is written. Requires GuestView Entry to be switched on (403\n`guest_view_entry_disabled` otherwise). Returns the full updated settings.\nTest-mode keys validate and report but change nothing.","operationId":"set_guest_view_entry_eligible_latches_v1_community_guest_view_entry_eligible_latches_put","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body","properties":{"latch_ids":{"type":"array","items":{"type":"string"},"description":"The COMPLETE set of latches guests may open. Any latch you omit loses guest eligibility, and its schedule windows are deleted with it."}},"required":["latch_ids"]},"example":{"latch_ids":["{{latch_id}}"]}}},"required":true},"responses":{"200":{"description":"Replaced (live) or validated (test).","content":{"application/json":{"schema":{},"example":{"result":"ok","guest_view_entry":{"allowed":true,"directory_viewing_enabled":true,"eligible_latches":[{"latch_id":"3f2a…","latch_name":"Front Gate"}],"schedule":[{"schedule_id":41,"latch_id":"3f2a…","latch_name":"Front Gate","days_of_the_week":"MTWHF","start_time":"09:00","end_time":"17:00"}],"schedule_timezone":"latch_local"},"request_id":"b1c2…"}}}},"404":{"description":"A latch id does not belong to this community.","content":{"application/json":{"example":{"error":{"code":"latch_not_found","message":"Latch not found in this community: 3f2a…","request_id":"b1c2…"}}}}},"403":{"description":"This API key is not bound to a community (`not_community_key`), or its manager no longer has API access to the community (`api_access_revoked`: removed as a manager, API access blocked for the community, or the permission withdrawn). The key itself stays valid and works again if that access is restored.","content":{"application/json":{"example":{"error":{"code":"not_community_key","message":"This API key is not bound to a community","request_id":"b1c2…"}}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"example":{"error":{"code":"unauthorized","message":"Invalid API key","request_id":"b1c2…"}}}}},"429":{"description":"Rate limit exceeded — see Retry-After.","content":{"application/json":{"example":{"error":{"code":"rate_limited","message":"Too many requests","request_id":"b1c2…"}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"bearerAuth":[]}]}},"/v1/community/guest-view-entry/schedule":{"post":{"tags":["Community · GuestView Entry"],"summary":"Add a GuestView Entry window","description":"Add one recurring window during which GuestView Entry is permitted.\n\n**Timezone: the window is evaluated in each LATCH's own local timezone**,\nat the moment a visitor taps open — never UTC, never the caller's, never\nthe community's. `09:00`–`17:00` on a latch in Los Angeles means 9-to-5\nPacific, and the same window applied to a latch in New York means 9-to-5\nEastern. This is the same rule hold-open windows and quiet hours follow.\nA latch whose timezone cannot be resolved skips the window check and stays\navailable around the clock.\n\n`days_of_the_week` is a string of `MTWHFSU` letters — **H is tHursday and\nU is sUnday** — with no repeats and at least one day. `start_time` and\n`end_time` are `'HH:MM'` 24-hour strings between `00:00` and `23:59`, or\nnull for an unbounded end. An `end_time` earlier than `start_time` wraps\npast midnight, and the days name the day the window **starts**.\n\nThe window is applied to every latch in `latch_ids` and stored as one row\nper latch, so each gets its own `schedule_id`. Those latches must already\nbe eligible (`PUT eligible-latches` first) — 422 `latch_not_eligible`\notherwise; a latch outside the community is a 404.\n\nRemember a latch with **no** windows is available to guests at any hour;\nadding the first window is what starts restricting it. Returns the full\nupdated settings. Test-mode keys validate and report but change nothing.","operationId":"add_guest_view_entry_schedule_v1_community_guest_view_entry_schedule_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body","properties":{"latch_ids":{"type":"array","items":{"type":"string"},"description":"Already-eligible latches this window applies to. Stored as one window per latch."},"days_of_the_week":{"type":"string","description":"Letters from MTWHFSU, no repeats (H = tHursday, U = sUnday). At least one."},"start_time":{"type":"string","description":"'HH:MM' 24-hour, 00:00–23:59, or null for no start bound. LATCH-LOCAL time."},"end_time":{"type":"string","description":"'HH:MM' 24-hour, 00:00–23:59, or null for no end bound. LATCH-LOCAL time. An end earlier than the start wraps past midnight."}},"required":["latch_ids","days_of_the_week"]},"example":{"latch_ids":["{{latch_id}}"],"days_of_the_week":"MTWHF","start_time":"09:00","end_time":"17:00"}}},"required":true},"responses":{"200":{"description":"Added (live) or validated (test); `created_schedule_ids` names the new rows.","content":{"application/json":{"schema":{},"example":{"result":"ok","guest_view_entry":{"allowed":true,"directory_viewing_enabled":true,"eligible_latches":[{"latch_id":"3f2a…","latch_name":"Front Gate"}],"schedule":[{"schedule_id":41,"latch_id":"3f2a…","latch_name":"Front Gate","days_of_the_week":"MTWHF","start_time":"09:00","end_time":"17:00"}],"schedule_timezone":"latch_local"},"created_schedule_ids":[41],"request_id":"b1c2…"}}}},"404":{"description":"A latch id does not belong to this community.","content":{"application/json":{"example":{"error":{"code":"latch_not_found","message":"Latch not found in this community: 3f2a…","request_id":"b1c2…"}}}}},"422":{"description":"Malformed days or times.","content":{"application/json":{"example":{"error":{"code":"invalid_days","message":"'days_of_the_week' may only contain MTWHFSU (H = tHursday, U = sUnday)","request_id":"b1c2…"}}}}},"403":{"description":"This API key is not bound to a community (`not_community_key`), or its manager no longer has API access to the community (`api_access_revoked`: removed as a manager, API access blocked for the community, or the permission withdrawn). The key itself stays valid and works again if that access is restored.","content":{"application/json":{"example":{"error":{"code":"not_community_key","message":"This API key is not bound to a community","request_id":"b1c2…"}}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"example":{"error":{"code":"unauthorized","message":"Invalid API key","request_id":"b1c2…"}}}}},"429":{"description":"Rate limit exceeded — see Retry-After.","content":{"application/json":{"example":{"error":{"code":"rate_limited","message":"Too many requests","request_id":"b1c2…"}}}}}},"security":[{"bearerAuth":[]}]}},"/v1/community/guest-view-entry/schedule/{schedule_id}":{"delete":{"tags":["Community · GuestView Entry"],"summary":"Remove a GuestView Entry window","description":"Delete one GuestView Entry window, by the `schedule_id` from the\nsettings read.\n\n**Removing a window widens access**, and removing a latch's *last* window\nmakes that gate available to guests at any hour — the schedule is a\nwhitelist of permitted times, not a blacklist. Treat this like any other\npermission-widening write.\n\n**Timezone reminder:** the windows you are choosing between are evaluated\nin each latch's own local timezone, so read the settings first and delete\nby id rather than reasoning about times in your own zone.\n\nAn id belonging to another community is a 404 and nothing is deleted.\nReturns the full updated settings. Test-mode keys validate and report but\nchange nothing.","operationId":"remove_guest_view_entry_schedule_v1_community_guest_view_entry_schedule__schedule_id__delete","parameters":[{"name":"schedule_id","in":"path","required":true,"schema":{"type":"string","title":"Schedule Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Removed (live) or validated (test).","content":{"application/json":{"schema":{},"example":{"result":"ok","guest_view_entry":{"allowed":true,"directory_viewing_enabled":true,"eligible_latches":[{"latch_id":"3f2a…","latch_name":"Front Gate"}],"schedule":[{"schedule_id":41,"latch_id":"3f2a…","latch_name":"Front Gate","days_of_the_week":"MTWHF","start_time":"09:00","end_time":"17:00"}],"schedule_timezone":"latch_local"},"removed_schedule_id":41,"request_id":"b1c2…"}}}},"404":{"description":"No such window on this community.","content":{"application/json":{"example":{"error":{"code":"schedule_not_found","message":"No GuestView Entry schedule window 41 in this community","request_id":"b1c2…"}}}}},"403":{"description":"This API key is not bound to a community (`not_community_key`), or its manager no longer has API access to the community (`api_access_revoked`: removed as a manager, API access blocked for the community, or the permission withdrawn). The key itself stays valid and works again if that access is restored.","content":{"application/json":{"example":{"error":{"code":"not_community_key","message":"This API key is not bound to a community","request_id":"b1c2…"}}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"example":{"error":{"code":"unauthorized","message":"Invalid API key","request_id":"b1c2…"}}}}},"429":{"description":"Rate limit exceeded — see Retry-After.","content":{"application/json":{"example":{"error":{"code":"rate_limited","message":"Too many requests","request_id":"b1c2…"}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"bearerAuth":[]}]}},"/v1/community/guest-view-entry/logs":{"get":{"tags":["Community · GuestView Entry"],"summary":"Read GuestView Entry attempts","description":"Every GuestView Entry attempt on this community, newest first.\n\n**These rows identify visitors**: name, phone number and client IP of the\nperson who stood at the gate, alongside the result (`opened`, or a failure\nreason such as `outside_schedule`, `latch_not_eligible`, `rate_limited`,\n`scan_required`). Handle and retain them accordingly.\n\n`limit` is clamped to 1–200 (default 50) and `offset` floors at 0;\n`has_more` is true when the page came back full. Readable whether or not\nGuestView Entry is currently switched on, so history survives the feature\nbeing turned off. Quota-exempt (the per-minute limit still applies).","operationId":"get_guest_view_entry_logs_v1_community_guest_view_entry_logs_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"description":"Rows per page, 1–200 (clamped server-side).","default":50,"title":"Limit"},"description":"Rows per page, 1–200 (clamped server-side)."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Rows to skip.","default":0,"title":"Offset"},"description":"Rows to skip."},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"true = opened only, false = failed attempts only, omitted = everything.","title":"Success"},"description":"true = opened only, false = failed attempts only, omitted = everything."},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"If-None-Match","in":"header","required":false,"description":"The `ETag` from a previous response to this URL. If the representation has not changed you get `304 Not Modified` with no body — reuse your cached copy. A comma-separated list and `*` are both accepted.","schema":{"type":"string"},"example":"\"6f9a3c1e8b2d4f70a1c5e9b3d7f2a4c8\""}],"responses":{"200":{"description":"Attempts, newest first. Rows identify the visitor.","content":{"application/json":{"schema":{},"example":{"result":"ok","logs":[{"guest_view_entry_log_id":918,"result":"opened","log_datetime":"2026-08-18T17:04:11+00:00","latch_id":"3f2a…","latch_name":"Front Gate","account_id":"a1b2…","phone":"+15551234567","first_name":"Dana","last_name":"Lee","client_ip":"203.0.113.9"}],"limit":50,"offset":0,"has_more":false}}},"headers":{"ETag":{"description":"Validator for this representation. Send it back as `If-None-Match` on the next poll.","schema":{"type":"string"}},"Cache-Control":{"description":"`private, no-cache`. `no-cache` means revalidate before reuse — not \"do not store\".","schema":{"type":"string"}}}},"403":{"description":"This API key is not bound to a community (`not_community_key`), or its manager no longer has API access to the community (`api_access_revoked`: removed as a manager, API access blocked for the community, or the permission withdrawn). The key itself stays valid and works again if that access is restored.","content":{"application/json":{"example":{"error":{"code":"not_community_key","message":"This API key is not bound to a community","request_id":"b1c2…"}}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"example":{"error":{"code":"unauthorized","message":"Invalid API key","request_id":"b1c2…"}}}}},"429":{"description":"Rate limit exceeded — see Retry-After.","content":{"application/json":{"example":{"error":{"code":"rate_limited","message":"Too many requests","request_id":"b1c2…"}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"304":{"description":"Not modified — your `If-None-Match` matched the current representation. No body. Does not consume monthly quota.","headers":{"ETag":{"description":"The unchanged validator.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]}]}},"/v1/community/short-codes":{"get":{"tags":["Community · Short Codes"],"summary":"List short codes","description":"Every GuestView short code assigned to your community.\n\nA short code is what a visitor types (or reaches via the QR on the placard)\nto open your community's guest directory and call a resident. Each entry\ncarries the `latch_id` it routes to plus the gate's `latch_name`, so you can\nrender or verify signage without a second lookup. `latch_id` is null for a\ncode that routes to the directory without preselecting a gate.\n\nCodes belonging to other communities are never listed here.","operationId":"list_short_codes_v1_community_short_codes_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"If-None-Match","in":"header","required":false,"description":"The `ETag` from a previous response to this URL. If the representation has not changed you get `304 Not Modified` with no body — reuse your cached copy. A comma-separated list and `*` are both accepted.","schema":{"type":"string"},"example":"\"6f9a3c1e8b2d4f70a1c5e9b3d7f2a4c8\""}],"responses":{"200":{"description":"The community's GuestView short codes, with the gate each routes to.","content":{"application/json":{"schema":{},"example":{"result":"ok","short_codes":[{"short_code":"Kp7Rx2Q","community_id":2585,"latch_id":"l1…","latch_name":"Main Entrance","disabled":false,"require_security_code":false,"created_at":"2026-08-18T17:04:11+00:00","last_updated_datetime":"2026-08-18T17:04:11+00:00"}]}}},"headers":{"ETag":{"description":"Validator for this representation. Send it back as `If-None-Match` on the next poll.","schema":{"type":"string"}},"Cache-Control":{"description":"`private, no-cache`. `no-cache` means revalidate before reuse — not \"do not store\".","schema":{"type":"string"}}}},"403":{"description":"This API key is not bound to a community (`not_community_key`), or its manager no longer has API access to the community (`api_access_revoked`: removed as a manager, API access blocked for the community, or the permission withdrawn). The key itself stays valid and works again if that access is restored.","content":{"application/json":{"example":{"error":{"code":"not_community_key","message":"This API key is not bound to a community","request_id":"b1c2…"}}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"example":{"error":{"code":"unauthorized","message":"Invalid API key","request_id":"b1c2…"}}}}},"429":{"description":"Rate limit exceeded — see Retry-After.","content":{"application/json":{"example":{"error":{"code":"rate_limited","message":"Too many requests","request_id":"b1c2…"}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"304":{"description":"Not modified — your `If-None-Match` matched the current representation. No body. Does not consume monthly quota.","headers":{"ETag":{"description":"The unchanged validator.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]}]},"post":{"tags":["Community · Short Codes"],"summary":"Create a short code","description":"Mint a GuestView short code on your community — the code your gate\nplacard or sign will display.\n\nOmit `code` and the server generates one (7 letters and digits), the same\nway the portal does. Supply `code` to claim a specific one: it must be 6–10\nletters and digits, and **short codes are unique across all of Nimbio, not\njust your community** — a code already in use anywhere comes back `409\nshort_code_taken` (including a code that differs only in letter case, since\na placard is read by a person). Generation retries on collision, so the\nserver-generated path effectively never 409s.\n\n`latch_id` is optional and must be a gate in your community; without it the\ncode routes to your directory without preselecting a gate.\n\n**There is no way to delete a short code** — not through this API, and not\nthrough the portal. A code you mint is permanent; the most that can be done\nto retire one is for a Nimbio admin to disable it. Mint deliberately.\n\nTest mode: validated in full (format, collision, latch ownership) and\nnothing is stored — a simulated create would otherwise consume a code out of\na global namespace that nothing can reclaim.","operationId":"create_short_code_v1_community_short_codes_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body","properties":{"code":{"type":"string","description":"Optional code to claim (6–10 letters and digits). Omit and one is generated for you."},"latch_id":{"type":"string","description":"Optional gate this code routes to. Omit for a community-wide directory code."}}},"example":{"latch_id":"{{latch_id}}"}}},"required":false},"responses":{"200":{"description":"Created (live) or validated (test).","content":{"application/json":{"schema":{},"example":{"result":"ok","short_code":{"short_code":"Kp7Rx2Q","community_id":2585,"latch_id":"l1…","latch_name":"Main Entrance","disabled":false,"require_security_code":false,"created_at":"2026-08-18T17:04:11+00:00","last_updated_datetime":"2026-08-18T17:04:11+00:00"},"request_id":"b1c2…"}}}},"409":{"description":"That code is already in use somewhere in Nimbio.","content":{"application/json":{"example":{"error":{"code":"short_code_taken","message":"Short code already in use: Kp7Rx2Q","request_id":"b1c2…"}}}}},"404":{"description":"No such short code on this community, or no such latch in it.","content":{"application/json":{"example":{"error":{"code":"short_code_not_found","message":"Short code not found: Kp7Rx2Q","request_id":"b1c2…"}}}}},"422":{"description":"Malformed short code (6–10 letters and digits).","content":{"application/json":{"example":{"error":{"code":"invalid_short_code","message":"Short code must be 6-10 letters and digits","request_id":"b1c2…"}}}}},"403":{"description":"This API key is not bound to a community (`not_community_key`), or its manager no longer has API access to the community (`api_access_revoked`: removed as a manager, API access blocked for the community, or the permission withdrawn). The key itself stays valid and works again if that access is restored.","content":{"application/json":{"example":{"error":{"code":"not_community_key","message":"This API key is not bound to a community","request_id":"b1c2…"}}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"example":{"error":{"code":"unauthorized","message":"Invalid API key","request_id":"b1c2…"}}}}},"429":{"description":"Rate limit exceeded — see Retry-After.","content":{"application/json":{"example":{"error":{"code":"rate_limited","message":"Too many requests","request_id":"b1c2…"}}}}}},"security":[{"bearerAuth":[]}]}},"/v1/community/short-codes/{code}":{"put":{"tags":["Community · Short Codes"],"summary":"Assign a short code to a gate","description":"Repoint an existing short code at a different gate — move a printed\nplacard's code from one latch to another without reprinting the sign.\n\nAssignment is exclusive: the code routes to exactly one gate, so this\ndetaches it from whatever it pointed at before, and it takes effect for the\nnext visitor who types it.\n\nThe code must already belong to your community. An unknown code and a code\nowned by a different community both answer `404 short_code_not_found` — the\nnamespace is global, so the API deliberately gives no way to tell those two\napart, let alone to seize someone else's code. Claiming an unassigned code\nminted by a Nimbio admin (a pre-printed placard from a batch) is likewise\nnot available here; that stays a portal operation.\n\nTest mode: validated against your community, nothing changes.","operationId":"assign_short_code_v1_community_short_codes__code__put","parameters":[{"name":"code","in":"path","required":true,"schema":{"type":"string","title":"Code"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body","properties":{"latch_id":{"type":"string","description":"The gate in your community this code should route to"}},"required":["latch_id"]},"example":{"latch_id":"{{latch_id}}"}}},"required":true},"responses":{"200":{"description":"Reassigned (live) or validated (test).","content":{"application/json":{"schema":{},"example":{"result":"ok","short_code":{"short_code":"Kp7Rx2Q","community_id":2585,"latch_id":"l1…","latch_name":"Main Entrance","disabled":false,"require_security_code":false,"created_at":"2026-08-18T17:04:11+00:00","last_updated_datetime":"2026-08-18T17:04:11+00:00"},"request_id":"b1c2…"}}}},"404":{"description":"No such short code on this community, or no such latch in it.","content":{"application/json":{"example":{"error":{"code":"short_code_not_found","message":"Short code not found: Kp7Rx2Q","request_id":"b1c2…"}}}}},"422":{"description":"Malformed short code (6–10 letters and digits).","content":{"application/json":{"example":{"error":{"code":"invalid_short_code","message":"Short code must be 6-10 letters and digits","request_id":"b1c2…"}}}}},"403":{"description":"This API key is not bound to a community (`not_community_key`), or its manager no longer has API access to the community (`api_access_revoked`: removed as a manager, API access blocked for the community, or the permission withdrawn). The key itself stays valid and works again if that access is restored.","content":{"application/json":{"example":{"error":{"code":"not_community_key","message":"This API key is not bound to a community","request_id":"b1c2…"}}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"example":{"error":{"code":"unauthorized","message":"Invalid API key","request_id":"b1c2…"}}}}},"429":{"description":"Rate limit exceeded — see Retry-After.","content":{"application/json":{"example":{"error":{"code":"rate_limited","message":"Too many requests","request_id":"b1c2…"}}}}}},"security":[{"bearerAuth":[]}]}},"/v1/community/homes":{"get":{"tags":["Community · Homes"],"summary":"List homes","description":"Every home (unit) in the key's community, with its resident count,\nsorted by address.","operationId":"list_homes_v1_community_homes_get","parameters":[{"name":"include_hidden","in":"query","required":false,"schema":{"type":"boolean","description":"Include hidden homes (default true — a roster sync wants the whole set). False matches the portal's list.","default":true,"title":"Include Hidden"},"description":"Include hidden homes (default true — a roster sync wants the whole set). False matches the portal's list."},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"If-None-Match","in":"header","required":false,"description":"The `ETag` from a previous response to this URL. If the representation has not changed you get `304 Not Modified` with no body — reuse your cached copy. A comma-separated list and `*` are both accepted.","schema":{"type":"string"},"example":"\"6f9a3c1e8b2d4f70a1c5e9b3d7f2a4c8\""}],"responses":{"200":{"description":"The community's homes (units).","content":{"application/json":{"schema":{},"example":{"result":"ok","homes":[{"home_id":"h1…","address":"12 Elm St, Unit 3","owner_occupied":false,"hidden":false,"created_datetime":"2026-08-18T17:04:11+00:00","member_count":2}]}}},"headers":{"ETag":{"description":"Validator for this representation. Send it back as `If-None-Match` on the next poll.","schema":{"type":"string"}},"Cache-Control":{"description":"`private, no-cache`. `no-cache` means revalidate before reuse — not \"do not store\".","schema":{"type":"string"}}}},"403":{"description":"This API key is not bound to a community (`not_community_key`), or its manager no longer has API access to the community (`api_access_revoked`: removed as a manager, API access blocked for the community, or the permission withdrawn). The key itself stays valid and works again if that access is restored.","content":{"application/json":{"example":{"error":{"code":"not_community_key","message":"This API key is not bound to a community","request_id":"b1c2…"}}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"example":{"error":{"code":"unauthorized","message":"Invalid API key","request_id":"b1c2…"}}}}},"429":{"description":"Rate limit exceeded — see Retry-After.","content":{"application/json":{"example":{"error":{"code":"rate_limited","message":"Too many requests","request_id":"b1c2…"}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"304":{"description":"Not modified — your `If-None-Match` matched the current representation. No body. Does not consume monthly quota.","headers":{"ETag":{"description":"The unchanged validator.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]}]},"post":{"tags":["Community · Homes"],"summary":"Add a home","description":"Add a home (unit) to the key's community.\n\nReturns the created home as a full resource — id, address, flags, and\nresident count — so a roster sync can record it without a second call.\nTest mode: the address is validated, nothing is created.","operationId":"create_home_v1_community_homes_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body","properties":{"home_address":{"type":"string","description":"The unit's address. Must not be blank."}},"required":["home_address"]},"example":{"home_address":"12 Elm St, Unit 3"}}},"required":true},"responses":{"200":{"description":"Created (live) or validated (test). The full resource is returned, so no follow-up GET is needed.","content":{"application/json":{"schema":{},"example":{"result":"ok","home":{"home_id":"h1…","address":"12 Elm St, Unit 3","owner_occupied":false,"hidden":false,"created_datetime":"2026-08-18T17:04:11+00:00","member_count":2},"request_id":"b1c2…"}}}},"422":{"description":"Blank or non-string address.","content":{"application/json":{"example":{"error":{"code":"invalid_field","message":"home_address must be a non-empty string","request_id":"b1c2…"}}}}},"403":{"description":"This API key is not bound to a community (`not_community_key`), or its manager no longer has API access to the community (`api_access_revoked`: removed as a manager, API access blocked for the community, or the permission withdrawn). The key itself stays valid and works again if that access is restored.","content":{"application/json":{"example":{"error":{"code":"not_community_key","message":"This API key is not bound to a community","request_id":"b1c2…"}}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"example":{"error":{"code":"unauthorized","message":"Invalid API key","request_id":"b1c2…"}}}}},"429":{"description":"Rate limit exceeded — see Retry-After.","content":{"application/json":{"example":{"error":{"code":"rate_limited","message":"Too many requests","request_id":"b1c2…"}}}}}},"security":[{"bearerAuth":[]}]}},"/v1/community/homes/{home_id}":{"get":{"tags":["Community · Homes"],"summary":"Get a home","description":"One home in the key's community, plus its residents and their move-out\ndates. A home belonging to another community reads as 404, the same as one\nthat does not exist.","operationId":"get_home_v1_community_homes__home_id__get","parameters":[{"name":"home_id","in":"path","required":true,"schema":{"type":"string","title":"Home Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"If-None-Match","in":"header","required":false,"description":"The `ETag` from a previous response to this URL. If the representation has not changed you get `304 Not Modified` with no body — reuse your cached copy. A comma-separated list and `*` are both accepted.","schema":{"type":"string"},"example":"\"6f9a3c1e8b2d4f70a1c5e9b3d7f2a4c8\""}],"responses":{"200":{"description":"One home, with the residents attached to it.","content":{"application/json":{"schema":{},"example":{"result":"ok","home":{"home_id":"h1…","address":"12 Elm St, Unit 3","owner_occupied":false,"hidden":false,"created_datetime":"2026-08-18T17:04:11+00:00","member_count":2,"members":[{"account_community_id":4021,"account_id":"a1…","first_name":"Dana","last_name":"Lee","phone_numbers":["+1 555 123 4567"],"accepted":true,"move_out_date":"2026-12-31"}]}}}},"headers":{"ETag":{"description":"Validator for this representation. Send it back as `If-None-Match` on the next poll.","schema":{"type":"string"}},"Cache-Control":{"description":"`private, no-cache`. `no-cache` means revalidate before reuse — not \"do not store\".","schema":{"type":"string"}}}},"404":{"description":"No such home on this community.","content":{"application/json":{"example":{"error":{"code":"home_not_found","message":"Home not found for this community","request_id":"b1c2…"}}}}},"403":{"description":"This API key is not bound to a community (`not_community_key`), or its manager no longer has API access to the community (`api_access_revoked`: removed as a manager, API access blocked for the community, or the permission withdrawn). The key itself stays valid and works again if that access is restored.","content":{"application/json":{"example":{"error":{"code":"not_community_key","message":"This API key is not bound to a community","request_id":"b1c2…"}}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"example":{"error":{"code":"unauthorized","message":"Invalid API key","request_id":"b1c2…"}}}}},"429":{"description":"Rate limit exceeded — see Retry-After.","content":{"application/json":{"example":{"error":{"code":"rate_limited","message":"Too many requests","request_id":"b1c2…"}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"304":{"description":"Not modified — your `If-None-Match` matched the current representation. No body. Does not consume monthly quota.","headers":{"ETag":{"description":"The unchanged validator.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]}]},"patch":{"tags":["Community · Homes"],"summary":"Update a home","description":"Edit a home: any of `home_address`, `owner_occupied`, `hidden`. A field\nyou omit is left alone, so you can change one without reading the rest.\n\n`hidden` is a setter, not a toggle: `{\"hidden\": true}` sent twice leaves the\nhome hidden. Test mode: validated, nothing changes.","operationId":"update_home_v1_community_homes__home_id__patch","parameters":[{"name":"home_id","in":"path","required":true,"schema":{"type":"string","title":"Home Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body","properties":{"home_address":{"type":"string"},"owner_occupied":{"type":"boolean"},"hidden":{"type":"boolean","description":"Explicit setter — true hides, false un-hides. Setting it twice leaves the same state, so a retry is safe. Refused (409) while residents are still attached."}}},"example":{"owner_occupied":true}}},"required":false},"responses":{"200":{"description":"Updated (live) or validated (test).","content":{"application/json":{"schema":{},"example":{"result":"ok","home":{"home_id":"h1…","address":"12 Elm St, Unit 3","owner_occupied":false,"hidden":false,"created_datetime":"2026-08-18T17:04:11+00:00","member_count":2},"request_id":"b1c2…"}}}},"400":{"description":"No updatable field supplied.","content":{"application/json":{"example":{"error":{"code":"no_fields","message":"Nothing to update: supply home_address, owner_occupied, and/or hidden","request_id":"b1c2…"}}}}},"404":{"description":"No such home on this community.","content":{"application/json":{"example":{"error":{"code":"home_not_found","message":"Home not found for this community","request_id":"b1c2…"}}}}},"409":{"description":"Cannot hide a home that still has residents.","content":{"application/json":{"example":{"error":{"code":"home_occupied","message":"Home still has residents attached; move them out before hiding it","request_id":"b1c2…"}}}}},"422":{"description":"Blank address or non-boolean flag.","content":{"application/json":{"example":{"error":{"code":"invalid_field","message":"home_address must be a non-empty string","request_id":"b1c2…"}}}}},"403":{"description":"This API key is not bound to a community (`not_community_key`), or its manager no longer has API access to the community (`api_access_revoked`: removed as a manager, API access blocked for the community, or the permission withdrawn). The key itself stays valid and works again if that access is restored.","content":{"application/json":{"example":{"error":{"code":"not_community_key","message":"This API key is not bound to a community","request_id":"b1c2…"}}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"example":{"error":{"code":"unauthorized","message":"Invalid API key","request_id":"b1c2…"}}}}},"429":{"description":"Rate limit exceeded — see Retry-After.","content":{"application/json":{"example":{"error":{"code":"rate_limited","message":"Too many requests","request_id":"b1c2…"}}}}}},"security":[{"bearerAuth":[]}]},"delete":{"tags":["Community · Homes"],"summary":"Remove a home (DETACHES its residents)","description":"Remove a home (unit) from the community.\n\n**This detaches every resident attached to the home.** They remain members of the community and keep their keys, but they are no longer associated with any unit, and nothing restores the association automatically — you would have to re-add the home and re-attach each resident by hand. The response reports `detached_member_count` so you can see how many were affected; call `GET /v1/community/homes/{home_id}` first if you want to know before you commit. Test mode reports the count it would detach and changes nothing.","operationId":"delete_home_v1_community_homes__home_id__delete","parameters":[{"name":"home_id","in":"path","required":true,"schema":{"type":"string","title":"Home Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Deleted (live) or validated (test), with the number of residents detached from the home.","content":{"application/json":{"schema":{},"example":{"result":"ok","home_id":"h1…","deleted":true,"detached_member_count":2,"request_id":"b1c2…"}}}},"404":{"description":"No such home on this community.","content":{"application/json":{"example":{"error":{"code":"home_not_found","message":"Home not found for this community","request_id":"b1c2…"}}}}},"403":{"description":"This API key is not bound to a community (`not_community_key`), or its manager no longer has API access to the community (`api_access_revoked`: removed as a manager, API access blocked for the community, or the permission withdrawn). The key itself stays valid and works again if that access is restored.","content":{"application/json":{"example":{"error":{"code":"not_community_key","message":"This API key is not bound to a community","request_id":"b1c2…"}}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"example":{"error":{"code":"unauthorized","message":"Invalid API key","request_id":"b1c2…"}}}}},"429":{"description":"Rate limit exceeded — see Retry-After.","content":{"application/json":{"example":{"error":{"code":"rate_limited","message":"Too many requests","request_id":"b1c2…"}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"bearerAuth":[]}]}},"/v1/community/members/{account_community_id}/move-out-date":{"put":{"tags":["Community · Homes"],"summary":"Set a member's move-out date","description":"Record (or clear) a member's move-out date, so their access lapses\nwithout anyone remembering to revoke it. Send `{\"move_out_date\": null}` to\nclear a date. The member must belong to the key's community. Test mode:\nvalidated, nothing changes.","operationId":"set_member_move_out_date_v1_community_members__account_community_id__move_out_date_put","parameters":[{"name":"account_community_id","in":"path","required":true,"schema":{"type":"string","title":"Account Community Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body","properties":{"move_out_date":{"type":"string","nullable":true,"description":"YYYY-MM-DD, or null to clear."}},"required":["move_out_date"]},"example":{"move_out_date":"2026-12-31"}}},"required":true},"responses":{"200":{"description":"Set (live) or validated (test).","content":{"application/json":{"schema":{},"example":{"result":"ok","account_community_id":4021,"move_out_date":"2026-12-31","request_id":"b1c2…"}}}},"404":{"description":"No such member on this community.","content":{"application/json":{"example":{"error":{"code":"member_not_found","message":"Member not found in this community","request_id":"b1c2…"}}}}},"422":{"description":"Malformed date.","content":{"application/json":{"example":{"error":{"code":"invalid_field","message":"move_out_date must be YYYY-MM-DD or null","request_id":"b1c2…"}}}}},"403":{"description":"This API key is not bound to a community (`not_community_key`), or its manager no longer has API access to the community (`api_access_revoked`: removed as a manager, API access blocked for the community, or the permission withdrawn). The key itself stays valid and works again if that access is restored.","content":{"application/json":{"example":{"error":{"code":"not_community_key","message":"This API key is not bound to a community","request_id":"b1c2…"}}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"example":{"error":{"code":"unauthorized","message":"Invalid API key","request_id":"b1c2…"}}}}},"429":{"description":"Rate limit exceeded — see Retry-After.","content":{"application/json":{"example":{"error":{"code":"rate_limited","message":"Too many requests","request_id":"b1c2…"}}}}}},"security":[{"bearerAuth":[]}]}},"/v1/community/webhooks/{webhook_id}/deliveries":{"get":{"tags":["Community · Webhooks"],"summary":"List a webhook's delivery attempts","description":"Delivery attempts for one webhook, newest first — what a receiver\nreturned and when, so you can tell a silently-broken endpoint from one\nNimbio never fired at.\n\n`status` is `pending`, `delivered`, or `failed`; `attempts` counts tries so\nfar, and `last_status_code` / `last_error` describe the most recent one.\n`next_attempt_datetime` is set while a delivery is still being retried.\n\nThe event payload Nimbio sent is not echoed back here — replay it from the\nevent stream if you need it. `last_error` does include the first part of\n*your own* endpoint's response body on a non-2xx reply, which is what makes\na broken receiver diagnosable; if your error pages carry anything sensitive,\ntreat this field accordingly. Reads work for test and live keys alike.","operationId":"list_webhook_deliveries_v1_community_webhooks__webhook_id__deliveries_get","parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","title":"Webhook Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"If-None-Match","in":"header","required":false,"description":"The `ETag` from a previous response to this URL. If the representation has not changed you get `304 Not Modified` with no body — reuse your cached copy. A comma-separated list and `*` are both accepted.","schema":{"type":"string"},"example":"\"6f9a3c1e8b2d4f70a1c5e9b3d7f2a4c8\""}],"responses":{"200":{"description":"Recent delivery attempts, newest first.","content":{"application/json":{"schema":{},"example":{"result":"ok","deliveries":[{"delivery_id":"d1…","event_type":"sense_line.changed","event_id":"e1…","status":"delivered","attempts":1,"last_status_code":200,"created_datetime":"2026-08-18T14:03:11+00:00","delivered_datetime":"2026-08-18T14:03:12+00:00"},{"delivery_id":"d2…","event_type":"open.succeeded","event_id":"e2…","status":"failed","attempts":5,"last_status_code":502,"last_error":"502 Bad Gateway","created_datetime":"2026-08-18T13:59:02+00:00"}]}}},"headers":{"ETag":{"description":"Validator for this representation. Send it back as `If-None-Match` on the next poll.","schema":{"type":"string"}},"Cache-Control":{"description":"`private, no-cache`. `no-cache` means revalidate before reuse — not \"do not store\".","schema":{"type":"string"}}}},"404":{"description":"No such webhook on this community.","content":{"application/json":{"example":{"error":{"code":"webhook_not_found","message":"Webhook not found for this community","request_id":"b1c2…"}}}}},"403":{"description":"This API key is not bound to a community (`not_community_key`), or its manager no longer has API access to the community (`api_access_revoked`: removed as a manager, API access blocked for the community, or the permission withdrawn). The key itself stays valid and works again if that access is restored.","content":{"application/json":{"example":{"error":{"code":"not_community_key","message":"This API key is not bound to a community","request_id":"b1c2…"}}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"example":{"error":{"code":"unauthorized","message":"Invalid API key","request_id":"b1c2…"}}}}},"429":{"description":"Rate limit exceeded — see Retry-After.","content":{"application/json":{"example":{"error":{"code":"rate_limited","message":"Too many requests","request_id":"b1c2…"}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"304":{"description":"Not modified — your `If-None-Match` matched the current representation. No body. Does not consume monthly quota.","headers":{"ETag":{"description":"The unchanged validator.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]}]}},"/v1/community/webhooks/{webhook_id}/deliveries/retry-failed":{"post":{"tags":["Community · Webhooks"],"summary":"Re-send every failed delivery for a webhook","description":"Re-send every delivery for this webhook currently in the `failed` state,\noldest first — the \"my receiver was down for an hour, send me what I\nmissed\" path.\n\n**The original event id and payload are preserved.** Each re-send carries\nthe exact body Nimbio sent the first time and the same `event_id`\n(`X-Nimbio-Delivery` header), so a handler that de-duplicates on event id\nwill correctly ignore an event it already processed. What changes is the\n`delivery_id` — a replay is a new delivery row, so it appears in\n`GET .../deliveries` alongside the original, whose failure record is left\nintact. The signature is computed fresh at send time from the webhook's\n*current* secret, so a delivery replayed after a secret rotation is signed\nwith the new secret, and the `X-Nimbio-Timestamp` is the replay's, not the\noriginal's.\n\nDeliveries still `pending` are skipped (counted in `skipped_in_flight`) so a\nretry can never race Nimbio's own backoff and double-fire, and candidates\nare de-duplicated by event id — calling this twice in a row re-sends\nnothing the second time. `limit` caps re-sends at 100 per call.\n\nRefused with 409 if the webhook is inactive or auto-disabled: re-enable it\n(`PATCH /v1/community/webhooks/{webhook_id}` with `active: true`) first,\notherwise the re-sends would be discarded unsent. Test-mode keys return\n`result: \"simulated\"` and enqueue nothing — a replay POSTs a real event at\nyour real receiver.","operationId":"retry_failed_webhook_deliveries_v1_community_webhooks__webhook_id__deliveries_retry_failed_post","parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","title":"Webhook Id"}},{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ISO-8601 instant; only deliveries created at or after it are considered","title":"Since"},"description":"ISO-8601 instant; only deliveries created at or after it are considered"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"What was actually re-enqueued.","content":{"application/json":{"schema":{},"example":{"result":"ok","webhook_id":"w1…","replayed_count":2,"replayed":[{"delivery_id":"d9…","replayed_from_delivery_id":"d2…","event_id":"e2…","event_type":"member.approved","status":"pending","created_datetime":"2026-08-18T15:10:00+00:00"},{"delivery_id":"d10…","replayed_from_delivery_id":"d3…","event_id":"e3…","event_type":"open.succeeded","status":"pending","created_datetime":"2026-08-18T15:10:00.001000+00:00"}],"skipped_in_flight":1,"skipped_duplicate_event":0,"limit":50,"request_id":"b1c2…"}}}},"404":{"description":"No such webhook on this community.","content":{"application/json":{"example":{"error":{"code":"webhook_not_found","message":"Webhook or delivery not found for this community","request_id":"b1c2…"}}}}},"409":{"description":"The webhook is inactive or auto-disabled.","content":{"application/json":{"example":{"error":{"code":"webhook_disabled","message":"Webhook is disabled or inactive; re-enable it before replaying","request_id":"b1c2…"}}}}},"422":{"description":"Unparseable 'since'.","content":{"application/json":{"example":{"error":{"code":"invalid_since","message":"since must be an ISO-8601 datetime","request_id":"b1c2…"}}}}},"403":{"description":"This API key is not bound to a community (`not_community_key`), or its manager no longer has API access to the community (`api_access_revoked`: removed as a manager, API access blocked for the community, or the permission withdrawn). The key itself stays valid and works again if that access is restored.","content":{"application/json":{"example":{"error":{"code":"not_community_key","message":"This API key is not bound to a community","request_id":"b1c2…"}}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"example":{"error":{"code":"unauthorized","message":"Invalid API key","request_id":"b1c2…"}}}}},"429":{"description":"Rate limit exceeded — see Retry-After.","content":{"application/json":{"example":{"error":{"code":"rate_limited","message":"Too many requests","request_id":"b1c2…"}}}}}},"security":[{"bearerAuth":[]}]}},"/v1/community/webhooks/{webhook_id}/deliveries/{delivery_id}/replay":{"post":{"tags":["Community · Webhooks"],"summary":"Replay one delivery","description":"Re-send one past delivery — the event you can see failed in\n`GET /v1/community/webhooks/{webhook_id}/deliveries`, once your receiver is\nfixed. Works for a `failed` delivery and for a `delivered` one you no longer\nhave.\n\n**The original event id and payload are preserved.** Nimbio stores the exact\nenvelope it POSTed, so the replay is that envelope byte-for-byte, carrying\nthe same `event_id` (and therefore the same `X-Nimbio-Delivery` header) as\nthe original attempt. A handler that de-duplicates on event id will\ncorrectly treat this as the event it already saw; a handler that does not\nwill apply it twice. The `delivery_id` is new — a replay is a new delivery\nrow, so it shows up in the delivery list next to the original, which keeps\nits failure record. The signature is computed at send time from the\nwebhook's *current* secret and a fresh `X-Nimbio-Timestamp`, so a replay\nafter a secret rotation is signed with the new secret.\n\nReturns 409 `delivery_in_flight` if a delivery of that event is still\n`pending` — Nimbio is already retrying it with backoff and a replay would\ndouble-fire. Returns 409 `webhook_disabled` if the webhook is inactive or\nauto-disabled; re-enable it first. Unknown ids and ids belonging to another\ncommunity are indistinguishable 404s. Test-mode keys return\n`result: \"simulated\"` and enqueue nothing.","operationId":"replay_webhook_delivery_v1_community_webhooks__webhook_id__deliveries__delivery_id__replay_post","parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","title":"Webhook Id"}},{"name":"delivery_id","in":"path","required":true,"schema":{"type":"string","title":"Delivery Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"The new delivery that was enqueued.","content":{"application/json":{"schema":{},"example":{"result":"ok","delivery_id":"d9…","replayed_from_delivery_id":"d2…","event_id":"e2…","event_type":"member.approved","status":"pending","created_datetime":"2026-08-18T15:10:00+00:00","request_id":"b1c2…"}}}},"404":{"description":"No such webhook or delivery on this community.","content":{"application/json":{"example":{"error":{"code":"webhook_not_found","message":"Webhook or delivery not found for this community","request_id":"b1c2…"}}}}},"409":{"description":"The webhook is inactive or auto-disabled, or that event is already queued.","content":{"application/json":{"example":{"error":{"code":"webhook_disabled","message":"Webhook is disabled or inactive; re-enable it before replaying","request_id":"b1c2…"}}}}},"403":{"description":"This API key is not bound to a community (`not_community_key`), or its manager no longer has API access to the community (`api_access_revoked`: removed as a manager, API access blocked for the community, or the permission withdrawn). The key itself stays valid and works again if that access is restored.","content":{"application/json":{"example":{"error":{"code":"not_community_key","message":"This API key is not bound to a community","request_id":"b1c2…"}}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"example":{"error":{"code":"unauthorized","message":"Invalid API key","request_id":"b1c2…"}}}}},"429":{"description":"Rate limit exceeded — see Retry-After.","content":{"application/json":{"example":{"error":{"code":"rate_limited","message":"Too many requests","request_id":"b1c2…"}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"bearerAuth":[]}]}},"/v1/events/stream":{"get":{"tags":["Community · Reads"],"summary":"Live event stream (SSE)","description":"Server-Sent Events stream of this community's live events. Quota-exempt;\nthe connection itself charges one per-minute request. At most\n3 concurrent streams per key. Heartbeat comments every ~25s.","operationId":"events_stream_v1_events_stream_get","parameters":[{"name":"events","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated event-type filter (e.g. `sense_line.changed,hold_open.changed`). Omit for all events.","title":"Events"},"description":"Comma-separated event-type filter (e.g. `sense_line.changed,hold_open.changed`). Omit for all events."},{"name":"last_event_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Resume cursor — same as the Last-Event-ID header.","title":"Last Event Id"},"description":"Resume cursor — same as the Last-Event-ID header."},{"name":"Last-Event-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last-Event-Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"An SSE stream (`text/event-stream`). Each frame: `id:` the event id, `event:` the event type, `data:` the same JSON body a webhook receives.","content":{"application/json":{"schema":{}},"text/event-stream":{"example":"id: 6f9a…\nevent: sense_line.changed\ndata: {\"event\":\"sense_line.changed\",…}\n\n"}}},"400":{"description":"Unknown event type in the `events` filter.","content":{"application/json":{"example":{"detail":{"error":{"code":"unknown_event_type","message":"Unknown event type(s): gate.opened"}}}}}},"429":{"description":"Rate limit exceeded — see Retry-After.","content":{"application/json":{"example":{"error":{"code":"rate_limited","message":"Too many requests","request_id":"b1c2…"}}}}},"403":{"description":"This API key is not bound to a community (`not_community_key`), or its manager no longer has API access to the community (`api_access_revoked`: removed as a manager, API access blocked for the community, or the permission withdrawn). The key itself stays valid and works again if that access is restored.","content":{"application/json":{"example":{"error":{"code":"not_community_key","message":"This API key is not bound to a community","request_id":"b1c2…"}}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"example":{"error":{"code":"unauthorized","message":"Invalid API key","request_id":"b1c2…"}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"bearerAuth":[]}]}}},"components":{"schemas":{"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}},"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"A nimbio_test_… or nimbio_live_… API key."}}},"tags":[{"name":"Community · Map & Geofences","description":"Where the community's gates physically are, and the proximity geofence each one advertises to the Nimbio mobile apps: centre point, radius in metres, on/off, and whether arriving prompts the member or opens the gate. Coordinates are WGS84 decimal degrees and radii are metres. The map read consumes quota like any other read — it is setup-time configuration, not a poll target. Test-mode keys validate but never change a real gate's geofence."},{"name":"Community · My Notifications","description":"Member-open alerts for **the community manager who owns this API key** — not a community-wide setting. Turn your own alerts on or off and manage your quiet hours. Two keys owned by two managers of the same community read and write two different settings objects. Quiet-hours windows are evaluated in the opened device's local timezone. Requires the community's member-open notifications feature to be enabled; test-mode keys validate but never save."},{"name":"Community · Settings","description":"Read and change the community's feature flags and terminology, so an integration can provision a property without a human visiting the portal. Several of these settings gate other endpoint families — see the endpoint docs for which. Flags Nimbio provisions for you (hold opens, access-log history, GuestView Entry) are reported read-only. Test-mode keys validate the patch in full and change nothing."},{"name":"Community · Devices","description":"The sense lines on a community's boxes — the physical inputs that report whether a gate actually moved. Read how they are wired and what they last observed, and switch a sense line's two flags on or off. This is the layer under `GET /v1/community/gate-status` and the `sense_line.changed` webhook: use it when a gate reports the wrong state or stops reporting at all. Reads never consume the monthly quota; test-mode keys validate but never reconfigure hardware."},{"name":"Community · NFC Tags","description":"Manage the community's physical NFC tags (NTAG 424 DNA fobs and cards) and read their tap history: list and search tags, move one to a different gate, detach it, and disable a lost one. Disabling takes effect for real gate taps. Cryptographic tag material is never returned. Reads never consume the monthly quota; test-mode keys validate scope but never enable or disable a real fob."},{"name":"Community · Short Codes","description":"GuestView short codes: the compact code printed on a gate placard or sign that routes a visitor to this community's directory so they can call a resident. List them, mint one (server-generated or your own), and repoint one at a different gate. Codes are unique across all of Nimbio and cannot be deleted; test-mode keys validate but never mint."},{"name":"Community · GuestView Entry","description":"GuestView Entry: let a phone-verified visitor standing at a gate open it from the community directory, without ever being granted a key. Control the master switch, which gates it covers, and the recurring windows during which it is permitted, and read the attempt log. **Schedule windows are evaluated in each latch's own local timezone**, never UTC and never the caller's. Distinct from the GuestView directory listing itself and from guest links. Reads never consume the monthly quota; test-mode keys validate scope but never widen real guest access."},{"name":"Community · Access Codes","description":"Keypad / GuestView PINs for visitors who are not members — a delivery driver, vendor, or contractor. Mint a code for a scheduled visit, limit it to specific gates and a time window, then disable or delete it afterwards. The PIN is returned exactly once, when it is created: every later read masks it. A community runs its codes in one of two modes — `per_member` (the visitor picks the member, then types that member's code) or `single_entry` (one field for the whole community; the visitor types the member's 3-letter preamble plus the code). Switching modes deletes every code and is its own confirm-gated endpoint. Requires the community's Directory Access Codes feature to be enabled; test-mode keys validate but never mint a working PIN or switch a real community's mode."},{"name":"Community · Guest Links","description":"Mint, list and revoke guest links — bearer-token URLs that open specific gates for someone with no Nimbio account. Two kinds: an `event` link is live between two absolute instants; a `limited_use` link is live until its open count runs out. Creating one hands out real gate access, so test-mode keys validate the whole request and mint nothing."},{"name":"Community · Homes","description":"The community's unit roster: list, add, edit, and remove homes, and record a resident's move-out date. Built for property-management-system sync. `hidden` is an explicit true/false setter, so a retried request is safe. Deleting a home DETACHES every resident attached to it (they stay members and keep their keys, but are no longer associated with a unit). Test-mode keys validate but never mutate."},{"name":"Account","description":"Your account: key metadata (`/v1/me`, any key), your keys and their latches, account opens, and your own call log. The keys and open endpoints require an account-scoped key."},{"name":"Community · Reads","description":"Describe the community itself (`GET /v1/community` — start here for latch ids, feature flags, and its timezone), and read its gate status, members, and key/latch statuses. Requires a community-scoped key. The community-description, gate-status, and key-statuses reads never consume the monthly quota (the per-minute limit still applies)."},{"name":"Community · Writes","description":"Issue opens, message members, and manage member keys. Test-mode keys validate scope but never mutate or fire a gate."},{"name":"Community · Hold Opens","description":"Read and control hold opens (keep a gate open): the manual toggle and one-time timed windows. Reads never consume the monthly quota. Requires the community's Hold Opens feature to be enabled; test-mode keys validate scope but never mutate."},{"name":"Community · Webhooks","description":"Self-manage the community's outbound webhooks (e.g. from an integration's setup flow): list event types, register, edit, rotate the signing secret, delete, and send a test ping. Webhook URLs must be public https. The signing secret is returned exactly once, on create/rotate."},{"name":"Community · Access Schedules","description":"Limit when the community's keys may open their gates, by day of week and time of day. Scoped to the community's own key(s): a schedule there is the community-wide rule and applies to every member key beneath it, so an individual member's key is refused with not_a_community_key. Reads never consume the monthly quota; test-mode keys validate scope but never change access."},{"name":"Community · Logs","description":"Access-log and gate-status-log history. Requires the community's Access Log History setting to be enabled."}],"servers":[{"url":"/","description":"This environment (the host you're viewing)"},{"url":"https://api.nimbio.com","description":"Production"},{"url":"https://api.nimbio.dev","description":"Dev"},{"url":"http://localhost:8000","description":"Local"}],"x-tagGroups":[{"name":"Account API","tags":["Account"]},{"name":"Community API","tags":["Community · Reads","Community · Writes","Community · Hold Opens","Community · Webhooks","Community · Access Schedules","Community · NFC Tags","Community · Devices","Community · Settings","Community · My Notifications","Community · Map & Geofences","Community · Guest Links","Community · Access Codes","Community · GuestView Entry","Community · Short Codes","Community · Homes","Community · Logs"]}]}