Create a credential
Issues a new credential for the team. The raw secret is returned only once in the response — store it securely; subsequent list responses only show the prefix.
The kind field selects the credential shape:
integration(sk-) authenticates programmatic API calls.agent(ak-) authenticates headless agents to the platform.device(dk-) is reserved for the desktop device-pairing flow and is normally created by that flow, not directly via this endpoint.
Auth: JWT only. dk- is rejected on this endpoint so a stolen
desktop credential cannot bootstrap long-lived sk-/ak- credentials
that would survive a subsequent device revoke.
Documentation Index
Fetch the complete documentation index at: https://docs.cyberun.cloud/llms.txt
Use this file to discover all available pages before exploring further.
Authorizations
User session JWT (Bearer ). Must be paired with the X-Team-ID
request header on team-scoped endpoints so the server knows which
team's resources to operate on.
Headers
UUID of the team to scope the request to. Required on all team-scoped JWT endpoints because a user may belong to multiple teams.
"019abc12-4567-7890-abcd-ef1234567891"
Body
Subset of CredentialKind permitted in POST /credentials. Excludes
device because dk- credentials must come from /desktop/pair/confirm
(which binds the credential to the confirming user's JWT). Direct
POST /credentials { kind: "device" } is rejected by the service layer
even if a client sends it.
integration, agent "integration"
Human-readable label for the credential (shown back in the list view).
1 - 100"CI bot"
Optional expiry, in days from creation. Integer between 1 and 365 inclusive. If omitted, the credential never expires until manually revoked.
1 <= x <= 36590
Response
Credential created
UUID of the credential row.
Type of credential. Each kind shares the same storage shape but has different behaviour:
integration(sk-...): team-scoped programmatic key. Carries no user identity; used by CI bots, third-party integrations, scripts.agent(ak-...): team-scoped agent key. Used by headless workers connecting to the platform's WebSocket. Rejected by the REST surface — see the carrier table at the top of the spec.device(dk-...): per-user, team-scoped key issued by the desktop device-pairing flow (POST /desktop/pair/confirm). Carriesuser_idso the authorization layer can run against the actual user. Cannot be issued viaPOST /credentials— use the pairing flow.
integration, agent, device "integration"
The first 12 characters of the raw key, e.g. "sk-abcd1234..".
"sk-abcd1234"
The full secret. Shown only once — store it securely; subsequent list responses only show the prefix.
"sk-abcdefghijklmnop..."
