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)requiredThe person to invite.
- invited_bystring (uuid)requiredThe account id (
sub) of the person inviting. They must have signed in to the caller. - organisationstringWhat they are invited to, by its display name, on one line. Shown in the mail. At most 120 characters.
- organisation_idstringThe caller's own id for it. Kept with the invitation, never shown. Pattern: ^[A-Za-z0-9._:-]{1,120}$.
Responses
- 200application/jsonNothing was sent: the address already has a Praecise account (
has-account: add them), or this product invited it within the last day (already-invited).- statusrequiredOne of: has-account, already-invited.
- expiresstring (date-time)
- statusrequired
- 201application/jsonThe invitation was sent.
- statusinvitedrequired
- expiresstring (date-time)required
- 400application/jsonA field is missing or malformed.
- errorstringrequiredWhat went wrong, in a sentence.
- detailstring
- errorstringrequired
- 401application/jsonNo valid client id and secret.
- errorstringrequiredWhat went wrong, in a sentence.
- detailstring
- errorstringrequired
- 403application/jsonThis client may not invite people, or
invited_byhas not signed in to it.- errorstringrequiredWhat went wrong, in a sentence.
- detailstring
- errorstringrequired
- 429application/jsonOver 60 a minute for the product, or 100 a day for the inviting person.
Retry-Aftersays when to try again.- errorstringrequiredWhat went wrong, in a sentence.
- detailstring
- errorstringrequired
- 502application/jsonThe mail could not be sent. Nothing was kept; try again later.
- errorstringrequiredWhat went wrong, in a sentence.
- detailstring
- errorstringrequired
- 503application/jsonInvitations by products are not switched on.
- errorstringrequiredWhat went wrong, in a sentence.
- detailstring
- errorstringrequired