Cubicle

Create a service account

POST
/v1/orgs/{org}/service-accounts

Creates a non-interactive member of the organization for automation, such as CI. Its identity is ORG/NAME (acme/ci). It never signs in, and it starts with no API keys and no Box grants.

  • name must be unique among the organization's live service accounts; a deleted account's name can be used again. Avoid UUID-shaped names: {account} reads a UUID as an ID.
  • role is member (the default) or admin, never owner; Service accounts says what each allows. Running commands always needs a grant.

Next, create an API key for it and grant it access to the Boxes it should use. A Box it creates itself is granted to it automatically.

Only the organization's owners and admins may call this route, with a sign-in session; API keys are refused. See Run CI jobs in Boxes.

Authorization

session
headerAuthorizationBearer <token>

A sign-in session token (jvs_…) from the Dashboard, cubicle login or the device authorization flow.

Path Parameters

org*string

The organization's ID or name. An organization where the caller is not an active member returns 404.

Request Body

application/json
  1. body
name*string
Match^[a-z0-9][a-z0-9-]{0,62}$
role?string
Default"member"
Value in"admin""member"

Response Body

The new service account.

application/json
  1. response

A non-interactive member that one organization owns, identified as ORG/NAME. It receives Box grants like a person, holds the organization's API keys and never signs in.

id*string

The service account's user ID: {account} in service account routes and {user} in grant and member routes.

name*string

The service account's name, the part of identity after the slash.

identity*string

The service account's identity, ORG/NAME, as member and grant lists show it.

role*string

The service account's role in its organization: member or admin, never owner.

Value in"admin""member"
createdAt*string

When the service account was created (ISO 8601, UTC).

keys*array<>

The service account's API keys that are not revoked, oldest first and without their tokens; expired keys stay listed until revoked.

Example Request
curl -X POST 'https://api.cubicle.sh/v1/orgs/acme/service-accounts' \  -H 'Content-Type: application/json' \  -d '{  "name": "ci",  "role": "member"}'
Example Response
{  "id": "8e0a2c4e-6b8d-4f1a-a3c5-9e1b3d5f7a9c",  "name": "ci",  "identity": "acme/ci",  "role": "member",  "createdAt": "2026-11-01T09:00:00.000Z",  "keys": []}