Skip to main content
POST

Overview

Assigns tenant-wide roles to an email and optionally grants project and region memberships. Repeating the request updates the existing rows. Assignments left out of the request stay as they are. The API key must be a customer API key.

Permissions

Behavior

  • Role titles must match an existing tenant role exactly. The first role is the project-scoped role on every membership and every project invite.
  • When the email already belongs to a tenant user, every listed role is added tenant-wide (ASSIGNED). Roles, projects, and regions omitted from the request stay as they are. Sending the request again replaces the project-scoped role with the first role of the new request.
  • When the email is unknown, projects or regions is required (INVITED). The project invite stores the first role; region invites carry no role. Further roles are validated and returned in role_ids. Send the request again after the user exists to apply every tenant-wide role.
  • project_number is unique per legal entity. If more than one project in the tenant uses it, the API responds with 409; use external_id.
  • Each project entry contains exactly one of project_number or external_id. The same project or region must not appear twice, including when two identifiers resolve to the same target.

Response codes

Authorizations

X-API-Key
string
header
required

API-Schlüssel zur Authentifizierung. Kontaktieren Sie Ihren Customer Success Manager, um einen API-Schlüssel zu erhalten.

Jeder Endpunkt erfordert spezifische Berechtigungen (Scopes); die erforderlichen Scopes werden pro Endpunkt angezeigt.

Body

application/json
email
string<email>
required

E-Mail-Adresse, der die Rollen und Mitgliedschaften zugewiesen werden.

Example:

"jane.doe@example.com"

roles
string[]
required

Titel der mandantenweiten Rollen. Mindestens eine, ohne Duplikate. Jede Rolle muss im Mandanten existieren. Bei Projekten wird die erste Rolle als projektbezogene Rolle verwendet.

Minimum array length: 1
Example:
projects
object[]

Optionale Projekte. Jeder Eintrag enthält genau eines von project_number oder external_id. Dasselbe Projekt darf nicht zweimal vorkommen. Für unbekannte E-Mails ist mindestens ein Projekt oder eine Region erforderlich.

regions
object[]

Optionale Projektregionen, adressiert über region_number. Duplikate werden abgelehnt. Bestehende Benutzer erhalten die Mitgliedschaft sofort; unbekannte E-Mails eine ausstehende Einladung.

Response

Zuweisung oder Einladungen gespeichert

success
boolean
required

Ob die Zuweisung gespeichert wurde

Example:

true

status
enum<string>
required

ASSIGNED, wenn die E-Mail bereits zu einem Benutzer des Mandanten gehört. INVITED, wenn stattdessen ausstehende Projekt- und/oder Regionseinladungen gespeichert wurden.

Available options:
ASSIGNED,
INVITED
Example:

"ASSIGNED"

email
string<email>
required

E-Mail, für die die Zuweisung gespeichert wurde

Example:

"jane.doe@example.com"

role_ids
string<uuid>[]
required

UUIDs der aufgelösten mandantenweiten Rollen, in der Reihenfolge der Anfrage

Example:
project_ids
string<uuid>[]
required

UUIDs der aufgelösten Projekte. Leer, wenn nur Rollen und/oder Regionen zugewiesen wurden.

Example:
region_ids
string<uuid>[]
required

UUIDs der aufgelösten Projektregionen. Leer, wenn keine Regionen angefragt wurden.

Example: