Create an Organization
POST/user-svc/organization
Allows a logged-in user to create a new organization. The user initiating the request will be assigned the role of admin for that organization.
The initiating user will receive a dynamic role in the format user-svc:org:{organizationId}:admin
, where $organization-slug
is a unique identifier for the created organization.
Dynamic roles are generated based on specific user-resource associations, offering more flexible permission management compared to static roles.
Request
- application/json
Body
required
Create User Request
id string
name string
Full name of the organization.
slug string
URL-friendly unique (inside the Singularon platform) identifier for the organization
.
Responses
- 200
- 400
- 401
- 500
User created successfully
- application/json
- Schema
- Example (from schema)
Schema
object
{}
Invalid JSON
- application/json
- Schema
- Example (from schema)
Schema
error string
{
"error": "string"
}
Unauthorized
- application/json
- Schema
- Example (from schema)
Schema
error string
{
"error": "string"
}
Internal Server Error
- application/json
- Schema
- Example (from schema)
Schema
error string
{
"error": "string"
}
Loading...