curl --request POST \
--url https://api.streamkap.com/project-keys \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"role_ids": [
"<string>"
],
"permission_ids": [
"<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
},
"allowed_tools": [
"<string>"
],
"blocked_tools": [
"<string>"
],
"agentic_enabled": false
}
'import requests
url = "https://api.streamkap.com/project-keys"
payload = {
"name": "<string>",
"description": "<string>",
"role_ids": ["<string>"],
"permission_ids": ["<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
},
"allowed_tools": ["<string>"],
"blocked_tools": ["<string>"],
"agentic_enabled": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
role_ids: ['<string>'],
permission_ids: ['<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
},
allowed_tools: ['<string>'],
blocked_tools: ['<string>'],
agentic_enabled: false
})
};
fetch('https://api.streamkap.com/project-keys', 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",
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([
'name' => '<string>',
'description' => '<string>',
'role_ids' => [
'<string>'
],
'permission_ids' => [
'<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
],
'allowed_tools' => [
'<string>'
],
'blocked_tools' => [
'<string>'
],
'agentic_enabled' => false
]),
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"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"role_ids\": [\n \"<string>\"\n ],\n \"permission_ids\": [\n \"<string>\"\n ],\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 \"allowed_tools\": [\n \"<string>\"\n ],\n \"blocked_tools\": [\n \"<string>\"\n ],\n \"agentic_enabled\": false\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.streamkap.com/project-keys")
.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_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 \"allowed_tools\": [\n \"<string>\"\n ],\n \"blocked_tools\": [\n \"<string>\"\n ],\n \"agentic_enabled\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.streamkap.com/project-keys")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.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_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 \"allowed_tools\": [\n \"<string>\"\n ],\n \"blocked_tools\": [\n \"<string>\"\n ],\n \"agentic_enabled\": false\n}"
response = http.request(request)
puts response.read_body{
"project_key_id": "<string>",
"project": {},
"created_at": "2023-11-07T05:31:56Z",
"type": "streamkap_project_key",
"api": {
"client_id": "<string>",
"client_secret": "<string>",
"token_endpoint": "<string>",
"api_url": "<string>",
"roles": [
"<string>"
]
},
"kafka": {
"username": "<string>",
"password": "<string>",
"bootstrap_servers": "<string>",
"security_protocol": "SASL_SSL",
"sasl_mechanism": "PLAIN",
"schema_registry_url": "<string>"
},
"kafka_acls": [
{}
],
"tool_profile": "full",
"allowed_tools": [
"<string>"
],
"blocked_tools": [
"<string>"
],
"created_by": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Create Project Key
Create a Project Key with API credentials and optional Kafka access.
Returns a credential file (JSON) with plaintext secrets. This is a one-time delivery - secrets are masked in all subsequent responses. Optionally creates a Kafka user with SCRAM credentials, K8s proxy, and ACLs.
curl --request POST \
--url https://api.streamkap.com/project-keys \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"role_ids": [
"<string>"
],
"permission_ids": [
"<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
},
"allowed_tools": [
"<string>"
],
"blocked_tools": [
"<string>"
],
"agentic_enabled": false
}
'import requests
url = "https://api.streamkap.com/project-keys"
payload = {
"name": "<string>",
"description": "<string>",
"role_ids": ["<string>"],
"permission_ids": ["<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
},
"allowed_tools": ["<string>"],
"blocked_tools": ["<string>"],
"agentic_enabled": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
role_ids: ['<string>'],
permission_ids: ['<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
},
allowed_tools: ['<string>'],
blocked_tools: ['<string>'],
agentic_enabled: false
})
};
fetch('https://api.streamkap.com/project-keys', 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",
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([
'name' => '<string>',
'description' => '<string>',
'role_ids' => [
'<string>'
],
'permission_ids' => [
'<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
],
'allowed_tools' => [
'<string>'
],
'blocked_tools' => [
'<string>'
],
'agentic_enabled' => false
]),
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"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"role_ids\": [\n \"<string>\"\n ],\n \"permission_ids\": [\n \"<string>\"\n ],\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 \"allowed_tools\": [\n \"<string>\"\n ],\n \"blocked_tools\": [\n \"<string>\"\n ],\n \"agentic_enabled\": false\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.streamkap.com/project-keys")
.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_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 \"allowed_tools\": [\n \"<string>\"\n ],\n \"blocked_tools\": [\n \"<string>\"\n ],\n \"agentic_enabled\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.streamkap.com/project-keys")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.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_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 \"allowed_tools\": [\n \"<string>\"\n ],\n \"blocked_tools\": [\n \"<string>\"\n ],\n \"agentic_enabled\": false\n}"
response = http.request(request)
puts response.read_body{
"project_key_id": "<string>",
"project": {},
"created_at": "2023-11-07T05:31:56Z",
"type": "streamkap_project_key",
"api": {
"client_id": "<string>",
"client_secret": "<string>",
"token_endpoint": "<string>",
"api_url": "<string>",
"roles": [
"<string>"
]
},
"kafka": {
"username": "<string>",
"password": "<string>",
"bootstrap_servers": "<string>",
"security_protocol": "SASL_SSL",
"sasl_mechanism": "PLAIN",
"schema_registry_url": "<string>"
},
"kafka_acls": [
{}
],
"tool_profile": "full",
"allowed_tools": [
"<string>"
],
"blocked_tools": [
"<string>"
],
"created_by": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Body
Request body for creating a Project Key.
When true, atomically seeds agentic_secret_blob on the new PK row from the credential file produced during creation. The PK is then immediately usable as the auth blob behind the Streamkap MCP. Requires API credentials (role_ids or permission_ids) - rejected with 400 on Kafka-only PKs since there is no API credential to seed. Audit-logged with action=enable. Post-creation toggling goes through POST /project-keys/{id}/enable-agentic or /disable-agentic.
Response
Successful Response
The downloadable .json credential file returned at creation time.
Was this page helpful?