Organization
The organization endpoints are deliberately small - they cover reading your org's basic record and updating its name and a few org-wide settings. Plan and subscription details live under billing, not here.
Get organization
GET /api/organizations/me
Returns the current organization's details, or null if the authenticated user isn't attached to an org.
Response 200 OK
{
"id": "org_xyz",
"name": "Acme Corp",
"plan": "team",
"plan_status": "active",
"deletion_scheduled_at": null,
"had_subscription_before_deletion": false,
"default_jurisdiction": "DE",
"timezone": "Europe/Berlin",
"auto_revoke_at_exit": true
}deletion_scheduled_at is set when an org has requested account deletion and is in its grace period; had_subscription_before_deletion records whether it had a paid plan at the time. default_jurisdiction (ISO 3166, e.g. DE or US-CA, or null) decides which legal document rules apply unless an offboarding says otherwise; timezone (IANA) is the zone in which access is revoked at the end of the last working day; auto_revoke_at_exit is whether that scheduled revocation is on.
Update organization
PATCH /api/organizations/me
Required role: Super Admin
Request body
{
"name": "Acme Corporation",
"benefitsRegion": "us",
"defaultJurisdiction": "DE",
"timezone": "Europe/Berlin",
"autoRevokeAtExit": true
}| Field | Required | Description |
|---|---|---|
name | Yes | Non-blank, at most 100 characters. Required on every call, even when only changing another setting |
benefitsRegion | No | "us" for US benefits guidance in the self-service portal, or null / "" for the neutral copy |
defaultJurisdiction | No | ISO 3166 code (e.g. DE, US-CA) or null |
timezone | No | IANA time zone such as Europe/Berlin |
autoRevokeAtExit | No | Boolean - revoke access automatically at the end of the last working day |
Fields you leave out are unchanged. Changing timezone or autoRevokeAtExit also reschedules the pending access revocation of every open offboarding that hasn't been revoked yet (offboardings with a time zone of their own keep it; switching revocation on only schedules those whose exit date is still ahead). Changed settings are audited with their before and after values.
Response 200 OK - the updated organization row.
Plan and usage
There's no /api/organizations/me/usage endpoint. For plan and subscription state, see GET /api/billing/subscription, which returns the org's effective plan, billing interval, and Stripe subscription status. It doesn't report usage counts against plan limits - those are enforced server-side at write time. No paid plan limits offboardings or assets. The only limits are active employees (Starter grows to 100, Team to 500) and seats (3 and 15); adding past either returns a 403 with details in the body rather than a dedicated usage report.
Membership and account
These endpoints act on the signed-in user's own membership and account. They use your session (cookie or Bearer JWT), not an API key.
List your organisations
GET /api/account/memberships
Returns every organisation you belong to, with your role there and whether you are its only Super Admin.
[
{ "org_id": "org_xyz", "org_name": "Acme Corp", "role": "superadmin", "sole_superadmin": true }
]Leave the current organisation
DELETE /api/account/leave-org
Removes you from your active organisation and signs you out. Your account and your other organisations are not affected, and API keys you created in this organisation are revoked. Returns 400 if you are the organisation's only Super Admin (transfer ownership first) or if you started offboardings that are still open.
Delete your account everywhere
DELETE /api/account
Closes your account and removes it from every organisation you belong to, revoking the API keys you created in each. Returns 400 with { "code": "sole_superadmin", "orgs": [...] } while you are the only Super Admin of any organisation - transfer ownership or delete that organisation first. Also returns 400 (with an error message only, no code) while you are the initiator of any offboarding in your current organisation that isn't completed - ask another admin to reassign or complete those first. POST /api/account/transfer-and-delete (hand over the current organisation, then delete your account) applies the same check to your other organisations.
Data exports
GET /api/account/export- your personal data (GDPR Art. 15/20): account details, memberships, the organisation's directory records with your email, offboardings you started, your audit trail, notifications, and your active API keys.POST /api/account/org-export- Super Admins and Admins (or a custom role with bothsettings_manageandaudit_export): starts a complete export of the organisation as a background job and returns202with the export (status: "queued"). 5 a day per user. Returns409withcode: "export_in_progress"and the running export while one is being built, and503when file storage is not configured.GET /api/account/org-export- the organisation's 20 most recent exports, newest first:{ "exports": [...], "storage_configured": true, "expires_after_days": 7 }. Each export hasid,status(queued,running,ready,failedorexpired),requested_by_name,size_bytes,counts(records per file,files,file_errors),error,created_at,completed_at,expires_atanddownload_available.GET /api/account/org-export/:id/download- for a ready export,{ "url": "...", "expires_in": 600 }: a signed link to the ZIP, valid for 10 minutes. The download is recorded in the audit log before the link is made; if that fails, the request fails.409while the export is not ready or after it has expired.
The ZIP holds one JSON array per record type (the organisation, members, the employee directory, offboardings, checklist items, assets, documents, notes, exit interviews, shipments, alumni, custom fields, knowledge transfer, compliance records, legal holds, security incidents, the complete audit log and more), every stored file under files/<offboarding id>/, and manifest.json with each file's record count, size and SHA-256. Exports are deleted 7 days after they are ready. The requester gets an email when the export is ready, or if it fails.