Organisations
The organisations a person belongs to at Praecise and their members, for the products named to use them.
One organisation and one directory of people at Praecise. The organisation and its members are Praecise Spaces'; people are Praecise accounts; a product keeps references (the organisation's id, the person's address) and its own roles. Only the products the deployment names may call this door; any other gets 403 forbidden. Read calling Spaces first.
GET https://inbox.praecise.com/api/spaces/orgs: The organisations the account belongs to, with its role in eachPOST https://inbox.praecise.com/api/spaces/orgs: Make an organisation; the account becomes its admin (takes anIdempotency-Key)GET https://inbox.praecise.com/api/spaces/orgs/{id}: One organisation the account belongs toGET https://inbox.praecise.com/api/spaces/orgs/{id}/role: What role a person has in an organisation the account belongs to (null: not a member), with the version to cache it byGET https://inbox.praecise.com/api/spaces/orgs/{id}/domains: The verified domains of an organisation the account belongs to (any role)GET https://inbox.praecise.com/api/spaces/orgs/{id}/mail: An organisation's mail for a product's selectors: the mailboxes the account may use and the verified domains with whether mail is set up on eachGET https://inbox.praecise.com/api/spaces/orgs/{id}/mailboxes: The mailboxes of an organisation the account may useGET https://inbox.praecise.com/api/spaces/orgs/{id}/members: The members of an organisation the account belongs toPUT https://inbox.praecise.com/api/spaces/orgs/{id}/members: Add a member or change a role; someone without a Praecise account is invited (takes anIdempotency-Key)DELETE https://inbox.praecise.com/api/spaces/orgs/{id}/members/{email}: Remove a member (an admin only) (takes anIdempotency-Key)
Adding a member
set_member takes { email, role } (member or admin) and is for admins of the organisation. If the address is new to the organisation, Spaces first asks the account service to invite it to Praecise (once, by whichever product adds them): invitation in the answer is has-account, invited, already-invited or not-sent (invitations are off here: the member is kept and let in at sign-in). If the invitation cannot be sent, nobody is added: 502, try again.
An organisation needs at least one admin.
Written and kept by Praecise Spaces. Read from https://spaces.praecise.com/guides/organisations.md.