Organization Management
Create, read, list, and update the organizations a user belongs to in the Blue API.
An organization is the top-level tenant in Blue — it owns workspaces, members, billing, and branding. Organizations are Company objects in the API, and every authenticated request runs inside exactly one of them, selected by the X-Bloo-Company-ID header.
This section covers the organization lifecycle a normal API consumer can drive: create an organization, read one, list the organizations the calling user belongs to, update an organization’s profile, and check whether a slug is free. For adding and removing members, see User Management.
Operations
| Operation | GraphQL | Description |
|---|---|---|
| Create an organization | createCompany | Create a new organization with a name and slug; the caller becomes its OWNER. |
| Get an organization | company(id) | Read a single organization by ID or slug. |
| List organizations | companies(filter, sort, skip, take) | Page through the organizations the calling user is a member of. Returns CompanyPagination ({ items, pageInfo }). |
| Update an organization | editCompany(input) | Update an organization’s name, slug, image, white-label settings, and other profile fields. Requires OWNER access. |
| Check slug availability | isCompanySlugAvailable(slug) | Returns true if no organization already uses that exact slug. |
Membership and lifecycle operations live alongside these: leaveCompany (leave an organization you belong to), removeCompanyUser (remove another member), and deleteCompanyRequest (request deletion of an organization). See User Management for member operations.
Authentication
Send every request to https://api.blue.cc/graphql with your personal access token headers:
X-Bloo-Token-ID: YOUR_TOKEN_ID
X-Bloo-Token-Secret: YOUR_TOKEN_SECRET
X-Bloo-Company-ID: YOUR_COMPANY_IDX-Bloo-Company-ID accepts an organization ID or its slug, and it sets the organization context for the whole request. See Authentication for how to obtain a token and Making Requests for the full request shape. Headers are case-insensitive.
Key concepts
Identifying an organization
Every organization has two stable identifiers, and operations that take an organization accept either:
- ID — a unique cuid generated by Blue when the organization is created. Returned as
Company.id. - Slug — a URL-friendly string. You propose the slug when creating an organization, but Blue normalizes it server-side (lowercased, symbols stripped, spaces replaced with hyphens) and appends a numeric suffix on collision. The final stored slug is returned on the created
Companyand may differ from what you submitted. UseisCompanySlugAvailableto check a candidate before you create, or readCompany.slugafterward to learn the value that was actually stored.
Access control
- A user can only read organizations they are a member of.
companyandcompaniesresolve against the caller’s memberships; requesting an organization you don’t belong to returnsCOMPANY_NOT_FOUND. editCompanyrequiresOWNERaccess to the target organization; other members getFORBIDDEN.- If the organization set in your
X-Bloo-Company-IDheader is banned, every request in that context fails withCOMPANY_BANNED. The ban is enforced when the request context is built from the header — it is not a check performed by thecompanyread path on some other target organization.
Each organization is billed separately. Creating organizations through the API can affect your account’s billing.
Related
- Create an organization
- Get an organization
- User Management — invite, list, and remove members
- Authentication