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 '
{
"kid": "<string>",
"provider": "<string>",
"public_key_b64url": "<string>"
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({kid: '<string>', provider: '<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 = {
"kid": "<string>",
"provider": "<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 \"kid\": \"<string>\",\n \"provider\": \"<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
Rotates a cryptographic key, creating a new key and disabling the old one. Optionally specify a new algorithm for the rotated key.
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 '
{
"kid": "<string>",
"provider": "<string>",
"public_key_b64url": "<string>"
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({kid: '<string>', provider: '<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 = {
"kid": "<string>",
"provider": "<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 \"kid\": \"<string>\",\n \"provider\": \"<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"
}Rotates a signing key by creating a new key and marking the previous key as rotated. Existing attestations signed with the old key remain valid, but new attestations will use the new key.
Responses
Authorizations
API key for machine-to-machine authentication
Path Parameters
Body
application/json
Response
200 - application/json
Key rotated
Key identifier
Signing algorithm for key generation
Available options:
Ed25519, ES256, ES384, ES512, RS256, RS384, RS512, PS256, PS384, PS512 Base64-encoded public key
Available options:
ACTIVE, DISABLED, EXPIRED 
