Skip to content
Get started

Create a new API key

POST/api/user/api-keys

Creates a new PAT or Ed25519 key pair. The plaintext key / private key PEM is returned once and never stored.

Body ParametersJSONExpand Collapse
name: optional string

Optional label for the key (max 64 characters)

maxLength64
type: optional "PAT" or "ED25519"

Key type — PAT for Bearer tokens, ED25519 for asymmetric signing

One of the following:
"PAT"
"ED25519"
ReturnsExpand Collapse
id: optional string
fingerprint: optional string

SHA256 fingerprint of the public key (Ed25519 keys only)

key: optional string

Full racks_… token (PAT) or private key PEM (Ed25519) — store it now, it will not be shown again

publicKeyPem: optional string

Ed25519 public key PEM (Ed25519 keys only)

Create a new API key

curl https://racks.cash/api/user/api-keys \
    -X POST
{
  "id": "id",
  "fingerprint": "fingerprint",
  "key": "key",
  "publicKeyPem": "publicKeyPem"
}
Returns Examples
{
  "id": "id",
  "fingerprint": "fingerprint",
  "key": "key",
  "publicKeyPem": "publicKeyPem"
}