Xeonr Developer Docs
API SpecificationTeams

Create an API token

POST
/xeonr.functions.v1.TeamService/CreateTeamToken

Mints an API token for CI. The secret is returned once and stored only as a hash, so the response is unrepeatable by design.

Authorization

BearerAuth
AuthorizationBearer <token>

A team API token, created by a team owner and presented as Authorization: Bearer fnt_…. The secret is shown once at creation and stored only as a hash.

In: header

Header Parameters

Connect-Protocol-Version*number

Define the version of the Connect protocol

Value in1
Connect-Timeout-Ms?number

Define the timeout, in ms

Request Body

application/json

ownerTeam?string

owner_team is the team's URN.

name?string
role?string

role must be TEAM_ROLE_EDITOR or TEAM_ROLE_VIEWER. Never owner: a token that could mint more tokens would make revocation meaningless.

Value in"TEAM_ROLE_UNSPECIFIED" | "TEAM_ROLE_OWNER" | "TEAM_ROLE_EDITOR" | "TEAM_ROLE_VIEWER"
[key: string]?never

Response Body

application/json

application/json

curl -X POST "https://functions.xeonr.io/xeonr.functions.v1.TeamService/CreateTeamToken" \  -H "Connect-Protocol-Version: 1" \  -H "Content-Type: application/json" \  -d '{}'
{
  "token": {
    "tokenId": "string",
    "name": "string",
    "role": "TEAM_ROLE_UNSPECIFIED",
    "createdAtUnix": 0,
    "lastUsedAtUnix": 0
  },
  "secret": "string"
}
{
  "code": "not_found",
  "message": "string",
  "details": [
    {
      "type": "string",
      "value": "string",
      "debug": {}
    }
  ]
}