Skip to content
Developer docs

Service accounts (qchsa_)

Give unattended programs their own identity: create a service account, mint and revoke its tokens, bind them, and act on behalf of a person from a product.

A service account is an identity for a program, not a person: a CI pipeline, a sync job, another product. It has an owner, and it acts with its owner's rights at most. Its tokens start with qchsa_. Unlike a personal token, it keeps working when the person who made it changes role, and its use is recorded under its own name.

Create one in the console

  1. Team > Access tokens > Service accounts > New service account.

  2. Name: unique on the platform, such as billing-sync. What it is for. Owner.

  3. Open it and click New token. Give the token a name, an end date and a binding (areas, one project, allowed sites). The value is shown once.

The account's page lists its tokens with their prefix, last use and state; Revoke one that might have leaked; Turn off disables the whole account.

Create one with the API

POST /api/me/service-accounts
Authorization: Bearer qchp_...
Content-Type: application/json

{"name": "billing-sync", "description": "Nightly invoice export to the finance warehouse"}
{"id": 7, "name": "billing-sync", "description": "Nightly invoice export to the finance warehouse",
 "owner": "asha", "is_active": true, "active_tokens": 0, "created_at": "2026-11-18T10:15:00Z"}

Mint a token for it:

POST /api/me/service-accounts/7/tokens
Authorization: Bearer qchp_...
Content-Type: application/json

{"name": "prod", "expires_in_days": 180, "scopes": ["jobs", "databases"]}
{"token": "qchsa_...shown once...",
 "info": {"id": 19, "name": "prod", "prefix": "qchsa_5be0d2", "service_account": "billing-sync",
          "service_account_id": 7, "scopes": ["jobs", "databases"], "expires_at": "2027-05-17T10:16:02Z",
          "active": true}}

Call

Does

GET /api/me/service-accounts

Your service accounts

DELETE /api/me/service-accounts/{sa_id}

Turn one off

GET /api/me/service-accounts/{sa_id}/tokens

Its tokens (prefixes only)

DELETE /api/me/service-accounts/{sa_id}/tokens/{token_id}

Revoke a token

Whether a service token may never expire is a platform policy; by default tokens need an end date.

Products acting for a person

A product registered with REM CloudHub (for example REM Vibe Coder) uses a bound qchsa_ token and may act on behalf of a signed-in person with the headers X-QCH-On-Behalf-Of (or -Email) and X-QCH-User-Token. The call then runs as that person everywhere, with that person's rights, never the token owner's. Only platform-admin personal tokens and product service tokens may send these headers. Organisations can mint their own product token for Vibe Coder under Connectors > Vibe Coder.

Audit

Every create, mint, revoke and turn-off is recorded in Activity, and every call names the service account that made it.

Download: PDF · Word · Markdown