Unpair API key
Unpair an API key from a cosigner Endpoint Permission: Admin and Non-Signing Admin.
DELETE
/
cosigners
/
{cosignerId}
/
api_keys
/
{apiKeyId}
TypeScript
const response: Promise<FireblocksResponse<ApiKey>> = fireblocks.cosignersBeta.unpairApiKey(cosignersBetaApiUnpairApiKeyRequest);CompletableFuture<ApiResponse<ApiKey>> response = fireblocks.cosignersBeta().unpairApiKey(cosignerId, apiKeyId);response = fireblocks.cosigners_beta.unpair_api_key(cosigner_id, api_key_id);curl --request DELETE \
--url https://api.fireblocks.io/v1/cosigners/{cosignerId}/api_keys/{apiKeyId}const options = {method: 'DELETE'};
fetch('https://api.fireblocks.io/v1/cosigners/{cosignerId}/api_keys/{apiKeyId}', 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://api.fireblocks.io/v1/cosigners/{cosignerId}/api_keys/{apiKeyId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
]);
$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://api.fireblocks.io/v1/cosigners/{cosignerId}/api_keys/{apiKeyId}"
req, _ := http.NewRequest("DELETE", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}require 'uri'
require 'net/http'
url = URI("https://api.fireblocks.io/v1/cosigners/{cosignerId}/api_keys/{apiKeyId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
response = http.request(request)
puts response.read_body{
"id": "44fcead0-7053-4831-a53a-df7fb90d440f",
"lastSeen": "2021-07-01T00:00:00.000Z",
"callbackHandler": {
"url": "https://example.com/callback-handler",
"publicKey": "-----BEGIN PUBLIC KEY-----\n... truncated ...\n-----END PUBLIC KEY-----",
"certPublicKeyHash": "<string>"
}
}{
"message": "<string>",
"code": 123
}Path Parameters
The unique identifier of the cosigner
The unique identifier of the API key
Was this page helpful?
Previous
Update API key callback handlerUpdate the callback handler of an API key
Endpoint Permission: Admin and Non-Signing Admin.
Next
⌘I
TypeScript
const response: Promise<FireblocksResponse<ApiKey>> = fireblocks.cosignersBeta.unpairApiKey(cosignersBetaApiUnpairApiKeyRequest);CompletableFuture<ApiResponse<ApiKey>> response = fireblocks.cosignersBeta().unpairApiKey(cosignerId, apiKeyId);response = fireblocks.cosigners_beta.unpair_api_key(cosigner_id, api_key_id);curl --request DELETE \
--url https://api.fireblocks.io/v1/cosigners/{cosignerId}/api_keys/{apiKeyId}const options = {method: 'DELETE'};
fetch('https://api.fireblocks.io/v1/cosigners/{cosignerId}/api_keys/{apiKeyId}', 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://api.fireblocks.io/v1/cosigners/{cosignerId}/api_keys/{apiKeyId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
]);
$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://api.fireblocks.io/v1/cosigners/{cosignerId}/api_keys/{apiKeyId}"
req, _ := http.NewRequest("DELETE", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}require 'uri'
require 'net/http'
url = URI("https://api.fireblocks.io/v1/cosigners/{cosignerId}/api_keys/{apiKeyId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
response = http.request(request)
puts response.read_body{
"id": "44fcead0-7053-4831-a53a-df7fb90d440f",
"lastSeen": "2021-07-01T00:00:00.000Z",
"callbackHandler": {
"url": "https://example.com/callback-handler",
"publicKey": "-----BEGIN PUBLIC KEY-----\n... truncated ...\n-----END PUBLIC KEY-----",
"certPublicKeyHash": "<string>"
}
}{
"message": "<string>",
"code": 123
}