Workspace
Revogar uma chave de workspace com nome
Revoga uma chave de workspace COM NOME; ela para de funcionar na próxima requisição. Proprietário ou Admin (apikeys:rotate). Revogar uma chave já revogada também responde 200, com o revokedAt original. A chave principal não pode ser revogada (409 PRIMARY_KEY_NOT_REVOCABLE) — gere uma nova com POST /v1/api-keys/regenerate.
Requer uma chave de conta (ps_account_, criada em Perfil → API). Chaves de workspace, de número e tokens OAuth/MCP recebem 403 ACCOUNT_KEY_REQUIRED. Enviado com Cache-Control: no-store.
DELETE
/
v1
/
workspaces
/
{workspaceId}
/
api-keys
/
{keyId}
Revogar uma chave de workspace com nome
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"
}A chave para de funcionar na próxima requisição, para toda integração que a usa.
Esta página foi útil?
⌘I
Revogar uma chave de workspace com nome
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"
}