Skip to main content

Org Management

Create, retrieve, and update organisations in Minimal. All System API endpoints require X-Server-Key from your config.yml.


Create an Organisation

Register a new organisation. If it already exists, 208 Already Reported is returned — safe to ignore.

Request Body

FieldTypeRequiredDescription
org_idstring❌ NoIf omitted, Minimal auto-generates a ULID
namestring✅ YesFull name of the organisation
abbreviationstring✅ YesShort identifier — max 5 characters
admin_emailstring✅ YesAdmin email address
admin_namestring✅ YesAdmin display name
addressstring✅ YesStreet address
statestring✅ YesState or province
countrystring✅ YesCountry
pin_codestring✅ YesPostal / ZIP code

Response

201 Created:

{
"code": 201,
"status": "Created",
"message": "organisation created successfully"
}

208 Already Reported — org already exists, safe to proceed:

{
"code": 208,
"status": "Already Reported",
"message": "organisation already exists"
}

Get Org Details

Returns details of a specific organisation.

Required Headers

HeaderDescription
X-Org-IdOrganisation identifier
X-User-IdAuthenticated user's identifier
X-User-RolesComma-separated roles (e.g., admin,user)
X-Server-KeyServer key from config.yml

Get All Orgs

Returns a list of all organisations on the server.

Required Headers

HeaderDescription
X-User-IdAuthenticated user's identifier
X-Server-KeyServer key from config.yml

Update Org Details

Updates an existing organisation. Pass org_id in the body to identify which org to update.

Request Body

FieldTypeRequiredDescription
org_idstring✅ YesID of the org to update
namestring✅ YesUpdated organisation name
abbreviationstring✅ YesShort identifier — max 5 characters
admin_emailstring✅ YesAdmin email address
admin_namestring✅ YesAdmin display name
addressstring✅ YesStreet address
statestring✅ YesState or province
countrystring✅ YesCountry
pin_codestring✅ YesPostal / ZIP code

Response

200 OK:

{
"code": 200,
"status": "OK",
"message": "organisation updated successfully"
}

Common Errors

CodeCause
400Missing or malformed request body
401Missing X-User-Id header
403Invalid or missing X-Server-Key
208Organisation already exists — safe to ignore on create
417A required field is missing
424abbreviation is too long — keep to 5 characters max