Skip to Content
Xeonr Developer Docs

Create Team Service Account

POST
/xeonr.auth.api.v1.ServiceAccountsService/CreateTeamServiceAccount

Creates a service account on the calling service account's application, owned by team and added to it as a member with application_roles (the calling application's team roles), holding scopes (the application's own, which cap its keys). The team must be entitled to the application, and on_behalf_of_user must own the team or hold the application's team roles there, giving none ranked above their own (a bare membership needs the highest-ranked role). Returns no token: issue keys through ApiKeysService.

Service accounts only, of a platform application.

Required scopes: auth:service-accounts:manage:own

Authorization

AuthorizationBearer <token>

JWT access token obtained via OAuth2 flow or service account

In: header

Header Parameters

Connect-Protocol-Version?number

Define the version of the Connect protocol

Connect-Timeout-Ms?number

Define the timeout, in ms

Request Body

application/json

team?string

A team URN or slug; it must be entitled to the calling application.

Length1 <= length <= 128
name?string

Unique among the application's service accounts; no "@".

Match^[A-Za-z0-9][A-Za-z0-9._-]*$
Length1 <= length <= 64
description?string
Lengthlength <= 512
applicationRoles?array<>

Names of the calling application's team roles to hold in the team.

Itemsitems <= 20
onBehalfOfUser?string

urn:xeonr:auth:uid:user: of the person asking. Required.

Length1 <= length <= 128
scopes?array<>

The calling application's own scopes the account may hold, which caps what its API keys may carry (ApiKeysService). Never a service-account-only or role-gated scope, nor another application's.

Itemsitems <= 64
[key: string]?never

Response Body

application/json

application/json

curl -X POST "https://auth.xeonr.io/xeonr.auth.api.v1.ServiceAccountsService/CreateTeamServiceAccount" \  -H "Connect-Protocol-Version: 1" \  -H "Connect-Timeout-Ms: 1000" \  -H "Content-Type: application/json" \  -d '{}'
{
  "serviceAccount": {
    "id": "string",
    "name": "string",
    "description": "string",
    "applicationId": "string",
    "ownerTeam": "string",
    "ownerTeamSlug": "string",
    "applicationRoles": [
      "string"
    ],
    "enabled": true,
    "createdBy": "string",
    "assertedBy": "string",
    "createdAt": "2023-01-15T01:30:15.01Z",
    "updatedAt": "2023-01-15T01:30:15.01Z",
    "scopes": [
      "string"
    ]
  }
}

xeonr.auth.api.v1.ServiceAccountsService

ServiceAccountsService lets a product create and manage service accounts on its OWN application that belong to one of the teams entitled to it: a team's bot in the forge, say (AUTH-309). Each account is owned by the team, is a member of it with the application team roles asked for, and records the person who asked and the service account that vouched for them. Service accounts only, and only a platform application's own: every method refuses a person's token, is confined to the calling service account's application, and needs `auth:service-accounts:manage:own`, which no client holds until an organisation administrator approves it on the product's binding to the auth application. The acting person (`on_behalf_of_user`) must own the team, or hold the application's team roles: they may give only roles ranked no higher than their own, and a bare membership only if they hold the application's highest-ranked team role. Credentials are not part of this service: a product issues the account's keys through ApiKeysService (owner kind SERVICE_ACCOUNT). A disabled account's keys are refused at verification; deleting one revokes its keys and drops its team memberships.

Delete Team Service Account POST

Deletes one of the calling application's team service accounts: revokes every API key it owns, drops its team memberships and removes it. Cannot be undone. `on_behalf_of_user` is held to the same standing as on creation. Service accounts only, of a platform application. **Required scopes:** `auth:service-accounts:manage:own`