JavaScript
import Profound from '@profoundai/client';
const client = new Profound({
apiKey: process.env['PROFOUND_API_KEY'], // This is the default and can be omitted
});
const response = await client.organizations.categories.updatePromptStatus(
'182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
{ prompt_ids: ['182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e'], status: 'active' },
);
console.log(response.dry_run);import os
from profound import Profound
client = Profound(
api_key=os.environ.get("PROFOUND_API_KEY"), # This is the default and can be omitted
)
response = client.organizations.categories.update_prompt_status(
category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
prompt_ids=["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"],
status="active",
)
print(response.dry_run)curl --request PATCH \
--url https://api.tryprofound.com/v1/org/categories/{category_id}/prompts/status \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"prompt_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"dry_run": false
}
'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.tryprofound.com/v1/org/categories/{category_id}/prompts/status",
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([
'prompt_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'dry_run' => false
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$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.tryprofound.com/v1/org/categories/{category_id}/prompts/status"
payload := strings.NewReader("{\n \"prompt_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"dry_run\": false\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-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://api.tryprofound.com/v1/org/categories/{category_id}/prompts/status")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"prompt_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"dry_run\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tryprofound.com/v1/org/categories/{category_id}/prompts/status")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"prompt_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"dry_run\": false\n}"
response = http.request(request)
puts response.read_body{
"dry_run": true,
"updated_prompts": 0
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Prompts
Update prompt status
Bulk-update the status of one or more prompts. Prompts already in the target status are skipped. Use dry_run to preview without persisting.
Status options:
- ‘active’: Prompts will run daily.
- ‘disabled’: Prompts will not run moving forward, but historical data is preserved.
- ‘deleted’: Prompts are deleted along with historical data
PATCH
/
v1
/
org
/
categories
/
{category_id}
/
prompts
/
status
JavaScript
import Profound from '@profoundai/client';
const client = new Profound({
apiKey: process.env['PROFOUND_API_KEY'], // This is the default and can be omitted
});
const response = await client.organizations.categories.updatePromptStatus(
'182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
{ prompt_ids: ['182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e'], status: 'active' },
);
console.log(response.dry_run);import os
from profound import Profound
client = Profound(
api_key=os.environ.get("PROFOUND_API_KEY"), # This is the default and can be omitted
)
response = client.organizations.categories.update_prompt_status(
category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
prompt_ids=["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"],
status="active",
)
print(response.dry_run)curl --request PATCH \
--url https://api.tryprofound.com/v1/org/categories/{category_id}/prompts/status \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"prompt_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"dry_run": false
}
'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.tryprofound.com/v1/org/categories/{category_id}/prompts/status",
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([
'prompt_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'dry_run' => false
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$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.tryprofound.com/v1/org/categories/{category_id}/prompts/status"
payload := strings.NewReader("{\n \"prompt_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"dry_run\": false\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-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://api.tryprofound.com/v1/org/categories/{category_id}/prompts/status")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"prompt_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"dry_run\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tryprofound.com/v1/org/categories/{category_id}/prompts/status")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"prompt_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"dry_run\": false\n}"
response = http.request(request)
puts response.read_body{
"dry_run": true,
"updated_prompts": 0
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
APIKeyHeaderBearerAuth
Path Parameters
Body
application/json
Was this page helpful?
⌘I