Revoga uma chave de API.
curl --request DELETE \
--url https://api.id.zapsign.com.br/v1/api-keys/{id} \
--header 'Authorization: Bearer <token>'const url = 'https://api.id.zapsign.com.br/v1/api-keys/{id}';
const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));import requests
url = "https://api.id.zapsign.com.br/v1/api-keys/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.id.zapsign.com.br/v1/api-keys/{id}"
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))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.id.zapsign.com.br/v1/api-keys/{id}",
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;
}require 'uri'
require 'net/http'
url = URI("https://api.id.zapsign.com.br/v1/api-keys/{id}")
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{
"object": "api_key",
"id": "key_0VH6KAMHAE8HTD08DB9XVZEN3P",
"deleted": true
}{
"error": {
"type": "authentication_error",
"code": "invalid_api_key",
"message": "The API key provided is invalid.",
"doc_url": "https://docs.id.zapsign.com.br/invalid_api_key",
"request_id": "req_3PK3TA2H0MEMTDSAPREHSY4QC4"
}
}{
"error": {
"type": "invalid_request",
"code": "insufficient_permission",
"message": "The API key does not have permission to perform this action.",
"doc_url": "https://docs.id.zapsign.com.br/insufficient_permission",
"request_id": "req_3PK3TA2H0MEMTDSAPREHSY4QC4"
}
}{
"error": {
"type": "not_found",
"code": "not_found",
"message": "No such resource.",
"doc_url": "https://docs.id.zapsign.com.br/not_found",
"request_id": "req_3PK3TA2H0MEMTDSAPREHSY4QC4"
}
}{
"error": {
"type": "rate_limit_error",
"code": "rate_limit_exceeded",
"message": "Too many requests. Please retry after the indicated delay.",
"doc_url": "https://docs.id.zapsign.com.br/rate_limit_exceeded",
"request_id": "req_3PK3TA2H0MEMTDSAPREHSY4QC4"
}
}{
"error": {
"type": "api_error",
"code": "api_error",
"message": "An internal error occurred.",
"doc_url": "https://docs.id.zapsign.com.br/api_error",
"request_id": "req_3PK3TA2H0MEMTDSAPREHSY4QC4"
}
}Chaves de API
Revogar chave de API
Revoga uma chave. A partir daí ela responde 401.
DELETE
/
api-keys
/
{id}
Revoga uma chave de API.
curl --request DELETE \
--url https://api.id.zapsign.com.br/v1/api-keys/{id} \
--header 'Authorization: Bearer <token>'const url = 'https://api.id.zapsign.com.br/v1/api-keys/{id}';
const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));import requests
url = "https://api.id.zapsign.com.br/v1/api-keys/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.id.zapsign.com.br/v1/api-keys/{id}"
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))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.id.zapsign.com.br/v1/api-keys/{id}",
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;
}require 'uri'
require 'net/http'
url = URI("https://api.id.zapsign.com.br/v1/api-keys/{id}")
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{
"object": "api_key",
"id": "key_0VH6KAMHAE8HTD08DB9XVZEN3P",
"deleted": true
}{
"error": {
"type": "authentication_error",
"code": "invalid_api_key",
"message": "The API key provided is invalid.",
"doc_url": "https://docs.id.zapsign.com.br/invalid_api_key",
"request_id": "req_3PK3TA2H0MEMTDSAPREHSY4QC4"
}
}{
"error": {
"type": "invalid_request",
"code": "insufficient_permission",
"message": "The API key does not have permission to perform this action.",
"doc_url": "https://docs.id.zapsign.com.br/insufficient_permission",
"request_id": "req_3PK3TA2H0MEMTDSAPREHSY4QC4"
}
}{
"error": {
"type": "not_found",
"code": "not_found",
"message": "No such resource.",
"doc_url": "https://docs.id.zapsign.com.br/not_found",
"request_id": "req_3PK3TA2H0MEMTDSAPREHSY4QC4"
}
}{
"error": {
"type": "rate_limit_error",
"code": "rate_limit_exceeded",
"message": "Too many requests. Please retry after the indicated delay.",
"doc_url": "https://docs.id.zapsign.com.br/rate_limit_exceeded",
"request_id": "req_3PK3TA2H0MEMTDSAPREHSY4QC4"
}
}{
"error": {
"type": "api_error",
"code": "api_error",
"message": "An internal error occurred.",
"doc_url": "https://docs.id.zapsign.com.br/api_error",
"request_id": "req_3PK3TA2H0MEMTDSAPREHSY4QC4"
}
}Authorizations
Sua chave de API no cabeçalho Authorization: Bearer sk_.... Crie e revogue chaves no painel ou pelos endpoints de Chaves de API.
Path Parameters
Identificador da chave de API.
Was this page helpful?
⌘I