Need help with your APIs? I offer API discovery, governance & evangelism services. Explore services →
API Evangelist API Evangelist
Discovery
Learnings
Guidance
Toolbox
Alignment
API Evangelist LLC

Keygen Tokens API

Authenticate and manage bearer tokens.

Keygen Tokens API is one of 12 APIs that Keygen publishes on the APIs.io network, described by a machine-readable OpenAPI specification.

Tagged areas include Tokens. The published artifact set on APIs.io includes an OpenAPI specification, API documentation, and an API reference.

This API exposes 5 operations across 4 paths, and defines 8 schemas. It is described by OpenAPI 3.0.3, at version 1.0.

Requests are made against a single base URL, https://api.keygen.sh/v1/accounts/{account}.

5 operations 4 paths 8 schemas 1 DELETE2 GET1 POST1 PUT

Metadata

The identity and technical contract details declared by the specification.

Specification
OpenAPI 3.0.3
API Version
1.0
Base URL
https://api.keygen.sh/v1/accounts/{account}
Authentication
HTTP Bearer, HTTP Bearer, HTTP Basic
Terms of Service
Resource Areas
1

Authentication & Security 3

Keygen Tokens API declares 3 security schemes for authenticating requests. It accepts HTTP bearer tokens (token) (bearerAuth). It accepts HTTP bearer tokens (license-key) (licenseKeyAuth). It accepts HTTP basic authentication (basicAuth). By default, every request must be authenticated.

  • bearerAuth — Admin, environment, product, user, or license bearer token in the Authorization: Bearer header.
  • licenseKeyAuth — A license key passed as Authorization: License for license validation and self-service actions.
  • basicAuth — HTTP Basic (email:password) used only to generate a user token.

Paths & Operations 5

Across 4 paths, the API surfaces 5 operations — 1 DELETE, 2 GET, 1 POST, 1 PUT. Each is listed below with its method, path, parameters, and response codes.

Tokens 5

Authenticate and manage bearer tokens.

POST
/tokens
Generate a token
generateToken → 201401
GET
/tokens
List all tokens
listTokens 2 params → 200
GET
/tokens/{id}
Retrieve a token
retrieveToken 1 param → 200404
PUT
/tokens/{id}/actions/regenerate
Regenerate a token
regenerateToken 1 param → 200
DELETE
/tokens/{id}/actions/revoke
Revoke a token
revokeToken 1 param → 204

Schemas 8

The contract defines 8 schemas that model the data the API accepts and returns. The most detailed are PageLinks (5 properties), Error (4 properties), TokenResource (4 properties), Relationship (2 properties). Each schema is shown below with its type and property counts.

Error
object
4 properties
Relationship
object
2 properties
TokenResource
object
4 properties
ResourceIdentifier
object
2 properties 2 required
TokenDocument
object
1 property
PageLinks
object
5 properties
TokenCollectionDocument
object
2 properties
ErrorDocument
object
1 property 1 required

Specification

The full machine-readable OpenAPI contract behind this narrative.

Source

keygen-tokens-api-openapi.yml Raw ↑

Other APIs Keygen publishes across the network.

Keygen Artifacts API
Keygen Components API
Keygen Entitlements API
Keygen Licenses API
Keygen Machines API
Keygen Policies API
Keygen Processes API
Keygen Products API
Keygen Releases API
Keygen Users API
Keygen Webhooks API