Create Security Champion conversation
curl --request POST \
--url https://api-eu.cybedefend.com/project/{projectId}/security-champion/conversation \
--header 'Content-Type: application/json' \
--data '
{
"projectId": "11111111-2222-3333-4444-555555555555",
"branch": "main",
"vulnerabilityId": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
"initialMessage": "List the critical vulnerabilities related to authentication."
}
'import requests
url = "https://api-eu.cybedefend.com/project/{projectId}/security-champion/conversation"
payload = {
"projectId": "11111111-2222-3333-4444-555555555555",
"branch": "main",
"vulnerabilityId": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
"initialMessage": "List the critical vulnerabilities related to authentication."
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
projectId: '11111111-2222-3333-4444-555555555555',
branch: 'main',
vulnerabilityId: 'aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee',
initialMessage: 'List the critical vulnerabilities related to authentication.'
})
};
fetch('https://api-eu.cybedefend.com/project/{projectId}/security-champion/conversation', 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-eu.cybedefend.com/project/{projectId}/security-champion/conversation",
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([
'projectId' => '11111111-2222-3333-4444-555555555555',
'branch' => 'main',
'vulnerabilityId' => 'aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee',
'initialMessage' => 'List the critical vulnerabilities related to authentication.'
]),
CURLOPT_HTTPHEADER => [
"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-eu.cybedefend.com/project/{projectId}/security-champion/conversation"
payload := strings.NewReader("{\n \"projectId\": \"11111111-2222-3333-4444-555555555555\",\n \"branch\": \"main\",\n \"vulnerabilityId\": \"aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee\",\n \"initialMessage\": \"List the critical vulnerabilities related to authentication.\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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-eu.cybedefend.com/project/{projectId}/security-champion/conversation")
.header("Content-Type", "application/json")
.body("{\n \"projectId\": \"11111111-2222-3333-4444-555555555555\",\n \"branch\": \"main\",\n \"vulnerabilityId\": \"aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee\",\n \"initialMessage\": \"List the critical vulnerabilities related to authentication.\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-eu.cybedefend.com/project/{projectId}/security-champion/conversation")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"projectId\": \"11111111-2222-3333-4444-555555555555\",\n \"branch\": \"main\",\n \"vulnerabilityId\": \"aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee\",\n \"initialMessage\": \"List the critical vulnerabilities related to authentication.\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"conversationId": "conv-abc123",
"status": "created",
"reason": null
}Security Champion
Create Security Champion conversation
Creates a new Security Champion AI conversation for a specific vulnerability. Returns a conversation ID to use with the streaming endpoint
POST
/
project
/
{projectId}
/
security-champion
/
conversation
Create Security Champion conversation
curl --request POST \
--url https://api-eu.cybedefend.com/project/{projectId}/security-champion/conversation \
--header 'Content-Type: application/json' \
--data '
{
"projectId": "11111111-2222-3333-4444-555555555555",
"branch": "main",
"vulnerabilityId": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
"initialMessage": "List the critical vulnerabilities related to authentication."
}
'import requests
url = "https://api-eu.cybedefend.com/project/{projectId}/security-champion/conversation"
payload = {
"projectId": "11111111-2222-3333-4444-555555555555",
"branch": "main",
"vulnerabilityId": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
"initialMessage": "List the critical vulnerabilities related to authentication."
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
projectId: '11111111-2222-3333-4444-555555555555',
branch: 'main',
vulnerabilityId: 'aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee',
initialMessage: 'List the critical vulnerabilities related to authentication.'
})
};
fetch('https://api-eu.cybedefend.com/project/{projectId}/security-champion/conversation', 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-eu.cybedefend.com/project/{projectId}/security-champion/conversation",
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([
'projectId' => '11111111-2222-3333-4444-555555555555',
'branch' => 'main',
'vulnerabilityId' => 'aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee',
'initialMessage' => 'List the critical vulnerabilities related to authentication.'
]),
CURLOPT_HTTPHEADER => [
"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-eu.cybedefend.com/project/{projectId}/security-champion/conversation"
payload := strings.NewReader("{\n \"projectId\": \"11111111-2222-3333-4444-555555555555\",\n \"branch\": \"main\",\n \"vulnerabilityId\": \"aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee\",\n \"initialMessage\": \"List the critical vulnerabilities related to authentication.\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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-eu.cybedefend.com/project/{projectId}/security-champion/conversation")
.header("Content-Type", "application/json")
.body("{\n \"projectId\": \"11111111-2222-3333-4444-555555555555\",\n \"branch\": \"main\",\n \"vulnerabilityId\": \"aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee\",\n \"initialMessage\": \"List the critical vulnerabilities related to authentication.\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-eu.cybedefend.com/project/{projectId}/security-champion/conversation")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"projectId\": \"11111111-2222-3333-4444-555555555555\",\n \"branch\": \"main\",\n \"vulnerabilityId\": \"aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee\",\n \"initialMessage\": \"List the critical vulnerabilities related to authentication.\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"conversationId": "conv-abc123",
"status": "created",
"reason": null
}Path Parameters
Project unique identifier
Body
application/json
Project identifier (UUID)
Example:
"11111111-2222-3333-4444-555555555555"
Git branch name for branch-specific conversations. Used together with projectId to identify the project context in Potpie. Defaults to "main" if not provided.
Example:
"main"
Optional vulnerability identifier (UUID). If provided, the conversation will start focused on this vulnerability context.
Example:
"aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"
Optional initial user message to send
Example:
"List the critical vulnerabilities related to authentication."
⌘I