Manage an organization
mountaya-admin holds what a server that runs your organization needs: its members, its keys, its session tokens and its webhook endpoints. It is for servers and admin tools.
Import admin, and the operations appear under mountaya.admin on the client you already hold:
Here MOUNTAYA_PUBLISHABLE_KEY is a key that carries the management scope, kept on your server. The session token names the member who administers: an owner or an admin, minted as mint session tokens shows.
Each sample below takes that client and the organization's id.
Each member has a user_id and a role. A key never grants admin: the owner does that in the Mountaya app. An invitation holds a seat until the person accepts it.
A key reaches only the scopes it carries. Secret keys are created in the Mountaya app, under Organization → API keys.
Minting takes the secret key, so it runs on your server:
Hand the session to the client that calls the API. Authentication in the SDK keeps it fresh in the app.
The secret signs every delivery. Receive webhooks verifies them.