AskAgento API
Information
Askagento API
    Bring-your-own-key (BYOK) LLM credentialspostAI ChatbotpostCORS for AI ChatbotoptionsAuto FilterpostCORS for Auto FilteroptionsInstallation statusgetInstall pluginpostInstall verifypostCORS preflightoptionsAuto LabelpostCORS for Auto LabeloptionsAI Agents & MCPpostCORS for AI AgentsoptionsCurrent subscription plangetAI Recommend (cross-sell)getAI Recommend (upsell)getAI SearchpostCORS for AI SearchoptionsUpdate product datapostUninstall pluginpostUsage limitsget
Schemas
powered by Zudoku
Welcome to AskAgento API
Welcome to AskAgento API

Schemas


ByokRequest

action
​string · enum · required

set stores the merchant key; clear removes BYOK credentials from the install record.

Enum values:
set
clear
provider
​string · enum

Required when action=set.

Enum values:
openai
openrouter
api_key
​string

Merchant LLM API key. Required when action=set. Never logged by the API.

model
​string

Optional model id for action=set (e.g. gpt-5-mini for OpenAI, or an OpenRouter model id). When omitted, the chatbot uses the server default (OpenRouter ids are prefixed with openai/ when needed).

ByokResponse

status
​string · required
site_id
​string · required
byok
​boolean · required

True when a BYOK key is stored after this request; false after clear.

provider
​string · enum

Present when byok is true (the provider just stored).

Enum values:
openai
openrouter

WooCommerceTermObject

WooCommerce taxonomy term (category or tag).
id
​integer
name
​string
slug
​string

Product

id
​integer · required
title
​string
name
​string
description
​string
short_description
​string
sku
​string
price
​string

Effective price (sale price when on sale, otherwise regular price).

regular_price
​string
sale_price
​string
price_html
​string

HTML-formatted price string (may include <span> tags).

​
status
​string

Product publication status (e.g. publish, draft, private).

featured
​boolean

True when the merchant has marked the product as featured.

on_sale
​boolean

True when a sale price is active.

permalink
​string · uri

Canonical product page URL.

image_url
​string · uri
​WooCommerceTermObject[]

Product categories; each item is a WooCommerce term object.

​WooCommerceTermObject[]

Product tags; each item is a WooCommerce term object.

​object[]
​object[]

Product variation objects (variable products only).

date_created
​string · date-time

Product creation timestamp (used by get_featured_products new_arrivals sort).

date_modified
​string · date-time
created_at
​string · date-time

Alias for date_created (plugin may send either field).

updated_at
​string · date-time

Alias for date_modified (plugin may send either field).

InstallRequest

domain
​string · required
​Product[] · required
system
​string · enum · required

woocommerce — full catalogue with image + text data. knowledge_base — text-only Confluence/article chunks for askagento.com chat.

Enum values:
woocommerce
knowledge_base
plugin_version
​string
woocommerce_version
​string
total_products
​integer
shop_ip
​string

Optional IPv4 string for the shop host (plugin may send DNS resolution result).

InstallVerifyRequest

domain
​string · required

Shop host name, e.g. shop.example.com. A full URL is also accepted.

Example: shop.example.com
image_url
​string

URL of one product image, picked at random from the catalogue about to be installed. Products are indexed by their images, so a catalogue without one cannot be installed: omitting it yields blocked (no_product_images).

Example: https://shop.example.com/wp-content/uploads/2026/01/hat.jpg

InstallVerifyResponse

ok
​boolean

True only when verdict is pass.

verdict
​string · enum
Enum values:
pass
blocked
inconclusive
code
​string

Machine-readable outcome, e.g. reachable, local_domain, private_ip, dns_unresolved, tls_invalid, password_protected, image_forbidden, image_not_found, no_product_images, rate_limited, timeout.

Example: image_forbidden
reason
​string

Sentence suitable for display to the shop administrator.

Example: The shop refuses image requests from our servers (hotlink protection or a firewall).
​object[]

Per-check detail, in the order the checks ran.

UpdateRequest

​Product[] · required
system
​string · enum · required
Enum values:
woocommerce
domain
​string
plugin_version
​string
woocommerce_version
​string
total_products
​integer

UpdateResponse

status
​string · required
site_id
​string · required
synced_products
​integer · required
update_needed
​boolean · required

True when the catalogue hash changed on this sync (re-embed required). Unchanged-hash syncs do not clear a previously true flag.

message
​string · required

UninstallRequest

system
​string · enum · required
Enum values:
woocommerce
knowledge_base
domain
​string
plugin_version
​string
woocommerce_version
​string

InstallAcceptedResponse

status
​string · required
site_id
​string · required

New site identifier; send it in X-Askagento-Site-Id on every authenticated call.

api_key
​string · required

Secret key; accepted on every authenticated route. Keep it on your server and never expose it in a web page.

public_key
​string · required

Public key; accepted only on POST /chatbot, POST /search and POST /mcp. Safe to embed in storefront pages and AI agent configs.

Example: pk_3fQx8ZkP2mLr7TnV1cWy9HsB
message
​string · required

StatusOkResponse

status
​string

InstallStatusResponse

site_id
​string
installed_at
​string | null · date-time
status_message
​string
status
​string

RecommendationsPayload

site_id
​string
generated_at
​string

ISO 8601 timestamp (UTC) with Z suffix

​object

Map of source product id to cross-sell targets (similarity-ranked)

​object

Map of source product id (string) to ranked neighbor list

RecommendationNeighbor

product_id
​string
distance
​number | null · float

Hybrid score; lower is better when present

title
​string
image_url
​string
source
​string

hybrid, image, or text

SearchRequest

text
​string

Search text, at least 2 characters

image_base64
​string

Base64-encoded image bytes. A leading data:image/...;base64, prefix is stripped if present. Never fetched over the network.

modality
​string · enum

Omit to infer from the body: text only → text, image_base64 only → image, both present → both. Setting both requires text (≥2 chars) and image_base64.

Enum values:
text
image
both
limit
​integer · min: 1 · max: 50
Default: 12

SearchHit

product_id
​string
title
​string
image_url
​string
distance
​number | null · float

SearchResponse

site_id
​string · required
modality
​string · enum · required
Enum values:
text
image
both
​SearchHit[] · required
query
​string

Echoed text query when modality is text or both

ChatMessage

role
​string · enum · required
Enum values:
system
user
assistant
content
​string · maxLength: 12000 · required

ChatbotRequest

action
​string · enum

chat — full conversation; last user turn drives product retrieval (see POST /chatbot). health — connectivity probe; messages optional and ignored; max_completion_tokens ignored.

Enum values:
chat
health
Default: chat
​ChatMessage[] · maxItems: 24

Required when action=chat (non-empty after normalization); omitted or ignored for health. Up to 24 turns; each content truncated to 12 000 chars.

max_completion_tokens
​integer · max: 4096

Alias max_tokens also accepted; capped at 4096. Ignored when action=health (server uses 3).

Default: 1024

ChatbotResponse

site_id
​string · required
action
​string · enum · required
Enum values:
chat
health
latency_ms
​integer · required

Round-trip latency to the chat provider in milliseconds

​object · required
reply
​string · required

Text reply from the model

products_retrieved
​integer · required

Number of catalogue products injected as context for action=chat; always 0 for health

limits_tokens_remaining
​integer | null

Remaining token quota for the site after this call; null if no quota is set

ChatbotErrorResponse

error
​string
llm_status
​integer

HTTP status code returned by the upstream chat API

McpRequest

jsonrpc
​string · enum · required
Enum values:
2.0
method
​string · required

One of: initialize, notifications/initialized, tools/call, tools/list

​

Request id (omit for notifications)

​object

For tools/call: {"name": "chat_with_shop"|"get_catalogue_stats"|"get_featured_products"|"get_product_by_id"|"get_shop_status"|"get_similar_products"|"list_categories"|"list_tags"|"search_products", "arguments": {...}}

McpResponse

jsonrpc
​string · enum
Enum values:
2.0
​
​object | null
error
​object | null

PlanResponse

site_id
​string
plan
​string | null

Plan slug (free, basic, pro); null if no plan is set

plan_label
​string | null

Human-readable plan label

UsageLimits

tokens
​integer

Remaining AI token quota

searches
​integer

Remaining search quota

UsageResponse

site_id
​string
plan
​string | null

Plan slug; null if no plan is set

plan_label
​string | null
​UsageLimits

Remaining monthly plan allowance for this site; null if no limits are tracked. Reset to the tier maximum each billing period. Does not include add-on packs.

​UsageLimits

Unspent one-time add-on pack credits, omitted keys meaning zero; null when the site has none. These do not expire and are only spent once limits reaches zero, so the site's true remaining balance is limits + pack_units.

​UsageLimits

Tier-level maximums for the current plan; null if no plan is set. Includes a products field (how many products the plan indexes) in addition to tokens/searches.

product_count
​integer | null

Number of products in the shop's catalogue; null if not yet recorded

max_products
​integer | null

Number of products the service indexes on the current plan; null if no plan is set.

over_product_limit
​boolean

True when the catalogue is larger than the current plan indexes. While true, catalogue-backed endpoints return 403 (code: product_limit_exceeded) until the catalogue is covered by a larger plan or reduced in size.

FilterRequest

action
​string · enum
Enum values:
analyze
generate
upload
export
filter_action
​string · enum

Alias for action; supply either action or filter_action.

Enum values:
analyze
generate
upload
export
canonical_filters
​string[]

Alias for canonical_attributes when generating attribute filters.

LabelRequest

mode
​string · enum · required
Enum values:
attributes
categories
tags
action
​string · enum · required
Enum values:
analyze
generate
upload
export
canonical_attributes
​string[]
canonical_categories
​string[]
canonical_tags
​string[]

LabelFilterJsonResponse

Shape depends on `mode` and `action`. `generated_preview`, `uploaded_products` (upload), `filename` (export), and informational `message`.
site_id
​string
mode
​string
action
​string
Additional properties are allowed

LabelLlmErrorResponse

error
​string
llm_status
​integer

HTTP status from the upstream chat API when the failure was from the LLM

ErrorResponse

error
​string
On this page
  • ByokRequest
  • ByokResponse
  • WooCommerceTermObject
  • Product
  • InstallRequest
  • InstallVerifyRequest
  • InstallVerifyResponse
  • UpdateRequest
  • UpdateResponse
  • UninstallRequest
  • InstallAcceptedResponse
  • StatusOkResponse
  • InstallStatusResponse
  • RecommendationsPayload
  • RecommendationNeighbor
  • SearchRequest
  • SearchHit
  • SearchResponse
  • ChatMessage
  • ChatbotRequest
  • ChatbotResponse
  • ChatbotErrorResponse
  • McpRequest
  • McpResponse
  • PlanResponse
  • UsageLimits
  • UsageResponse
  • FilterRequest
  • LabelRequest
  • LabelFilterJsonResponse
  • LabelLlmErrorResponse
  • ErrorResponse