# Organizations

# Organizations

Organizations group monitored domains by customer within a tenant. One tenant can own many organizations; each organization owns zero or more domains.

## When this matters

MSPs who monitor DMARC for many customers from one Drillmark deployment use organizations to split the UI by customer. Each organization becomes a filter dimension on the dashboard, in alerts, and in exports.

Single-customer deployments can leave everything in the default organization and ignore this screen.

## List

Rows carry:

- Organization name.
- Domain count.
- Last activity timestamp.
- Bunyip sync status (`Synced`, `Stale`, `Disabled`).

## Creating an organization

Which create form is offered depends on the Bunyip sync status reported by the backend:

- **`Synced` or `Stale`**: the SPA shows a Bunyip-federated create card. Clicking Create Organization opens Bunyip; the new org is linked back on next sync.
- **`Disabled`**: the SPA shows a local-create form. Fill in the name and submit. The organization is created at Drillmark's own `organizations` table.
- **`Pending`**: the status has not loaded yet. Neither card is offered until the first status arrives.

`OrgSyncStatus::Disabled` is the state when `MOKOSH_API_URL` is unset or unreachable. To switch between federated and local, configure (or unconfigure) `MOKOSH_API_URL` and restart the api; the Organizations screen will pick up the new posture on next load.

## Moving a domain

Open the organization detail, use Assign Domains to add domains the tenant already monitors, or Remove Domain to free one up for a different organization. Moving a domain does not re-ingest reports; the organization attribution is a join on existing records, applied at read time.

## Deleting an organization

The organization detail has a delete action. Deletion is refused when the organization still owns any domain; move or reassign the domains first.
