Update API Key Config
curl --request POST \
--url https://api.velt.dev/v2/workspace/apikeyconfig/update \
--header 'Content-Type: application/json' \
--header 'x-velt-api-key: <x-velt-api-key>' \
--header 'x-velt-auth-token: <x-velt-auth-token>' \
--data '
{
"data": {
"enablePrivateComments": true,
"requireJwtToken": true,
"requireAutoOrgUser": true,
"defaultDocumentAccessType": "<string>",
"aiModelApiKey": [
{
"provider": "<string>",
"customerApiKey": "<string>"
}
]
}
}
'import requests
url = "https://api.velt.dev/v2/workspace/apikeyconfig/update"
payload = { "data": {
"enablePrivateComments": True,
"requireJwtToken": True,
"requireAutoOrgUser": True,
"defaultDocumentAccessType": "<string>",
"aiModelApiKey": [
{
"provider": "<string>",
"customerApiKey": "<string>"
}
]
} }
headers = {
"x-velt-api-key": "<x-velt-api-key>",
"x-velt-auth-token": "<x-velt-auth-token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-velt-api-key': '<x-velt-api-key>',
'x-velt-auth-token': '<x-velt-auth-token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
data: {
enablePrivateComments: true,
requireJwtToken: true,
requireAutoOrgUser: true,
defaultDocumentAccessType: '<string>',
aiModelApiKey: [{provider: '<string>', customerApiKey: '<string>'}]
}
})
};
fetch('https://api.velt.dev/v2/workspace/apikeyconfig/update', 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.velt.dev/v2/workspace/apikeyconfig/update",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'data' => [
'enablePrivateComments' => true,
'requireJwtToken' => true,
'requireAutoOrgUser' => true,
'defaultDocumentAccessType' => '<string>',
'aiModelApiKey' => [
[
'provider' => '<string>',
'customerApiKey' => '<string>'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-velt-api-key: <x-velt-api-key>",
"x-velt-auth-token: <x-velt-auth-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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.velt.dev/v2/workspace/apikeyconfig/update"
payload := strings.NewReader("{\n \"data\": {\n \"enablePrivateComments\": true,\n \"requireJwtToken\": true,\n \"requireAutoOrgUser\": true,\n \"defaultDocumentAccessType\": \"<string>\",\n \"aiModelApiKey\": [\n {\n \"provider\": \"<string>\",\n \"customerApiKey\": \"<string>\"\n }\n ]\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-velt-api-key", "<x-velt-api-key>")
req.Header.Add("x-velt-auth-token", "<x-velt-auth-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.post("https://api.velt.dev/v2/workspace/apikeyconfig/update")
.header("x-velt-api-key", "<x-velt-api-key>")
.header("x-velt-auth-token", "<x-velt-auth-token>")
.header("Content-Type", "application/json")
.body("{\n \"data\": {\n \"enablePrivateComments\": true,\n \"requireJwtToken\": true,\n \"requireAutoOrgUser\": true,\n \"defaultDocumentAccessType\": \"<string>\",\n \"aiModelApiKey\": [\n {\n \"provider\": \"<string>\",\n \"customerApiKey\": \"<string>\"\n }\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.velt.dev/v2/workspace/apikeyconfig/update")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-velt-api-key"] = '<x-velt-api-key>'
request["x-velt-auth-token"] = '<x-velt-auth-token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"data\": {\n \"enablePrivateComments\": true,\n \"requireJwtToken\": true,\n \"requireAutoOrgUser\": true,\n \"defaultDocumentAccessType\": \"<string>\",\n \"aiModelApiKey\": [\n {\n \"provider\": \"<string>\",\n \"customerApiKey\": \"<string>\"\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"result": {
"status": "success",
"message": "API key configuration updated successfully.",
"data": {
"requireJwtToken": true,
"defaultDocumentAccessType": "restricted",
"aiModelsConfig": {
"openai": { "displayText": "sk-open...xxxxxxxxxxxxxxxxxxxxxxx" },
"anthropic": { "displayText": "sk-ant-...xxxxxxxxxxxxxxxxxxxxx" },
"gemini": { "displayText": "AIza...xxxxxxxxxxxxxxxxxxxxxxxxx" }
}
}
}
}
API Key Configuration
Update API Key Config
POST
/
v2
/
workspace
/
apikeyconfig
/
update
Update API Key Config
curl --request POST \
--url https://api.velt.dev/v2/workspace/apikeyconfig/update \
--header 'Content-Type: application/json' \
--header 'x-velt-api-key: <x-velt-api-key>' \
--header 'x-velt-auth-token: <x-velt-auth-token>' \
--data '
{
"data": {
"enablePrivateComments": true,
"requireJwtToken": true,
"requireAutoOrgUser": true,
"defaultDocumentAccessType": "<string>",
"aiModelApiKey": [
{
"provider": "<string>",
"customerApiKey": "<string>"
}
]
}
}
'import requests
url = "https://api.velt.dev/v2/workspace/apikeyconfig/update"
payload = { "data": {
"enablePrivateComments": True,
"requireJwtToken": True,
"requireAutoOrgUser": True,
"defaultDocumentAccessType": "<string>",
"aiModelApiKey": [
{
"provider": "<string>",
"customerApiKey": "<string>"
}
]
} }
headers = {
"x-velt-api-key": "<x-velt-api-key>",
"x-velt-auth-token": "<x-velt-auth-token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-velt-api-key': '<x-velt-api-key>',
'x-velt-auth-token': '<x-velt-auth-token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
data: {
enablePrivateComments: true,
requireJwtToken: true,
requireAutoOrgUser: true,
defaultDocumentAccessType: '<string>',
aiModelApiKey: [{provider: '<string>', customerApiKey: '<string>'}]
}
})
};
fetch('https://api.velt.dev/v2/workspace/apikeyconfig/update', 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.velt.dev/v2/workspace/apikeyconfig/update",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'data' => [
'enablePrivateComments' => true,
'requireJwtToken' => true,
'requireAutoOrgUser' => true,
'defaultDocumentAccessType' => '<string>',
'aiModelApiKey' => [
[
'provider' => '<string>',
'customerApiKey' => '<string>'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-velt-api-key: <x-velt-api-key>",
"x-velt-auth-token: <x-velt-auth-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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.velt.dev/v2/workspace/apikeyconfig/update"
payload := strings.NewReader("{\n \"data\": {\n \"enablePrivateComments\": true,\n \"requireJwtToken\": true,\n \"requireAutoOrgUser\": true,\n \"defaultDocumentAccessType\": \"<string>\",\n \"aiModelApiKey\": [\n {\n \"provider\": \"<string>\",\n \"customerApiKey\": \"<string>\"\n }\n ]\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-velt-api-key", "<x-velt-api-key>")
req.Header.Add("x-velt-auth-token", "<x-velt-auth-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.post("https://api.velt.dev/v2/workspace/apikeyconfig/update")
.header("x-velt-api-key", "<x-velt-api-key>")
.header("x-velt-auth-token", "<x-velt-auth-token>")
.header("Content-Type", "application/json")
.body("{\n \"data\": {\n \"enablePrivateComments\": true,\n \"requireJwtToken\": true,\n \"requireAutoOrgUser\": true,\n \"defaultDocumentAccessType\": \"<string>\",\n \"aiModelApiKey\": [\n {\n \"provider\": \"<string>\",\n \"customerApiKey\": \"<string>\"\n }\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.velt.dev/v2/workspace/apikeyconfig/update")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-velt-api-key"] = '<x-velt-api-key>'
request["x-velt-auth-token"] = '<x-velt-auth-token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"data\": {\n \"enablePrivateComments\": true,\n \"requireJwtToken\": true,\n \"requireAutoOrgUser\": true,\n \"defaultDocumentAccessType\": \"<string>\",\n \"aiModelApiKey\": [\n {\n \"provider\": \"<string>\",\n \"customerApiKey\": \"<string>\"\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"result": {
"status": "success",
"message": "API key configuration updated successfully.",
"data": {
"requireJwtToken": true,
"defaultDocumentAccessType": "restricted",
"aiModelsConfig": {
"openai": { "displayText": "sk-open...xxxxxxxxxxxxxxxxxxxxxxx" },
"anthropic": { "displayText": "sk-ant-...xxxxxxxxxxxxxxxxxxxxx" },
"gemini": { "displayText": "AIza...xxxxxxxxxxxxxxxxxxxxxxxxx" }
}
}
}
}
Use this API to update the app configuration for a workspace API key. Every field is optional, but at least one must be provided. Unknown fields are rejected. All writes are field-merge only — no fields are removed.
This endpoint uses API-key-level auth: pass
x-velt-api-key and x-velt-auth-token as headers. You can obtain these from the Get Auth Tokens endpoint.Endpoint
POST https://api.velt.dev/v2/workspace/apikeyconfig/update
Headers
Your API key.
Your Auth Token.
Body
Params
At least one of the following fields must be provided.
Show properties
Show properties
Enable (
true) or disable (false) private comments for this API key.When
true, the SDK requires a signed JWT to authenticate.When
true, users are auto-added to the organization on first access.Workspace-default document access type. One of
public, restricted, or organizationPrivate.Array of AI model provider keys — pass multiple entries to update several providers in one call. Each raw key is encrypted at rest and is never returned in any response. Must contain at least one entry.
Example Request
{
"data": {
"requireJwtToken": true,
"defaultDocumentAccessType": "restricted",
"aiModelApiKey": [
{ "provider": "openai", "customerApiKey": "sk-openai-..." },
{ "provider": "anthropic", "customerApiKey": "sk-ant-..." },
{ "provider": "gemini", "customerApiKey": "AIza..." }
]
}
}
Example Response
Success Response
{
"result": {
"status": "success",
"message": "API key configuration updated successfully.",
"data": {
"requireJwtToken": true,
"defaultDocumentAccessType": "restricted",
"aiModelsConfig": {
"openai": { "displayText": "sk-open...xxxxxxxxxxxxxxxxxxxxxxx" },
"anthropic": { "displayText": "sk-ant-...xxxxxxxxxxxxxxxxxxxxx" },
"gemini": { "displayText": "AIza...xxxxxxxxxxxxxxxxxxxxxxxxx" }
}
}
}
}
The response echoes the post-write values for the fields you provided. For
aiModelApiKey, the keys come back masked under aiModelsConfig as a map of provider -> { displayText } (the same shape as Get API Key Config) — the raw key value is never returned. When enablePrivateComments is the only field and its value already matches the current value, the write is skipped internally and the response is simply { "enablePrivateComments": <value> }.Failure Response
If no field is provided, or an unknown field is sent
{
"error": {
"status": "INVALID_ARGUMENT",
"message": "At least one field must be provided for update"
}
}
{
"result": {
"status": "success",
"message": "API key configuration updated successfully.",
"data": {
"requireJwtToken": true,
"defaultDocumentAccessType": "restricted",
"aiModelsConfig": {
"openai": { "displayText": "sk-open...xxxxxxxxxxxxxxxxxxxxxxx" },
"anthropic": { "displayText": "sk-ant-...xxxxxxxxxxxxxxxxxxxxx" },
"gemini": { "displayText": "AIza...xxxxxxxxxxxxxxxxxxxxxxxxx" }
}
}
}
}
Was this page helpful?
⌘I

