Get a prompt
Returns one prompt from the key's workspace.
Required scope: v2:prompts. Takes no query parameters.
A malformed id, or a prompt in another workspace, returns 404 PROMPT_NOT_FOUND.
curl -X GET "https://api.opttab.com/v1/external/prompts/33333333-3333-4333-8333-333333333333" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN"
import requests
import json
url = "https://api.opttab.com/v1/external/prompts/33333333-3333-4333-8333-333333333333"
headers = {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN"
}
response = requests.get(url, headers=headers)
print(response.json())
const response = await fetch("https://api.opttab.com/v1/external/prompts/33333333-3333-4333-8333-333333333333", {
method: "GET",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN"
}
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
)
func main() {
req, err := http.NewRequest("GET", "https://api.opttab.com/v1/external/prompts/33333333-3333-4333-8333-333333333333", nil)
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Authorization", "Bearer YOUR_API_TOKEN")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
require 'net/http'
require 'json'
uri = URI('https://api.opttab.com/v1/external/prompts/33333333-3333-4333-8333-333333333333')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Get.new(uri)
request['Content-Type'] = 'application/json'
request['Authorization'] = 'Bearer YOUR_API_TOKEN'
response = http.request(request)
puts response.body
{
"id": "33333333-3333-4333-8333-333333333333",
"text": "What is the best running shoe for daily training?",
"topicId": "22222222-2222-4222-8222-222222222222",
"topicName": "Running shoes",
"isActive": true,
"cadence": "daily",
"visibility": 42,
"country": "US",
"language": "en",
"targetPlatforms": [
"chatgpt",
"perplexity"
],
"tags": [
{
"name": "Running",
"subTags": [
"Daily"
]
}
],
"lastRunAt": "2026-10-18T12:00:00.000Z"
}
{
"error": "API_KEY_INVALID",
"code": "UNAUTHORIZED"
}
{
"error": "API_KEY_SCOPE",
"code": "FORBIDDEN"
}
{
"error": "API_KEY_IP_DENIED",
"code": "FORBIDDEN"
}
{
"error": "PROMPT_NOT_FOUND",
"code": "NOT_FOUND"
}
{
"error": "ThrottlerException: Too Many Requests",
"code": "RATE_LIMITED"
}
/v1/external/prompts/{promptId}Target server for requests. Edit to use your own host.
An API key secret from Settings › API. It starts with opt_live_.
Send it as Authorization: Bearer opt_live_xxxxxxxx. A session cookie, an X-API-Key
header and an ?api_key= query parameter do not authenticate.
opt_live_.
Send it as Authorization: Bearer opt_live_xxxxxxxx. A session cookie, an X-API-Key
header and an ?api_key= query parameter do not authenticate.
The prompt's id, from GET /v1/external/prompts.
Request Preview
Response
Response will appear here after sending the request
Authentication
Bearer token. An API key secret from Settings › API. It starts with opt_live_.
Send it as Authorization: Bearer opt_live_xxxxxxxx. A session cookie, an X-API-Key
header and an ?api_key= query parameter do not authenticate.
Path Parameters
The prompt's id, from GET /v1/external/prompts.
33333333-3333-4333-8333-333333333333Responses
The prompt id.
The question Opttab asks the AI engines.
The id of the prompt's topic.
The name of the prompt's topic.
Whether the prompt is being tracked.
How often the prompt is asked again.
dailyweeklymonthlyThe brand's visibility on this prompt, 0–100. null until there are results.
The target market, as a country code.
The prompt's language code.
The AI engines this prompt runs on.
chatgptgrokgeminiclaudeperplexitydeepseekmistralgoogle_ai_modecopilotgoogle_ai_overviewTags on the prompt. Empty when there are none.
When the prompt last ran. null if it has not run yet.