> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs.athenaintel.com/api-reference/computer/revoke-ssh-access-token/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.athenaintel.com/_mcp/server. # Revoke one of your temporary SSH tokens by id DELETE https://api.athenaintel.com/api/v0/computer/{asset_id}/ssh-access/tokens/{token_id} Revoke a temporary SSH token you minted for this computer, by the id `list_ssh_access_tokens` returns. The token stops admitting connections and every open SSH session using it is disconnected. An expired token can still be revoked, which ends a session that outlived its expiry. Returns 404 for an id that is not one of your unrevoked tokens on this computer. Requires edit access to the computer. Reference: https://docs.athenaintel.com/api-reference/computer/revoke-ssh-access-token ## Authentication - `X-API-KEY` header (required) — API Key authentication via header ## Request ### Path parameters - `asset_id` (string, required) - `token_id` (string, required) ## Response ### 200 Successful Response - `revoked` (boolean, required) — Whether the SSH token was revoked ## Errors ### 401 Unauthorized Error Unauthorized - `message` (string, required) ### 403 Forbidden Error Forbidden - `map from string to any` ### 404 Not Found Error Not Found - `map from string to any` ### 422 Unprocessable Entity Error Validation Error - `detail` (list of ValidationError, optional) ### 502 Bad Gateway Error Bad Gateway - `map from string to any` ## Types ### ValidationError - `loc` (list of ValidationErrorLocItems, required) - `msg` (string, required) - `type` (string, required) - `ctx` (ValidationErrorCtx, optional) - `input` (any, optional) ### ValidationErrorLocItems ### ValidationErrorCtx ## Examples **Response** ```json { "revoked": true } ``` **SDK Code** ```python import requests url = "https://api.athenaintel.com/api/v0/computer/asset_id/ssh-access/tokens/token_id" headers = {"X-API-KEY": ""} response = requests.delete(url, headers=headers) print(response.json()) ``` ```javascript const url = 'https://api.athenaintel.com/api/v0/computer/asset_id/ssh-access/tokens/token_id'; const options = {method: 'DELETE', headers: {'X-API-KEY': ''}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go package main import ( "fmt" "net/http" "io" ) func main() { url := "https://api.athenaintel.com/api/v0/computer/asset_id/ssh-access/tokens/token_id" req, _ := http.NewRequest("DELETE", url, nil) req.Header.Add("X-API-KEY", "") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby require 'uri' require 'net/http' url = URI("https://api.athenaintel.com/api/v0/computer/asset_id/ssh-access/tokens/token_id") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Delete.new(url) request["X-API-KEY"] = '' response = http.request(request) puts response.read_body ``` ```java import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.delete("https://api.athenaintel.com/api/v0/computer/asset_id/ssh-access/tokens/token_id") .header("X-API-KEY", "") .asString(); ``` ```php request('DELETE', 'https://api.athenaintel.com/api/v0/computer/asset_id/ssh-access/tokens/token_id', [ 'headers' => [ 'X-API-KEY' => '', ], ]); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("https://api.athenaintel.com/api/v0/computer/asset_id/ssh-access/tokens/token_id"); var request = new RestRequest(Method.DELETE); request.AddHeader("X-API-KEY", ""); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let headers = ["X-API-KEY": ""] let request = NSMutableURLRequest(url: NSURL(string: "https://api.athenaintel.com/api/v0/computer/asset_id/ssh-access/tokens/token_id")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "DELETE" request.allHTTPHeaderFields = headers let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ```