Revoke an API key
curl --request DELETE \
--url https://scribe.skeptrune.com/api/org/api-keys/{id} \
--cookie scribe_session=import requests
url = "https://scribe.skeptrune.com/api/org/api-keys/{id}"
headers = {"cookie": "scribe_session="}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {cookie: 'scribe_session='}};
fetch('https://scribe.skeptrune.com/api/org/api-keys/{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_URL => "https://scribe.skeptrune.com/api/org/api-keys/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_COOKIE => "scribe_session=",
]);
$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://scribe.skeptrune.com/api/org/api-keys/{id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("cookie", "scribe_session=")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://scribe.skeptrune.com/api/org/api-keys/{id}")
.header("cookie", "scribe_session=")
.asString();require 'uri'
require 'net/http'
url = URI("https://scribe.skeptrune.com/api/org/api-keys/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["cookie"] = 'scribe_session='
response = http.request(request)
puts response.read_body{
"ok": true
}{
"error": {
"code": "not_found",
"message": "No such document."
}
}{
"error": {
"code": "not_found",
"message": "No such document."
}
}{
"error": {
"code": "not_found",
"message": "No such document."
}
}API Keys
Revoke an API key
Revokes an API key immediately, cutting off authentication. The agent user behind the key is kept so its documents, comments, and activity stay attributed. Sessions need the admin role or higher; an API key with edit access can revoke any key of its organization, including itself. Keys the revoked agent minted earlier keep working — audit them via createdBy.
DELETE
/
api
/
org
/
api-keys
/
{id}
Revoke an API key
curl --request DELETE \
--url https://scribe.skeptrune.com/api/org/api-keys/{id} \
--cookie scribe_session=import requests
url = "https://scribe.skeptrune.com/api/org/api-keys/{id}"
headers = {"cookie": "scribe_session="}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {cookie: 'scribe_session='}};
fetch('https://scribe.skeptrune.com/api/org/api-keys/{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_URL => "https://scribe.skeptrune.com/api/org/api-keys/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_COOKIE => "scribe_session=",
]);
$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://scribe.skeptrune.com/api/org/api-keys/{id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("cookie", "scribe_session=")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://scribe.skeptrune.com/api/org/api-keys/{id}")
.header("cookie", "scribe_session=")
.asString();require 'uri'
require 'net/http'
url = URI("https://scribe.skeptrune.com/api/org/api-keys/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["cookie"] = 'scribe_session='
response = http.request(request)
puts response.read_body{
"ok": true
}{
"error": {
"code": "not_found",
"message": "No such document."
}
}{
"error": {
"code": "not_found",
"message": "No such document."
}
}{
"error": {
"code": "not_found",
"message": "No such document."
}
}Authorizations
cookieAuthbearerAuth
Browser session cookie set by the WorkOS sign-in flow.
Path Parameters
Id of the API key to revoke.
Response
The key was revoked.
Generic acknowledgement body for operations with no other payload.
Always true.
Available options:
true Example:
true