Organization
The caller's organization, including its credit balance. Everything in HackAgent belongs to an organization.
List organizations
Returns a page holding the caller's organization (the only one a user can see). Login tokens only: API keys get 401.
Create an organization
Creates an organization. The caller does not join it: users are added to an organization when they first sign in. Names are unique. Login tokens only: API keys get 401.
Retrieve an organization
Returns the caller's organization by id; any other id is a 404. Login tokens only: API keys get 401.
Replace an organization
Renames the caller's organization (`name` is its only writable field; the credit balance is read-only). Login tokens only: API keys get 401.
Update an organization
Changes the fields sent of the caller's organization; the dashboard uses it to rename the organization. Login tokens only: API keys get 401.
Delete an organization
Deletes the caller's organization. An organization that still has members cannot be deleted. Login tokens only: API keys get 401.
Get the caller's organization
Returns the organization of the authenticated user, with its credit balance. Accepts an API key or a login token; the SDK uses it to find its organization. 404 when the caller has none.