API reference
Suggested questions and product questions
Questions to start a chat with. Approved questions and answers for a product page.
On this page
Two endpoints bring the work your team does in Answer Studio to a custom front end. /suggested-questions is the suggested questions API for a chatbot’s opening screen: a few questions to tap, so shoppers never face an empty box. /product-questions fills a “Questions people ask” block on a product page with real questions shoppers asked about that product and the answers your team approved. Neither uses an answered question from your allowance; that only happens when a shopper sends a question to /ask.
Get starter questions
Starter questions to show when the chat opens. On a product page, send sku so questions about that product come first. Rate limit group suggested_questions, which grows with your plan.
- Key
Authorization: Bearerwith theask:readscope- Origin
- One of the key’s allowed origins
- Call from
- The browser or your server
- Rate limit
suggested_questionsgroup, set by your plan- Retries
- Safe with
Idempotency-Key
Headers and parameters
| Field | Description |
|---|---|
Origin
|
Your storefront’s address, which must be one of the key’s allowed origins. Browsers send it themselves; a server must send it too. |
Idempotency-Key
|
Makes a retry safe: the same key, path and body within 24 hours returns the first response again. A key is shared by every API key and store in the workspace, so it must be unique to each request (a random id, not a row number from one store’s database): reusing the key with a different body is refused with 409. Servers only. |
X-Ottla-Client-Ip
|
The shopper’s public IP address, when your server calls on a shopper’s behalf, so each shopper has their own allowance. Read only for a key marked “Used by a store connector or another server” in the console, which also needs allowed IP addresses; ignored for any other key. |
X-Ottla-Request-Id
|
Your own id for this request, returned in the response header. Ottla creates one when you send none. Servers only. |
Responses
-
200 OK
Starter questions.
-
401 Unauthorised
No API key was sent (
unauthenticated), or the key is unknown, revoked or expired (invalid_api_key). -
402 Payment required
Billing needs attention.
plan_limit_exceeded: the plan’s allowance and any credits are used up (the body addsmetric,usedandlimit).account_past_due: a payment is overdue, or a trial ended without a plan.account_suspended: the account is suspended. Stop sending until the workspace owner resolves it atupgrade_url. -
403 Forbidden
The key cannot be used for this request:
forbidden_scope,ip_not_allowedortenant_suspendedas for any key, or theOrigincheck failed:origin_not_configured,origin_required,origin_invalidororigin_not_allowed. -
409 Conflict
The
Idempotency-Keywas used before with a different body (idempotency_key_reused), or a request with it is still running (idempotency_in_flight). -
422 Invalid
The request is not valid (
validation_failed, witherrorskeyed by field), or theIdempotency-Keyheader is malformed (invalid_idempotency_key). -
429 Rate limited
A rate limit was reached: this key’s limit for the operation’s group (
rate_limited), the workspace’s limit across all its keys (tenant_rate_limited), the limit for one network address (ip_rate_limited) or for one shopper (shopper_rate_limited). Waitretry_afterseconds. -
503 Unavailable
This capability is temporarily paused by Ottla (
feature_disabled). Try again afterRetry-Afterseconds;help_urlshows the service status.
| Field | Description |
|---|---|
sku
|
On a product page: the product’s SKU, so questions about it come first. |
page_type
|
The kind of page, up to 32 characters. Your own suggested questions set for another page type are left out. |
placement
|
Where the chat sits: chat, sidebar or inline. |
limit
|
How many questions, 1 to 20. Default 5. |
page_context
|
The product on the page, in the same shape as for /ask. |
context
|
Further facts about the page as key and value pairs. |
website_id
|
Ottla’s id for the website. Send it so only that website’s suggested questions come back. |
scope_ref
|
Your code for the market or language, such as uk. |
locale
|
The shopper’s language, such as en-GB. It decides the language of the standard questions. |
store_view_id
|
The store view, for a catalogue organised by store view. |
curl https://ottla.ai/api/v1/suggested-questions \
-H "Authorization: Bearer YOUR_BROWSER_KEY" \
-H "Origin: https://shop.example" \
-H "Content-Type: application/json" \
-d '{"sku": "TENT-2P", "page_type": "pdp", "limit": 3, "locale": "en-GB"}'
<?php
use GuzzleHttp\Client;
$client = new Client(['base_uri' => 'https://ottla.ai/api/v1/']);
$response = $client->post('suggested-questions', [
'headers' => [
'Authorization' => 'Bearer YOUR_BROWSER_KEY',
'Origin' => 'https://shop.example',
],
'json' => ['sku' => 'TENT-2P', 'page_type' => 'pdp', 'limit' => 3, 'locale' => 'en-GB'],
]);
$questions = json_decode((string) $response->getBody(), true)['questions'];
{
"questions": [
{ "id": null, "question": "What are the key features of this product?", "sku": "TENT-2P" },
{ "id": null, "question": "How do shipping and returns work?", "sku": null },
{ "id": null, "question": "What is the warranty policy?", "sku": null }
]
}
Each question has an id, the question text and the sku it’s about, if any. Your own suggested questions also carry page_type and priority. Here’s where they come from, in order:
- On a product page, the questions that your team has approved for that product in AI assistant → Answer Studio, if you have enabled Show approved questions on product pages for your website.
- Your own suggested questions from the console.
- When there are none, standard starter questions in the shopper’s language (English, German, Spanish or French), with
idset to null.
Get a product’s questions and answers
The questions shoppers ask about one product, with the answers your team approved, in the shopper’s language. It always answers 200: an unknown product or a paused assistant gives an empty list, so the block simply doesn’t show. Rate limit group product_questions: 600 a minute per key.
- Key
Authorization: Bearerwith theask:readscope- Origin
- One of the key’s allowed origins
- Call from
- The browser or your server
- Rate limit
product_questionsgroup, 600 a minute
Headers and parameters
| Field | Description |
|---|---|
Origin
|
Your storefront’s address, which must be one of the key’s allowed origins. Browsers send it themselves; a server must send it too. |
X-Ottla-Client-Ip
|
The shopper’s public IP address, when your server calls on a shopper’s behalf, so each shopper has their own allowance. Read only for a key marked “Used by a store connector or another server” in the console, which also needs allowed IP addresses; ignored for any other key. |
X-Ottla-Request-Id
|
Your own id for this request, returned in the response header. Ottla creates one when you send none. Servers only. |
Responses
-
200 OK
Approved questions and answers.
-
401 Unauthorised
No API key was sent (
unauthenticated), or the key is unknown, revoked or expired (invalid_api_key). -
402 Payment required
Billing needs attention.
plan_limit_exceeded: the plan’s allowance and any credits are used up (the body addsmetric,usedandlimit).account_past_due: a payment is overdue, or a trial ended without a plan.account_suspended: the account is suspended. Stop sending until the workspace owner resolves it atupgrade_url. -
403 Forbidden
The key cannot be used for this request:
forbidden_scope,ip_not_allowedortenant_suspendedas for any key, or theOrigincheck failed:origin_not_configured,origin_required,origin_invalidororigin_not_allowed. -
422 Invalid
The request is not valid (
validation_failed, witherrorskeyed by field), or theIdempotency-Keyheader is malformed (invalid_idempotency_key). -
429 Rate limited
A rate limit was reached: this key’s limit for the operation’s group (
rate_limited), the workspace’s limit across all its keys (tenant_rate_limited), the limit for one network address (ip_rate_limited) or for one shopper (shopper_rate_limited). Waitretry_afterseconds. -
503 Unavailable
This capability is temporarily paused by Ottla (
feature_disabled). Try again afterRetry-Afterseconds;help_urlshows the service status.
| Field | Description |
|---|---|
external_id
|
The product, by your platform’s product id, up to 64 characters. |
limit
|
How many questions, 1 to 10. |
include
|
What to return besides the questions: review_summary. Leave include out and the summary comes back whenever there is one. |
website_id
|
Ottla’s id for the website. Ignored for a key bound to one website. |
scope_ref
|
Your code for the market or language, such as uk. |
locale
|
The shopper’s language, such as en-GB. |
store_view_id
|
The store view, for a catalogue organised by store view. |
curl https://ottla.ai/api/v1/product-questions \
-H "Authorization: Bearer YOUR_BROWSER_KEY" \
-H "Origin: https://shop.example" \
-H "Content-Type: application/json" \
-d '{"external_id": "1187", "limit": 5, "locale": "en-GB"}'
<?php
// $client as in the starter questions example above
$response = $client->post('product-questions', [
'headers' => [
'Authorization' => 'Bearer YOUR_BROWSER_KEY',
'Origin' => 'https://shop.example',
],
'json' => ['external_id' => '1187', 'limit' => 5, 'locale' => 'en-GB'],
]);
$block = json_decode((string) $response->getBody(), true);
{
"questions": [
{
"id": "pq_01JB7Y3K2MQ4R6S8T0V2W4X6Y8",
"question": "Can two adults sit up inside?",
"answer": "Yes. The peak height is 105 cm, so two adults can sit up comfortably.",
"answer_format": "text",
"sources": [
{ "title": "Ridgeline 2 Person Tent specification", "url": "https://shop.example/ridgeline-2-person-tent" }
],
"updated_at": "2026-10-02T14:20:00+01:00",
"approved": true
}
],
"ask_prompt": "Ask about this product"
}
| Field | What it holds |
|---|---|
questions | Approved questions with their answer, answer_format (such as text), updated_at and up to 5 sources (the pages the answer is based on, with title and url). |
ask_prompt | A line inviting the shopper to ask their own question, in their language. Link it to your chat. |
review_summary | An AI summary of the product’s reviews, when there is one and you didn’t leave it out with include. |
A question appears in this list once it has been asked by at least 3 different shoppers within 90 days (the defaults for your website) and your team has approved an answer. Up to 5 questions show per product by default, and your team can change this. Review summaries are available on Growth and above. Once Ottla has checked your store’s reviews and switched review insights on, a product has a summary when at least 3 of its reviews make the same point, and it is always labelled as AI-assisted.
Errors
| Status | Code | What to do |
|---|---|---|
| 401 | unauthenticated, invalid_api_key | Ensure you are sending a valid key. |
| 402 | account_past_due, account_suspended | Your billing needs attention. You should not show starter questions until this is resolved. |
| 403 | forbidden_scope and the origin_* codes | Your key needs the ask:read scope. You also need to send an allowed Origin. |
| 422 | validation_failed | Please fix any errors returned in the errors array. You need to send an external_id when requesting product questions. |
| 429 | rate_limited and the other rate limit codes | Please wait retry_after seconds. You can cache starter questions per product to reduce calls. |
| 503 | feature_disabled | We have temporarily paused this feature. Try again later. |
FAQ
Questions developers ask
Why do I get standard questions on a product page?
Either your team has not approved any questions for this product yet, or you have not enabled Show approved questions on product pages for your website.
Which languages are the standard questions in?
English, German, Spanish and French, picked from the shopper’s locale.
Can I show the review summary?
On Growth and above, once Ottla has switched review insights on for your store and at least 3 of the product’s reviews make the same point. It comes back in review_summary.
Do these calls use answered questions?
No. Only an answer from /ask does, so a shopper tapping a starter question uses one when it’s answered.
Related
Ask
Send a tapped question to our assistant and display the answer.
Product questions
Learn how Answer Studio turns real shopper questions into approved answers.
Headless storefronts
Build chat and product questions into your custom front end.
Webhook events
Receive the question.approved webhook when your team approves a question.