at.happyproto.admin.createInvites

Invite customers: mint one single-use customers-space invite per address, each expiring after expiresInDays, and record which address each went to, so a redeemed invite pairs the address with the account. Redeemed with actor.acceptInvite. Staff only.

Repository @happyproto.at did:plc:mo7vq4jbioxwafy5zkcc3eux namespace authority
Details · procedure
Kindprocedure
Authorityadmin.happyproto.at
Indexed

Procedure

procedure · POST

Input

application/json

emails

requiredarray
  • minLength: 1
  • maxLength: 50
itemsstring
  • maxLength: 254
  • minimum: 1
  • maximum: 30
  • default: 14

idempotencyKey

requiredstring

A UUID, new for each attempt; a retry reuses it.

Output

application/json

invites

requiredarray
itemsref
Reference

Errors

AuthRequired

This endpoint requires an authenticated caller.

Forbidden

The caller is not HappyProto staff, or may not invite to the customers space: only its creator or a HappyView super user may.

InvalidRequest

emails is not 1 to 50 distinct addresses, expiresInDays is not a whole number from 1 to 30, or idempotencyKey is not a UUID.

OperationInProgress

A request with this idempotencyKey is still running.

Upstream

The customers space is not configured, an invite could not be made, or the addresses could not be recorded. Nothing is returned then: an invite whose address is not recorded is never handed out, and simply expires.

#invite

object

Properties

email

requiredstring

expiresAt

requiredstring · datetime

token

requiredstring

The secret the invitee redeems. Shown once: HappyView and the provisioner keep only its hash.

Similar lexicons

semantic match

Lexicons whose schemas describe something close to this one. Check them before publishing a new one that overlaps.

  • Redeem an invite from admin.createInvites: the caller joins the customers space with read access, and the address the invite went to is paired with the caller's account. Redeeming as an account that is already a customer succeeds and spends nothing. Any signed-in account may call this; the token is the authority.

  • Every customer invite, newest first: the address it went to, whether it is pending, expired or redeemed, and by which account. Staff only.

  • Create an invite link (root admin). The token is shown once and delivered by hand.