Disable or enable a client capability
curl --request PATCH \
--url https://api.portalhq.io/api/v3/custodians/me/clients/{clientId}/capabilities \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"capability": "SIGN",
"disabled": true
}
'import requests
url = "https://api.portalhq.io/api/v3/custodians/me/clients/{clientId}/capabilities"
payload = {
"capability": "SIGN",
"disabled": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({capability: 'SIGN', disabled: true})
};
fetch('https://api.portalhq.io/api/v3/custodians/me/clients/{clientId}/capabilities', 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.portalhq.io/api/v3/custodians/me/clients/{clientId}/capabilities",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'capability' => 'SIGN',
'disabled' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.portalhq.io/api/v3/custodians/me/clients/{clientId}/capabilities"
payload := strings.NewReader("{\n \"capability\": \"SIGN\",\n \"disabled\": true\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.portalhq.io/api/v3/custodians/me/clients/{clientId}/capabilities")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"capability\": \"SIGN\",\n \"disabled\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.portalhq.io/api/v3/custodians/me/clients/{clientId}/capabilities")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"capability\": \"SIGN\",\n \"disabled\": true\n}"
response = http.request(request)
puts response.read_body{
"disabledCapabilities": [
"SIGN"
],
"id": "clientId"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Clients
Disable or enable a client capability
Disables or re-enables a single capability for the specified client.
Disabling the SIGN capability blocks every signing request for that client, even
when the request carries a valid client API key. Use this to freeze a client you
believe is compromised. Re-enable it by sending the same request with
disabled: false.
The current state is returned by the Get a client endpoint in
disabledCapabilities.
PATCH
/
custodians
/
me
/
clients
/
{clientId}
/
capabilities
Disable or enable a client capability
curl --request PATCH \
--url https://api.portalhq.io/api/v3/custodians/me/clients/{clientId}/capabilities \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"capability": "SIGN",
"disabled": true
}
'import requests
url = "https://api.portalhq.io/api/v3/custodians/me/clients/{clientId}/capabilities"
payload = {
"capability": "SIGN",
"disabled": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({capability: 'SIGN', disabled: true})
};
fetch('https://api.portalhq.io/api/v3/custodians/me/clients/{clientId}/capabilities', 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.portalhq.io/api/v3/custodians/me/clients/{clientId}/capabilities",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'capability' => 'SIGN',
'disabled' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.portalhq.io/api/v3/custodians/me/clients/{clientId}/capabilities"
payload := strings.NewReader("{\n \"capability\": \"SIGN\",\n \"disabled\": true\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.portalhq.io/api/v3/custodians/me/clients/{clientId}/capabilities")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"capability\": \"SIGN\",\n \"disabled\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.portalhq.io/api/v3/custodians/me/clients/{clientId}/capabilities")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"capability\": \"SIGN\",\n \"disabled\": true\n}"
response = http.request(request)
puts response.read_body{
"disabledCapabilities": [
"SIGN"
],
"id": "clientId"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Authorizations
Portal API Key (Custodian API Key). Pass as a Bearer token in the Authorization header.
Path Parameters
The unique identifier of the client.
Body
application/json
Was this page helpful?