Rotate Issuer Key
curl --request POST \
--url https://api.truthlocks.com/v1/issuers/keys/{kid}/rotate \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"provider": "KMS",
"kid": "<string>",
"public_key_b64url": "<string>"
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({provider: 'KMS', kid: '<string>', public_key_b64url: '<string>'})
};
fetch('https://api.truthlocks.com/v1/issuers/keys/{kid}/rotate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.truthlocks.com/v1/issuers/keys/{kid}/rotate"
payload = {
"provider": "KMS",
"kid": "<string>",
"public_key_b64url": "<string>"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.truthlocks.com/v1/issuers/keys/{kid}/rotate"
payload := strings.NewReader("{\n \"provider\": \"KMS\",\n \"kid\": \"<string>\",\n \"public_key_b64url\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"kid": "<string>",
"issuer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"algorithm": "Ed25519",
"public_key": "<string>",
"status": "ACTIVE",
"not_before": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z"
}Issuers
Rotate Key
Creates a replacement key in the same issuer and environment, and expires the old key for new issuance. Stored records issued before the cutoff retain verification support unless the key is compromised or revoked. Managed generation supports Ed25519, ES256, ES384, RS256, RS512, PS256 and PS512.
POST
/
v1
/
issuers
/
keys
/
{kid}
/
rotate
Rotate Issuer Key
curl --request POST \
--url https://api.truthlocks.com/v1/issuers/keys/{kid}/rotate \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"provider": "KMS",
"kid": "<string>",
"public_key_b64url": "<string>"
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({provider: 'KMS', kid: '<string>', public_key_b64url: '<string>'})
};
fetch('https://api.truthlocks.com/v1/issuers/keys/{kid}/rotate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.truthlocks.com/v1/issuers/keys/{kid}/rotate"
payload = {
"provider": "KMS",
"kid": "<string>",
"public_key_b64url": "<string>"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.truthlocks.com/v1/issuers/keys/{kid}/rotate"
payload := strings.NewReader("{\n \"provider\": \"KMS\",\n \"kid\": \"<string>\",\n \"public_key_b64url\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"kid": "<string>",
"issuer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"algorithm": "Ed25519",
"public_key": "<string>",
"status": "ACTIVE",
"not_before": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z"
}Creates a replacement key for an active key and atomically expires the old key for new issuance. The replacement stays in the same issuer and environment. Use its returned
Managed generation supports Ed25519, ES256, ES384, RS256, RS512, PS256 and PS512. For public-key import, supply
kid explicitly in subsequent mint requests; callers are not silently switched to another key.
Generate a replacement
{"provider": "KMS", "alg": "ES256"}
kid, alg and public_key_b64url with DER SubjectPublicKeyInfo encoded as unpadded base64url. Imported public material alone cannot mint new records. See signing algorithms.
Existing records
Verification uses the registered issuance timestamp. Records issued before the old key’s cutoff can still pass signature verification with their original payload. A compromised or revoked key is rejected even for older records. Missing trusted timestamps cannot be replaced with a caller-supplied date. Success returns HTTP 201 with the replacement key androtated_from. A retired key cannot be rotated again. Record expiry, revocation and signature checks continue to apply independently.Body
application/json
- Managed signing key
- Imported public verification key
Response
201 - application/json
Key rotated

