curl --request DELETE \
--url https://iam.basaltic.sh/v1/sts-sessions/{session_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"reason": "Security incident response"
}
'import requests
url = "https://iam.basaltic.sh/v1/sts-sessions/{session_id}"
payload = { "reason": "Security incident response" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({reason: 'Security incident response'})
};
fetch('https://iam.basaltic.sh/v1/sts-sessions/{session_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://iam.basaltic.sh/v1/sts-sessions/{session_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_POSTFIELDS => json_encode([
'reason' => 'Security incident response'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://iam.basaltic.sh/v1/sts-sessions/{session_id}"
payload := strings.NewReader("{\n \"reason\": \"Security incident response\"\n}")
req, _ := http.NewRequest("DELETE", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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))
}HttpResponse<String> response = Unirest.delete("https://iam.basaltic.sh/v1/sts-sessions/{session_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"reason\": \"Security incident response\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://iam.basaltic.sh/v1/sts-sessions/{session_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"reason\": \"Security incident response\"\n}"
response = http.request(request)
puts response.read_body{
"sts_session": {
"id": "550e8400-e29b-41d4-a716-446655440001",
"crn": "crn:iam::production:sts-session/550e8400-e29b-41d4-a716-446655440001",
"role": {
"id": "b2c3d4e5-f6a7-8901-2345-67890abcdef1",
"crn": "crn:iam::production:role/github-deployer",
"name": "github-deployer"
},
"identity_provider": {
"id": "550e8400-e29b-41d4-a716-446655440004",
"crn": "crn:iam::production:oidc-provider/github",
"name": "github"
},
"subject": "repo:acme@123456/deploy@789012:ref:refs/heads/main",
"grant_type": "web_identity",
"session_name": "deploy-session",
"created_at": "2026-01-15T09:30:00Z",
"expires_at": "2026-01-15T10:30:00Z",
"revoked": false
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "Authentication required",
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}{
"error": {
"code": "ACCESS_DENIED",
"message": "You don't have permission to perform this action",
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}{
"error": {
"code": "NOT_FOUND",
"message": "Resource not found",
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}Revoke STS session
Revoke an active STS session, invalidating its credentials.
Needs two actions, not one. iam:RevokeSession decides whether the
revocation happens; the response then re-reads the session, which checks
iam:GetSTSSession. A caller holding only the first revokes the session
successfully and still receives a 403 — the credentials are already
dead at that point.
curl --request DELETE \
--url https://iam.basaltic.sh/v1/sts-sessions/{session_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"reason": "Security incident response"
}
'import requests
url = "https://iam.basaltic.sh/v1/sts-sessions/{session_id}"
payload = { "reason": "Security incident response" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({reason: 'Security incident response'})
};
fetch('https://iam.basaltic.sh/v1/sts-sessions/{session_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://iam.basaltic.sh/v1/sts-sessions/{session_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_POSTFIELDS => json_encode([
'reason' => 'Security incident response'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://iam.basaltic.sh/v1/sts-sessions/{session_id}"
payload := strings.NewReader("{\n \"reason\": \"Security incident response\"\n}")
req, _ := http.NewRequest("DELETE", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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))
}HttpResponse<String> response = Unirest.delete("https://iam.basaltic.sh/v1/sts-sessions/{session_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"reason\": \"Security incident response\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://iam.basaltic.sh/v1/sts-sessions/{session_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"reason\": \"Security incident response\"\n}"
response = http.request(request)
puts response.read_body{
"sts_session": {
"id": "550e8400-e29b-41d4-a716-446655440001",
"crn": "crn:iam::production:sts-session/550e8400-e29b-41d4-a716-446655440001",
"role": {
"id": "b2c3d4e5-f6a7-8901-2345-67890abcdef1",
"crn": "crn:iam::production:role/github-deployer",
"name": "github-deployer"
},
"identity_provider": {
"id": "550e8400-e29b-41d4-a716-446655440004",
"crn": "crn:iam::production:oidc-provider/github",
"name": "github"
},
"subject": "repo:acme@123456/deploy@789012:ref:refs/heads/main",
"grant_type": "web_identity",
"session_name": "deploy-session",
"created_at": "2026-01-15T09:30:00Z",
"expires_at": "2026-01-15T10:30:00Z",
"revoked": false
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "Authentication required",
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}{
"error": {
"code": "ACCESS_DENIED",
"message": "You don't have permission to perform this action",
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}{
"error": {
"code": "NOT_FOUND",
"message": "Resource not found",
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}iam:RevokeSession.
Revocation requires iam:RevokeSession. Reading the response additionally
requires iam:GetSTSSession; without it the session is revoked but the
request returns 403.
See IAM permissions for policy examples.Authorizations
An OAuth 2.0 bearer token, sent as Authorization: Bearer <token>.
This is the recommended way to authenticate.
Get one by exchanging a service account's access key pair at
POST /v1/oauth/token with grant_type=client_credentials. It is the
standard client-credentials grant, so any OAuth-aware library will
obtain and refresh it for you.
curl -s -u "$KEY_ID:$SECRET" -d grant_type=client_credentials \
https://iam.basaltic.sh/v1/oauth/token
Tokens last an hour by default. The same access key pair is separately your AWS SigV4 credential for the S3-compatible object endpoint, which speaks nothing else.
Path Parameters
STS session ID
"f6a7b8c9-d0e1-2345-6789-0abcdef12345"
Body
Reason for revoking the session
"Security incident response"
Response
Session revoked successfully
Account-scoped temporary credentials, including assumed-role and service-account OAuth sessions. Personal browser login sessions are not listed here. A session is active when it is not revoked and its expiration is in the future.
Show child attributes
Show child attributes
{
"id": "550e8400-e29b-41d4-a716-446655440001",
"crn": "crn:iam::production:sts-session/550e8400-e29b-41d4-a716-446655440001",
"role": {
"id": "b2c3d4e5-f6a7-8901-2345-67890abcdef1",
"crn": "crn:iam::production:role/github-deployer",
"name": "github-deployer"
},
"identity_provider": {
"id": "550e8400-e29b-41d4-a716-446655440004",
"crn": "crn:iam::production:oidc-provider/github",
"name": "github"
},
"subject": "repo:acme@123456/deploy@789012:ref:refs/heads/main",
"grant_type": "web_identity",
"session_name": "deploy-session",
"created_at": "2026-01-15T09:30:00Z",
"expires_at": "2026-01-15T10:30:00Z",
"revoked": false
}

