curl --request POST \
--url https://app.searchable.com/api/mcp/projects/{projectId}/prompts/sync \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"prompts": [
{
"promptId": "<string>",
"expectedRevision": 2,
"text": "<string>",
"isBranded": true,
"topics": [
"<string>"
],
"locations": [
{
"country": "<string>",
"city": "<string>",
"state": "<string>"
}
]
}
],
"dryRun": true
}
'import requests
url = "https://app.searchable.com/api/mcp/projects/{projectId}/prompts/sync"
payload = {
"prompts": [
{
"promptId": "<string>",
"expectedRevision": 2,
"text": "<string>",
"isBranded": True,
"topics": ["<string>"],
"locations": [
{
"country": "<string>",
"city": "<string>",
"state": "<string>"
}
]
}
],
"dryRun": True
}
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({
prompts: [
{
promptId: '<string>',
expectedRevision: 2,
text: '<string>',
isBranded: true,
topics: ['<string>'],
locations: [{country: '<string>', city: '<string>', state: '<string>'}]
}
],
dryRun: true
})
};
fetch('https://app.searchable.com/api/mcp/projects/{projectId}/prompts/sync', 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://app.searchable.com/api/mcp/projects/{projectId}/prompts/sync",
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([
'prompts' => [
[
'promptId' => '<string>',
'expectedRevision' => 2,
'text' => '<string>',
'isBranded' => true,
'topics' => [
'<string>'
],
'locations' => [
[
'country' => '<string>',
'city' => '<string>',
'state' => '<string>'
]
]
]
],
'dryRun' => true
]),
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://app.searchable.com/api/mcp/projects/{projectId}/prompts/sync"
payload := strings.NewReader("{\n \"prompts\": [\n {\n \"promptId\": \"<string>\",\n \"expectedRevision\": 2,\n \"text\": \"<string>\",\n \"isBranded\": true,\n \"topics\": [\n \"<string>\"\n ],\n \"locations\": [\n {\n \"country\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\"\n }\n ]\n }\n ],\n \"dryRun\": true\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://app.searchable.com/api/mcp/projects/{projectId}/prompts/sync")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"prompts\": [\n {\n \"promptId\": \"<string>\",\n \"expectedRevision\": 2,\n \"text\": \"<string>\",\n \"isBranded\": true,\n \"topics\": [\n \"<string>\"\n ],\n \"locations\": [\n {\n \"country\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\"\n }\n ]\n }\n ],\n \"dryRun\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.searchable.com/api/mcp/projects/{projectId}/prompts/sync")
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 \"prompts\": [\n {\n \"promptId\": \"<string>\",\n \"expectedRevision\": 2,\n \"text\": \"<string>\",\n \"isBranded\": true,\n \"topics\": [\n \"<string>\"\n ],\n \"locations\": [\n {\n \"country\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\"\n }\n ]\n }\n ],\n \"dryRun\": true\n}"
response = http.request(request)
puts response.read_body{
"dryRun": true,
"counts": {
"changed": 123,
"unchanged": 123,
"conflict": 123,
"not_found": 123,
"invalid": 123,
"failed": 123
},
"prompts": [
{
"promptId": "<string>",
"outcome": "changed",
"text": "<string>",
"changes": {},
"currentRevision": 123,
"currentText": "<string>",
"reason": "<string>",
"notes": [
"<string>"
]
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "unauthorized",
"error": "<string>",
"message": "<string>",
"howToFix": "<string>",
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"requiresUpgrade": true,
"retryable": true,
"timeout": true,
"quotaExceeded": true,
"current": 123,
"limit": 123,
"bulkLimitExceeded": true,
"requested": 123,
"maxAllowed": 123,
"details": {
"formErrors": [
"<string>"
],
"fieldErrors": {}
}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "unauthorized",
"error": "<string>",
"message": "<string>",
"howToFix": "<string>",
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"requiresUpgrade": true,
"retryable": true,
"timeout": true,
"quotaExceeded": true,
"current": 123,
"limit": 123,
"bulkLimitExceeded": true,
"requested": 123,
"maxAllowed": 123,
"details": {
"formErrors": [
"<string>"
],
"fieldErrors": {}
}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "unauthorized",
"error": "<string>",
"message": "<string>",
"howToFix": "<string>",
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"requiresUpgrade": true,
"retryable": true,
"timeout": true,
"quotaExceeded": true,
"current": 123,
"limit": 123,
"bulkLimitExceeded": true,
"requested": 123,
"maxAllowed": 123,
"details": {
"formErrors": [
"<string>"
],
"fieldErrors": {}
}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "unauthorized",
"error": "<string>",
"message": "<string>",
"howToFix": "<string>",
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"requiresUpgrade": true,
"retryable": true,
"timeout": true,
"quotaExceeded": true,
"current": 123,
"limit": 123,
"bulkLimitExceeded": true,
"requested": 123,
"maxAllowed": 123,
"details": {
"formErrors": [
"<string>"
],
"fieldErrors": {}
}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "unauthorized",
"error": "<string>",
"message": "<string>",
"howToFix": "<string>",
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"requiresUpgrade": true,
"retryable": true,
"timeout": true,
"quotaExceeded": true,
"current": 123,
"limit": 123,
"bulkLimitExceeded": true,
"requested": 123,
"maxAllowed": 123,
"details": {
"formErrors": [
"<string>"
],
"fieldErrors": {}
}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "unauthorized",
"error": "<string>",
"message": "<string>",
"howToFix": "<string>",
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"requiresUpgrade": true,
"retryable": true,
"timeout": true,
"quotaExceeded": true,
"current": 123,
"limit": 123,
"bulkLimitExceeded": true,
"requested": 123,
"maxAllowed": 123,
"details": {
"formErrors": [
"<string>"
],
"fieldErrors": {}
}
}Bulk-edit prompts
Edit existing prompts in bulk, in place: the round trip for a spreadsheet of prompts. Read them with GET /projects/{projectId}/prompts (each row carries its id and currentRevision; ?format=csv downloads them), change what you need, and send up to 500 rows back in prompts. Each row names a prompt by promptId and gives the end state for any of text, isBranded, intentCategory, topics (names; the list replaces the prompt’s topics, [] removes them, names the project lacks are created) and locations (the full set, at most 5; a location left out stops being tracked and its history is kept). Omit a field to leave it alone; a row that changes nothing writes nothing. Send each prompt’s expectedRevision: a prompt edited since you read it comes back as conflict instead of being overwritten. Every row of one prompt must be in the same request. A reworded prompt keeps its id and past answers, and its old wording stays as a revision. A batch whose added locations do not fit the prompt allowance is refused with 403 quota_exceeded and nothing written; past that, each prompt stands alone and reports its own outcome. Result entries carry each promptId trimmed and lower-cased, so match ids case-insensitively. New prompts go through POST /projects/{projectId}/prompts. dryRun: true returns the same plan without writing. A dry run plans the edit but does not check the prompt allowance; adding locations to tracked prompts can still be refused with quota_exceeded when you apply. Requires a connection minted with the prompt:draft capability, and your own project role must allow the write (otherwise 403 forbidden). A pitch project that is not currently active refuses with 409 INACTIVE_PITCH_PROMPT_MUTATION. Supports Idempotency-Key replay; a reused key with a different body returns 409 idempotency_conflict.
curl --request POST \
--url https://app.searchable.com/api/mcp/projects/{projectId}/prompts/sync \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"prompts": [
{
"promptId": "<string>",
"expectedRevision": 2,
"text": "<string>",
"isBranded": true,
"topics": [
"<string>"
],
"locations": [
{
"country": "<string>",
"city": "<string>",
"state": "<string>"
}
]
}
],
"dryRun": true
}
'import requests
url = "https://app.searchable.com/api/mcp/projects/{projectId}/prompts/sync"
payload = {
"prompts": [
{
"promptId": "<string>",
"expectedRevision": 2,
"text": "<string>",
"isBranded": True,
"topics": ["<string>"],
"locations": [
{
"country": "<string>",
"city": "<string>",
"state": "<string>"
}
]
}
],
"dryRun": True
}
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({
prompts: [
{
promptId: '<string>',
expectedRevision: 2,
text: '<string>',
isBranded: true,
topics: ['<string>'],
locations: [{country: '<string>', city: '<string>', state: '<string>'}]
}
],
dryRun: true
})
};
fetch('https://app.searchable.com/api/mcp/projects/{projectId}/prompts/sync', 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://app.searchable.com/api/mcp/projects/{projectId}/prompts/sync",
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([
'prompts' => [
[
'promptId' => '<string>',
'expectedRevision' => 2,
'text' => '<string>',
'isBranded' => true,
'topics' => [
'<string>'
],
'locations' => [
[
'country' => '<string>',
'city' => '<string>',
'state' => '<string>'
]
]
]
],
'dryRun' => true
]),
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://app.searchable.com/api/mcp/projects/{projectId}/prompts/sync"
payload := strings.NewReader("{\n \"prompts\": [\n {\n \"promptId\": \"<string>\",\n \"expectedRevision\": 2,\n \"text\": \"<string>\",\n \"isBranded\": true,\n \"topics\": [\n \"<string>\"\n ],\n \"locations\": [\n {\n \"country\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\"\n }\n ]\n }\n ],\n \"dryRun\": true\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://app.searchable.com/api/mcp/projects/{projectId}/prompts/sync")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"prompts\": [\n {\n \"promptId\": \"<string>\",\n \"expectedRevision\": 2,\n \"text\": \"<string>\",\n \"isBranded\": true,\n \"topics\": [\n \"<string>\"\n ],\n \"locations\": [\n {\n \"country\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\"\n }\n ]\n }\n ],\n \"dryRun\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.searchable.com/api/mcp/projects/{projectId}/prompts/sync")
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 \"prompts\": [\n {\n \"promptId\": \"<string>\",\n \"expectedRevision\": 2,\n \"text\": \"<string>\",\n \"isBranded\": true,\n \"topics\": [\n \"<string>\"\n ],\n \"locations\": [\n {\n \"country\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\"\n }\n ]\n }\n ],\n \"dryRun\": true\n}"
response = http.request(request)
puts response.read_body{
"dryRun": true,
"counts": {
"changed": 123,
"unchanged": 123,
"conflict": 123,
"not_found": 123,
"invalid": 123,
"failed": 123
},
"prompts": [
{
"promptId": "<string>",
"outcome": "changed",
"text": "<string>",
"changes": {},
"currentRevision": 123,
"currentText": "<string>",
"reason": "<string>",
"notes": [
"<string>"
]
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "unauthorized",
"error": "<string>",
"message": "<string>",
"howToFix": "<string>",
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"requiresUpgrade": true,
"retryable": true,
"timeout": true,
"quotaExceeded": true,
"current": 123,
"limit": 123,
"bulkLimitExceeded": true,
"requested": 123,
"maxAllowed": 123,
"details": {
"formErrors": [
"<string>"
],
"fieldErrors": {}
}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "unauthorized",
"error": "<string>",
"message": "<string>",
"howToFix": "<string>",
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"requiresUpgrade": true,
"retryable": true,
"timeout": true,
"quotaExceeded": true,
"current": 123,
"limit": 123,
"bulkLimitExceeded": true,
"requested": 123,
"maxAllowed": 123,
"details": {
"formErrors": [
"<string>"
],
"fieldErrors": {}
}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "unauthorized",
"error": "<string>",
"message": "<string>",
"howToFix": "<string>",
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"requiresUpgrade": true,
"retryable": true,
"timeout": true,
"quotaExceeded": true,
"current": 123,
"limit": 123,
"bulkLimitExceeded": true,
"requested": 123,
"maxAllowed": 123,
"details": {
"formErrors": [
"<string>"
],
"fieldErrors": {}
}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "unauthorized",
"error": "<string>",
"message": "<string>",
"howToFix": "<string>",
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"requiresUpgrade": true,
"retryable": true,
"timeout": true,
"quotaExceeded": true,
"current": 123,
"limit": 123,
"bulkLimitExceeded": true,
"requested": 123,
"maxAllowed": 123,
"details": {
"formErrors": [
"<string>"
],
"fieldErrors": {}
}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "unauthorized",
"error": "<string>",
"message": "<string>",
"howToFix": "<string>",
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"requiresUpgrade": true,
"retryable": true,
"timeout": true,
"quotaExceeded": true,
"current": 123,
"limit": 123,
"bulkLimitExceeded": true,
"requested": 123,
"maxAllowed": 123,
"details": {
"formErrors": [
"<string>"
],
"fieldErrors": {}
}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "unauthorized",
"error": "<string>",
"message": "<string>",
"howToFix": "<string>",
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"requiresUpgrade": true,
"retryable": true,
"timeout": true,
"quotaExceeded": true,
"current": 123,
"limit": 123,
"bulkLimitExceeded": true,
"requested": 123,
"maxAllowed": 123,
"details": {
"formErrors": [
"<string>"
],
"fieldErrors": {}
}
}Authorizations
A Searchable API key, created under Settings → Workspace → Integrations. Send as Authorization: Bearer sea_xxxxx. Every key carries one or more scopes (read, write, admin) and may optionally be bound to a single project — see Getting started.
Headers
Optional client-generated key (e.g. a UUID). Retrying with the same key within 24h replays the original stored response (X-Idempotent-Replay: true) instead of repeating the side effect. See Idempotency.
Path Parameters
The project id.