Replace custom problem
Full replacement using the same body as create. Resets the problem to draft and prepares it again. No delete endpoint exists.
curl --request PUT \
--url https://api.promptster.ai/v1/issues/custom/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"repoUrl": "<string>",
"testSuiteConfig": {
"testFiles": [
{
"fileName": "<string>",
"destination": "<string>",
"content": "<string>"
}
],
"testCommand": "<string>",
"setupCommand": "<string>",
"testFramework": "<string>",
"timeoutSeconds": 300,
"edgeCaseFiles": [
{
"fileName": "<string>",
"destination": "<string>",
"content": "<string>"
}
],
"edgeCaseCommand": "<string>",
"hygieneRules": [
"<string>"
]
},
"ticketFlow": {
"ticket": {
"key": "<string>",
"title": "<string>",
"body": "<string>",
"acceptance": [
"<string>"
],
"labels": [],
"fields": []
},
"personas": [
{
"id": "<string>",
"name": "<string>",
"role": "<string>",
"owns": "<string>",
"brief": "<string>"
}
],
"requirements": [
{
"id": "<string>",
"owner": "<string>",
"ticketImplied": true,
"text": "<string>",
"tests": [
"<string>"
]
}
],
"unavailability": [
{
"personaId": "<string>",
"fromSec": 1,
"toSec": 2
}
]
},
"title": "<string>",
"taskBrief": "<string>",
"brief": {
"scenario": "<string>",
"codebase": {
"name": "<string>",
"description": "<string>",
"stack": [
"<string>"
],
"runCommand": "<string>",
"testCommand": "<string>"
},
"phases": [
{
"name": "<string>",
"goal": "<string>",
"tasks": [
"<string>"
],
"guidance": [
"<string>"
]
}
],
"evaluation": [
"<string>"
],
"groundRules": [
"<string>"
],
"deliverables": [
"<string>"
]
},
"commitSha": "<string>",
"isPrivate": false,
"skillTags": [],
"problemType": "bug_fix",
"estimatedMinutes": 300
}
'import requests
url = "https://api.promptster.ai/v1/issues/custom/{id}"
payload = {
"repoUrl": "<string>",
"testSuiteConfig": {
"testFiles": [
{
"fileName": "<string>",
"destination": "<string>",
"content": "<string>"
}
],
"testCommand": "<string>",
"setupCommand": "<string>",
"testFramework": "<string>",
"timeoutSeconds": 300,
"edgeCaseFiles": [
{
"fileName": "<string>",
"destination": "<string>",
"content": "<string>"
}
],
"edgeCaseCommand": "<string>",
"hygieneRules": ["<string>"]
},
"ticketFlow": {
"ticket": {
"key": "<string>",
"title": "<string>",
"body": "<string>",
"acceptance": ["<string>"],
"labels": [],
"fields": []
},
"personas": [
{
"id": "<string>",
"name": "<string>",
"role": "<string>",
"owns": "<string>",
"brief": "<string>"
}
],
"requirements": [
{
"id": "<string>",
"owner": "<string>",
"ticketImplied": True,
"text": "<string>",
"tests": ["<string>"]
}
],
"unavailability": [
{
"personaId": "<string>",
"fromSec": 1,
"toSec": 2
}
]
},
"title": "<string>",
"taskBrief": "<string>",
"brief": {
"scenario": "<string>",
"codebase": {
"name": "<string>",
"description": "<string>",
"stack": ["<string>"],
"runCommand": "<string>",
"testCommand": "<string>"
},
"phases": [
{
"name": "<string>",
"goal": "<string>",
"tasks": ["<string>"],
"guidance": ["<string>"]
}
],
"evaluation": ["<string>"],
"groundRules": ["<string>"],
"deliverables": ["<string>"]
},
"commitSha": "<string>",
"isPrivate": False,
"skillTags": [],
"problemType": "bug_fix",
"estimatedMinutes": 300
}
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({
repoUrl: '<string>',
testSuiteConfig: {
testFiles: [{fileName: '<string>', destination: '<string>', content: '<string>'}],
testCommand: '<string>',
setupCommand: '<string>',
testFramework: '<string>',
timeoutSeconds: 300,
edgeCaseFiles: [{fileName: '<string>', destination: '<string>', content: '<string>'}],
edgeCaseCommand: '<string>',
hygieneRules: ['<string>']
},
ticketFlow: {
ticket: {
key: '<string>',
title: '<string>',
body: JSON.stringify('<string>'),
acceptance: ['<string>'],
labels: [],
fields: []
},
personas: [
{
id: '<string>',
name: '<string>',
role: '<string>',
owns: '<string>',
brief: '<string>'
}
],
requirements: [
{
id: '<string>',
owner: '<string>',
ticketImplied: true,
text: '<string>',
tests: ['<string>']
}
],
unavailability: [{personaId: '<string>', fromSec: 1, toSec: 2}]
},
title: '<string>',
taskBrief: '<string>',
brief: {
scenario: '<string>',
codebase: {
name: '<string>',
description: '<string>',
stack: ['<string>'],
runCommand: '<string>',
testCommand: '<string>'
},
phases: [
{
name: '<string>',
goal: '<string>',
tasks: ['<string>'],
guidance: ['<string>']
}
],
evaluation: ['<string>'],
groundRules: ['<string>'],
deliverables: ['<string>']
},
commitSha: '<string>',
isPrivate: false,
skillTags: [],
problemType: 'bug_fix',
estimatedMinutes: 300
})
};
fetch('https://api.promptster.ai/v1/issues/custom/{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.promptster.ai/v1/issues/custom/{id}",
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([
'repoUrl' => '<string>',
'testSuiteConfig' => [
'testFiles' => [
[
'fileName' => '<string>',
'destination' => '<string>',
'content' => '<string>'
]
],
'testCommand' => '<string>',
'setupCommand' => '<string>',
'testFramework' => '<string>',
'timeoutSeconds' => 300,
'edgeCaseFiles' => [
[
'fileName' => '<string>',
'destination' => '<string>',
'content' => '<string>'
]
],
'edgeCaseCommand' => '<string>',
'hygieneRules' => [
'<string>'
]
],
'ticketFlow' => [
'ticket' => [
'key' => '<string>',
'title' => '<string>',
'body' => '<string>',
'acceptance' => [
'<string>'
],
'labels' => [
],
'fields' => [
]
],
'personas' => [
[
'id' => '<string>',
'name' => '<string>',
'role' => '<string>',
'owns' => '<string>',
'brief' => '<string>'
]
],
'requirements' => [
[
'id' => '<string>',
'owner' => '<string>',
'ticketImplied' => true,
'text' => '<string>',
'tests' => [
'<string>'
]
]
],
'unavailability' => [
[
'personaId' => '<string>',
'fromSec' => 1,
'toSec' => 2
]
]
],
'title' => '<string>',
'taskBrief' => '<string>',
'brief' => [
'scenario' => '<string>',
'codebase' => [
'name' => '<string>',
'description' => '<string>',
'stack' => [
'<string>'
],
'runCommand' => '<string>',
'testCommand' => '<string>'
],
'phases' => [
[
'name' => '<string>',
'goal' => '<string>',
'tasks' => [
'<string>'
],
'guidance' => [
'<string>'
]
]
],
'evaluation' => [
'<string>'
],
'groundRules' => [
'<string>'
],
'deliverables' => [
'<string>'
]
],
'commitSha' => '<string>',
'isPrivate' => false,
'skillTags' => [
],
'problemType' => 'bug_fix',
'estimatedMinutes' => 300
]),
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.promptster.ai/v1/issues/custom/{id}"
payload := strings.NewReader("{\n \"repoUrl\": \"<string>\",\n \"testSuiteConfig\": {\n \"testFiles\": [\n {\n \"fileName\": \"<string>\",\n \"destination\": \"<string>\",\n \"content\": \"<string>\"\n }\n ],\n \"testCommand\": \"<string>\",\n \"setupCommand\": \"<string>\",\n \"testFramework\": \"<string>\",\n \"timeoutSeconds\": 300,\n \"edgeCaseFiles\": [\n {\n \"fileName\": \"<string>\",\n \"destination\": \"<string>\",\n \"content\": \"<string>\"\n }\n ],\n \"edgeCaseCommand\": \"<string>\",\n \"hygieneRules\": [\n \"<string>\"\n ]\n },\n \"ticketFlow\": {\n \"ticket\": {\n \"key\": \"<string>\",\n \"title\": \"<string>\",\n \"body\": \"<string>\",\n \"acceptance\": [\n \"<string>\"\n ],\n \"labels\": [],\n \"fields\": []\n },\n \"personas\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"role\": \"<string>\",\n \"owns\": \"<string>\",\n \"brief\": \"<string>\"\n }\n ],\n \"requirements\": [\n {\n \"id\": \"<string>\",\n \"owner\": \"<string>\",\n \"ticketImplied\": true,\n \"text\": \"<string>\",\n \"tests\": [\n \"<string>\"\n ]\n }\n ],\n \"unavailability\": [\n {\n \"personaId\": \"<string>\",\n \"fromSec\": 1,\n \"toSec\": 2\n }\n ]\n },\n \"title\": \"<string>\",\n \"taskBrief\": \"<string>\",\n \"brief\": {\n \"scenario\": \"<string>\",\n \"codebase\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"stack\": [\n \"<string>\"\n ],\n \"runCommand\": \"<string>\",\n \"testCommand\": \"<string>\"\n },\n \"phases\": [\n {\n \"name\": \"<string>\",\n \"goal\": \"<string>\",\n \"tasks\": [\n \"<string>\"\n ],\n \"guidance\": [\n \"<string>\"\n ]\n }\n ],\n \"evaluation\": [\n \"<string>\"\n ],\n \"groundRules\": [\n \"<string>\"\n ],\n \"deliverables\": [\n \"<string>\"\n ]\n },\n \"commitSha\": \"<string>\",\n \"isPrivate\": false,\n \"skillTags\": [],\n \"problemType\": \"bug_fix\",\n \"estimatedMinutes\": 300\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.promptster.ai/v1/issues/custom/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"repoUrl\": \"<string>\",\n \"testSuiteConfig\": {\n \"testFiles\": [\n {\n \"fileName\": \"<string>\",\n \"destination\": \"<string>\",\n \"content\": \"<string>\"\n }\n ],\n \"testCommand\": \"<string>\",\n \"setupCommand\": \"<string>\",\n \"testFramework\": \"<string>\",\n \"timeoutSeconds\": 300,\n \"edgeCaseFiles\": [\n {\n \"fileName\": \"<string>\",\n \"destination\": \"<string>\",\n \"content\": \"<string>\"\n }\n ],\n \"edgeCaseCommand\": \"<string>\",\n \"hygieneRules\": [\n \"<string>\"\n ]\n },\n \"ticketFlow\": {\n \"ticket\": {\n \"key\": \"<string>\",\n \"title\": \"<string>\",\n \"body\": \"<string>\",\n \"acceptance\": [\n \"<string>\"\n ],\n \"labels\": [],\n \"fields\": []\n },\n \"personas\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"role\": \"<string>\",\n \"owns\": \"<string>\",\n \"brief\": \"<string>\"\n }\n ],\n \"requirements\": [\n {\n \"id\": \"<string>\",\n \"owner\": \"<string>\",\n \"ticketImplied\": true,\n \"text\": \"<string>\",\n \"tests\": [\n \"<string>\"\n ]\n }\n ],\n \"unavailability\": [\n {\n \"personaId\": \"<string>\",\n \"fromSec\": 1,\n \"toSec\": 2\n }\n ]\n },\n \"title\": \"<string>\",\n \"taskBrief\": \"<string>\",\n \"brief\": {\n \"scenario\": \"<string>\",\n \"codebase\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"stack\": [\n \"<string>\"\n ],\n \"runCommand\": \"<string>\",\n \"testCommand\": \"<string>\"\n },\n \"phases\": [\n {\n \"name\": \"<string>\",\n \"goal\": \"<string>\",\n \"tasks\": [\n \"<string>\"\n ],\n \"guidance\": [\n \"<string>\"\n ]\n }\n ],\n \"evaluation\": [\n \"<string>\"\n ],\n \"groundRules\": [\n \"<string>\"\n ],\n \"deliverables\": [\n \"<string>\"\n ]\n },\n \"commitSha\": \"<string>\",\n \"isPrivate\": false,\n \"skillTags\": [],\n \"problemType\": \"bug_fix\",\n \"estimatedMinutes\": 300\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.promptster.ai/v1/issues/custom/{id}")
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 \"repoUrl\": \"<string>\",\n \"testSuiteConfig\": {\n \"testFiles\": [\n {\n \"fileName\": \"<string>\",\n \"destination\": \"<string>\",\n \"content\": \"<string>\"\n }\n ],\n \"testCommand\": \"<string>\",\n \"setupCommand\": \"<string>\",\n \"testFramework\": \"<string>\",\n \"timeoutSeconds\": 300,\n \"edgeCaseFiles\": [\n {\n \"fileName\": \"<string>\",\n \"destination\": \"<string>\",\n \"content\": \"<string>\"\n }\n ],\n \"edgeCaseCommand\": \"<string>\",\n \"hygieneRules\": [\n \"<string>\"\n ]\n },\n \"ticketFlow\": {\n \"ticket\": {\n \"key\": \"<string>\",\n \"title\": \"<string>\",\n \"body\": \"<string>\",\n \"acceptance\": [\n \"<string>\"\n ],\n \"labels\": [],\n \"fields\": []\n },\n \"personas\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"role\": \"<string>\",\n \"owns\": \"<string>\",\n \"brief\": \"<string>\"\n }\n ],\n \"requirements\": [\n {\n \"id\": \"<string>\",\n \"owner\": \"<string>\",\n \"ticketImplied\": true,\n \"text\": \"<string>\",\n \"tests\": [\n \"<string>\"\n ]\n }\n ],\n \"unavailability\": [\n {\n \"personaId\": \"<string>\",\n \"fromSec\": 1,\n \"toSec\": 2\n }\n ]\n },\n \"title\": \"<string>\",\n \"taskBrief\": \"<string>\",\n \"brief\": {\n \"scenario\": \"<string>\",\n \"codebase\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"stack\": [\n \"<string>\"\n ],\n \"runCommand\": \"<string>\",\n \"testCommand\": \"<string>\"\n },\n \"phases\": [\n {\n \"name\": \"<string>\",\n \"goal\": \"<string>\",\n \"tasks\": [\n \"<string>\"\n ],\n \"guidance\": [\n \"<string>\"\n ]\n }\n ],\n \"evaluation\": [\n \"<string>\"\n ],\n \"groundRules\": [\n \"<string>\"\n ],\n \"deliverables\": [\n \"<string>\"\n ]\n },\n \"commitSha\": \"<string>\",\n \"isPrivate\": false,\n \"skillTags\": [],\n \"problemType\": \"bug_fix\",\n \"estimatedMinutes\": 300\n}"
response = http.request(request)
puts response.read_body{
"issue": {
"id": "<string>",
"issueTitle": "<string>",
"repoUrl": "<string>",
"brokenSha": "<string>",
"taskBrief": "<string>",
"language": "<string>",
"difficulty": "<string>",
"isCustom": true,
"isPrivate": true,
"isTicketFlow": true,
"status": "<string>",
"prepStatus": "pending",
"prepError": "<string>",
"testSuiteVerified": true,
"issueUrl": "<string>"
}
}{
"error": "Invalid body",
"details": [
{
"path": [
"testSuiteConfig",
"setupCommand"
],
"message": "Setup must not run tests."
}
]
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"details": [
"<unknown>"
],
"personaId": "<string>"
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"details": [
"<unknown>"
],
"personaId": "<string>"
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"details": [
"<unknown>"
],
"personaId": "<string>"
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"details": [
"<unknown>"
],
"personaId": "<string>"
}{
"error": "problem_preparing",
"message": "This problem is still being prepared. Edit it once preparation finishes."
}{
"error": "brief_restates_requirement",
"personaId": "dana",
"message": "The brief repeats wording from the hidden spec. Briefs set tone, not facts."
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"details": [
"<unknown>"
],
"personaId": "<string>"
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"details": [
"<unknown>"
],
"personaId": "<string>"
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"details": [
"<unknown>"
],
"personaId": "<string>"
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"details": [
"<unknown>"
],
"personaId": "<string>"
}Authorizations
Organization API key from Settings → API. Send Authorization: Bearer psk_live_… .
Path Parameters
Body
- Option 1
- Option 2
POST creates; PUT fully replaces. language is trimmed and lowercased before validation. A successful save starts preparation; inspect issue.prepStatus, including on the initial response.
GitHub repository URL: https://github.com/owner/repo
typescript, javascript, python, go, rust, java, ruby, csharp warmup, standard, deep Show child attributes
Show child attributes
Persona and requirement IDs must each be unique. Owners and unavailability personaId must refer to a persona. fromSec must precede toSec. With ticketFlow, the ticket replaces title and taskBrief.
Show child attributes
Show child attributes
1 - 2001 - 8000Show child attributes
Show child attributes
Omit to pin the current default-branch head.
^[0-9a-fA-F]{7,40}$Uses the organization GitHub token from Settings → GitHub access. Candidates receive a snapshot without credentials or history.
201bug_fix, feature, performance 1 <= x <= 600Response
Success
Show child attributes
Show child attributes
curl --request PUT \
--url https://api.promptster.ai/v1/issues/custom/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"repoUrl": "<string>",
"testSuiteConfig": {
"testFiles": [
{
"fileName": "<string>",
"destination": "<string>",
"content": "<string>"
}
],
"testCommand": "<string>",
"setupCommand": "<string>",
"testFramework": "<string>",
"timeoutSeconds": 300,
"edgeCaseFiles": [
{
"fileName": "<string>",
"destination": "<string>",
"content": "<string>"
}
],
"edgeCaseCommand": "<string>",
"hygieneRules": [
"<string>"
]
},
"ticketFlow": {
"ticket": {
"key": "<string>",
"title": "<string>",
"body": "<string>",
"acceptance": [
"<string>"
],
"labels": [],
"fields": []
},
"personas": [
{
"id": "<string>",
"name": "<string>",
"role": "<string>",
"owns": "<string>",
"brief": "<string>"
}
],
"requirements": [
{
"id": "<string>",
"owner": "<string>",
"ticketImplied": true,
"text": "<string>",
"tests": [
"<string>"
]
}
],
"unavailability": [
{
"personaId": "<string>",
"fromSec": 1,
"toSec": 2
}
]
},
"title": "<string>",
"taskBrief": "<string>",
"brief": {
"scenario": "<string>",
"codebase": {
"name": "<string>",
"description": "<string>",
"stack": [
"<string>"
],
"runCommand": "<string>",
"testCommand": "<string>"
},
"phases": [
{
"name": "<string>",
"goal": "<string>",
"tasks": [
"<string>"
],
"guidance": [
"<string>"
]
}
],
"evaluation": [
"<string>"
],
"groundRules": [
"<string>"
],
"deliverables": [
"<string>"
]
},
"commitSha": "<string>",
"isPrivate": false,
"skillTags": [],
"problemType": "bug_fix",
"estimatedMinutes": 300
}
'import requests
url = "https://api.promptster.ai/v1/issues/custom/{id}"
payload = {
"repoUrl": "<string>",
"testSuiteConfig": {
"testFiles": [
{
"fileName": "<string>",
"destination": "<string>",
"content": "<string>"
}
],
"testCommand": "<string>",
"setupCommand": "<string>",
"testFramework": "<string>",
"timeoutSeconds": 300,
"edgeCaseFiles": [
{
"fileName": "<string>",
"destination": "<string>",
"content": "<string>"
}
],
"edgeCaseCommand": "<string>",
"hygieneRules": ["<string>"]
},
"ticketFlow": {
"ticket": {
"key": "<string>",
"title": "<string>",
"body": "<string>",
"acceptance": ["<string>"],
"labels": [],
"fields": []
},
"personas": [
{
"id": "<string>",
"name": "<string>",
"role": "<string>",
"owns": "<string>",
"brief": "<string>"
}
],
"requirements": [
{
"id": "<string>",
"owner": "<string>",
"ticketImplied": True,
"text": "<string>",
"tests": ["<string>"]
}
],
"unavailability": [
{
"personaId": "<string>",
"fromSec": 1,
"toSec": 2
}
]
},
"title": "<string>",
"taskBrief": "<string>",
"brief": {
"scenario": "<string>",
"codebase": {
"name": "<string>",
"description": "<string>",
"stack": ["<string>"],
"runCommand": "<string>",
"testCommand": "<string>"
},
"phases": [
{
"name": "<string>",
"goal": "<string>",
"tasks": ["<string>"],
"guidance": ["<string>"]
}
],
"evaluation": ["<string>"],
"groundRules": ["<string>"],
"deliverables": ["<string>"]
},
"commitSha": "<string>",
"isPrivate": False,
"skillTags": [],
"problemType": "bug_fix",
"estimatedMinutes": 300
}
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({
repoUrl: '<string>',
testSuiteConfig: {
testFiles: [{fileName: '<string>', destination: '<string>', content: '<string>'}],
testCommand: '<string>',
setupCommand: '<string>',
testFramework: '<string>',
timeoutSeconds: 300,
edgeCaseFiles: [{fileName: '<string>', destination: '<string>', content: '<string>'}],
edgeCaseCommand: '<string>',
hygieneRules: ['<string>']
},
ticketFlow: {
ticket: {
key: '<string>',
title: '<string>',
body: JSON.stringify('<string>'),
acceptance: ['<string>'],
labels: [],
fields: []
},
personas: [
{
id: '<string>',
name: '<string>',
role: '<string>',
owns: '<string>',
brief: '<string>'
}
],
requirements: [
{
id: '<string>',
owner: '<string>',
ticketImplied: true,
text: '<string>',
tests: ['<string>']
}
],
unavailability: [{personaId: '<string>', fromSec: 1, toSec: 2}]
},
title: '<string>',
taskBrief: '<string>',
brief: {
scenario: '<string>',
codebase: {
name: '<string>',
description: '<string>',
stack: ['<string>'],
runCommand: '<string>',
testCommand: '<string>'
},
phases: [
{
name: '<string>',
goal: '<string>',
tasks: ['<string>'],
guidance: ['<string>']
}
],
evaluation: ['<string>'],
groundRules: ['<string>'],
deliverables: ['<string>']
},
commitSha: '<string>',
isPrivate: false,
skillTags: [],
problemType: 'bug_fix',
estimatedMinutes: 300
})
};
fetch('https://api.promptster.ai/v1/issues/custom/{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.promptster.ai/v1/issues/custom/{id}",
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([
'repoUrl' => '<string>',
'testSuiteConfig' => [
'testFiles' => [
[
'fileName' => '<string>',
'destination' => '<string>',
'content' => '<string>'
]
],
'testCommand' => '<string>',
'setupCommand' => '<string>',
'testFramework' => '<string>',
'timeoutSeconds' => 300,
'edgeCaseFiles' => [
[
'fileName' => '<string>',
'destination' => '<string>',
'content' => '<string>'
]
],
'edgeCaseCommand' => '<string>',
'hygieneRules' => [
'<string>'
]
],
'ticketFlow' => [
'ticket' => [
'key' => '<string>',
'title' => '<string>',
'body' => '<string>',
'acceptance' => [
'<string>'
],
'labels' => [
],
'fields' => [
]
],
'personas' => [
[
'id' => '<string>',
'name' => '<string>',
'role' => '<string>',
'owns' => '<string>',
'brief' => '<string>'
]
],
'requirements' => [
[
'id' => '<string>',
'owner' => '<string>',
'ticketImplied' => true,
'text' => '<string>',
'tests' => [
'<string>'
]
]
],
'unavailability' => [
[
'personaId' => '<string>',
'fromSec' => 1,
'toSec' => 2
]
]
],
'title' => '<string>',
'taskBrief' => '<string>',
'brief' => [
'scenario' => '<string>',
'codebase' => [
'name' => '<string>',
'description' => '<string>',
'stack' => [
'<string>'
],
'runCommand' => '<string>',
'testCommand' => '<string>'
],
'phases' => [
[
'name' => '<string>',
'goal' => '<string>',
'tasks' => [
'<string>'
],
'guidance' => [
'<string>'
]
]
],
'evaluation' => [
'<string>'
],
'groundRules' => [
'<string>'
],
'deliverables' => [
'<string>'
]
],
'commitSha' => '<string>',
'isPrivate' => false,
'skillTags' => [
],
'problemType' => 'bug_fix',
'estimatedMinutes' => 300
]),
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.promptster.ai/v1/issues/custom/{id}"
payload := strings.NewReader("{\n \"repoUrl\": \"<string>\",\n \"testSuiteConfig\": {\n \"testFiles\": [\n {\n \"fileName\": \"<string>\",\n \"destination\": \"<string>\",\n \"content\": \"<string>\"\n }\n ],\n \"testCommand\": \"<string>\",\n \"setupCommand\": \"<string>\",\n \"testFramework\": \"<string>\",\n \"timeoutSeconds\": 300,\n \"edgeCaseFiles\": [\n {\n \"fileName\": \"<string>\",\n \"destination\": \"<string>\",\n \"content\": \"<string>\"\n }\n ],\n \"edgeCaseCommand\": \"<string>\",\n \"hygieneRules\": [\n \"<string>\"\n ]\n },\n \"ticketFlow\": {\n \"ticket\": {\n \"key\": \"<string>\",\n \"title\": \"<string>\",\n \"body\": \"<string>\",\n \"acceptance\": [\n \"<string>\"\n ],\n \"labels\": [],\n \"fields\": []\n },\n \"personas\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"role\": \"<string>\",\n \"owns\": \"<string>\",\n \"brief\": \"<string>\"\n }\n ],\n \"requirements\": [\n {\n \"id\": \"<string>\",\n \"owner\": \"<string>\",\n \"ticketImplied\": true,\n \"text\": \"<string>\",\n \"tests\": [\n \"<string>\"\n ]\n }\n ],\n \"unavailability\": [\n {\n \"personaId\": \"<string>\",\n \"fromSec\": 1,\n \"toSec\": 2\n }\n ]\n },\n \"title\": \"<string>\",\n \"taskBrief\": \"<string>\",\n \"brief\": {\n \"scenario\": \"<string>\",\n \"codebase\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"stack\": [\n \"<string>\"\n ],\n \"runCommand\": \"<string>\",\n \"testCommand\": \"<string>\"\n },\n \"phases\": [\n {\n \"name\": \"<string>\",\n \"goal\": \"<string>\",\n \"tasks\": [\n \"<string>\"\n ],\n \"guidance\": [\n \"<string>\"\n ]\n }\n ],\n \"evaluation\": [\n \"<string>\"\n ],\n \"groundRules\": [\n \"<string>\"\n ],\n \"deliverables\": [\n \"<string>\"\n ]\n },\n \"commitSha\": \"<string>\",\n \"isPrivate\": false,\n \"skillTags\": [],\n \"problemType\": \"bug_fix\",\n \"estimatedMinutes\": 300\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.promptster.ai/v1/issues/custom/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"repoUrl\": \"<string>\",\n \"testSuiteConfig\": {\n \"testFiles\": [\n {\n \"fileName\": \"<string>\",\n \"destination\": \"<string>\",\n \"content\": \"<string>\"\n }\n ],\n \"testCommand\": \"<string>\",\n \"setupCommand\": \"<string>\",\n \"testFramework\": \"<string>\",\n \"timeoutSeconds\": 300,\n \"edgeCaseFiles\": [\n {\n \"fileName\": \"<string>\",\n \"destination\": \"<string>\",\n \"content\": \"<string>\"\n }\n ],\n \"edgeCaseCommand\": \"<string>\",\n \"hygieneRules\": [\n \"<string>\"\n ]\n },\n \"ticketFlow\": {\n \"ticket\": {\n \"key\": \"<string>\",\n \"title\": \"<string>\",\n \"body\": \"<string>\",\n \"acceptance\": [\n \"<string>\"\n ],\n \"labels\": [],\n \"fields\": []\n },\n \"personas\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"role\": \"<string>\",\n \"owns\": \"<string>\",\n \"brief\": \"<string>\"\n }\n ],\n \"requirements\": [\n {\n \"id\": \"<string>\",\n \"owner\": \"<string>\",\n \"ticketImplied\": true,\n \"text\": \"<string>\",\n \"tests\": [\n \"<string>\"\n ]\n }\n ],\n \"unavailability\": [\n {\n \"personaId\": \"<string>\",\n \"fromSec\": 1,\n \"toSec\": 2\n }\n ]\n },\n \"title\": \"<string>\",\n \"taskBrief\": \"<string>\",\n \"brief\": {\n \"scenario\": \"<string>\",\n \"codebase\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"stack\": [\n \"<string>\"\n ],\n \"runCommand\": \"<string>\",\n \"testCommand\": \"<string>\"\n },\n \"phases\": [\n {\n \"name\": \"<string>\",\n \"goal\": \"<string>\",\n \"tasks\": [\n \"<string>\"\n ],\n \"guidance\": [\n \"<string>\"\n ]\n }\n ],\n \"evaluation\": [\n \"<string>\"\n ],\n \"groundRules\": [\n \"<string>\"\n ],\n \"deliverables\": [\n \"<string>\"\n ]\n },\n \"commitSha\": \"<string>\",\n \"isPrivate\": false,\n \"skillTags\": [],\n \"problemType\": \"bug_fix\",\n \"estimatedMinutes\": 300\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.promptster.ai/v1/issues/custom/{id}")
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 \"repoUrl\": \"<string>\",\n \"testSuiteConfig\": {\n \"testFiles\": [\n {\n \"fileName\": \"<string>\",\n \"destination\": \"<string>\",\n \"content\": \"<string>\"\n }\n ],\n \"testCommand\": \"<string>\",\n \"setupCommand\": \"<string>\",\n \"testFramework\": \"<string>\",\n \"timeoutSeconds\": 300,\n \"edgeCaseFiles\": [\n {\n \"fileName\": \"<string>\",\n \"destination\": \"<string>\",\n \"content\": \"<string>\"\n }\n ],\n \"edgeCaseCommand\": \"<string>\",\n \"hygieneRules\": [\n \"<string>\"\n ]\n },\n \"ticketFlow\": {\n \"ticket\": {\n \"key\": \"<string>\",\n \"title\": \"<string>\",\n \"body\": \"<string>\",\n \"acceptance\": [\n \"<string>\"\n ],\n \"labels\": [],\n \"fields\": []\n },\n \"personas\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"role\": \"<string>\",\n \"owns\": \"<string>\",\n \"brief\": \"<string>\"\n }\n ],\n \"requirements\": [\n {\n \"id\": \"<string>\",\n \"owner\": \"<string>\",\n \"ticketImplied\": true,\n \"text\": \"<string>\",\n \"tests\": [\n \"<string>\"\n ]\n }\n ],\n \"unavailability\": [\n {\n \"personaId\": \"<string>\",\n \"fromSec\": 1,\n \"toSec\": 2\n }\n ]\n },\n \"title\": \"<string>\",\n \"taskBrief\": \"<string>\",\n \"brief\": {\n \"scenario\": \"<string>\",\n \"codebase\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"stack\": [\n \"<string>\"\n ],\n \"runCommand\": \"<string>\",\n \"testCommand\": \"<string>\"\n },\n \"phases\": [\n {\n \"name\": \"<string>\",\n \"goal\": \"<string>\",\n \"tasks\": [\n \"<string>\"\n ],\n \"guidance\": [\n \"<string>\"\n ]\n }\n ],\n \"evaluation\": [\n \"<string>\"\n ],\n \"groundRules\": [\n \"<string>\"\n ],\n \"deliverables\": [\n \"<string>\"\n ]\n },\n \"commitSha\": \"<string>\",\n \"isPrivate\": false,\n \"skillTags\": [],\n \"problemType\": \"bug_fix\",\n \"estimatedMinutes\": 300\n}"
response = http.request(request)
puts response.read_body{
"issue": {
"id": "<string>",
"issueTitle": "<string>",
"repoUrl": "<string>",
"brokenSha": "<string>",
"taskBrief": "<string>",
"language": "<string>",
"difficulty": "<string>",
"isCustom": true,
"isPrivate": true,
"isTicketFlow": true,
"status": "<string>",
"prepStatus": "pending",
"prepError": "<string>",
"testSuiteVerified": true,
"issueUrl": "<string>"
}
}{
"error": "Invalid body",
"details": [
{
"path": [
"testSuiteConfig",
"setupCommand"
],
"message": "Setup must not run tests."
}
]
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"details": [
"<unknown>"
],
"personaId": "<string>"
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"details": [
"<unknown>"
],
"personaId": "<string>"
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"details": [
"<unknown>"
],
"personaId": "<string>"
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"details": [
"<unknown>"
],
"personaId": "<string>"
}{
"error": "problem_preparing",
"message": "This problem is still being prepared. Edit it once preparation finishes."
}{
"error": "brief_restates_requirement",
"personaId": "dana",
"message": "The brief repeats wording from the hidden spec. Briefs set tone, not facts."
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"details": [
"<unknown>"
],
"personaId": "<string>"
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"details": [
"<unknown>"
],
"personaId": "<string>"
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"details": [
"<unknown>"
],
"personaId": "<string>"
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"details": [
"<unknown>"
],
"personaId": "<string>"
}