워크스페이스 API 키
API 키 폐기
JWT 호출자는 대상 워크스페이스의 소유자 또는 관리자여야 합니다. 지정한 type(기본값 secret, all은 받지 않음)의 워크스페이스(organization_id) API 키를 폐기합니다. 필수 쿼리인 key_name과 secret_key_suffix 조합으로 키를 식별하며, 워크스페이스 자체 키 또는 상위 메인 워크스페이스의 키로 접근할 수 있습니다. 메인 워크스페이스 자체의 secret 키는 대시보드에서만 관리하므로 403을 반환합니다. 이 경우 type=publishable로 요청해야 합니다. 내부 키 ID는 노출하지 않습니다. 다른 워크스페이스 소유의 키를 포함해 해당 종류에서 일치하는 키가 없으면 404 API_KEY_NOT_FOUND, 둘 이상이면 409 API_KEY_AMBIGUOUS를 반환하며 삭제하지 않습니다.
DELETE
/
organizations
/
{organization_id}
/
api-keys
API 키 폐기
curl --request DELETE \
--url https://client-api.tryvox.co/v3/organizations/{organization_id}/api-keys \
--header 'Authorization: Bearer <token>'import requests
url = "https://client-api.tryvox.co/v3/organizations/{organization_id}/api-keys"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://client-api.tryvox.co/v3/organizations/{organization_id}/api-keys', 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://client-api.tryvox.co/v3/organizations/{organization_id}/api-keys",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://client-api.tryvox.co/v3/organizations/{organization_id}/api-keys"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://client-api.tryvox.co/v3/organizations/{organization_id}/api-keys")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://client-api.tryvox.co/v3/organizations/{organization_id}/api-keys")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"error": {
"code": "VALIDATION_ERROR",
"message": "Request validation failed.",
"details": {
"field": "name",
"reason": "must not be blank"
}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "Authentication is required.",
"details": {}
}
}{
"error": {
"code": "FORBIDDEN",
"message": "Permission denied.",
"details": {}
}
}{
"error": {
"code": "RESOURCE_NOT_FOUND",
"message": "Resource not found.",
"details": {
"resource": "agent"
}
}
}{
"error": {
"code": "CONFLICT",
"message": "The requested operation conflicts with current state.",
"details": {
"current_status": "draft"
}
}
}{
"error": {
"code": "RATE_LIMIT_EXCEEDED",
"message": "Too many requests.",
"details": {
"limit": 10,
"window_seconds": 1,
"scope": "user"
}
}
}{
"error": {
"code": "INTERNAL_ERROR",
"message": "Internal server error.",
"details": {}
}
}{
"error": {
"code": "SERVICE_UNAVAILABLE",
"message": "Service temporarily unavailable.",
"details": {}
}
}Authorizations
워크스페이스 API 키를 Authorization: Bearer <token> 형식으로 보냅니다.
Path Parameters
워크스페이스 ID입니다. 본인 워크스페이스 또는 직속 하위 워크스페이스를 지정합니다.
Query Parameters
폐기할 키의 이름입니다. 발급 또는 목록 응답의 key_name 값을 사용하세요.
Minimum string length:
1폐기할 키의 평문 끝 4자리입니다. 발급 또는 목록 응답의 secret_key_suffix 값을 사용하세요.
Minimum string length:
1폐기할 키 종류입니다. secret(기본값) 또는 publishable입니다.
Available options:
secret, publishable Response
성공 응답
Was this page helpful?
⌘I
API 키 폐기
curl --request DELETE \
--url https://client-api.tryvox.co/v3/organizations/{organization_id}/api-keys \
--header 'Authorization: Bearer <token>'import requests
url = "https://client-api.tryvox.co/v3/organizations/{organization_id}/api-keys"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://client-api.tryvox.co/v3/organizations/{organization_id}/api-keys', 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://client-api.tryvox.co/v3/organizations/{organization_id}/api-keys",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://client-api.tryvox.co/v3/organizations/{organization_id}/api-keys"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://client-api.tryvox.co/v3/organizations/{organization_id}/api-keys")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://client-api.tryvox.co/v3/organizations/{organization_id}/api-keys")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"error": {
"code": "VALIDATION_ERROR",
"message": "Request validation failed.",
"details": {
"field": "name",
"reason": "must not be blank"
}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "Authentication is required.",
"details": {}
}
}{
"error": {
"code": "FORBIDDEN",
"message": "Permission denied.",
"details": {}
}
}{
"error": {
"code": "RESOURCE_NOT_FOUND",
"message": "Resource not found.",
"details": {
"resource": "agent"
}
}
}{
"error": {
"code": "CONFLICT",
"message": "The requested operation conflicts with current state.",
"details": {
"current_status": "draft"
}
}
}{
"error": {
"code": "RATE_LIMIT_EXCEEDED",
"message": "Too many requests.",
"details": {
"limit": 10,
"window_seconds": 1,
"scope": "user"
}
}
}{
"error": {
"code": "INTERNAL_ERROR",
"message": "Internal server error.",
"details": {}
}
}{
"error": {
"code": "SERVICE_UNAVAILABLE",
"message": "Service temporarily unavailable.",
"details": {}
}
}