Skip to main content
A service account is an identity for a pipeline or another automation that belongs to the organisation, not to a person. It holds a set of permissions and the API keys that use them. Its keys keep working when the member who created them is removed, so offboarding someone never breaks a pipeline they set up. Use a service account for any automation that has to outlive the person who configured it, such as a release pipeline or a nightly export. A personal API key is still fine for a script on your own machine. Before you start: Only the Admin role can see and manage service accounts. An API key can never create, change, or read service accounts, whatever it holds. See Team and roles.

How a Service Account Differs from a Personal Key

Creating a Service Account

  1. Go to Settings → Service accounts and select Create service account.
  2. Enter a Name, for example release-pipeline, and optionally a description of what uses it. The name must be unique among the organisation’s active service accounts.
  3. Choose its permissions with a preset (CI pipeline, Coding agent (MCP), or Read-only reporter) or under Adjust exact permissions. These are the same scopes a key can hold. See the scope reference.
  4. Choose All projects or Specific projects.
  5. Select Create.
Permissions and projects are fixed at creation. You can rename a service account and change its description later, but not what it may do. To change that, create a new service account and disable the old one.
You can only give a service account permissions you hold yourself. Some permissions are never available to it, the same ones no API key can hold: managing members, SSO, API keys, or service accounts, changing organisation settings, connecting integrations, and deciding Policy Approvals. See What only a person can do.

Giving It a Key

  1. Open the service account and select Generate key.
  2. Enter a Key name and choose its expiry (at most 365 days).
  3. Leave Same as the account selected, or choose Narrow it to give this key fewer permissions or fewer projects than the service account holds.
  4. Select Generate, then copy the key. Earnie shows it only once.
The key holds the service account’s permissions and projects, or the subset you chose. A key can never hold a permission or a project the service account doesn’t. The API refuses one with 400 scope_exceeds_service_account. Use the key like any other: send it as Authorization: Bearer <key>, or sign the Earnie CLI in with it. To replace a key’s secret, rotate it: the new key stays with the service account.

Managing Service Accounts

The Service accounts page lists the organisation’s accounts with their permissions, number of active keys, when one of their keys was last used, and who created them. Use the status filter to show Active accounts (the default), Disabled ones, or All. Select a service account to see its permissions, projects, and every key it holds, including revoked and expired ones. From there you can rename it, generate or revoke keys, and disable it. On the API keys page, a key that belongs to a service account names the account as its holder. Its details also show which member generated it.

Disabling a Service Account

Select Disable service account, then Disable to confirm. Earnie revokes every live key of the account in the same step, so anything using them stops working at once with 401 key_revoked. Disabling can’t be undone. A disabled service account stays on the page as a read-only record, so the audit log keeps naming it, and its name becomes free for a new account.

What the Audit Log Records

  • Creating, renaming, and disabling a service account, with the member who did it and, for disabling, the keys it revoked.
  • Generating a key for it, as for any key, naming the service account.
  • Every action a service account key takes, shown as the service account and the key, for example release-pipeline · deploy.

Using the API

Admins can manage service accounts from a signed-in session through the API. An API key gets 403 on these endpoints.

What’s Next

To call the Earnie API with a key, see Using the API.