Xeonr Developer Docs
API SpecificationTeams

Create an API key

POST
/xeonr.functions.v1.TeamService/CreateTeamToken

Creates a team API key for CI. The secret (xk_…) is returned once and stored only as a hash, so the response is unrepeatable by design.

Authorization

BearerAuth
AuthorizationBearer <token>

A team API key, created by a team admin in the console and presented as Authorization: Bearer xk_…. Xeonr Auth issues and verifies it; the secret is shown once at creation and stored only as a hash, and a revoked key stops working within 30 seconds. An existing fnt_… token is accepted the same way.

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 or admin: a key that could mint more keys would make revocation meaningless.

Value in"TEAM_ROLE_UNSPECIFIED" | "TEAM_ROLE_OWNER" | "TEAM_ROLE_EDITOR" | "TEAM_ROLE_VIEWER"
description?string

description is what the key is for, up to 512 characters.

Lengthlength <= 512
expiresAtUnix?integer|string

expires_at_unix is when the key stops working; 0 is never. Xeonr Auth refuses one beyond the application's maximum lifetime, if it sets one.

Formatint64
Range0 <= value
[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,
    "keyPrefix": "string",
    "legacyPrefix": "string",
    "scopes": [
      "string"
    ],
    "createdBy": "string",
    "description": "string",
    "expiresAtUnix": 0,
    "revokedAtUnix": 0
  },
  "secret": "string"
}
{
  "code": "not_found",
  "message": "string",
  "details": [
    {
      "type": "string",
      "value": "string",
      "debug": {}
    }
  ]
}