Praecise account/ Reference/ Account

Invite a person to Praecise, once, for one of the caller's own people

post/api/invitations

For the server of a Praecise product that adds someone to an organisation or a project by address. When the address has no Praecise account, the account service mints a single-use invite code bound to that address, valid 30 days, and mails it itself, saying who invited them and to what; the code is never returned to the caller. Only the products the account service lists in ACCOUNT_INVITERS may call; with none listed, the call answers 503. Keep the person as pending under the address, and make them a member when that address first signs in to you (the email claim is confirmed). Limited to 60 calls a minute for each product and 100 invitations a day for each inviting person.

Before you call

Credential
Authorization: Basic $KEY
Callers
The servers of the products listed in ACCOUNT_INVITERS (first: Praecise Spaces).

Request bodyapplication/json, required

  • emailstring (email)required
    The person to invite.
  • invited_bystring (uuid)required
    The account id (sub) of the person inviting. They must have signed in to the caller.
  • organisationstring
    What they are invited to, by its display name, on one line. Shown in the mail. At most 120 characters.
  • organisation_idstring
    The caller's own id for it. Kept with the invitation, never shown. Pattern: ^[A-Za-z0-9._:-]{1,120}$.

Responses

  • 200application/json
    Nothing was sent: the address already has a Praecise account (has-account: add them), or this product invited it within the last day (already-invited).
    • statusrequired
      One of: has-account, already-invited.
    • expiresstring (date-time)
  • 201application/json
    The invitation was sent.
    • statusinvitedrequired
    • expiresstring (date-time)required
  • 400application/json
    A field is missing or malformed.
    • errorstringrequired
      What went wrong, in a sentence.
    • detailstring
  • 401application/json
    No valid client id and secret.
    • errorstringrequired
      What went wrong, in a sentence.
    • detailstring
  • 403application/json
    This client may not invite people, or invited_by has not signed in to it.
    • errorstringrequired
      What went wrong, in a sentence.
    • detailstring
  • 429application/json
    Over 60 a minute for the product, or 100 a day for the inviting person. Retry-After says when to try again.
    • errorstringrequired
      What went wrong, in a sentence.
    • detailstring
  • 502application/json
    The mail could not be sent. Nothing was kept; try again later.
    • errorstringrequired
      What went wrong, in a sentence.
    • detailstring
  • 503application/json
    Invitations by products are not switched on.
    • errorstringrequired
      What went wrong, in a sentence.
    • detailstring

This page as Markdown