POST/api/organizationsAuthenticated

Create an organization

Creates an organization and makes the caller its owner. When the admin_only_organization_creation server setting is on, only platform administrators may create organizations. Reserved (hardcoded) organization ids are refused.

operationId post_api_organizationsOrganizations

Authentication & permissionsAuthenticated

Any authenticated user

Accepted credentials
Who may call
Any authenticated user

Request body

Required — created_by is ignored and set to the caller.

application/json
OrganizationDefinition
PropertyTypeDescription
organization_id*string

minLength: 4maxLength: 32pattern: ^[a-z][a-z0-9_-]+$

name*string

minLength: 1maxLength: 64pattern: ^[a-zA-Z0-9]([a-zA-Z0-9 _-]*[a-zA-Z0-9])?$

created_at*number

exclusiveMinimum: 0

created_bystring (uuid) | null (uuid) | null
JSONExample
"organization_id""string"
"name""string"
"created_at"1.5
"created_by""123e4567-e89b-12d3-a456-426614174000"

Responses

application/json
ResourceCreationResponse
PropertyTypeDescription
success*true
message*string
resource_id*string

Identifier of the created / affected resource

JSONExample
"success"true
"message""string"
"resource_id""string"

Example request

bashcurl
curl -X POST 'https://auth.schemavaults.com/api/organizations' \
  -b 'refresh_token_<auth_server_app_id>=<value>' \
  -H 'Content-Type: application/json' \
  -d '{
  "organization_id": "string",
  "name": "string",
  "created_at": 1.5,
  "created_by": "123e4567-e89b-12d3-a456-426614174000"
}'

Other methods on this path

POST /api/organizations | SchemaVaults Auth API