revokeKey
curl --request DELETE \
--url http://127.0.0.1:9113/v1/account/keys/{key_id} \
--header 'Authorization: Bearer <token>'import requests
url = "http://127.0.0.1:9113/v1/account/keys/{key_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('http://127.0.0.1:9113/v1/account/keys/{key_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "9113",
CURLOPT_URL => "http://127.0.0.1:9113/v1/account/keys/{key_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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 := "http://127.0.0.1:9113/v1/account/keys/{key_id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("http://127.0.0.1:9113/v1/account/keys/{key_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("http://127.0.0.1:9113/v1/account/keys/{key_id}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"created_at": "2023-11-07T05:31:56Z",
"id": "<string>",
"name": "<string>",
"prefix": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"replaces_id": "<string>",
"revoked_at": "2023-11-07T05:31:56Z"
}
],
"meta": {
"consistency": "<string>",
"count": 123,
"next_cursor": "<string>",
"request_id": "<string>",
"sent_ts": "2023-11-07T05:31:56Z",
"snapshot_ts": "2023-11-07T05:31:56Z",
"version": "<string>",
"namespace": "<string>"
},
"missing": [
{
"detail": "<string>",
"reason": "<string>",
"family": "1x2",
"fixture_id": 4503599627370496,
"quote_key": "<string>",
"source_id": 4503599627370496
}
]
}{
"code": "<string>",
"detail": "<string>",
"invalid_params": [
{
"name": "<string>",
"reason": "<string>"
}
],
"missing": [
{
"detail": "<string>",
"reason": "<string>",
"family": "1x2",
"fixture_id": 4503599627370496,
"quote_key": "<string>",
"source_id": 4503599627370496
}
],
"request_id": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}{
"code": "<string>",
"detail": "<string>",
"invalid_params": [
{
"name": "<string>",
"reason": "<string>"
}
],
"missing": [
{
"detail": "<string>",
"reason": "<string>",
"family": "1x2",
"fixture_id": 4503599627370496,
"quote_key": "<string>",
"source_id": 4503599627370496
}
],
"request_id": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}{
"code": "<string>",
"detail": "<string>",
"invalid_params": [
{
"name": "<string>",
"reason": "<string>"
}
],
"missing": [
{
"detail": "<string>",
"reason": "<string>",
"family": "1x2",
"fixture_id": 4503599627370496,
"quote_key": "<string>",
"source_id": 4503599627370496
}
],
"request_id": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}{
"code": "<string>",
"detail": "<string>",
"invalid_params": [
{
"name": "<string>",
"reason": "<string>"
}
],
"missing": [
{
"detail": "<string>",
"reason": "<string>",
"family": "1x2",
"fixture_id": 4503599627370496,
"quote_key": "<string>",
"source_id": 4503599627370496
}
],
"request_id": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}{
"code": "<string>",
"detail": "<string>",
"invalid_params": [
{
"name": "<string>",
"reason": "<string>"
}
],
"missing": [
{
"detail": "<string>",
"reason": "<string>",
"family": "1x2",
"fixture_id": 4503599627370496,
"quote_key": "<string>",
"source_id": 4503599627370496
}
],
"request_id": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}{
"code": "<string>",
"detail": "<string>",
"invalid_params": [
{
"name": "<string>",
"reason": "<string>"
}
],
"missing": [
{
"detail": "<string>",
"reason": "<string>",
"family": "1x2",
"fixture_id": 4503599627370496,
"quote_key": "<string>",
"source_id": 4503599627370496
}
],
"request_id": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}{
"code": "<string>",
"detail": "<string>",
"invalid_params": [
{
"name": "<string>",
"reason": "<string>"
}
],
"missing": [
{
"detail": "<string>",
"reason": "<string>",
"family": "1x2",
"fixture_id": 4503599627370496,
"quote_key": "<string>",
"source_id": 4503599627370496
}
],
"request_id": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}{
"code": "<string>",
"detail": "<string>",
"invalid_params": [
{
"name": "<string>",
"reason": "<string>"
}
],
"missing": [
{
"detail": "<string>",
"reason": "<string>",
"family": "1x2",
"fixture_id": 4503599627370496,
"quote_key": "<string>",
"source_id": 4503599627370496
}
],
"request_id": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}{
"code": "<string>",
"detail": "<string>",
"invalid_params": [
{
"name": "<string>",
"reason": "<string>"
}
],
"missing": [
{
"detail": "<string>",
"reason": "<string>",
"family": "1x2",
"fixture_id": 4503599627370496,
"quote_key": "<string>",
"source_id": 4503599627370496
}
],
"request_id": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}{
"code": "<string>",
"detail": "<string>",
"invalid_params": [
{
"name": "<string>",
"reason": "<string>"
}
],
"missing": [
{
"detail": "<string>",
"reason": "<string>",
"family": "1x2",
"fixture_id": 4503599627370496,
"quote_key": "<string>",
"source_id": 4503599627370496
}
],
"request_id": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}{
"code": "<string>",
"detail": "<string>",
"invalid_params": [
{
"name": "<string>",
"reason": "<string>"
}
],
"missing": [
{
"detail": "<string>",
"reason": "<string>",
"family": "1x2",
"fixture_id": 4503599627370496,
"quote_key": "<string>",
"source_id": 4503599627370496
}
],
"request_id": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}Account and control reference
Revoke key
Revoke key: request contract, authentication, parameters and response behavior for the Oddswire private pilot.
revokeKey
curl --request DELETE \
--url http://127.0.0.1:9113/v1/account/keys/{key_id} \
--header 'Authorization: Bearer <token>'import requests
url = "http://127.0.0.1:9113/v1/account/keys/{key_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('http://127.0.0.1:9113/v1/account/keys/{key_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "9113",
CURLOPT_URL => "http://127.0.0.1:9113/v1/account/keys/{key_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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 := "http://127.0.0.1:9113/v1/account/keys/{key_id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("http://127.0.0.1:9113/v1/account/keys/{key_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("http://127.0.0.1:9113/v1/account/keys/{key_id}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"created_at": "2023-11-07T05:31:56Z",
"id": "<string>",
"name": "<string>",
"prefix": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"replaces_id": "<string>",
"revoked_at": "2023-11-07T05:31:56Z"
}
],
"meta": {
"consistency": "<string>",
"count": 123,
"next_cursor": "<string>",
"request_id": "<string>",
"sent_ts": "2023-11-07T05:31:56Z",
"snapshot_ts": "2023-11-07T05:31:56Z",
"version": "<string>",
"namespace": "<string>"
},
"missing": [
{
"detail": "<string>",
"reason": "<string>",
"family": "1x2",
"fixture_id": 4503599627370496,
"quote_key": "<string>",
"source_id": 4503599627370496
}
]
}{
"code": "<string>",
"detail": "<string>",
"invalid_params": [
{
"name": "<string>",
"reason": "<string>"
}
],
"missing": [
{
"detail": "<string>",
"reason": "<string>",
"family": "1x2",
"fixture_id": 4503599627370496,
"quote_key": "<string>",
"source_id": 4503599627370496
}
],
"request_id": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}{
"code": "<string>",
"detail": "<string>",
"invalid_params": [
{
"name": "<string>",
"reason": "<string>"
}
],
"missing": [
{
"detail": "<string>",
"reason": "<string>",
"family": "1x2",
"fixture_id": 4503599627370496,
"quote_key": "<string>",
"source_id": 4503599627370496
}
],
"request_id": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}{
"code": "<string>",
"detail": "<string>",
"invalid_params": [
{
"name": "<string>",
"reason": "<string>"
}
],
"missing": [
{
"detail": "<string>",
"reason": "<string>",
"family": "1x2",
"fixture_id": 4503599627370496,
"quote_key": "<string>",
"source_id": 4503599627370496
}
],
"request_id": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}{
"code": "<string>",
"detail": "<string>",
"invalid_params": [
{
"name": "<string>",
"reason": "<string>"
}
],
"missing": [
{
"detail": "<string>",
"reason": "<string>",
"family": "1x2",
"fixture_id": 4503599627370496,
"quote_key": "<string>",
"source_id": 4503599627370496
}
],
"request_id": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}{
"code": "<string>",
"detail": "<string>",
"invalid_params": [
{
"name": "<string>",
"reason": "<string>"
}
],
"missing": [
{
"detail": "<string>",
"reason": "<string>",
"family": "1x2",
"fixture_id": 4503599627370496,
"quote_key": "<string>",
"source_id": 4503599627370496
}
],
"request_id": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}{
"code": "<string>",
"detail": "<string>",
"invalid_params": [
{
"name": "<string>",
"reason": "<string>"
}
],
"missing": [
{
"detail": "<string>",
"reason": "<string>",
"family": "1x2",
"fixture_id": 4503599627370496,
"quote_key": "<string>",
"source_id": 4503599627370496
}
],
"request_id": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}{
"code": "<string>",
"detail": "<string>",
"invalid_params": [
{
"name": "<string>",
"reason": "<string>"
}
],
"missing": [
{
"detail": "<string>",
"reason": "<string>",
"family": "1x2",
"fixture_id": 4503599627370496,
"quote_key": "<string>",
"source_id": 4503599627370496
}
],
"request_id": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}{
"code": "<string>",
"detail": "<string>",
"invalid_params": [
{
"name": "<string>",
"reason": "<string>"
}
],
"missing": [
{
"detail": "<string>",
"reason": "<string>",
"family": "1x2",
"fixture_id": 4503599627370496,
"quote_key": "<string>",
"source_id": 4503599627370496
}
],
"request_id": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}{
"code": "<string>",
"detail": "<string>",
"invalid_params": [
{
"name": "<string>",
"reason": "<string>"
}
],
"missing": [
{
"detail": "<string>",
"reason": "<string>",
"family": "1x2",
"fixture_id": 4503599627370496,
"quote_key": "<string>",
"source_id": 4503599627370496
}
],
"request_id": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}{
"code": "<string>",
"detail": "<string>",
"invalid_params": [
{
"name": "<string>",
"reason": "<string>"
}
],
"missing": [
{
"detail": "<string>",
"reason": "<string>",
"family": "1x2",
"fixture_id": 4503599627370496,
"quote_key": "<string>",
"source_id": 4503599627370496
}
],
"request_id": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}{
"code": "<string>",
"detail": "<string>",
"invalid_params": [
{
"name": "<string>",
"reason": "<string>"
}
],
"missing": [
{
"detail": "<string>",
"reason": "<string>",
"family": "1x2",
"fixture_id": 4503599627370496,
"quote_key": "<string>",
"source_id": 4503599627370496
}
],
"request_id": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}Requires an explicit Bearer Clerk session (or CLI-only local session). API keys cannot manage accounts. Owner/admin manages keys and audit; only owner changes existing member roles. POST auth/session enrolls an identity with zero API/Terminal grants. Provider login is unavailable until Clerk is configured.
Full request and response schemas: OpenAPI. Authentication · Prices and coverage · Errors and credits.
DELETE /v1/account/keys/{key_id}
Authentication
AccountSession
Parameters
| Name | Location | Required | Description |
|---|---|---|---|
X-Oddswire-Account | header | No | UUID of an account where the signed-in user is a member; defaults to their oldest account. |
key_id | path | Yes | See the OpenAPI schema. |
Responses
| Status | Meaning |
|---|---|
| 200 | Account ledger response; no-store. Key secrets appear only once on creation/rotation. Lists contain at most 100 recent entries, active keys first. |
| 400 | Structured problem; see error handling. |
| 401 | Structured problem; see error handling. |
| 403 | Structured problem; see error handling. |
| 404 | Structured problem; see error handling. |
| 405 | Structured problem; see error handling. |
| 409 | Structured problem; see error handling. |
| 422 | Structured problem; see error handling. |
| 429 | Structured problem; see error handling. |
| 500 | Structured problem; see error handling. |
| 503 | Structured problem; see error handling. |
| 504 | Structured problem; see error handling. |
Authorizations
Clerk session JWT, or one-hour CLI-only local session. No cookie authentication.
Headers
UUID of an account where the signed-in user is a member; defaults to their oldest account.