Skip to content
SETSimple Easy Transactions
SET DocsSET Crypto API Suite and SET API referenceCurrent as of 2026-11-21 · wallet release 7d8a79fb
Browse: SET API

SET API · Request signing

Register the key's public key (request signing)

POST/v1/api_keys/{key}/signing_key

Key scope: write · Success: 201

Registers one Ed25519 public key for an API key. From then on every write made with that key must be signed; reads stay unsigned.

Path parameters

key stringrequired
The API key's id, key_ + 32 hex, from GET /v1/api_keys. It must be a key of this business and mode, not revoked (404 api_key_unknown); it need not be the calling key.

Headers

Idempotency-Key string
Any unique string, so a retry runs once. See Idempotency.

Body

publicKey stringrequired
The Ed25519 public key as a JWK's x: base64url, 43 characters. Anything else answers 400 public_key_invalid.

Notes

  • Needs the write scope. Any account type; no deployment switch.
  • Keep the private key yourself: SET holds only the public half.
  • From then on every write with that key (any method but GET and HEAD, on /v1 and on /api/partner) carries SET-Timestamp and SET-Request-Signature, or answers 401 request_signature_required.
  • The text to sign is four lines joined by \n with no trailing newline: the SET-Timestamp value (unix seconds), the method in upper case, the path with its query, and the hex SHA-256 of the exact body bytes (of the empty string when there is no body).
  • SET-Request-Signature is the Ed25519 signature of that text, base64url.
  • SET-Timestamp must be within 300 seconds of SET's clock (401 request_signature_expired); a signature that does not match answers 401 request_signature_invalid.
  • Idempotency-Key works as before on signed writes.
  • signingKeyId is rsk_ and 12 hex characters derived from the public key; it is kept on each signed write's audit row.
  • One public key per key: a second registration answers 409 signing_key_exists; rotate the key to register another. Because the key now signs, that second request must itself be signed.
  • This example is a recorded run of SET's own code (wallet release e9b03447) with a sandbox key; ids and times are that run's.

Errors

  • 403 operator_cannot_issue
  • 400 public_key_invalid
  • 404 api_key_unknown
  • 409 signing_key_exists
  • 401 request_signature_required
  • 401 request_signature_invalid
  • 401 request_signature_expired

All codes: Errors.