Create an organization
Create a draft organization and become its admin.
The new organization starts as DRAFT. The creator’s membership receives organization:manage_members only. Declaring issuer does not create an issuer grant and does not allow credential:issue.
1. Request URL
POST https://api.medicaltrace.net/v1/organizations
2. Request parameters
| Parameter | In | Required | Type | Description |
|---|---|---|---|---|
Authorization | header | Yes | string | Bearer token from POST /auth/login. The sample value demo.local.jwt is a placeholder. |
legalName | body | Yes | string | Legal name. |
displayName | body | Yes | string | Name shown to other participants. |
capabilities | body | No | string[] | Optional labels. Unknown values return 400. |
3. Request example
curl -s -X POST 'https://api.medicaltrace.net/v1/organizations' \
-H 'content-type: application/json' \
-H 'authorization: Bearer demo.local.jwt' \
-d '{"legalName":"Demo Supply Co. LLC","displayName":"Demo Supply Co.","capabilities":["supplier"]}'4. Response data
HTTP 201. The body below uses the fictional DEMO-BED-001 fixtures.
{
"organization": {
"id": "77777777-7777-4777-8777-777777777777",
"legalName": "Demo Supply Co. LLC",
"displayName": "Demo Supply Co.",
"capabilities": [
"supplier"
],
"status": "DRAFT"
},
"membership": {
"orgId": "77777777-7777-4777-8777-777777777777",
"role": "org_admin",
"permissions": [
"organization:manage_members"
]
}
}5. Response fields
| Field | Type | Description | Example |
|---|---|---|---|
organization.status | string | Always DRAFT on create. | DRAFT |
membership.role | string | Creator role. | org_admin |
membership.permissions | string[] | Only member management until a later grant. | organization:manage_members |