Skip to content
main-compute

Account

Team and roles

Invite members and apply least-privilege roles.

Updated 2026-10-25 · MainAI Compute docs

Membership is per organization. The portal shows only the active organization, and switching organizations re-checks membership on every request. Invite people with the smallest role that lets them work.

RolesLink to this section

Read usage and key metadata

Owner
Yes
Admin
Yes
Developer
Yes
Billing
Yes
Viewer
Yes

Create and revoke keys

Owner
Yes
Admin
Yes
Developer
Yes
Billing
No
Viewer
No

Publish models and pricing

Owner
Yes
Admin
Yes
Developer
No
Billing
No
Viewer
No

Invite and remove members

Owner
Yes
Admin
Yes
Developer
No
Billing
No
Viewer
No

Buy credits and manage payment

Owner
Yes
Admin
Yes
Developer
No
Billing
Yes
Viewer
No

Submit KYB

Owner
Yes
Admin
Yes
Developer
No
Billing
Yes
Viewer
No

Delete organization

Owner
Yes
Admin
No
Developer
No
Billing
No
Viewer
No
UI hiding is cosmetic. Role checks run server-side.

Invite a memberLink to this section

  1. 01

    Open Team

    Owner or admin only.

  2. 02

    Enter the work email

    Use the address the person controls. The invitation is tied to it.

  3. 03

    Choose a role

    Default to developer for engineers and viewer for auditors.

  4. 04

    Send

    The invitation expires after seven days.

POST /api/portal/members/invite
curl -s https://cloud.mainai.dk/api/portal/members/invite \
  -H "Content-Type: application/json" \
  -H "Origin: https://cloud.mainai.dk" \
  -H "Cookie: $PORTAL_COOKIE" \
  -d '{ "email": "engineer@example.eu", "role": "developer" }'

The invitee must have an account with that email before accepting. Invitations are single-use and hashed at rest.

Change a roleLink to this section

PATCH /api/portal/members/:userId
curl -s -X PATCH https://cloud.mainai.dk/api/portal/members/$USER_ID \
  -H "Content-Type: application/json" \
  -H "Origin: https://cloud.mainai.dk" \
  -H "Cookie: $PORTAL_COOKIE" \
  -d '{ "role": "billing" }'

A role change applies on the member's next request. Longer-lived sessions do not cache permissions beyond their current page load.

Remove a memberLink to this section

DELETE /api/portal/members/:userId
curl -s -X DELETE https://cloud.mainai.dk/api/portal/members/$USER_ID \
  -H "Origin: https://cloud.mainai.dk" \
  -H "Cookie: $PORTAL_COOKIE" -o /dev/null -w "%{http_code}\n"

Removal drops the membership immediately. Keys created by the person stay with the organization; keys are organization assets, not personal assets. Sessions for other organizations are unaffected.

Offboarding checklistLink to this section

  1. 01Remove the membership.
  2. 02Rotate any key the person could read in plaintext or store.
  3. 03Check recent audit entries for their user ID.
  4. 04Move ownership of open invoices or KYB cases to another billing member.
  5. 05Keep at least two owners so a departure cannot strand the organization.

Authentication · Billing · KYB · Security