Manage an organization
MountayaAdmin 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, never for an app.
Link .product(name: "MountayaAdmin", package: "sdk-swift") beside MountayaClient. Importing it adds admin to the client you already hold:
Each sample below takes that client and organizationId.
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.
Each member has a user_id and a role. An invitation holds a seat until the person accepts it in the Mountaya app.
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.