Skip to content

Concepts

Understanding how b'nerd organizes identity and resources will make everything else click into place.

Accounts

An account represents a person. It has a login (email address), a display name, and can belong to one or more organizations through memberships. You authenticate as an account — all API tokens and JWT sessions are tied to an account.

GET /accounts/me returns your account together with:

  • memberships[] — every membership the caller holds (one entry per organization the account belongs to), each carrying the membership id, organization_id, role, and permissions.
  • current_organization_id — the organization resolved for the current request (see Organization context below).

Organizations

An organization is the top-level billing and access boundary. Every resource on the platform belongs to an organization. When you sign up you create both an account and a first organization at the same time.

Organization creation is not a self-service API call

There is no public POST /organizations endpoint. Organizations are created through the signup flow or by b'nerd staff via the admin interface. To add an existing account to a second organization, use invitations (see below).

Key properties:

  • Has one or more members (accounts with a role and permissions)
  • Has at least one account with the Admin role at all times — the platform will refuse an action that would remove the last admin
  • Is the scope for static API tokens — a token is valid within the organization it was created for
  • Is the billing entity: invoices, subscriptions, and payment methods are per organization

Organization standing

An organization's standing (approval_status) gates what it may do, independently of any member's role or permissions.

A new organization is created pending and only becomes active once b'nerd staff approve it — see Quick Start: Wait for organization approval. Staff-facing surfaces (the admin interface) are not subject to this gate.

Standing What it can do
pending The onboarding surface only (see below). Everything else — creating a project, provisioning any resource — returns 403 Forbidden (code: "organization_pending_approval").
active Full access, subject to normal role/permission checks.
rejected The same onboarding surface as pending. Everything else returns 403 Forbidden (code: "organization_rejected"); if staff recorded a reason, it appears in errors[0].meta.reason.
suspended All reads (GET/HEAD) and all deletes keep working — including resource-specific delete actions, not just DELETE routes — so the organization can always retrieve or shed its data. Other writes are blocked (403 Forbidden, code: "organization_suspended") except the same onboarding surface a pending organization keeps, plus the suspended-organization exceptions below.

The 403 response uses the standard error envelope. errors[0].meta carries approval_status and organization_id, and — when there is one — a reason:

{
  "request_id": "...",
  "errors": [
    {
      "code": "organization_suspended",
      "message": "This organization is suspended. You can still read and export your data, delete resources, manage billing and contact support.",
      "status": 403,
      "source": { "service": "org_standing", "operation": "enforce" },
      "meta": {
        "retryable": false,
        "approval_status": "suspended",
        "organization_id": "...",
        "reason": "dunning"
      }
    }
  ]
}
code Standing meta.reason
organization_pending_approval pending Not set.
organization_rejected rejected The rejection reason, if b'nerd recorded one.
organization_suspended suspended One of dunning, false_data, abuse, other.

These responses are not retryable: repeating the request does not help until the standing changes. The gate applies to every credential — browser session, JWT and static API token — and to every member of the organization, whatever their role.

The onboarding surface

The same allowlist applies to pending, rejected, and suspended organizations. It covers:

  • your own account: profile, phone, MFA and recovery codes
  • the organization's own record: company data, legal name, VAT ID, address. Once an organization is active or suspended (or has a billing account), only b'nerd can change the legal name, VAT ID or country: a change attempted through the API is refused with 422 Unprocessable Content (code: "billing_identity_locked", errors[0].field names the field). Ask support to change them. A pending organization that has no billing account yet can still correct them itself. If the stored legal name is empty, you can fill it in once.
  • payment methods: you can list them and remove one in every standing. Adding one or setting the default needs an organization that is pending, active, or suspended for dunning; any other organization gets 403 Forbidden (code: "organization_not_eligible", message "This organization cannot add payment methods in its current state."). A rejected organization, or one suspended for another reason, cannot add a payment method. Organizations billed under a signed contract do not use payment methods.
  • members and invitations
  • invoices (GET), EasyBill invoices and their downloads, and billing usage
  • notifications: the inbox, categories, preferences, schedules and absences (including writes — you can still change how you are notified)
  • legal documents, broadcasts, the product catalog and cloud-provider list
  • support tickets and comments

Anything outside it is gated.

While an organization is pending, rejected or suspended, it may send at most 3 invitations in any 30 days. The fourth request is refused with 422 Unprocessable Content (code: "invitation_limit_unapproved"; meta.limit is 3). Changing the email address of an existing invitation is refused with 422 (code: "invitation_email_locked_unapproved"): cancel it and send a new one once the organization is active. Role-only edits still work. Resending an invitation does not count towards the limit, but it is rate limited (429 Too Many Requests). Deleting an invitation does not free a slot: the limit counts invitations created, not invitations still open.

While an organization is suspended

A suspended organization keeps reading and deleting. It also keeps a few writes, so that you can get your data out and stay informed:

  • app credential reveal (POST /apps/{app_id}/credentials/reveal) and backup-key reveal (POST /apps/{app_id}/backup_key/reveal)
  • API-token creation (POST /tokens) and object storage key renewal (POST /rgw/users/{id}/renew_key)
  • accepting updated terms (POST /organizations/{id}/terms/acceptance, browser session only)
  • alert ingest and acknowledgement (POST /projects/{project_id}/alerts, POST /projects/{project_id}/alerts/{id}/ack): an Alertmanager webhook that authenticates with a static token scoped alerts:write is still accepted. A browser or JWT caller who posts to the ingest endpoint gets 403 organization_suspended. Sending a test alert stays blocked.

Existing resources keep running and stay billable; suspension does not delete data. Creating new resources is blocked.

Suspension and unpaid invoices

reason: "dunning" means the organization was suspended because of an open payment problem. A suspension is applied and lifted by b'nerd staff. An organization suspended for dunning can add or change a payment method; for the other reasons it cannot (see organization_not_eligible above). See Billing: Suspended organizations.

Deleting an organization

DELETE /organizations/{id} is not supported yet. After authorization the call answers 422 Unprocessable Content (code: "organization_deletion_not_supported"), changes nothing, and the message tells you to write to support to close an organization — see Support.

View organization details

GET /organizations/{org-id}
Authorization: Bearer <token>

Returns the full organization object including approval_status (pending, active, rejected, or suspended), legal_name, vat_id, address, and created_at.

Payment method requirement

Creating priced resources can also require a payment method on the organization. That is a separate check, with its own error (422 payment_required) — see Billing: Payment method required.

Organization context

When an account is a member of more than one organization, every API request must declare which organization it targets. The server reads ?organization_id=<uuid> from the query string and validates that the caller is actually a member of that organization. Requests that name an organization the caller does not belong to are rejected with 403 Forbidden (fail-closed — there is no server-side default for multi-org accounts).

curl "https://api.bnerd.cloud/projects?organization_id=$ORG_ID" \
  -H "Authorization: Bearer $TOKEN"

The resolved organization_id is echoed back in every response envelope's metadata and in current_organization_id on GET /accounts/me — the dashboard uses this to confirm a switch landed.

Accounts that belong to only one organization continue to work without the parameter; the server resolves the single membership automatically.

Projects

A project groups resources within an organization. Projects are a lightweight namespace: DNS zones, Kubernetes clusters, compute resources, and object storage users are created inside a project.

Projects exist mainly to separate environments (e.g. production, staging) or workloads within a single organization. They do not create separate billing boundaries — all projects within an organization share its quota and billing.

Memberships

A membership links an account to an organization and carries that account's role and permissions within that organization.

  • Role — either Admin or Member. Admins bypass all per-category permission checks. Members are restricted to the permissions explicitly listed on their membership.
  • Permissions — a set of allowed actions (read, create, update, delete) across eight resource categories: projects, openstack, garden, rgw, apps, billing, members, settings.

See Roles & RBAC for the full permission model and built-in presets.

Invitations

You add new members to an organization by sending an invitation to their email address. Invitations carry a role and permissions and expire if not accepted. The invited person accepts or declines while logged in with the invited account (see Joining an additional organization); someone without an account signs up with the link from the invitation mail and joins once their email address is verified. Only the invitation details lookup is public (see Unauthenticated endpoints).

The invitation's token field is returned only to an Admin of the organization who is logged in to the dashboard (a session, not an API token). Members and API tokens never receive it.

An existing account can also be invited into a second (or third, …) organization. When the account holder accepts that invitation they gain an additional membership. From that point on, all their API requests must carry ?organization_id=<uuid> to declare which organization to act in (see Organization context).

Summary

Account
  ├── Membership ──► Organization A
  │                       └── Project
  │                             └── Resources (servers, DNS zones, clusters, …)
  └── Membership ──► Organization B
                          └── Project
                                └── Resources

One account can be a member of multiple organizations, each with different roles and permissions. Permissions are evaluated per-membership — the same account can be an Admin in one organization and a read-only viewer in another.