Create Prompt
curl --request POST \
--url https://api.tryhikoo.com/api/v1/public/prompts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"content": "<string>",
"topic_id": 123,
"localizations": [
"worldwide"
],
"source_keyword": "<string>"
}
'import requests
url = "https://api.tryhikoo.com/api/v1/public/prompts"
payload = {
"content": "<string>",
"topic_id": 123,
"localizations": ["worldwide"],
"source_keyword": "<string>"
}
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({
content: '<string>',
topic_id: 123,
localizations: ['worldwide'],
source_keyword: '<string>'
})
};
fetch('https://api.tryhikoo.com/api/v1/public/prompts', 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.tryhikoo.com/api/v1/public/prompts",
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([
'content' => '<string>',
'topic_id' => 123,
'localizations' => [
'worldwide'
],
'source_keyword' => '<string>'
]),
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.tryhikoo.com/api/v1/public/prompts"
payload := strings.NewReader("{\n \"content\": \"<string>\",\n \"topic_id\": 123,\n \"localizations\": [\n \"worldwide\"\n ],\n \"source_keyword\": \"<string>\"\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://api.tryhikoo.com/api/v1/public/prompts")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"content\": \"<string>\",\n \"topic_id\": 123,\n \"localizations\": [\n \"worldwide\"\n ],\n \"source_keyword\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tryhikoo.com/api/v1/public/prompts")
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 \"content\": \"<string>\",\n \"topic_id\": 123,\n \"localizations\": [\n \"worldwide\"\n ],\n \"source_keyword\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"content": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"topic_id": 123,
"topic_name": "<string>",
"localizations": [
"worldwide"
],
"intent": "informational",
"journey_stage": "discovery",
"source_keyword": "<string>",
"visibility_score": 0,
"visibility_delta_7d": 123,
"status": "unclaimed",
"top_platforms": [],
"sentiment_score": 123,
"sentiment_highlights_count": 0,
"sentiment_positive_count": 0,
"sentiment_negative_count": 0,
"sentiment_neutral_count": 0,
"ai_search_volume": 123,
"ai_volume_delta": 123,
"volume_updated_at": "2023-11-07T05:31:56Z",
"is_active": true,
"archived_at": "2023-11-07T05:31:56Z"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Prompts
Create Prompt
Create a new prompt. Fails if the website’s prompt quota is reached.
POST
/
api
/
v1
/
public
/
prompts
Create Prompt
curl --request POST \
--url https://api.tryhikoo.com/api/v1/public/prompts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"content": "<string>",
"topic_id": 123,
"localizations": [
"worldwide"
],
"source_keyword": "<string>"
}
'import requests
url = "https://api.tryhikoo.com/api/v1/public/prompts"
payload = {
"content": "<string>",
"topic_id": 123,
"localizations": ["worldwide"],
"source_keyword": "<string>"
}
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({
content: '<string>',
topic_id: 123,
localizations: ['worldwide'],
source_keyword: '<string>'
})
};
fetch('https://api.tryhikoo.com/api/v1/public/prompts', 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.tryhikoo.com/api/v1/public/prompts",
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([
'content' => '<string>',
'topic_id' => 123,
'localizations' => [
'worldwide'
],
'source_keyword' => '<string>'
]),
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.tryhikoo.com/api/v1/public/prompts"
payload := strings.NewReader("{\n \"content\": \"<string>\",\n \"topic_id\": 123,\n \"localizations\": [\n \"worldwide\"\n ],\n \"source_keyword\": \"<string>\"\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://api.tryhikoo.com/api/v1/public/prompts")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"content\": \"<string>\",\n \"topic_id\": 123,\n \"localizations\": [\n \"worldwide\"\n ],\n \"source_keyword\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tryhikoo.com/api/v1/public/prompts")
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 \"content\": \"<string>\",\n \"topic_id\": 123,\n \"localizations\": [\n \"worldwide\"\n ],\n \"source_keyword\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"content": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"topic_id": 123,
"topic_name": "<string>",
"localizations": [
"worldwide"
],
"intent": "informational",
"journey_stage": "discovery",
"source_keyword": "<string>",
"visibility_score": 0,
"visibility_delta_7d": 123,
"status": "unclaimed",
"top_platforms": [],
"sentiment_score": 123,
"sentiment_highlights_count": 0,
"sentiment_positive_count": 0,
"sentiment_negative_count": 0,
"sentiment_neutral_count": 0,
"ai_search_volume": 123,
"ai_volume_delta": 123,
"volume_updated_at": "2023-11-07T05:31:56Z",
"is_active": true,
"archived_at": "2023-11-07T05:31:56Z"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Personal API key created in the dashboard (Settings > API keys).
Query Parameters
Target website id
Body
application/json
Schema for creating a new prompt
Response
Successful Response
Base prompt schema
Available options:
informational, comparative, transactional, navigational Available options:
discovery, consideration, decision, retention Derived health status for a prompt.
Computed at query time from the current visibility score and the 7-day delta. Not persisted: changing thresholds is a no-op migration.
Thresholds (validated with product):
- WINNING: score >= 70 AND delta_7d >= 0
- AT_RISK: 30 <= score < 70 OR delta_7d <= -10
- LOSING: score < 30 AND delta_7d < 0
- UNCLAIMED: score == 0 (no platform cites the website)
Available options:
winning, at_risk, losing, unclaimed Show child attributes
Show child attributes