Apps

Create a group in an app

Groups (teams) in an app with auth.groups: true. A group has a key (like team-north), a name, and optionally a role and an entitlement that everyone in it gets on top of their own: the app's code sees env.HYPAMOON.user.groups and inGroup(key), and the extra role and entitlement in is() and has(). A group never gives the admin role (the first role). At most 100 groups per app and 20 groups per person. Admins of the app manage groups on /_hypamoon/admin too.

post/apps/{id}/groups

Request

  • Base URL: https://api.hypamoon.com/api/v1
  • URL: https://api.hypamoon.com/api/v1/apps/{id}/groups
  • Auth: one of:
    • HTTP bearer
    • OAuth 2 (authorization code, authorization URL https://app.hypamoon.com/oauth/authorize, token URL https://api.hypamoon.com/oauth/token, scopes: sites:write)

Path parameters

idstring uuid required

The id of the app.

Request body

keystring required

The key the code checks with inGroup(key): lowercase letters, digits, - and _, starting with a letter, like team-north. It cannot change later.

namestring

A name for people, like Team North. Defaults to the key.

rolestring

Optional: one of the app's roles that everyone in the group gets too. Never the admin role (the first role).

entitlementstring

Optional: an entitlement everyone in the group gets too, checked with env.HYPAMOON.user.has(entitlement).

Response

The new group.

keystring required
namestring required
rolestring nullable required
entitlementstring nullable required
member_countinteger required
created_atstring required

Changes

No recorded changes to this operation across all 1 revision of this API.