Espacio de trabajo
Revocar una clave con nombre del espacio de trabajo
Revoca una clave de workspace CON NOMBRE; deja de funcionar en la siguiente solicitud. Owner o Admin (apikeys:rotate). Revocar una clave que ya está revocada también responde 200 con su revokedAt original. La clave principal no se puede revocar (409 PRIMARY_KEY_NOT_REVOCABLE): rótala con POST /v1/api-keys/regenerate.
Requiere una clave de cuenta (ps_account_, creada en Perfil → API). Las claves de workspace, las claves de número y los tokens OAuth/MCP reciben 403 ACCOUNT_KEY_REQUIRED. Se envía con Cache-Control: no-store.
DELETE
/
v1
/
workspaces
/
{workspaceId}
/
api-keys
/
{keyId}
Revocar una clave de workspace con nombre
curl --request DELETE \
--url https://pilotstatus.com.br/v1/workspaces/{workspaceId}/api-keys/{keyId} \
--header 'x-api-key: <api-key>'import requests
url = "https://pilotstatus.com.br/v1/workspaces/{workspaceId}/api-keys/{keyId}"
headers = {"x-api-key": "<api-key>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {'x-api-key': '<api-key>'}};
fetch('https://pilotstatus.com.br/v1/workspaces/{workspaceId}/api-keys/{keyId}', 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://pilotstatus.com.br/v1/workspaces/{workspaceId}/api-keys/{keyId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$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://pilotstatus.com.br/v1/workspaces/{workspaceId}/api-keys/{keyId}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://pilotstatus.com.br/v1/workspaces/{workspaceId}/api-keys/{keyId}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://pilotstatus.com.br/v1/workspaces/{workspaceId}/api-keys/{keyId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "cmh2ab7770004ak8example9m",
"revokedAt": "2026-10-28T12:00:00.000Z"
}{
"error": "Invalid API key"
}{
"error": "This endpoint requires an account API key (ps_account_…), created in Profile → API. Workspace keys, number keys and OAuth tokens cannot use it | Este endpoint exige uma API key de conta (ps_account_…), criada em Perfil → API. Chaves de workspace, de número e tokens OAuth não podem usá-lo",
"code": "ACCOUNT_KEY_REQUIRED"
}{
"error": "API key not found | API key não encontrada",
"code": "API_KEY_NOT_FOUND"
}{
"error": "The primary workspace key cannot be revoked; rotate it with POST /v1/api-keys/regenerate | A chave principal do workspace não pode ser revogada; gere uma nova com POST /v1/api-keys/regenerate",
"code": "PRIMARY_KEY_NOT_REVOCABLE"
}La clave deja de funcionar en la siguiente solicitud, para todas las integraciones que la usan.
¿Esta página le ayudó?
⌘I
Revocar una clave de workspace con nombre
curl --request DELETE \
--url https://pilotstatus.com.br/v1/workspaces/{workspaceId}/api-keys/{keyId} \
--header 'x-api-key: <api-key>'import requests
url = "https://pilotstatus.com.br/v1/workspaces/{workspaceId}/api-keys/{keyId}"
headers = {"x-api-key": "<api-key>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {'x-api-key': '<api-key>'}};
fetch('https://pilotstatus.com.br/v1/workspaces/{workspaceId}/api-keys/{keyId}', 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://pilotstatus.com.br/v1/workspaces/{workspaceId}/api-keys/{keyId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$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://pilotstatus.com.br/v1/workspaces/{workspaceId}/api-keys/{keyId}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://pilotstatus.com.br/v1/workspaces/{workspaceId}/api-keys/{keyId}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://pilotstatus.com.br/v1/workspaces/{workspaceId}/api-keys/{keyId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "cmh2ab7770004ak8example9m",
"revokedAt": "2026-10-28T12:00:00.000Z"
}{
"error": "Invalid API key"
}{
"error": "This endpoint requires an account API key (ps_account_…), created in Profile → API. Workspace keys, number keys and OAuth tokens cannot use it | Este endpoint exige uma API key de conta (ps_account_…), criada em Perfil → API. Chaves de workspace, de número e tokens OAuth não podem usá-lo",
"code": "ACCOUNT_KEY_REQUIRED"
}{
"error": "API key not found | API key não encontrada",
"code": "API_KEY_NOT_FOUND"
}{
"error": "The primary workspace key cannot be revoked; rotate it with POST /v1/api-keys/regenerate | A chave principal do workspace não pode ser revogada; gere uma nova com POST /v1/api-keys/regenerate",
"code": "PRIMARY_KEY_NOT_REVOCABLE"
}