Skip to content

Create a organisation

POST
/organisations
object
data
object
name
required
string
slug
string
description
string
logo
string
street_number
string
vat_id
string
company_id
string
zip_code
integer
state
string
num_of_users
integer
org_disabled
boolean
creator
string
users
One of:

DocumentId reference to plugin::users-permissions.user

string
members
One of:

DocumentId reference to api::organisation-member.organisation-member

string
cloud_credentials
One of:

DocumentId reference to api::cloud-credential.cloud-credential

string
sencai_agents
One of:

DocumentId reference to api::sencai-agent.sencai-agent

string
account_type
One of:

DocumentId reference to api::account-type.account-type

string
gitea_org_name
string
gitea_org_id
integer
gitea_registry_url
string
deleted_at
string format: date-time
budget_monthly

Měsíční cloud budget limit organizace (F2.C.09). 0/null = bez limitu.

number
budget_currency
string
Allowed values: EUR USD CZK GBP
budget_notifications

Seznam emailů pro budget alerty (F2.C.09).

budget_state
required

Aktuální stav vůči budgetu: ok / soft (>=70%) / hard (>=100%, blokuje provisioning) — počítá FinOps watchdog (F2.C.09).

string
Allowed values: ok soft hard
budget_period_spend

Cache aktuální útraty za sledované období (aktualizuje budget watchdog).

number
budget_override

Owner/admin override hard-limit blokace (‘Continue anyway’ s audit logem).

boolean
home_region
required

Logical data-residency region of the tenant (CELL invariant, F2.CELL.01)

string
Allowed values: eu us apac
cell_id

Deployment cell within home_region for blast-radius isolation (CELL invariant, F2.CELL.01)

string
workspace_domain

Google Workspace domain for SSO (hd claim). Set to enable Google Workspace login button for this organisation (F2.W.01). Example: firma.cz

string
sso_enforced

F4.ENTERPRISE.02 — when true, password-grant (email+password) login is rejected for every user belonging to this organisation; only Google Workspace / EntraId SSO login is accepted. May only be enabled while the org has at least one SSO method actually configured (workspace_domain set, or an enabled ms365-integration with entra_tenant_id) — enforced server-side in organisation.update, not just a UI toggle.

boolean
plan_type

PLG subscription plan of the organisation (F2.FLEET.03). Determines agent_limit and feature access.

string
Allowed values: free starter pro enterprise
agent_limit

Maximum number of enrolled agents allowed under the current plan (F2.FLEET.03). Default 3 for free tier.

integer
account_tier

Subscription tier controlling instance/member limits (F2.M.01).

string
Allowed values: free starter professional enterprise
max_instances

Maximum number of non-terminated cloud instances allowed under the current tier (F2.M.01).

integer
max_members

Maximum number of organisation members allowed under the current tier (F2.M.01).

integer
max_monthly_budget

Maximum monthly cloud budget in EUR allowed under the current tier (F2.M.01).

number
plan_valid_until

Expiry date of the current paid plan. null = no expiry (free tier or unlimited enterprise).

string format: date-time
cookie_consents
One of:

DocumentId reference to api::cookie-consent.cookie-consent

string
ropa_entries
One of:

DocumentId reference to api::ropa-entry.ropa-entry

string
platform_events
One of:

DocumentId reference to api::platform-event.platform-event

string
org_status

Lifecycle status of the organisation. archived = set by org merge/split operation (F2.MULTI.04). grace_period (F3.USERPLAN.02) = this org exceeds its owner’s User Plan capacity (max_organisations_owned/max_members_per_org) after their personal trial fell back to Free — 14-day grace window (org_status_changed_at) before sencai-watchdog auto-suspends it; never archived/deleted by this path. suspended here is the SAME read-only mechanism used by the org-level dunning watchdog (F3.BILLING.03) — reused, not reinvented.

string
Allowed values: active archived suspended grace_period
org_status_changed_at

F3.USERPLAN.02 — timestamp of the last org_status transition driven by the User Plan grace-period watchdog (grace_period/suspended). Used to compute the 14-day grace window. Distinct from any org-level dunning timestamp (F3.BILLING.03 keeps its own state on subscription-enrollment).

string format: date-time
billing_country

ISO 3166-1 alpha-2 country code of the billing/registered address (F3.LEGAL.03). Drives VAT/DPH computation in computeTax().

string
is_business

Whether this organisation is a business (B2B) customer vs a private individual (B2C) for VAT purposes (F3.LEGAL.03).

boolean
vat_validated

Whether vat_id was last confirmed valid against the EU VIES registry (F3.LEGAL.03). False also covers ‘VIES was unreachable’ — treat as ‘not confirmed’, never blocks checkout.

boolean
vat_validated_at

Timestamp of the last VIES validation attempt for vat_id (F3.LEGAL.03). Used as the 24h cache TTL anchor in POST /api/billing/validate-vat.

string format: date-time
ip_allowlist

F4.ENTERPRISE.03 — JSON array of CIDR ranges (IPv4/IPv6, e.g. [“203.0.113.0/24”, “2001:db8::/32”]) restricting platform access for members of this organisation. Nullable/empty = no restriction (backward-compatible default). Enforced server-side by global::ip-allowlist-guard against the resolved client IP (X-Forwarded-For aware, see middleware doc comment).

lemmy_community_id

F4.FORUM.05 — numeric Lemmy community id auto-provisioned for this organisation by forum-connector. Null until the async organisation.forum-community-requested event has been processed (best-effort, never blocks org creation).

integer
lemmy_community_name

F4.FORUM.05 — sanitized Lemmy community name (URL-safe slug) matching lemmy_community_id, kept alongside it so the frontend can link straight to forum.sencai.space/c/ without an extra Lemmy lookup.

string
leaderboard_enabled

F4.GAM.06 — opt-in per-org gamification leaderboard (default OFF: comparing employees’ XP is sensitive, never default-on). Self-service field, toggled by an org admin/owner via PUT /api/organisations/:id (is-organisation-role minRole:‘admin’). Gates GET /api/organisations/:id/leaderboard — the endpoint returns 403 while this is false, even for an org admin.

boolean

Created

object
data
object
name
required
string
slug
string
description
string
logo
string
street_number
string
vat_id
string
company_id
string
zip_code
integer
state
string
num_of_users
integer
org_disabled
boolean
creator
string
users
One of:

DocumentId reference to plugin::users-permissions.user

string
members
One of:

DocumentId reference to api::organisation-member.organisation-member

string
cloud_credentials
One of:

DocumentId reference to api::cloud-credential.cloud-credential

string
sencai_agents
One of:

DocumentId reference to api::sencai-agent.sencai-agent

string
account_type
One of:

DocumentId reference to api::account-type.account-type

string
gitea_org_name
string
gitea_org_id
integer
gitea_registry_url
string
deleted_at
string format: date-time
budget_monthly

Měsíční cloud budget limit organizace (F2.C.09). 0/null = bez limitu.

number
budget_currency
string
Allowed values: EUR USD CZK GBP
budget_notifications

Seznam emailů pro budget alerty (F2.C.09).

budget_state
required

Aktuální stav vůči budgetu: ok / soft (>=70%) / hard (>=100%, blokuje provisioning) — počítá FinOps watchdog (F2.C.09).

string
Allowed values: ok soft hard
budget_period_spend

Cache aktuální útraty za sledované období (aktualizuje budget watchdog).

number
budget_override

Owner/admin override hard-limit blokace (‘Continue anyway’ s audit logem).

boolean
home_region
required

Logical data-residency region of the tenant (CELL invariant, F2.CELL.01)

string
Allowed values: eu us apac
cell_id

Deployment cell within home_region for blast-radius isolation (CELL invariant, F2.CELL.01)

string
workspace_domain

Google Workspace domain for SSO (hd claim). Set to enable Google Workspace login button for this organisation (F2.W.01). Example: firma.cz

string
sso_enforced

F4.ENTERPRISE.02 — when true, password-grant (email+password) login is rejected for every user belonging to this organisation; only Google Workspace / EntraId SSO login is accepted. May only be enabled while the org has at least one SSO method actually configured (workspace_domain set, or an enabled ms365-integration with entra_tenant_id) — enforced server-side in organisation.update, not just a UI toggle.

boolean
plan_type

PLG subscription plan of the organisation (F2.FLEET.03). Determines agent_limit and feature access.

string
Allowed values: free starter pro enterprise
agent_limit

Maximum number of enrolled agents allowed under the current plan (F2.FLEET.03). Default 3 for free tier.

integer
account_tier

Subscription tier controlling instance/member limits (F2.M.01).

string
Allowed values: free starter professional enterprise
max_instances

Maximum number of non-terminated cloud instances allowed under the current tier (F2.M.01).

integer
max_members

Maximum number of organisation members allowed under the current tier (F2.M.01).

integer
max_monthly_budget

Maximum monthly cloud budget in EUR allowed under the current tier (F2.M.01).

number
plan_valid_until

Expiry date of the current paid plan. null = no expiry (free tier or unlimited enterprise).

string format: date-time
cookie_consents
One of:

DocumentId reference to api::cookie-consent.cookie-consent

string
ropa_entries
One of:

DocumentId reference to api::ropa-entry.ropa-entry

string
platform_events
One of:

DocumentId reference to api::platform-event.platform-event

string
org_status

Lifecycle status of the organisation. archived = set by org merge/split operation (F2.MULTI.04). grace_period (F3.USERPLAN.02) = this org exceeds its owner’s User Plan capacity (max_organisations_owned/max_members_per_org) after their personal trial fell back to Free — 14-day grace window (org_status_changed_at) before sencai-watchdog auto-suspends it; never archived/deleted by this path. suspended here is the SAME read-only mechanism used by the org-level dunning watchdog (F3.BILLING.03) — reused, not reinvented.

string
Allowed values: active archived suspended grace_period
org_status_changed_at

F3.USERPLAN.02 — timestamp of the last org_status transition driven by the User Plan grace-period watchdog (grace_period/suspended). Used to compute the 14-day grace window. Distinct from any org-level dunning timestamp (F3.BILLING.03 keeps its own state on subscription-enrollment).

string format: date-time
billing_country

ISO 3166-1 alpha-2 country code of the billing/registered address (F3.LEGAL.03). Drives VAT/DPH computation in computeTax().

string
is_business

Whether this organisation is a business (B2B) customer vs a private individual (B2C) for VAT purposes (F3.LEGAL.03).

boolean
vat_validated

Whether vat_id was last confirmed valid against the EU VIES registry (F3.LEGAL.03). False also covers ‘VIES was unreachable’ — treat as ‘not confirmed’, never blocks checkout.

boolean
vat_validated_at

Timestamp of the last VIES validation attempt for vat_id (F3.LEGAL.03). Used as the 24h cache TTL anchor in POST /api/billing/validate-vat.

string format: date-time
ip_allowlist

F4.ENTERPRISE.03 — JSON array of CIDR ranges (IPv4/IPv6, e.g. [“203.0.113.0/24”, “2001:db8::/32”]) restricting platform access for members of this organisation. Nullable/empty = no restriction (backward-compatible default). Enforced server-side by global::ip-allowlist-guard against the resolved client IP (X-Forwarded-For aware, see middleware doc comment).

lemmy_community_id

F4.FORUM.05 — numeric Lemmy community id auto-provisioned for this organisation by forum-connector. Null until the async organisation.forum-community-requested event has been processed (best-effort, never blocks org creation).

integer
lemmy_community_name

F4.FORUM.05 — sanitized Lemmy community name (URL-safe slug) matching lemmy_community_id, kept alongside it so the frontend can link straight to forum.sencai.space/c/ without an extra Lemmy lookup.

string
leaderboard_enabled

F4.GAM.06 — opt-in per-org gamification leaderboard (default OFF: comparing employees’ XP is sensitive, never default-on). Self-service field, toggled by an org admin/owner via PUT /api/organisations/:id (is-organisation-role minRole:‘admin’). Gates GET /api/organisations/:id/leaderboard — the endpoint returns 403 while this is false, even for an org admin.

boolean
documentId
string
id
integer
createdAt
string format: date-time
updatedAt
string format: date-time
publishedAt
string format: date-time
nullable

Validation error

Missing or invalid authentication

Not authorized (tenant scope or capability)