curl --request PATCH \
--url https://api.streamkap.com/project-keys/{project_key_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"role_ids": [
"<string>"
],
"permission_ids": [
"<string>"
],
"kafka_acls": [
{
"topic_name": "<string>",
"operation": "<string>",
"resource_pattern_type": "<string>",
"resource": "TOPIC"
}
],
"whitelist_ips": "<string>",
"kafka_config": {
"username": "<string>",
"password": "<string>",
"whitelist_ips": "<string>",
"kafka_acls": [
{
"topic_name": "<string>",
"operation": "<string>",
"resource_pattern_type": "<string>",
"resource": "TOPIC"
}
],
"is_create_schema_registry": false
},
"kafka_password": "<string>",
"allowed_tools": [
"<string>"
],
"blocked_tools": [
"<string>"
]
}
'import requests
url = "https://api.streamkap.com/project-keys/{project_key_id}"
payload = {
"name": "<string>",
"description": "<string>",
"role_ids": ["<string>"],
"permission_ids": ["<string>"],
"kafka_acls": [
{
"topic_name": "<string>",
"operation": "<string>",
"resource_pattern_type": "<string>",
"resource": "TOPIC"
}
],
"whitelist_ips": "<string>",
"kafka_config": {
"username": "<string>",
"password": "<string>",
"whitelist_ips": "<string>",
"kafka_acls": [
{
"topic_name": "<string>",
"operation": "<string>",
"resource_pattern_type": "<string>",
"resource": "TOPIC"
}
],
"is_create_schema_registry": False
},
"kafka_password": "<string>",
"allowed_tools": ["<string>"],
"blocked_tools": ["<string>"]
}
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({
name: '<string>',
description: '<string>',
role_ids: ['<string>'],
permission_ids: ['<string>'],
kafka_acls: [
{
topic_name: '<string>',
operation: '<string>',
resource_pattern_type: '<string>',
resource: 'TOPIC'
}
],
whitelist_ips: '<string>',
kafka_config: {
username: '<string>',
password: '<string>',
whitelist_ips: '<string>',
kafka_acls: [
{
topic_name: '<string>',
operation: '<string>',
resource_pattern_type: '<string>',
resource: 'TOPIC'
}
],
is_create_schema_registry: false
},
kafka_password: '<string>',
allowed_tools: ['<string>'],
blocked_tools: ['<string>']
})
};
fetch('https://api.streamkap.com/project-keys/{project_key_id}', 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.streamkap.com/project-keys/{project_key_id}",
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([
'name' => '<string>',
'description' => '<string>',
'role_ids' => [
'<string>'
],
'permission_ids' => [
'<string>'
],
'kafka_acls' => [
[
'topic_name' => '<string>',
'operation' => '<string>',
'resource_pattern_type' => '<string>',
'resource' => 'TOPIC'
]
],
'whitelist_ips' => '<string>',
'kafka_config' => [
'username' => '<string>',
'password' => '<string>',
'whitelist_ips' => '<string>',
'kafka_acls' => [
[
'topic_name' => '<string>',
'operation' => '<string>',
'resource_pattern_type' => '<string>',
'resource' => 'TOPIC'
]
],
'is_create_schema_registry' => false
],
'kafka_password' => '<string>',
'allowed_tools' => [
'<string>'
],
'blocked_tools' => [
'<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.streamkap.com/project-keys/{project_key_id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"role_ids\": [\n \"<string>\"\n ],\n \"permission_ids\": [\n \"<string>\"\n ],\n \"kafka_acls\": [\n {\n \"topic_name\": \"<string>\",\n \"operation\": \"<string>\",\n \"resource_pattern_type\": \"<string>\",\n \"resource\": \"TOPIC\"\n }\n ],\n \"whitelist_ips\": \"<string>\",\n \"kafka_config\": {\n \"username\": \"<string>\",\n \"password\": \"<string>\",\n \"whitelist_ips\": \"<string>\",\n \"kafka_acls\": [\n {\n \"topic_name\": \"<string>\",\n \"operation\": \"<string>\",\n \"resource_pattern_type\": \"<string>\",\n \"resource\": \"TOPIC\"\n }\n ],\n \"is_create_schema_registry\": false\n },\n \"kafka_password\": \"<string>\",\n \"allowed_tools\": [\n \"<string>\"\n ],\n \"blocked_tools\": [\n \"<string>\"\n ]\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.streamkap.com/project-keys/{project_key_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"role_ids\": [\n \"<string>\"\n ],\n \"permission_ids\": [\n \"<string>\"\n ],\n \"kafka_acls\": [\n {\n \"topic_name\": \"<string>\",\n \"operation\": \"<string>\",\n \"resource_pattern_type\": \"<string>\",\n \"resource\": \"TOPIC\"\n }\n ],\n \"whitelist_ips\": \"<string>\",\n \"kafka_config\": {\n \"username\": \"<string>\",\n \"password\": \"<string>\",\n \"whitelist_ips\": \"<string>\",\n \"kafka_acls\": [\n {\n \"topic_name\": \"<string>\",\n \"operation\": \"<string>\",\n \"resource_pattern_type\": \"<string>\",\n \"resource\": \"TOPIC\"\n }\n ],\n \"is_create_schema_registry\": false\n },\n \"kafka_password\": \"<string>\",\n \"allowed_tools\": [\n \"<string>\"\n ],\n \"blocked_tools\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.streamkap.com/project-keys/{project_key_id}")
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 \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"role_ids\": [\n \"<string>\"\n ],\n \"permission_ids\": [\n \"<string>\"\n ],\n \"kafka_acls\": [\n {\n \"topic_name\": \"<string>\",\n \"operation\": \"<string>\",\n \"resource_pattern_type\": \"<string>\",\n \"resource\": \"TOPIC\"\n }\n ],\n \"whitelist_ips\": \"<string>\",\n \"kafka_config\": {\n \"username\": \"<string>\",\n \"password\": \"<string>\",\n \"whitelist_ips\": \"<string>\",\n \"kafka_acls\": [\n {\n \"topic_name\": \"<string>\",\n \"operation\": \"<string>\",\n \"resource_pattern_type\": \"<string>\",\n \"resource\": \"TOPIC\"\n }\n ],\n \"is_create_schema_registry\": false\n },\n \"kafka_password\": \"<string>\",\n \"allowed_tools\": [\n \"<string>\"\n ],\n \"blocked_tools\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"service_id": "<string>",
"status": "<string>",
"description": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"created_by_user": {
"id": "<string>",
"email": "<string>",
"name": "<string>",
"tenant_id": "<string>",
"profile_picture_url": "<string>",
"phone_number": "<string>",
"created_at": "<string>",
"last_login": "<string>"
},
"api_client_id": "<string>",
"api_client_id_masked_secret": "<string>",
"kafka_username": "<string>",
"roles": [
{
"id": "<string>",
"key": "<string>",
"name": "<string>",
"description": "<string>",
"created_at": "<string>",
"updated_at": "<string>",
"permissions": [
"<string>"
]
}
],
"last_used_at": "2023-11-07T05:31:56Z",
"tool_profile": "full",
"allowed_tools": [
"<string>"
],
"blocked_tools": [
"<string>"
],
"agentic_enabled": false,
"agentic_secret_blob": "<string>",
"new_api_credentials": {
"client_id": "<string>",
"client_secret": "<string>",
"token_endpoint": "<string>",
"api_url": "<string>",
"roles": [
"<string>"
]
},
"new_kafka_credentials": {
"username": "<string>",
"password": "<string>",
"bootstrap_servers": "<string>",
"security_protocol": "SASL_SSL",
"sasl_mechanism": "PLAIN",
"schema_registry_url": "<string>"
},
"token_ttl_seconds": 123,
"warnings": [
"<string>"
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Update Project Key
Update a Project Key’s name, description, roles, tool scoping, or Kafka ACLs.
Supports additive capability transitions:
- Send
kafka_configon an API-only PK to add Kafka access. Response will includenew_kafka_credentialswith the plaintext Kafka password (shown once). - Send
role_idsorpermission_idson a Kafka-only PK to add API credentials. Response will includenew_api_credentialswith the plaintext client_secret (shown once).
Returns 400 if the key is in creating/deleting/delete_failed state. role_ids and permission_ids are mutually exclusive.
curl --request PATCH \
--url https://api.streamkap.com/project-keys/{project_key_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"role_ids": [
"<string>"
],
"permission_ids": [
"<string>"
],
"kafka_acls": [
{
"topic_name": "<string>",
"operation": "<string>",
"resource_pattern_type": "<string>",
"resource": "TOPIC"
}
],
"whitelist_ips": "<string>",
"kafka_config": {
"username": "<string>",
"password": "<string>",
"whitelist_ips": "<string>",
"kafka_acls": [
{
"topic_name": "<string>",
"operation": "<string>",
"resource_pattern_type": "<string>",
"resource": "TOPIC"
}
],
"is_create_schema_registry": false
},
"kafka_password": "<string>",
"allowed_tools": [
"<string>"
],
"blocked_tools": [
"<string>"
]
}
'import requests
url = "https://api.streamkap.com/project-keys/{project_key_id}"
payload = {
"name": "<string>",
"description": "<string>",
"role_ids": ["<string>"],
"permission_ids": ["<string>"],
"kafka_acls": [
{
"topic_name": "<string>",
"operation": "<string>",
"resource_pattern_type": "<string>",
"resource": "TOPIC"
}
],
"whitelist_ips": "<string>",
"kafka_config": {
"username": "<string>",
"password": "<string>",
"whitelist_ips": "<string>",
"kafka_acls": [
{
"topic_name": "<string>",
"operation": "<string>",
"resource_pattern_type": "<string>",
"resource": "TOPIC"
}
],
"is_create_schema_registry": False
},
"kafka_password": "<string>",
"allowed_tools": ["<string>"],
"blocked_tools": ["<string>"]
}
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({
name: '<string>',
description: '<string>',
role_ids: ['<string>'],
permission_ids: ['<string>'],
kafka_acls: [
{
topic_name: '<string>',
operation: '<string>',
resource_pattern_type: '<string>',
resource: 'TOPIC'
}
],
whitelist_ips: '<string>',
kafka_config: {
username: '<string>',
password: '<string>',
whitelist_ips: '<string>',
kafka_acls: [
{
topic_name: '<string>',
operation: '<string>',
resource_pattern_type: '<string>',
resource: 'TOPIC'
}
],
is_create_schema_registry: false
},
kafka_password: '<string>',
allowed_tools: ['<string>'],
blocked_tools: ['<string>']
})
};
fetch('https://api.streamkap.com/project-keys/{project_key_id}', 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.streamkap.com/project-keys/{project_key_id}",
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([
'name' => '<string>',
'description' => '<string>',
'role_ids' => [
'<string>'
],
'permission_ids' => [
'<string>'
],
'kafka_acls' => [
[
'topic_name' => '<string>',
'operation' => '<string>',
'resource_pattern_type' => '<string>',
'resource' => 'TOPIC'
]
],
'whitelist_ips' => '<string>',
'kafka_config' => [
'username' => '<string>',
'password' => '<string>',
'whitelist_ips' => '<string>',
'kafka_acls' => [
[
'topic_name' => '<string>',
'operation' => '<string>',
'resource_pattern_type' => '<string>',
'resource' => 'TOPIC'
]
],
'is_create_schema_registry' => false
],
'kafka_password' => '<string>',
'allowed_tools' => [
'<string>'
],
'blocked_tools' => [
'<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.streamkap.com/project-keys/{project_key_id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"role_ids\": [\n \"<string>\"\n ],\n \"permission_ids\": [\n \"<string>\"\n ],\n \"kafka_acls\": [\n {\n \"topic_name\": \"<string>\",\n \"operation\": \"<string>\",\n \"resource_pattern_type\": \"<string>\",\n \"resource\": \"TOPIC\"\n }\n ],\n \"whitelist_ips\": \"<string>\",\n \"kafka_config\": {\n \"username\": \"<string>\",\n \"password\": \"<string>\",\n \"whitelist_ips\": \"<string>\",\n \"kafka_acls\": [\n {\n \"topic_name\": \"<string>\",\n \"operation\": \"<string>\",\n \"resource_pattern_type\": \"<string>\",\n \"resource\": \"TOPIC\"\n }\n ],\n \"is_create_schema_registry\": false\n },\n \"kafka_password\": \"<string>\",\n \"allowed_tools\": [\n \"<string>\"\n ],\n \"blocked_tools\": [\n \"<string>\"\n ]\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.streamkap.com/project-keys/{project_key_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"role_ids\": [\n \"<string>\"\n ],\n \"permission_ids\": [\n \"<string>\"\n ],\n \"kafka_acls\": [\n {\n \"topic_name\": \"<string>\",\n \"operation\": \"<string>\",\n \"resource_pattern_type\": \"<string>\",\n \"resource\": \"TOPIC\"\n }\n ],\n \"whitelist_ips\": \"<string>\",\n \"kafka_config\": {\n \"username\": \"<string>\",\n \"password\": \"<string>\",\n \"whitelist_ips\": \"<string>\",\n \"kafka_acls\": [\n {\n \"topic_name\": \"<string>\",\n \"operation\": \"<string>\",\n \"resource_pattern_type\": \"<string>\",\n \"resource\": \"TOPIC\"\n }\n ],\n \"is_create_schema_registry\": false\n },\n \"kafka_password\": \"<string>\",\n \"allowed_tools\": [\n \"<string>\"\n ],\n \"blocked_tools\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.streamkap.com/project-keys/{project_key_id}")
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 \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"role_ids\": [\n \"<string>\"\n ],\n \"permission_ids\": [\n \"<string>\"\n ],\n \"kafka_acls\": [\n {\n \"topic_name\": \"<string>\",\n \"operation\": \"<string>\",\n \"resource_pattern_type\": \"<string>\",\n \"resource\": \"TOPIC\"\n }\n ],\n \"whitelist_ips\": \"<string>\",\n \"kafka_config\": {\n \"username\": \"<string>\",\n \"password\": \"<string>\",\n \"whitelist_ips\": \"<string>\",\n \"kafka_acls\": [\n {\n \"topic_name\": \"<string>\",\n \"operation\": \"<string>\",\n \"resource_pattern_type\": \"<string>\",\n \"resource\": \"TOPIC\"\n }\n ],\n \"is_create_schema_registry\": false\n },\n \"kafka_password\": \"<string>\",\n \"allowed_tools\": [\n \"<string>\"\n ],\n \"blocked_tools\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"service_id": "<string>",
"status": "<string>",
"description": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"created_by_user": {
"id": "<string>",
"email": "<string>",
"name": "<string>",
"tenant_id": "<string>",
"profile_picture_url": "<string>",
"phone_number": "<string>",
"created_at": "<string>",
"last_login": "<string>"
},
"api_client_id": "<string>",
"api_client_id_masked_secret": "<string>",
"kafka_username": "<string>",
"roles": [
{
"id": "<string>",
"key": "<string>",
"name": "<string>",
"description": "<string>",
"created_at": "<string>",
"updated_at": "<string>",
"permissions": [
"<string>"
]
}
],
"last_used_at": "2023-11-07T05:31:56Z",
"tool_profile": "full",
"allowed_tools": [
"<string>"
],
"blocked_tools": [
"<string>"
],
"agentic_enabled": false,
"agentic_secret_blob": "<string>",
"new_api_credentials": {
"client_id": "<string>",
"client_secret": "<string>",
"token_endpoint": "<string>",
"api_url": "<string>",
"roles": [
"<string>"
]
},
"new_kafka_credentials": {
"username": "<string>",
"password": "<string>",
"bootstrap_servers": "<string>",
"security_protocol": "SASL_SSL",
"sasl_mechanism": "PLAIN",
"schema_registry_url": "<string>"
},
"token_ttl_seconds": 123,
"warnings": [
"<string>"
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Body
Request body for updating a Project Key.
Change the Frontegg roles for this PK, or assign roles when adding API access to a Kafka-only PK. Note: changing roles on an existing API credential only takes effect when the current JWT expires. See token_ttl_seconds in the detail response for the validity window.
1Assign fine-grained permissions when ADDING API access to a Kafka-only PK. Changing permissions on an existing API credential is NOT supported - to change permissions on an existing PK, either switch to role_ids or delete and recreate the PK. This field is only accepted when the PK has no api_client_id yet.
1Response
Successful Response
Response for PATCH /project-keys/{id}.
Extends the summary with plaintext secrets when an additive capability transition
occurred. For regular updates (no capability change), both new_api_credentials and
new_kafka_credentials are None.
Whether this Project Key is wired up as the auth blob behind the Streamkap MCP. Toggled via POST /project-keys/{id}/enable-agentic and disable-agentic. When true, the encrypted credential lives on the PK row (server-side only); the agent picker on the FE filters to PKs where this is true.
Was this page helpful?