curl --request POST \
--url https://api.nephia.cc/v1/queries \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"name": "<string>",
"refreshIntervalSeconds": 123,
"globalCriteria": {
"market": "<string>",
"query": "<string>",
"priceMin": 123,
"priceMax": 123,
"sort": "<string>",
"page": 123,
"perPage": 123,
"filters": {},
"terms": [
"<string>"
]
},
"sources": [
{
"enabled": true,
"searches": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"label": "<string>",
"overridesEnabled": true,
"overrides": {
"market": "<string>",
"query": "<string>",
"priceMin": 123,
"priceMax": 123,
"sort": "<string>",
"page": 123,
"perPage": 123,
"filters": {},
"terms": [
"<string>"
]
}
}
],
"refreshIntervalSeconds": 123
}
],
"webhookUrl": "",
"aiEnabled": true,
"aiPrompt": "<string>",
"aiStep": {
"instruction": "<string>",
"schema": {}
},
"sentimentEnabled": true,
"coBrandsEnabled": true,
"muteRules": [
"<string>"
],
"vipAuthors": [
"<string>"
],
"rules": [
{
"name": "<string>",
"when": {
"kind": "item",
"all": [
{
"field": "<string>",
"value": "<string>"
}
]
},
"then": [
{
"channelIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
],
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"enabled": true
}
],
"channels": [
{
"channelId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"backfill": true,
"schedule": {
"startsAt": "2023-11-07T05:31:56Z",
"endsAt": "2023-11-07T05:31:56Z",
"timezone": "<string>"
}
}
'import requests
url = "https://api.nephia.cc/v1/queries"
payload = {
"name": "<string>",
"refreshIntervalSeconds": 123,
"globalCriteria": {
"market": "<string>",
"query": "<string>",
"priceMin": 123,
"priceMax": 123,
"sort": "<string>",
"page": 123,
"perPage": 123,
"filters": {},
"terms": ["<string>"]
},
"sources": [
{
"enabled": True,
"searches": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"label": "<string>",
"overridesEnabled": True,
"overrides": {
"market": "<string>",
"query": "<string>",
"priceMin": 123,
"priceMax": 123,
"sort": "<string>",
"page": 123,
"perPage": 123,
"filters": {},
"terms": ["<string>"]
}
}
],
"refreshIntervalSeconds": 123
}
],
"webhookUrl": "",
"aiEnabled": True,
"aiPrompt": "<string>",
"aiStep": {
"instruction": "<string>",
"schema": {}
},
"sentimentEnabled": True,
"coBrandsEnabled": True,
"muteRules": ["<string>"],
"vipAuthors": ["<string>"],
"rules": [
{
"name": "<string>",
"when": {
"kind": "item",
"all": [
{
"field": "<string>",
"value": "<string>"
}
]
},
"then": [{ "channelIds": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"] }],
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"enabled": True
}
],
"channels": [{ "channelId": "3c90c3cc-0d44-4b50-8888-8dd25736052a" }],
"backfill": True,
"schedule": {
"startsAt": "2023-11-07T05:31:56Z",
"endsAt": "2023-11-07T05:31:56Z",
"timezone": "<string>"
}
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
refreshIntervalSeconds: 123,
globalCriteria: {
market: '<string>',
query: '<string>',
priceMin: 123,
priceMax: 123,
sort: '<string>',
page: 123,
perPage: 123,
filters: {},
terms: ['<string>']
},
sources: [
{
enabled: true,
searches: [
{
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
label: '<string>',
overridesEnabled: true,
overrides: {
market: '<string>',
query: '<string>',
priceMin: 123,
priceMax: 123,
sort: '<string>',
page: 123,
perPage: 123,
filters: {},
terms: ['<string>']
}
}
],
refreshIntervalSeconds: 123
}
],
webhookUrl: '',
aiEnabled: true,
aiPrompt: '<string>',
aiStep: {instruction: '<string>', schema: {}},
sentimentEnabled: true,
coBrandsEnabled: true,
muteRules: ['<string>'],
vipAuthors: ['<string>'],
rules: [
{
name: '<string>',
when: {kind: 'item', all: [{field: '<string>', value: '<string>'}]},
then: [{channelIds: ['3c90c3cc-0d44-4b50-8888-8dd25736052a']}],
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
enabled: true
}
],
channels: [{channelId: '3c90c3cc-0d44-4b50-8888-8dd25736052a'}],
backfill: true,
schedule: {
startsAt: '2023-11-07T05:31:56Z',
endsAt: '2023-11-07T05:31:56Z',
timezone: '<string>'
}
})
};
fetch('https://api.nephia.cc/v1/queries', 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.nephia.cc/v1/queries",
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([
'name' => '<string>',
'refreshIntervalSeconds' => 123,
'globalCriteria' => [
'market' => '<string>',
'query' => '<string>',
'priceMin' => 123,
'priceMax' => 123,
'sort' => '<string>',
'page' => 123,
'perPage' => 123,
'filters' => [
],
'terms' => [
'<string>'
]
],
'sources' => [
[
'enabled' => true,
'searches' => [
[
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'label' => '<string>',
'overridesEnabled' => true,
'overrides' => [
'market' => '<string>',
'query' => '<string>',
'priceMin' => 123,
'priceMax' => 123,
'sort' => '<string>',
'page' => 123,
'perPage' => 123,
'filters' => [
],
'terms' => [
'<string>'
]
]
]
],
'refreshIntervalSeconds' => 123
]
],
'webhookUrl' => '',
'aiEnabled' => true,
'aiPrompt' => '<string>',
'aiStep' => [
'instruction' => '<string>',
'schema' => [
]
],
'sentimentEnabled' => true,
'coBrandsEnabled' => true,
'muteRules' => [
'<string>'
],
'vipAuthors' => [
'<string>'
],
'rules' => [
[
'name' => '<string>',
'when' => [
'kind' => 'item',
'all' => [
[
'field' => '<string>',
'value' => '<string>'
]
]
],
'then' => [
[
'channelIds' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
]
],
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'enabled' => true
]
],
'channels' => [
[
'channelId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
],
'backfill' => true,
'schedule' => [
'startsAt' => '2023-11-07T05:31:56Z',
'endsAt' => '2023-11-07T05:31:56Z',
'timezone' => '<string>'
]
]),
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.nephia.cc/v1/queries"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"refreshIntervalSeconds\": 123,\n \"globalCriteria\": {\n \"market\": \"<string>\",\n \"query\": \"<string>\",\n \"priceMin\": 123,\n \"priceMax\": 123,\n \"sort\": \"<string>\",\n \"page\": 123,\n \"perPage\": 123,\n \"filters\": {},\n \"terms\": [\n \"<string>\"\n ]\n },\n \"sources\": [\n {\n \"enabled\": true,\n \"searches\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"label\": \"<string>\",\n \"overridesEnabled\": true,\n \"overrides\": {\n \"market\": \"<string>\",\n \"query\": \"<string>\",\n \"priceMin\": 123,\n \"priceMax\": 123,\n \"sort\": \"<string>\",\n \"page\": 123,\n \"perPage\": 123,\n \"filters\": {},\n \"terms\": [\n \"<string>\"\n ]\n }\n }\n ],\n \"refreshIntervalSeconds\": 123\n }\n ],\n \"webhookUrl\": \"\",\n \"aiEnabled\": true,\n \"aiPrompt\": \"<string>\",\n \"aiStep\": {\n \"instruction\": \"<string>\",\n \"schema\": {}\n },\n \"sentimentEnabled\": true,\n \"coBrandsEnabled\": true,\n \"muteRules\": [\n \"<string>\"\n ],\n \"vipAuthors\": [\n \"<string>\"\n ],\n \"rules\": [\n {\n \"name\": \"<string>\",\n \"when\": {\n \"kind\": \"item\",\n \"all\": [\n {\n \"field\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n },\n \"then\": [\n {\n \"channelIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n }\n ],\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"enabled\": true\n }\n ],\n \"channels\": [\n {\n \"channelId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"backfill\": true,\n \"schedule\": {\n \"startsAt\": \"2023-11-07T05:31:56Z\",\n \"endsAt\": \"2023-11-07T05:31:56Z\",\n \"timezone\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.nephia.cc/v1/queries")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"refreshIntervalSeconds\": 123,\n \"globalCriteria\": {\n \"market\": \"<string>\",\n \"query\": \"<string>\",\n \"priceMin\": 123,\n \"priceMax\": 123,\n \"sort\": \"<string>\",\n \"page\": 123,\n \"perPage\": 123,\n \"filters\": {},\n \"terms\": [\n \"<string>\"\n ]\n },\n \"sources\": [\n {\n \"enabled\": true,\n \"searches\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"label\": \"<string>\",\n \"overridesEnabled\": true,\n \"overrides\": {\n \"market\": \"<string>\",\n \"query\": \"<string>\",\n \"priceMin\": 123,\n \"priceMax\": 123,\n \"sort\": \"<string>\",\n \"page\": 123,\n \"perPage\": 123,\n \"filters\": {},\n \"terms\": [\n \"<string>\"\n ]\n }\n }\n ],\n \"refreshIntervalSeconds\": 123\n }\n ],\n \"webhookUrl\": \"\",\n \"aiEnabled\": true,\n \"aiPrompt\": \"<string>\",\n \"aiStep\": {\n \"instruction\": \"<string>\",\n \"schema\": {}\n },\n \"sentimentEnabled\": true,\n \"coBrandsEnabled\": true,\n \"muteRules\": [\n \"<string>\"\n ],\n \"vipAuthors\": [\n \"<string>\"\n ],\n \"rules\": [\n {\n \"name\": \"<string>\",\n \"when\": {\n \"kind\": \"item\",\n \"all\": [\n {\n \"field\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n },\n \"then\": [\n {\n \"channelIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n }\n ],\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"enabled\": true\n }\n ],\n \"channels\": [\n {\n \"channelId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"backfill\": true,\n \"schedule\": {\n \"startsAt\": \"2023-11-07T05:31:56Z\",\n \"endsAt\": \"2023-11-07T05:31:56Z\",\n \"timezone\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nephia.cc/v1/queries")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"refreshIntervalSeconds\": 123,\n \"globalCriteria\": {\n \"market\": \"<string>\",\n \"query\": \"<string>\",\n \"priceMin\": 123,\n \"priceMax\": 123,\n \"sort\": \"<string>\",\n \"page\": 123,\n \"perPage\": 123,\n \"filters\": {},\n \"terms\": [\n \"<string>\"\n ]\n },\n \"sources\": [\n {\n \"enabled\": true,\n \"searches\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"label\": \"<string>\",\n \"overridesEnabled\": true,\n \"overrides\": {\n \"market\": \"<string>\",\n \"query\": \"<string>\",\n \"priceMin\": 123,\n \"priceMax\": 123,\n \"sort\": \"<string>\",\n \"page\": 123,\n \"perPage\": 123,\n \"filters\": {},\n \"terms\": [\n \"<string>\"\n ]\n }\n }\n ],\n \"refreshIntervalSeconds\": 123\n }\n ],\n \"webhookUrl\": \"\",\n \"aiEnabled\": true,\n \"aiPrompt\": \"<string>\",\n \"aiStep\": {\n \"instruction\": \"<string>\",\n \"schema\": {}\n },\n \"sentimentEnabled\": true,\n \"coBrandsEnabled\": true,\n \"muteRules\": [\n \"<string>\"\n ],\n \"vipAuthors\": [\n \"<string>\"\n ],\n \"rules\": [\n {\n \"name\": \"<string>\",\n \"when\": {\n \"kind\": \"item\",\n \"all\": [\n {\n \"field\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n },\n \"then\": [\n {\n \"channelIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n }\n ],\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"enabled\": true\n }\n ],\n \"channels\": [\n {\n \"channelId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"backfill\": true,\n \"schedule\": {\n \"startsAt\": \"2023-11-07T05:31:56Z\",\n \"endsAt\": \"2023-11-07T05:31:56Z\",\n \"timezone\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"kind": "catalog",
"globalCriteria": {},
"refreshIntervalSeconds": 123,
"sources": [
{
"source": "x",
"enabled": true,
"searches": [
{
"id": "<string>",
"label": "<string>",
"overridesEnabled": true,
"overrides": {},
"resolvedCriteria": {}
}
],
"refreshIntervalSeconds": 123
}
],
"webhookUrl": "<string>",
"webhookMode": "all",
"aiEnabled": true,
"aiPreset": "<string>",
"aiPrompt": "<string>",
"aiStep": {},
"sentimentEnabled": true,
"coBrandsEnabled": true,
"muteRules": [
"<unknown>"
],
"vipAuthors": [
"<unknown>"
],
"rules": [
"<unknown>"
],
"schedule": {},
"isActive": true,
"pausedReason": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "Rate limit exceeded",
"code": "TOO_MANY_REQUESTS"
}Create a query
Creates a Query and the child Watches that poll for it. The body, the plan limits, the interval floors and the multi-term rules are exactly the ones the dashboard applies — a Query this refuses is one the Configure screen would refuse too, with the same error code. Pass backfill: true to run one immediate, non-delivering poll per enabled source so the Query is not empty on day one: charged one tick per source at its rate, events come back marked seeded, and no webhook or channel fires.
curl --request POST \
--url https://api.nephia.cc/v1/queries \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"name": "<string>",
"refreshIntervalSeconds": 123,
"globalCriteria": {
"market": "<string>",
"query": "<string>",
"priceMin": 123,
"priceMax": 123,
"sort": "<string>",
"page": 123,
"perPage": 123,
"filters": {},
"terms": [
"<string>"
]
},
"sources": [
{
"enabled": true,
"searches": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"label": "<string>",
"overridesEnabled": true,
"overrides": {
"market": "<string>",
"query": "<string>",
"priceMin": 123,
"priceMax": 123,
"sort": "<string>",
"page": 123,
"perPage": 123,
"filters": {},
"terms": [
"<string>"
]
}
}
],
"refreshIntervalSeconds": 123
}
],
"webhookUrl": "",
"aiEnabled": true,
"aiPrompt": "<string>",
"aiStep": {
"instruction": "<string>",
"schema": {}
},
"sentimentEnabled": true,
"coBrandsEnabled": true,
"muteRules": [
"<string>"
],
"vipAuthors": [
"<string>"
],
"rules": [
{
"name": "<string>",
"when": {
"kind": "item",
"all": [
{
"field": "<string>",
"value": "<string>"
}
]
},
"then": [
{
"channelIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
],
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"enabled": true
}
],
"channels": [
{
"channelId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"backfill": true,
"schedule": {
"startsAt": "2023-11-07T05:31:56Z",
"endsAt": "2023-11-07T05:31:56Z",
"timezone": "<string>"
}
}
'import requests
url = "https://api.nephia.cc/v1/queries"
payload = {
"name": "<string>",
"refreshIntervalSeconds": 123,
"globalCriteria": {
"market": "<string>",
"query": "<string>",
"priceMin": 123,
"priceMax": 123,
"sort": "<string>",
"page": 123,
"perPage": 123,
"filters": {},
"terms": ["<string>"]
},
"sources": [
{
"enabled": True,
"searches": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"label": "<string>",
"overridesEnabled": True,
"overrides": {
"market": "<string>",
"query": "<string>",
"priceMin": 123,
"priceMax": 123,
"sort": "<string>",
"page": 123,
"perPage": 123,
"filters": {},
"terms": ["<string>"]
}
}
],
"refreshIntervalSeconds": 123
}
],
"webhookUrl": "",
"aiEnabled": True,
"aiPrompt": "<string>",
"aiStep": {
"instruction": "<string>",
"schema": {}
},
"sentimentEnabled": True,
"coBrandsEnabled": True,
"muteRules": ["<string>"],
"vipAuthors": ["<string>"],
"rules": [
{
"name": "<string>",
"when": {
"kind": "item",
"all": [
{
"field": "<string>",
"value": "<string>"
}
]
},
"then": [{ "channelIds": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"] }],
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"enabled": True
}
],
"channels": [{ "channelId": "3c90c3cc-0d44-4b50-8888-8dd25736052a" }],
"backfill": True,
"schedule": {
"startsAt": "2023-11-07T05:31:56Z",
"endsAt": "2023-11-07T05:31:56Z",
"timezone": "<string>"
}
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
refreshIntervalSeconds: 123,
globalCriteria: {
market: '<string>',
query: '<string>',
priceMin: 123,
priceMax: 123,
sort: '<string>',
page: 123,
perPage: 123,
filters: {},
terms: ['<string>']
},
sources: [
{
enabled: true,
searches: [
{
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
label: '<string>',
overridesEnabled: true,
overrides: {
market: '<string>',
query: '<string>',
priceMin: 123,
priceMax: 123,
sort: '<string>',
page: 123,
perPage: 123,
filters: {},
terms: ['<string>']
}
}
],
refreshIntervalSeconds: 123
}
],
webhookUrl: '',
aiEnabled: true,
aiPrompt: '<string>',
aiStep: {instruction: '<string>', schema: {}},
sentimentEnabled: true,
coBrandsEnabled: true,
muteRules: ['<string>'],
vipAuthors: ['<string>'],
rules: [
{
name: '<string>',
when: {kind: 'item', all: [{field: '<string>', value: '<string>'}]},
then: [{channelIds: ['3c90c3cc-0d44-4b50-8888-8dd25736052a']}],
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
enabled: true
}
],
channels: [{channelId: '3c90c3cc-0d44-4b50-8888-8dd25736052a'}],
backfill: true,
schedule: {
startsAt: '2023-11-07T05:31:56Z',
endsAt: '2023-11-07T05:31:56Z',
timezone: '<string>'
}
})
};
fetch('https://api.nephia.cc/v1/queries', 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.nephia.cc/v1/queries",
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([
'name' => '<string>',
'refreshIntervalSeconds' => 123,
'globalCriteria' => [
'market' => '<string>',
'query' => '<string>',
'priceMin' => 123,
'priceMax' => 123,
'sort' => '<string>',
'page' => 123,
'perPage' => 123,
'filters' => [
],
'terms' => [
'<string>'
]
],
'sources' => [
[
'enabled' => true,
'searches' => [
[
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'label' => '<string>',
'overridesEnabled' => true,
'overrides' => [
'market' => '<string>',
'query' => '<string>',
'priceMin' => 123,
'priceMax' => 123,
'sort' => '<string>',
'page' => 123,
'perPage' => 123,
'filters' => [
],
'terms' => [
'<string>'
]
]
]
],
'refreshIntervalSeconds' => 123
]
],
'webhookUrl' => '',
'aiEnabled' => true,
'aiPrompt' => '<string>',
'aiStep' => [
'instruction' => '<string>',
'schema' => [
]
],
'sentimentEnabled' => true,
'coBrandsEnabled' => true,
'muteRules' => [
'<string>'
],
'vipAuthors' => [
'<string>'
],
'rules' => [
[
'name' => '<string>',
'when' => [
'kind' => 'item',
'all' => [
[
'field' => '<string>',
'value' => '<string>'
]
]
],
'then' => [
[
'channelIds' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
]
],
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'enabled' => true
]
],
'channels' => [
[
'channelId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
],
'backfill' => true,
'schedule' => [
'startsAt' => '2023-11-07T05:31:56Z',
'endsAt' => '2023-11-07T05:31:56Z',
'timezone' => '<string>'
]
]),
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.nephia.cc/v1/queries"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"refreshIntervalSeconds\": 123,\n \"globalCriteria\": {\n \"market\": \"<string>\",\n \"query\": \"<string>\",\n \"priceMin\": 123,\n \"priceMax\": 123,\n \"sort\": \"<string>\",\n \"page\": 123,\n \"perPage\": 123,\n \"filters\": {},\n \"terms\": [\n \"<string>\"\n ]\n },\n \"sources\": [\n {\n \"enabled\": true,\n \"searches\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"label\": \"<string>\",\n \"overridesEnabled\": true,\n \"overrides\": {\n \"market\": \"<string>\",\n \"query\": \"<string>\",\n \"priceMin\": 123,\n \"priceMax\": 123,\n \"sort\": \"<string>\",\n \"page\": 123,\n \"perPage\": 123,\n \"filters\": {},\n \"terms\": [\n \"<string>\"\n ]\n }\n }\n ],\n \"refreshIntervalSeconds\": 123\n }\n ],\n \"webhookUrl\": \"\",\n \"aiEnabled\": true,\n \"aiPrompt\": \"<string>\",\n \"aiStep\": {\n \"instruction\": \"<string>\",\n \"schema\": {}\n },\n \"sentimentEnabled\": true,\n \"coBrandsEnabled\": true,\n \"muteRules\": [\n \"<string>\"\n ],\n \"vipAuthors\": [\n \"<string>\"\n ],\n \"rules\": [\n {\n \"name\": \"<string>\",\n \"when\": {\n \"kind\": \"item\",\n \"all\": [\n {\n \"field\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n },\n \"then\": [\n {\n \"channelIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n }\n ],\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"enabled\": true\n }\n ],\n \"channels\": [\n {\n \"channelId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"backfill\": true,\n \"schedule\": {\n \"startsAt\": \"2023-11-07T05:31:56Z\",\n \"endsAt\": \"2023-11-07T05:31:56Z\",\n \"timezone\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.nephia.cc/v1/queries")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"refreshIntervalSeconds\": 123,\n \"globalCriteria\": {\n \"market\": \"<string>\",\n \"query\": \"<string>\",\n \"priceMin\": 123,\n \"priceMax\": 123,\n \"sort\": \"<string>\",\n \"page\": 123,\n \"perPage\": 123,\n \"filters\": {},\n \"terms\": [\n \"<string>\"\n ]\n },\n \"sources\": [\n {\n \"enabled\": true,\n \"searches\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"label\": \"<string>\",\n \"overridesEnabled\": true,\n \"overrides\": {\n \"market\": \"<string>\",\n \"query\": \"<string>\",\n \"priceMin\": 123,\n \"priceMax\": 123,\n \"sort\": \"<string>\",\n \"page\": 123,\n \"perPage\": 123,\n \"filters\": {},\n \"terms\": [\n \"<string>\"\n ]\n }\n }\n ],\n \"refreshIntervalSeconds\": 123\n }\n ],\n \"webhookUrl\": \"\",\n \"aiEnabled\": true,\n \"aiPrompt\": \"<string>\",\n \"aiStep\": {\n \"instruction\": \"<string>\",\n \"schema\": {}\n },\n \"sentimentEnabled\": true,\n \"coBrandsEnabled\": true,\n \"muteRules\": [\n \"<string>\"\n ],\n \"vipAuthors\": [\n \"<string>\"\n ],\n \"rules\": [\n {\n \"name\": \"<string>\",\n \"when\": {\n \"kind\": \"item\",\n \"all\": [\n {\n \"field\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n },\n \"then\": [\n {\n \"channelIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n }\n ],\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"enabled\": true\n }\n ],\n \"channels\": [\n {\n \"channelId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"backfill\": true,\n \"schedule\": {\n \"startsAt\": \"2023-11-07T05:31:56Z\",\n \"endsAt\": \"2023-11-07T05:31:56Z\",\n \"timezone\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nephia.cc/v1/queries")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"refreshIntervalSeconds\": 123,\n \"globalCriteria\": {\n \"market\": \"<string>\",\n \"query\": \"<string>\",\n \"priceMin\": 123,\n \"priceMax\": 123,\n \"sort\": \"<string>\",\n \"page\": 123,\n \"perPage\": 123,\n \"filters\": {},\n \"terms\": [\n \"<string>\"\n ]\n },\n \"sources\": [\n {\n \"enabled\": true,\n \"searches\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"label\": \"<string>\",\n \"overridesEnabled\": true,\n \"overrides\": {\n \"market\": \"<string>\",\n \"query\": \"<string>\",\n \"priceMin\": 123,\n \"priceMax\": 123,\n \"sort\": \"<string>\",\n \"page\": 123,\n \"perPage\": 123,\n \"filters\": {},\n \"terms\": [\n \"<string>\"\n ]\n }\n }\n ],\n \"refreshIntervalSeconds\": 123\n }\n ],\n \"webhookUrl\": \"\",\n \"aiEnabled\": true,\n \"aiPrompt\": \"<string>\",\n \"aiStep\": {\n \"instruction\": \"<string>\",\n \"schema\": {}\n },\n \"sentimentEnabled\": true,\n \"coBrandsEnabled\": true,\n \"muteRules\": [\n \"<string>\"\n ],\n \"vipAuthors\": [\n \"<string>\"\n ],\n \"rules\": [\n {\n \"name\": \"<string>\",\n \"when\": {\n \"kind\": \"item\",\n \"all\": [\n {\n \"field\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n },\n \"then\": [\n {\n \"channelIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n }\n ],\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"enabled\": true\n }\n ],\n \"channels\": [\n {\n \"channelId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"backfill\": true,\n \"schedule\": {\n \"startsAt\": \"2023-11-07T05:31:56Z\",\n \"endsAt\": \"2023-11-07T05:31:56Z\",\n \"timezone\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"kind": "catalog",
"globalCriteria": {},
"refreshIntervalSeconds": 123,
"sources": [
{
"source": "x",
"enabled": true,
"searches": [
{
"id": "<string>",
"label": "<string>",
"overridesEnabled": true,
"overrides": {},
"resolvedCriteria": {}
}
],
"refreshIntervalSeconds": 123
}
],
"webhookUrl": "<string>",
"webhookMode": "all",
"aiEnabled": true,
"aiPreset": "<string>",
"aiPrompt": "<string>",
"aiStep": {},
"sentimentEnabled": true,
"coBrandsEnabled": true,
"muteRules": [
"<unknown>"
],
"vipAuthors": [
"<unknown>"
],
"rules": [
"<unknown>"
],
"schedule": {},
"isActive": true,
"pausedReason": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "Rate limit exceeded",
"code": "TOO_MANY_REQUESTS"
}Authorizations
API key created from the Nephia dashboard for your Account.
Headers
Unique key (e.g. UUID) making this POST safe to retry for 24 hours. Replays return the original response with an Idempotency-Replayed: true header; reusing a key with a different body returns 422.
255Body
1 - 80Show child attributes
Show child attributes
1Show child attributes
Show child attributes
""product-model, theme-sentiment, seller, duplicates, custom, null 400Show child attributes
Show child attributes
501 - 601001 - 6020Show child attributes
Show child attributes
all, rules 5Show child attributes
Show child attributes
low, medium, high, null Show child attributes
Show child attributes
Response
Query created
catalog, listening Show child attributes
Show child attributes
Show child attributes
Show child attributes
all, rules Show child attributes
Show child attributes
Show child attributes
Show child attributes
Was this page helpful?