curl --request POST \
--url https://api.edenai.run/v3/manage/keys/{key_id}/rotate/import requests
url = "https://api.edenai.run/v3/manage/keys/{key_id}/rotate/"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.edenai.run/v3/manage/keys/{key_id}/rotate/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.edenai.run/v3/manage/keys/{key_id}/rotate/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.edenai.run/v3/manage/keys/{key_id}/rotate/"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.edenai.run/v3/manage/keys/{key_id}/rotate/")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.edenai.run/v3/manage/keys/{key_id}/rotate/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_bodyPost managekeys rotate
POST /v3/manage/keys/{key_id}/rotate (manage:write) — replace a key’s secret in place: same
identity (name, key_id, budget, guardrail), a brand-new sk-eden value returned ONCE. Lets a
compliance pipeline roll a secret without reconfiguring the key. Distinct from DELETE: revoke KILLS
(terminal), rotate RE-SECRETS.
A REVOKED key is a 404 here, never resurrected. rotate_key_secret clears revoked_at and
writes fresh secret material, so rotating a revoked key would REVIVE it — the exact one-way-door
that revoke depends on. The read filters a revoked (or cross-org, or unknown) key_id to a 404, and
the whole rotate runs in a transaction that select_for_update-locks the row: a concurrent DELETE
either commits its revoke first (revoked_at then filters the row out -> 404) or blocks on the
lock until the rotate commits and then still wins its own compare-and-set. Without the lock the read
filter alone is a check-then-act race — a rotate that resolved a live key could blind-write a fresh
secret AFTER a concurrent revoke landed, resurrecting a terminally-revoked key. So revocation stays
terminal.
curl --request POST \
--url https://api.edenai.run/v3/manage/keys/{key_id}/rotate/import requests
url = "https://api.edenai.run/v3/manage/keys/{key_id}/rotate/"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.edenai.run/v3/manage/keys/{key_id}/rotate/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.edenai.run/v3/manage/keys/{key_id}/rotate/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.edenai.run/v3/manage/keys/{key_id}/rotate/"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.edenai.run/v3/manage/keys/{key_id}/rotate/")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.edenai.run/v3/manage/keys/{key_id}/rotate/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_bodyPath Parameters
Response
No response body