Skip to content
API reference2f1aba7 · docs(api): organization

Organization

These endpoints say who your key acts as and what your organization is on. A key belongs to one organization, so there is only one to look at. Paths name it by its ID or by its slug.

Endpoints

Start with GET /v1/users/me to check that a key works: it answers with the person the key acts as. GET /v1/organizations lists the key's organization, which is the quickest way to find its slug. The plan and usage endpoints show what the organization may use and what it has used, so a script can check for room before it creates a cube or starts a build.

Shell
curl -sS "https://api.cubecen.com/v1/organizations/<org>/plan" \
  -H "Authorization: Bearer $CUBECEN_API_KEY"

Get the current user

GET/v1/users/me
Read-only key

Returns the person the API key acts as: the key's owner.

Use it to check that a key works, and to see who the builds and changes made with it are credited to. The id is the one that created_by shows on builds, deployments and projects.

A key acts with its owner's role in its organization. If the owner has left the organization, or can no longer read it, the request is refused.

Responses

StatusDescription
200

The user the key acts as.

User object6 fields
idstringrequired

The user's ID. It is the created_by of what the user made.

emailstringrequired

The user's email address.

email_verifiedbooleanrequired

true once the user has confirmed the address.

first_namestring | nullrequired

The user's first name. null when there is none.

last_namestring | nullrequired

The user's last name. null when there is none.

avatar_urlstring | nullrequired

The address of the user's profile picture. null when there is none.

401

The API key is missing, unknown, expired or revoked.

403

The key may not do this. Its access level or its owner's role does not allow it, or the organization is not the key's.

429

The key made too many requests. Wait for the number of seconds in Retry-After, then retry.

500

Something went wrong on our side. Retry the request with backoff. If it keeps failing, give support the error.requestId.

503

The service is temporarily unavailable. Retry the same request with backoff: wait a little longer after each failed attempt. The error code can differ from the one shown.

Example

Shell
curl -sS "https://api.cubecen.com/v1/users/me" \
  -H "Authorization: Bearer $CUBECEN_API_KEY"
Response
{
  "id": "c41e7a02-93bd-4d58-b0f6-6a1d2e8f4c73",
  "email": "ada@example.com",
  "email_verified": true,
  "first_name": "Ada",
  "last_name": "Lovelace",
  "avatar_url": null
}

List organizations

GET/v1/organizations
Read-only key

Returns the organizations the API key can act in.

A key belongs to one organization, so the list holds that organization and no other, whatever others its owner belongs to. Use it to find the id and slug of the key's organization: paths take either one as {organizationId}.

The answer is a page, with data and after. A key lists one organization, so after is always null and the first page is the only page. limit and after are still checked, and a value that is not valid is refused with 400.

Query parameters

NameTypeDescription
limitinteger

The most organizations to return in a page, from 1 to 100. The default is 25.

afterstring

Where the next page starts: an opaque value of at most 512 characters. Send the after of the previous page as it is. A key never has a next page, so leave it out.

Responses

StatusDescription
200

A page with the key's organization.

OrganizationPage object2 fields
dataarray of objectrequired

The organizations on this page.

data items7 fields
idstringrequired

The organization's ID.

namestringrequired

The organization's name.

slugstringrequired

A short, unique name for the organization. Paths accept it in place of the ID.

statusstringrequired

The organization's state. It is always active: an organization that was deleted cannot be read.

One of: active

default_project_idstring | nullrequired

The ID of the organization's default project: the one that new cubes are put in by default. null when the organization has none, for example after its default project was deleted.

created_atstringrequired

When the organization was created.

updated_atstringrequired

When the organization was last changed.

afterstring | nullrequired

Send it as after to get the next page. null on the last page. Always null for a key, which lists one organization.

400

The request is not valid. error.field names the field to blame, when there is one.

401

The API key is missing, unknown, expired or revoked.

403

The key may not do this. Its access level or its owner's role does not allow it, or the organization is not the key's.

429

The key made too many requests. Wait for the number of seconds in Retry-After, then retry.

500

Something went wrong on our side. Retry the request with backoff. If it keeps failing, give support the error.requestId.

503

The service is temporarily unavailable. Retry the same request with backoff: wait a little longer after each failed attempt. The error code can differ from the one shown.

Example

Shell
curl -sS "https://api.cubecen.com/v1/organizations" \
  -H "Authorization: Bearer $CUBECEN_API_KEY"
Response
{
  "data": [
    {
      "id": "5d0f3a8c-2b19-4e7d-a6c4-1f8e9b027d35",
      "name": "Acme",
      "slug": "acme",
      "status": "active",
      "default_project_id": "9b2c5d1e-7a34-4f6b-8e21-3c0d5a9f1b47",
      "created_at": "2026-09-14T08:25:41Z",
      "updated_at": "2026-09-14T08:30:12Z"
    }
  ],
  "after": null
}

Get an organization

GET/v1/organizations/{org}
Read-only key

Returns an organization: its name, slug, default project and dates.

A key can read only its own organization. Another organization, by ID or by slug, is refused with 403, and so is a slug that matches no organization. An ID that matches no organization at all is 404.

default_project_id is the project that new cubes go to by default. It is null when the organization has none.

Path parameters

NameTypeDescription
orgrequiredstring

The ID or slug of the organization. A key works in one organization. Another organization, by ID or by slug, is refused with 403, and so is a slug that matches no organization. An ID that matches no organization at all is 404.

Responses

StatusDescription
200

The organization.

Organization object7 fields
idstringrequired

The organization's ID.

namestringrequired

The organization's name.

slugstringrequired

A short, unique name for the organization. Paths accept it in place of the ID.

statusstringrequired

The organization's state. It is always active: an organization that was deleted cannot be read.

One of: active

default_project_idstring | nullrequired

The ID of the organization's default project: the one that new cubes are put in by default. null when the organization has none, for example after its default project was deleted.

created_atstringrequired

When the organization was created.

updated_atstringrequired

When the organization was last changed.

401

The API key is missing, unknown, expired or revoked.

403

The key may not do this. Its access level or its owner's role does not allow it, or the organization is not the key's.

404

Nothing was found at this address. An organization ID that matches no organization is 404, and so is a project, cube or other ID or slug in the path that matches nothing in the organization (or in the project or cube that the path names). An organization slug that matches nothing, and another organization by ID or by slug, is 403, not 404.

429

The key made too many requests. Wait for the number of seconds in Retry-After, then retry.

500

Something went wrong on our side. Retry the request with backoff. If it keeps failing, give support the error.requestId.

503

The service is temporarily unavailable. Retry the same request with backoff: wait a little longer after each failed attempt. The error code can differ from the one shown.

Example

Shell
curl -sS "https://api.cubecen.com/v1/organizations/<org>" \
  -H "Authorization: Bearer $CUBECEN_API_KEY"
Response
{
  "id": "5d0f3a8c-2b19-4e7d-a6c4-1f8e9b027d35",
  "name": "Acme",
  "slug": "acme",
  "status": "active",
  "default_project_id": "9b2c5d1e-7a34-4f6b-8e21-3c0d5a9f1b47",
  "created_at": "2026-09-14T08:25:41Z",
  "updated_at": "2026-09-14T08:30:12Z"
}

Get the plan of an organization

GET/v1/organizations/{org}/plan
Read-only key

Returns the plan the organization is on, what the plan allows, and what the organization has used so far.

Use it before you create a cube or start a build, to see how much room is left, or to warn when a limit is close. plan names the plan and the period that its build minutes and bandwidth count in. limits holds what the plan allows, and a limit of null has no ceiling. usage holds what the organization has used. over_limit lists the limits it has passed, and near_limit the ones that are at least 80 percent used but not yet used up. sizes lists the sizes a cube can have.

When plan.overage is false, as on the Free plan, builds stop once the period's build minutes are used up, and the cubes are paused once its bandwidth is used up. suspension is set while they are paused. A cube is not stopped for passing the count of cubes or previews: what already runs keeps running, and no more can be made.

For the use of each day and of each cube, see getOrganizationUsage.

Path parameters

NameTypeDescription
orgrequiredstring

The ID or slug of the organization. A key works in one organization. Another organization, by ID or by slug, is refused with 403, and so is a slug that matches no organization. An ID that matches no organization at all is 404.

Responses

StatusDescription
200

The plan, its limits and what the organization has used.

OrganizationPlan object7 fields
planobjectrequired

The plan the organization is on.

plan object6 fields
idstringrequired

The plan's ID: free, launch, scale or enterprise.

One of: free, launch, scale, enterprise

namestringrequired

The plan's name, such as Free.

overagebooleanrequired

true when the organization can go on past the build minutes and bandwidth that the plan includes. false when it cannot: builds stop once the period's build minutes are used up, and the cubes are paused once its bandwidth is used up.

trialbooleanrequired

true while the plan is on a trial. During a trial the included amounts are firm limits, as when overage is false.

period_startstringrequired

When the current period starts. Build minutes and bandwidth are counted per period: a calendar month in UTC, or the billing period on a paid plan.

period_endstringrequired

When the current period ends. The next period starts then.

limitsobjectrequired

What the plan allows.

limits object9 fields
cubesinteger | nullrequired

The most cubes that the organization can have.

memory_mib_per_cubeintegerrequired

The most memory that a cube can have, in MiB.

previewsinteger | nullrequired

The most previews that can be open at once.

build_minutesinteger | nullrequired

The build minutes that the plan includes in each period.

bandwidth_gbinteger | nullrequired

The bandwidth that the plan includes in each period, in GB of 10^9 bytes.

metrics_retention_daysintegerrequired

How many days the metrics of a cube are kept.

logs_retention_daysintegerrequired

How many days the logs of a cube are kept.

databasesobjectrequired

What the plan allows for databases. All zero on a plan without databases, such as Free.

databases object5 fields
countintegerrequired

The most databases that the organization can have.

max_cunumberrequired

The most compute each database can scale up to, in compute units: 1 unit is 1 vCPU and 4 GiB of memory.

storage_gbintegerrequired

The storage of each database, in GB of 10^9 bytes.

compute_hoursintegerrequired

The compute each database can use in a calendar month (UTC), in compute-unit hours.

transfer_gbintegerrequired

The data transfer of each database in a calendar month, in GB.

sizestringrequired

The largest size that a cube can have on this plan, for its memory: small, medium, large or xlarge.

One of: small, medium, large, xlarge

usageobjectrequired

What the organization has used.

usage object6 fields
cubesintegerrequired

How many cubes the organization has.

previewsintegerrequired

How many previews are open.

build_minutesinteger | nullrequired

The build minutes used in the current period, counting a started minute as a whole one. null when it is not available.

bandwidth_bytesinteger | nullrequired

The bytes of responses served in the current period. null when it is not available.

as_ofstringrequired

When this answer was made.

databasesintegerrequired

How many databases the organization has. One that is being deleted counts until its deletion ends.

over_limitarray of stringrequired

The limits that the organization has passed: cubes, previews, build_minutes or bandwidth_gb. For cubes and previews it has more than the plan allows: what runs keeps running, and no more can be made. For build_minutes and bandwidth_gb the period's amount is used up: see plan.overage for what that means. databases: it has more databases than the plan allows, after a change of plan; they keep running, and no more can be made. Empty when there is none.

sizesarray of objectrequired

The sizes that a cube can have, smallest first. A plan allows the sizes up to limits.size.

sizes items5 fields
sizestringrequired

The size's ID: small, medium, large or xlarge.

One of: small, medium, large, xlarge

namestringrequired

The size's name.

One of: Small, Medium, Large, XLarge

memory_mibintegerrequired

The memory that a cube of this size is limited to, in MiB.

cpunumberrequired

The most CPU that a cube of this size can use, in cores.

availablebooleanrequired

true when a new cube can have this size now. A size can be listed and not available: no new cube gets it yet.

near_limitarray of stringrequired

The limits that are at least 80 percent used but not yet used up: build_minutes or bandwidth_gb. Empty when there is none.

suspensionobject | nullrequired

Why the organization's cubes are paused, while they are. null when they are not.

401

The API key is missing, unknown, expired or revoked.

403

The key may not do this. Its access level or its owner's role does not allow it, or the organization is not the key's.

404

Nothing was found at this address. An organization ID that matches no organization is 404, and so is a project, cube or other ID or slug in the path that matches nothing in the organization (or in the project or cube that the path names). An organization slug that matches nothing, and another organization by ID or by slug, is 403, not 404.

429

The key made too many requests. Wait for the number of seconds in Retry-After, then retry.

500

Something went wrong on our side. Retry the request with backoff. If it keeps failing, give support the error.requestId.

503

The service is temporarily unavailable. Retry the same request with backoff: wait a little longer after each failed attempt. The error code can differ from the one shown.

Example

Shell
curl -sS "https://api.cubecen.com/v1/organizations/<org>/plan" \
  -H "Authorization: Bearer $CUBECEN_API_KEY"
Response
{
  "plan": {
    "id": "free",
    "name": "Free",
    "overage": false,
    "trial": false,
    "period_start": "2026-10-01T00:00:00Z",
    "period_end": "2026-11-01T00:00:00Z"
  },
  "limits": {
    "cubes": 3,
    "memory_mib_per_cube": 2048,
    "previews": 0,
    "build_minutes": 300,
    "bandwidth_gb": 10,
    "metrics_retention_days": 30,
    "logs_retention_days": 7,
    "size": "small",
    "databases": {
      "count": 0,
      "max_cu": 0,
      "storage_gb": 0,
      "compute_hours": 0,
      "transfer_gb": 0
    }
  },
  "sizes": [
    {
      "size": "small",
      "name": "Small",
      "memory_mib": 2048,
      "cpu": 0.5,
      "available": true
    },
    {
      "size": "medium",
      "name": "Medium",
      "memory_mib": 4096,
      "cpu": 1,
      "available": true
    },
    {
      "size": "large",
      "name": "Large",
      "memory_mib": 8192,
      "cpu": 2,
      "available": false
    },
    {
      "size": "xlarge",
      "name": "XLarge",
      "memory_mib": 16384,
      "cpu": 4,
      "available": false
    }
  ],
  "usage": {
    "cubes": 2,
    "previews": 0,
    "build_minutes": 42,
    "bandwidth_bytes": 1834000,
    "as_of": "2026-10-25T09:30:00Z",
    "databases": 0
  },
  "over_limit": [],
  "near_limit": [],
  "suspension": null
}

Get the usage of an organization

GET/v1/organizations/{org}/usage
Read-only key

Returns what the organization used over a range of days: build minutes, bandwidth, the hours its cubes ran and the requests they answered.

Without from and to, the range is the current month. The answer holds the totals of the range, the use of each day in days, and the use of each cube in cubes. A day without any use is left out of days.

Days are UTC days. to is not counted, and the range can be at most 93 days. Usage is collected about every 15 minutes, not as it happens: as_of says when it was last collected, so the latest minutes can be missing.

The amounts the plan counts against its limits are in getOrganizationPlan.

Path parameters

NameTypeDescription
orgrequiredstring

The ID or slug of the organization. A key works in one organization. Another organization, by ID or by slug, is refused with 403, and so is a slug that matches no organization. An ID that matches no organization at all is 404.

Query parameters

NameTypeDescription
fromstring

The first day to count, as a UTC date: YYYY-MM-DD. The default is the first day of the current month.

tostring

The day to stop at, as a UTC date: YYYY-MM-DD. This day is not counted. The default is the first day of the next month. It must be after from, and at most 93 days after it.

Responses

StatusDescription
200

The use of the range, in total, by day and by cube.

OrganizationUsage object8 fields
fromstringrequired

The first day counted.

tostringrequired

The day the range stops at. This day is not counted.

as_ofstring | nullrequired

When the usage was last collected. null before the first collection.

totalsobjectrequired

The use of the whole range.

totals object4 fields
build_minutesintegerrequired

Minutes spent building, rounded up to a whole minute. Every figure is rounded on its own, so days and cubes may not add up to the total.

bandwidth_bytesintegerrequired

Bytes of responses served.

instance_hoursnumberrequired

Hours that the instances of the cubes ran, rounded down to two decimals.

requestsintegerrequired

Requests answered.

instance_hours_by_sizeobjectrequired

The instance hours of totals, split by the size of the cubes.

instance_hours_by_size object4 fields
smallnumberrequired

Instance hours of cubes of size small.

mediumnumberrequired

Instance hours of cubes of size medium.

largenumberrequired

Instance hours of cubes of size large.

xlargenumberrequired

Instance hours of cubes of size xlarge.

daysarray of objectrequired

The use of each UTC day that has any, oldest first. A day without use is left out.

days items5 fields
build_minutesintegerrequired

Minutes spent building that day, rounded up to a whole minute.

bandwidth_bytesintegerrequired

Bytes of responses served that day.

instance_hoursnumberrequired

Hours that the instances of the cubes ran that day, rounded down to two decimals.

requestsintegerrequired

Requests answered that day.

daystringrequired

The day, as a date.

cubesarray of objectrequired

The use of each cube in the range, by name. A cube that was deleted is listed while it has use in the range.

cubes items10 fields
build_minutesintegerrequired

Minutes spent building the cube, rounded up to a whole minute.

bandwidth_bytesintegerrequired

Bytes of responses served by the cube.

instance_hoursnumberrequired

Hours that the instances of the cube ran, rounded down to two decimals.

requestsintegerrequired

Requests that the cube answered.

application_idstringrequired

The cube's ID.

project_idstringrequired

The ID of the project the cube is in.

namestringrequired

The cube's name.

slugstringrequired

The cube's slug.

deletedbooleanrequired

true when the cube was deleted. It is listed because it has use in the range.

previewsobjectrequired

The part of the cube's use that its previews made. It is included in the figures above.

previews object4 fields
build_minutesintegerrequired

Minutes spent building, rounded up to a whole minute. Every figure is rounded on its own, so days and cubes may not add up to the total.

bandwidth_bytesintegerrequired

Bytes of responses served.

instance_hoursnumberrequired

Hours that the instances of the cubes ran, rounded down to two decimals.

requestsintegerrequired

Requests answered.

databasesarray of object | null

The use of each database in the range. A database that was deleted is listed while it has use in the range.

400

The request is not valid. error.field names the field to blame, when there is one.

401

The API key is missing, unknown, expired or revoked.

403

The key may not do this. Its access level or its owner's role does not allow it, or the organization is not the key's.

404

Nothing was found at this address. An organization ID that matches no organization is 404, and so is a project, cube or other ID or slug in the path that matches nothing in the organization (or in the project or cube that the path names). An organization slug that matches nothing, and another organization by ID or by slug, is 403, not 404.

429

The key made too many requests. Wait for the number of seconds in Retry-After, then retry.

500

Something went wrong on our side. Retry the request with backoff. If it keeps failing, give support the error.requestId.

503

The service is temporarily unavailable. Retry the same request with backoff: wait a little longer after each failed attempt. The error code can differ from the one shown.

Example

Shell
curl -sS "https://api.cubecen.com/v1/organizations/<org>/usage" \
  -H "Authorization: Bearer $CUBECEN_API_KEY"
Response
{
  "from": "2026-10-01",
  "to": "2026-11-01",
  "as_of": "2026-10-25T09:30:00Z",
  "totals": {
    "build_minutes": 42,
    "bandwidth_bytes": 1834000,
    "instance_hours": 57.5,
    "requests": 4810
  },
  "instance_hours_by_size": {
    "small": 57.5,
    "medium": 0,
    "large": 0,
    "xlarge": 0
  },
  "days": [
    {
      "day": "2026-10-23",
      "build_minutes": 12,
      "bandwidth_bytes": 600000,
      "instance_hours": 24,
      "requests": 1500
    },
    {
      "day": "2026-10-24",
      "build_minutes": 30,
      "bandwidth_bytes": 900000,
      "instance_hours": 24,
      "requests": 2300
    },
    {
      "day": "2026-10-25",
      "build_minutes": 0,
      "bandwidth_bytes": 334000,
      "instance_hours": 9.5,
      "requests": 1010
    }
  ],
  "cubes": [
    {
      "application_id": "b64f2a19-0c83-4d7e-9a15-e2d83c7f5a40",
      "project_id": "9b2c5d1e-7a34-4f6b-8e21-3c0d5a9f1b47",
      "name": "api",
      "slug": "api",
      "deleted": false,
      "build_minutes": 12,
      "bandwidth_bytes": 500000,
      "instance_hours": 24,
      "requests": 1000,
      "previews": {
        "build_minutes": 0,
        "bandwidth_bytes": 0,
        "instance_hours": 0,
        "requests": 0
      }
    },
    {
      "application_id": "f1a83d52-6e07-4b9c-8d34-7a0c9e215b68",
      "project_id": "9b2c5d1e-7a34-4f6b-8e21-3c0d5a9f1b47",
      "name": "web",
      "slug": "web",
      "deleted": false,
      "build_minutes": 30,
      "bandwidth_bytes": 1334000,
      "instance_hours": 33.5,
      "requests": 3810,
      "previews": {
        "build_minutes": 0,
        "bandwidth_bytes": 0,
        "instance_hours": 0,
        "requests": 0
      }
    }
  ]
}

Get a summary of an organization

GET/v1/organizations/{org}/summary
Read-only key

Returns counts for the organization: its projects, its cubes by state, the releases in progress and the connected GitHub installations.

Use it for a quick look at an organization without listing everything in it. applications counts the cubes that still exist: active cubes are ready, creating cubes are still being set up, and failed cubes could not be set up. live counts the cubes that have a deployment serving traffic. releases_in_progress counts the cubes that have a build or a deployment running now.

members and pending_invitations are always null for an API key: a key cannot see the people of an organization.

Path parameters

NameTypeDescription
orgrequiredstring

The ID or slug of the organization. A key works in one organization. Another organization, by ID or by slug, is refused with 403, and so is a slug that matches no organization. An ID that matches no organization at all is 404.

Responses

StatusDescription
200

The counts.

OrganizationSummary object6 fields
projectsintegerrequired

How many projects the organization has.

applicationsobjectrequired

How many cubes the organization has, by state.

applications object5 fields
totalintegerrequired

How many cubes still exist.

activeintegerrequired

How many cubes are ready.

creatingintegerrequired

How many cubes are still being set up.

failedintegerrequired

How many cubes could not be set up.

liveintegerrequired

How many cubes have a deployment serving traffic.

releases_in_progressintegerrequired

How many cubes have a build or a deployment running now.

github_installationsintegerrequired

How many GitHub installations are connected.

membersinteger | nullrequired

How many members the organization has. Always null for an API key, which cannot see the people of an organization.

pending_invitationsinteger | nullrequired

How many invitations are waiting to be accepted. Always null for an API key.

401

The API key is missing, unknown, expired or revoked.

403

The key may not do this. Its access level or its owner's role does not allow it, or the organization is not the key's.

404

Nothing was found at this address. An organization ID that matches no organization is 404, and so is a project, cube or other ID or slug in the path that matches nothing in the organization (or in the project or cube that the path names). An organization slug that matches nothing, and another organization by ID or by slug, is 403, not 404.

429

The key made too many requests. Wait for the number of seconds in Retry-After, then retry.

500

Something went wrong on our side. Retry the request with backoff. If it keeps failing, give support the error.requestId.

503

The service is temporarily unavailable. Retry the same request with backoff: wait a little longer after each failed attempt. The error code can differ from the one shown.

Example

Shell
curl -sS "https://api.cubecen.com/v1/organizations/<org>/summary" \
  -H "Authorization: Bearer $CUBECEN_API_KEY"
Response
{
  "projects": 2,
  "applications": {
    "total": 5,
    "active": 4,
    "creating": 0,
    "failed": 1,
    "live": 3
  },
  "releases_in_progress": 1,
  "github_installations": 1,
  "members": null,
  "pending_invitations": null
}