This reference covers the APIs for managing organizations in Eden-MDBS.
Organizations are the top-level container for all resources in Eden-MDBS. Each organization has isolated endpoints, users, and access controls.
Create a new organization. This requires the organization creation token.
The server must have the EDEN_NEW_ORG_TOKEN environment variable configured. Use that token value in the Authorization header.
POST /api/v1/new
Content-Type: application/json
Authorization: Bearer <org_creation_token>| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Unique organization identifier |
description | string | No | Organization description |
super_admins | array | Yes | List of super admin users |
| Field | Type | Required | Description |
|---|---|---|---|
username | string | Yes | Admin username |
password | string | Yes | Admin password |
description | string | No | Admin description |
# The token must match the EDEN_NEW_ORG_TOKEN environment variable on the server
curl http://{host}:8000/api/v1/new \
-H "Content-Type: application/json" \
-H "Authorization: Bearer your_org_creation_token" \
-d '{
"id": "TestOrg",
"description": "test organization",
"super_admins": [
{
"username": "admin",
"password": "password",
"description": null
}
]
}'{
"id": "my_company",
"uuid": "550e8400-e29b-41d4-a716-446655440000"
}Retrieve organization details.
GET /api/v1/organizations
Authorization: Bearer <token>curl http://{host}:8000/api/v1/organizations \
-H "Authorization: Bearer $TOKEN"{
"status": "success",
"data": {
"uuid": "550e8400-e29b-41d4-a716-446655440000",
"name": "my_company",
"created_at": "2024-01-15T10:30:00Z"
}
}Update organization settings. Only super admins can update organization data.
PATCH /api/v1/organizations
Content-Type: application/json
Authorization: Bearer <token>curl http://{host}:8000/api/v1/organizations \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X PATCH \
-d '{
"id": "my_company_renamed"
}'{
"status": "success",
"data": {
"uuid": "550e8400-e29b-41d4-a716-446655440000",
"name": "my_company_renamed",
"updated_at": "2024-01-16T10:30:00Z"
}
}Delete an organization and all its resources.
DELETE /api/v1/organizations
Authorization: Bearer <token>curl http://{host}:8000/api/v1/organizations \
-H "Authorization: Bearer $TOKEN" \
-X DELETE{
"status": "success",
"data": {
"message": "Organization deleted successfully"
}
}Warning: This operation is irreversible and will delete all endpoints, users, templates, and workflows associated with the organization.
| Operation | Required Access |
|---|---|
| Create organization | None (public) |
| Get organization | Read |
| Update organization | SuperAdmin |
| Delete organization | SuperAdmin |
| Get statistics | Admin |
{
"error": "Conflict",
"message": "Organization with name 'my_company' already exists"
}{
"error": "Bad Request",
"message": "Organization name must be alphanumeric with underscores only"
}{
"error": "Access denied",
"message": "SuperAdmin access required for this operation"
}Valid names:
my_companyacme_corp_2024test_orgInvalid names:
my-company (hyphens not allowed)2024_company (starts with number)ab (too short)