Organizations

Create a new organization

POST
/api/organizations

Creates an organization plus its first ADMIN user, seeded credentials document, default document/process types, and a default DynamicProperties (Contact) layout. Rejects duplicates by name or phone number and validates credentials are not already in use.

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

curl -X POST "https://example.com/api/organizations" \  -H "Content-Type: application/json" \  -d '{    "name": "Acme Corp",    "phoneNumber": "+14165550100",    "address": "123 Yonge St, Toronto, ON",    "adminDetails": {      "email": "admin@acme.example",      "password": "CorrectHorseBatteryStaple9!",      "fullName": "Alex Admin"    }  }'
{  "message": "Organization with admin user created successfully",  "data": {    "_id": "5f7b1c2e8a1d4e0012c3b400",    "name": "Acme Corp",    "phoneNumber": "+14165550100"  }}