> ## Documentation Index
> Fetch the complete documentation index at: https://latchkey.getgalaxy.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Latchkey API

> The latchkey.v1 ConnectRPC services, who calls each one, and how writes report the access revision.

The API is one `latchkey.v1` protobuf package served over ConnectRPC. The
protos under `protos/latchkey/v1` are the reference, and their comments
describe every message and RPC.

| Service | Called by | Purpose |
| - | - | - |
| AuthorizationService | Interceptors and UIs | Check, batch check and explain |
| DomainService | The product SDK at boot | Register kinds and list them |
| TenantService | Operators, domain owners and bootstrap | Provision a tenant with its default binding and first Admin, and let an operator bind an Admin to a tenant that has none |
| RoleService | Admin UI and CLI | Create, edit and delete custom roles, and list the built-ins |
| BindingService | Admin UI, CLI and SDK | Bind and unbind, and purge a deleted resource |
| GroupService | Admin UI and CLI | Manage manual groups and their membership |
| SubjectService | Admin UI and CLI | Add, list and deactivate subjects not synced from the directory |
| DirectoryService | The directory owner, Management in Galaxy Cloud | Upsert and deactivate subjects, and upsert and delete IdP groups with their membership |
| AuditService | Admin UI and CLI | Read the audit log |

Management writes return the tenant's new access revision, and domain and
kind writes return the new instance revision. To read your own writes, pass
the first as `min_revision` and the second as `min_instance_revision` on a
later `Check`. List calls page with the same `PaginationRequest`
and `PaginationResponse` that Filament uses.

A custom role carries an `etag` that changes with its description and
permissions. `UpdateRole` replaces both, so it takes the `etag` the caller
read and answers `ABORTED` if the role has changed since. Two people editing
one role never silently undo each other. Read the role again and retry.

The annotations products put on their own protos live in
`latchkey/v1/options.proto`. See
[Integrating a product](https://latchkey.getgalaxy.io/pages/guides/usage/integrating.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.