Dokumentation
ReferenzUsers

Create a user.

POST
/users

Create a user of the calling key's tenant. Built for onboarding: a staff list of several hundred people is written one call per person.

What this writes, and what it does not

The user is written in Galilea and nothing else is touched: no login account, no mail. Such a user is complete and can be put into groups immediately, before they have ever logged in — which is what a tenant behind an identity provider needs, since its people otherwise reach Galilea only at their first login. They are adopted at that login, whether it happens through the directory or with a password.

Giving them a login account is the separate POST /users/{userId}/invitation. Putting them into a group is PUT /user-groups/{userGroupId}/users/{userId}. Neither happens here: one call writes one thing, and an onboarding run is those calls in the order the caller wants.

Replaying an export

This operation creates. An address that already belongs to somebody is answered with 400, not with a silent update, so a caller replaying an export is told which of its people already exist rather than overwriting them. The usual shape is to read GET /users first and create only what is missing; correcting somebody who exists is PATCH /users/{userId}.

The address travels in the body

Every other operation addresses a user by the id this one returns, and which GET /users lists. At creation there is no id yet, so the email address takes its place — in the body rather than in the path, so that an address containing @, or a + in a tagged address, is transmitted unchanged and needs no URL encoding.

Addresses are matched case-insensitively, so one person cannot become two users.

Requires the right to create users, which is the tenant manager and the administrator.

Authorization

apiKey
headerX-API-Key<token>

API key issued in the Galilea settings.

Request Body

application/json
  1. body

The user to bring into existence. Group membership is not part of this: a membership is its own resource, created with PUT /user-groups/{userGroupId}/users/{userId} once the user has an id.

emailAddress*string

The address of the person, and also their login name. Matched case-insensitively and lowercased on write. An address that already belongs to a user — of this tenant or of any other, since login names are unique across the installation — is refused with 409 and an Error body; nothing is written.

This is the only operation of the API that identifies a user by their address rather than by their id, because at creation there is no id yet. It travels in the body so that an address containing @, or a + in a tagged address, is transmitted unchanged and needs no URL encoding.

Formatemail
Lengthlength <= 150
role*string

The role of the user. Required: a user without one has no defined access, so it is never guessed.

For a tenant with an external identity provider the role is advisory: the directory pushes the role on every login and overwrites what is set here.

Value in"light""viewer""editor""tenantManager"
identityProvider*string

How this person signs in, as an id from GET /identity-providers. Required: it is what POST /users/{userId}/invitation reads to decide what to do for them, so a user created without one could exist but never be brought in.

The sign-in Galilea manages means Galilea gives them an account and a password; any other entry is a directory that owns the person. A user of a directory is left unmanaged by Galilea: their role is the directory's from then on, sent at every sign-in, and PATCH /users/{userId} refuses a change of it. Their name and language stay changeable as for anyone else.

Must be one of the providers this tenant offers. The catalogue is shared between tenants, so an id that exists but belongs to another tenant is refused with 422 rather than silently accepted. It is fixed at creation: PATCH /users/{userId} does not write this field.

Formatuuid
firstName?string

Given name.

Lengthlength <= 150
lastName?string

Family name.

Lengthlength <= 150
preferredLanguage?string

Language of the Galilea interface and of generated answers.

Value in"de_DE""en_US""nl_NL""sq_AL""hu_HU""es_ES""uk_UA""ro_RO"

Response Body

The user was created.

application/json
  1. response

A user of the tenant, as returned by the user listing.

id*string

Identifier of the user.

Formatuuid
emailAddress*string

The address of the user, and their identity in this API.

Formatemail
firstName?string

Given name.

lastName?string

Family name.

role*string

The role of the user.

Value in"light""viewer""editor""tenantManager"
identityProvider*

How the user signs in, one of the providers of the tenant as listed by GET /identity-providers. Every user has exactly one; it was named when the user was created and never changes. A script reconciling against GET /users reads here which of its people are federated.

status*string

Whether the user has ever logged in. A user stays invited until their first login, whether they were provisioned, invited or arrive through an identity provider.

Value in"invited""active"
groups*array<>

The team groups of the user. The personal group and the group of all users of the tenant are implicit and are not listed.

invitedAt?string

When the user was created in Galilea.

Formatdate-time
lastActiveAt?|

When the user last logged in; null while the user is invited.

Formatdate-time
curl -X POST "https://example.com/users" \  -H "Content-Type: application/json" \  -d '{    "emailAddress": "anna.mueller@kunde.de",    "role": "editor",    "identityProvider": "8f1b0c2e-9a44-11ef-9f3d-4f0c2b6a1d77"  }'
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "emailAddress": "anna.mueller@kunde.de",  "firstName": "Anna",  "lastName": "Müller",  "role": "editor",  "identityProvider": {    "id": "8f1b0c2e-9a44-11ef-9f3d-4f0c2b6a1d77",    "alias": "microsoft-entra"  },  "status": "invited",  "groups": [    {      "id": "7d9030b3-4c0f-4051-9d54-79a6802a0c22",      "name": "Legal"    }  ],  "invitedAt": "2019-08-24T14:15:22Z",  "lastActiveAt": "2019-08-24T14:15:22Z"}