curl --request PUT \
--url https://api.cyberdesk.io/v1/provider-credentials/{slot} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"api_key": "<string>",
"service_account_json": "<string>",
"aws_access_key_id": "<string>",
"aws_secret_access_key": "<string>",
"aws_region": "<string>"
}
'import requests
url = "https://api.cyberdesk.io/v1/provider-credentials/{slot}"
payload = {
"api_key": "<string>",
"service_account_json": "<string>",
"aws_access_key_id": "<string>",
"aws_secret_access_key": "<string>",
"aws_region": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
api_key: '<string>',
service_account_json: '<string>',
aws_access_key_id: '<string>',
aws_secret_access_key: '<string>',
aws_region: '<string>'
})
};
fetch('https://api.cyberdesk.io/v1/provider-credentials/{slot}', 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.cyberdesk.io/v1/provider-credentials/{slot}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'api_key' => '<string>',
'service_account_json' => '<string>',
'aws_access_key_id' => '<string>',
'aws_secret_access_key' => '<string>',
'aws_region' => '<string>'
]),
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.cyberdesk.io/v1/provider-credentials/{slot}"
payload := strings.NewReader("{\n \"api_key\": \"<string>\",\n \"service_account_json\": \"<string>\",\n \"aws_access_key_id\": \"<string>\",\n \"aws_secret_access_key\": \"<string>\",\n \"aws_region\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.cyberdesk.io/v1/provider-credentials/{slot}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"api_key\": \"<string>\",\n \"service_account_json\": \"<string>\",\n \"aws_access_key_id\": \"<string>\",\n \"aws_secret_access_key\": \"<string>\",\n \"aws_region\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cyberdesk.io/v1/provider-credentials/{slot}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"api_key\": \"<string>\",\n \"service_account_json\": \"<string>\",\n \"aws_access_key_id\": \"<string>\",\n \"aws_secret_access_key\": \"<string>\",\n \"aws_region\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"slot": "anthropic",
"display_name": "<string>",
"source": "cyberdesk",
"covered_providers": [
"<string>"
],
"status": "active",
"auth_type": "api_key",
"display_metadata": {
"key_last4": "<string>",
"project_id": "<string>",
"client_email": "<string>",
"aws_region": "<string>",
"access_key_id_last4": "<string>"
},
"last_error": "<string>",
"activated_at": "2023-11-07T05:31:56Z",
"last_validated_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Upsert Provider Credential
Add or replace the organization’s credential for a provider slot.
Once a slot has a credential, Cyberdesk stops using its own keys for that provider.
curl --request PUT \
--url https://api.cyberdesk.io/v1/provider-credentials/{slot} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"api_key": "<string>",
"service_account_json": "<string>",
"aws_access_key_id": "<string>",
"aws_secret_access_key": "<string>",
"aws_region": "<string>"
}
'import requests
url = "https://api.cyberdesk.io/v1/provider-credentials/{slot}"
payload = {
"api_key": "<string>",
"service_account_json": "<string>",
"aws_access_key_id": "<string>",
"aws_secret_access_key": "<string>",
"aws_region": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
api_key: '<string>',
service_account_json: '<string>',
aws_access_key_id: '<string>',
aws_secret_access_key: '<string>',
aws_region: '<string>'
})
};
fetch('https://api.cyberdesk.io/v1/provider-credentials/{slot}', 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.cyberdesk.io/v1/provider-credentials/{slot}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'api_key' => '<string>',
'service_account_json' => '<string>',
'aws_access_key_id' => '<string>',
'aws_secret_access_key' => '<string>',
'aws_region' => '<string>'
]),
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.cyberdesk.io/v1/provider-credentials/{slot}"
payload := strings.NewReader("{\n \"api_key\": \"<string>\",\n \"service_account_json\": \"<string>\",\n \"aws_access_key_id\": \"<string>\",\n \"aws_secret_access_key\": \"<string>\",\n \"aws_region\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.cyberdesk.io/v1/provider-credentials/{slot}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"api_key\": \"<string>\",\n \"service_account_json\": \"<string>\",\n \"aws_access_key_id\": \"<string>\",\n \"aws_secret_access_key\": \"<string>\",\n \"aws_region\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cyberdesk.io/v1/provider-credentials/{slot}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"api_key\": \"<string>\",\n \"service_account_json\": \"<string>\",\n \"aws_access_key_id\": \"<string>\",\n \"aws_secret_access_key\": \"<string>\",\n \"aws_region\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"slot": "anthropic",
"display_name": "<string>",
"source": "cyberdesk",
"covered_providers": [
"<string>"
],
"status": "active",
"auth_type": "api_key",
"display_metadata": {
"key_last4": "<string>",
"project_id": "<string>",
"client_email": "<string>",
"aws_region": "<string>",
"access_key_id_last4": "<string>"
},
"last_error": "<string>",
"activated_at": "2023-11-07T05:31:56Z",
"last_validated_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Unique key for idempotent requests. If provided, the server ensures the request is processed at most once. Retries with the same key return the original response. SDKs auto-generate this for write requests.
"550e8400-e29b-41d4-a716-446655440000"
Path Parameters
anthropic, openai, google, aws_bedrock Body
Credential material for one slot. Which fields are required depends on the slot.
API key for the anthropic/openai slots, or the Bedrock API key when bedrock_auth_mode=api_key.
Google Cloud service account key file contents (JSON string) for the google slot.
AWS Bedrock authentication mode: 'api_key' (Bedrock API key) or 'iam' (access key pair).
api_key, iam AWS region for Bedrock. One of: us-east-1, us-east-2, us-west-2.
Response
Successful Response
State of one BYOK slot. Never includes secret material.
anthropic, openai, google, aws_bedrock 'cyberdesk' when the slot has never been configured (Cyberdesk platform keys are used).
cyberdesk, organization active, invalid, missing api_key, service_account_json, aws_bedrock_api_key, aws_iam Non-secret metadata shown in the dashboard.
Show child attributes
Show child attributes
Was this page helpful?