Skip to content

Create or update admin

Request

ADMIN: Create a new admin or update an existing admin within the tenant scope

Security
authJWT
Bodyapplication/jsonrequired
emailstringrequired

Email of the admin

displayNamestring

Display name of the admin

typestringrequired

Type of the admin

Enum:"SUPER_ADMIN""TENANT_ADMIN"
curl -i -X POST \
  https://docs.pers.ninja/_mock/swagger/admins \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "email": "string",
    "displayName": "string",
    "type": "SUPER_ADMIN"
  }'

Responses

Admin created or updated successfully

Bodyapplication/json
idstringrequired

Id of the admin

emailstringrequired

Email of the admin

displayNamestringrequired

Display name of the admin

typestringrequired

Type of the admin

Enum:"SUPER_ADMIN""TENANT_ADMIN"
tenantsArray of objects(TenantDTO)

Tenant of the admin

Response
{ "id": "string", "email": "string", "displayName": "string", "type": "SUPER_ADMIN", "tenants": [ { … } ] }