프롬프트 세트 수정
curl --request PATCH \
--url https://platform-api.trychainshift.ai/api/v1/platform/prompt-sets/{promptSetID} \
--header 'API-Key: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"description": "자사 서비스가 AI 답변에 어떻게 노출되는지 추적하는 프롬프트 모음",
"name": "AI 검색 노출 모니터링"
}
'import requests
url = "https://platform-api.trychainshift.ai/api/v1/platform/prompt-sets/{promptSetID}"
payload = {
"description": "자사 서비스가 AI 답변에 어떻게 노출되는지 추적하는 프롬프트 모음",
"name": "AI 검색 노출 모니터링"
}
headers = {
"API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({description: '자사 서비스가 AI 답변에 어떻게 노출되는지 추적하는 프롬프트 모음', name: 'AI 검색 노출 모니터링'})
};
fetch('https://platform-api.trychainshift.ai/api/v1/platform/prompt-sets/{promptSetID}', 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://platform-api.trychainshift.ai/api/v1/platform/prompt-sets/{promptSetID}",
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([
'description' => '자사 서비스가 AI 답변에 어떻게 노출되는지 추적하는 프롬프트 모음',
'name' => 'AI 검색 노출 모니터링'
]),
CURLOPT_HTTPHEADER => [
"API-Key: <api-key>",
"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://platform-api.trychainshift.ai/api/v1/platform/prompt-sets/{promptSetID}"
payload := strings.NewReader("{\n \"description\": \"자사 서비스가 AI 답변에 어떻게 노출되는지 추적하는 프롬프트 모음\",\n \"name\": \"AI 검색 노출 모니터링\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("API-Key", "<api-key>")
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://platform-api.trychainshift.ai/api/v1/platform/prompt-sets/{promptSetID}")
.header("API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"description\": \"자사 서비스가 AI 답변에 어떻게 노출되는지 추적하는 프롬프트 모음\",\n \"name\": \"AI 검색 노출 모니터링\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://platform-api.trychainshift.ai/api/v1/platform/prompt-sets/{promptSetID}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"description\": \"자사 서비스가 AI 답변에 어떻게 노출되는지 추적하는 프롬프트 모음\",\n \"name\": \"AI 검색 노출 모니터링\"\n}"
response = http.request(request)
puts response.read_body{
"code": "COMMON_VALIDATION",
"details": [
"limit: 100 이하여야 합니다"
],
"message": "데이터 검증에 실패했습니다"
}{
"code": "COMMON_UNAUTHORIZED",
"message": "인증되지 않은 사용자입니다"
}{
"code": "INSUFFICIENT_CREDITS",
"message": "크레딧이 부족합니다."
}{
"code": "PROMPT_SET_NOT_FOUND",
"message": "프롬프트 세트를 찾을 수 없습니다"
}{
"code": "PLATFORM_RATE_LIMIT_EXCEEDED",
"message": "요청이 너무 많습니다. 잠시 후 다시 시도해주세요."
}{
"message": "Internal Server Error",
"requestID": "bkZqnHQepkgTOocTvyHWSlHcGzRqQbZk"
}API
프롬프트 세트 수정
프롬프트 세트를 부분 수정합니다. 제공한 필드만 변경되고 나머지는 유지됩니다.
수정에 성공하면 204 No Content 를 반환합니다. 응답 본문은 비어 있으므로, 수정된 내용이 필요하면 프롬프트 세트 조회를 호출하세요.
오류
| HTTP | 코드 | 설명 |
|---|---|---|
| 400 | COMMON_BINDING | • 요청 본문 JSON 파싱 실패 • promptSetID 형식 오류 (details 에 PLATFORM_INVALID_ID) |
| 400 | COMMON_VALIDATION | • 이름 100자 초과 • 설명 1000자 초과 |
| 400 | PROMPT_SET_NAME_REQUIRED | name 을 빈 문자열로 보냄 |
| 401 | COMMON_UNAUTHORIZED | API 키 또는 액세스 토큰이 없거나 유효하지 않음 |
| 402 | INSUFFICIENT_CREDITS | 조직 크레딧 잔액이 이 요청의 단가보다 적음 |
| 404 | PROMPT_SET_NOT_FOUND | 세트가 없거나 타 조직 소유 |
| 429 | PLATFORM_RATE_LIMIT_EXCEEDED | 요청 한도 초과. Retry-After 헤더의 초만큼 기다린 뒤 재시도 |
| 500 | — | 서버 내부 오류. code 없이 message 와 requestID 를 반환 |
PATCH
/
v1
/
platform
/
prompt-sets
/
{promptSetID}
프롬프트 세트 수정
curl --request PATCH \
--url https://platform-api.trychainshift.ai/api/v1/platform/prompt-sets/{promptSetID} \
--header 'API-Key: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"description": "자사 서비스가 AI 답변에 어떻게 노출되는지 추적하는 프롬프트 모음",
"name": "AI 검색 노출 모니터링"
}
'import requests
url = "https://platform-api.trychainshift.ai/api/v1/platform/prompt-sets/{promptSetID}"
payload = {
"description": "자사 서비스가 AI 답변에 어떻게 노출되는지 추적하는 프롬프트 모음",
"name": "AI 검색 노출 모니터링"
}
headers = {
"API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({description: '자사 서비스가 AI 답변에 어떻게 노출되는지 추적하는 프롬프트 모음', name: 'AI 검색 노출 모니터링'})
};
fetch('https://platform-api.trychainshift.ai/api/v1/platform/prompt-sets/{promptSetID}', 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://platform-api.trychainshift.ai/api/v1/platform/prompt-sets/{promptSetID}",
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([
'description' => '자사 서비스가 AI 답변에 어떻게 노출되는지 추적하는 프롬프트 모음',
'name' => 'AI 검색 노출 모니터링'
]),
CURLOPT_HTTPHEADER => [
"API-Key: <api-key>",
"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://platform-api.trychainshift.ai/api/v1/platform/prompt-sets/{promptSetID}"
payload := strings.NewReader("{\n \"description\": \"자사 서비스가 AI 답변에 어떻게 노출되는지 추적하는 프롬프트 모음\",\n \"name\": \"AI 검색 노출 모니터링\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("API-Key", "<api-key>")
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://platform-api.trychainshift.ai/api/v1/platform/prompt-sets/{promptSetID}")
.header("API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"description\": \"자사 서비스가 AI 답변에 어떻게 노출되는지 추적하는 프롬프트 모음\",\n \"name\": \"AI 검색 노출 모니터링\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://platform-api.trychainshift.ai/api/v1/platform/prompt-sets/{promptSetID}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"description\": \"자사 서비스가 AI 답변에 어떻게 노출되는지 추적하는 프롬프트 모음\",\n \"name\": \"AI 검색 노출 모니터링\"\n}"
response = http.request(request)
puts response.read_body{
"code": "COMMON_VALIDATION",
"details": [
"limit: 100 이하여야 합니다"
],
"message": "데이터 검증에 실패했습니다"
}{
"code": "COMMON_UNAUTHORIZED",
"message": "인증되지 않은 사용자입니다"
}{
"code": "INSUFFICIENT_CREDITS",
"message": "크레딧이 부족합니다."
}{
"code": "PROMPT_SET_NOT_FOUND",
"message": "프롬프트 세트를 찾을 수 없습니다"
}{
"code": "PLATFORM_RATE_LIMIT_EXCEEDED",
"message": "요청이 너무 많습니다. 잠시 후 다시 시도해주세요."
}{
"message": "Internal Server Error",
"requestID": "bkZqnHQepkgTOocTvyHWSlHcGzRqQbZk"
}인증
"조직 API 키를 입력하세요. 예: 'cs_live_xxxx'"
경로 매개변수
대상 프롬프트 세트 ID — 세트 생성 응답 또는 세트 목록 항목의 id 를 그대로 넣습니다
본문
application/json
프롬프트 세트 수정 요청 (부분 수정)
응답
수정 완료. 응답 본문 없음