Base URLhttps://ottla.ai/api/v1

API reference

Suggested questions and product questions

Questions to start a chat with. Approved questions and answers for a product page.

Updated 12 min read

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.

An example chat on Kestrel & Fell’s store. The assistant answers: “Hi there. Ask me anything about the Ridgeline 2, or anything else in the shop.”.

Get starter questions

POST /api/v1/suggested-questions 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: Bearer with the ask:read scope
Origin
One of the key’s allowed origins
Call from
The browser or your server
Rate limit
suggested_questions group, set by your plan
Retries
Safe with Idempotency-Key

Headers and parameters

POST /suggested-questions: headers and parameters
FieldDescription
Origin string (uri) header Required 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 string header Optional 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 string header Optional 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 string header Optional 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 adds metric, used and limit). 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 at upgrade_url.

  • 403 Forbidden

    The key cannot be used for this request: forbidden_scope, ip_not_allowed or tenant_suspended as for any key, or the Origin check failed: origin_not_configured, origin_required, origin_invalid or origin_not_allowed.

  • 409 Conflict

    The Idempotency-Key was 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, with errors keyed by field), or the Idempotency-Key header 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). Wait retry_after seconds.

  • 503 Unavailable

    This capability is temporarily paused by Ottla (feature_disabled). Try again after Retry-After seconds; help_url shows the service status.

Request fields
FieldDescription
sku string Optional On a product page: the product’s SKU, so questions about it come first.
page_type string Optional The kind of page, up to 32 characters. Your own suggested questions set for another page type are left out.
placement string Optional Where the chat sits: chat, sidebar or inline.
limit integer Optional How many questions, 1 to 20. Default 5.
page_context object Optional The product on the page, in the same shape as for /ask.
context object Optional Further facts about the page as key and value pairs.
website_id integer Optional Ottla’s id for the website. Send it so only that website’s suggested questions come back.
scope_ref string Optional Your code for the market or language, such as uk.
locale string Optional The shopper’s language, such as en-GB. It decides the language of the standard questions.
store_view_id integer Optional 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"}'
200 response, before your team adds questions of its own
{
  "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:

  1. 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.
  2. Your own suggested questions from the console.
  3. When there are none, standard starter questions in the shopper’s language (English, German, Spanish or French), with id set to null.

Get a product’s questions and answers

POST /api/v1/product-questions 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: Bearer with the ask:read scope
Origin
One of the key’s allowed origins
Call from
The browser or your server
Rate limit
product_questions group, 600 a minute

Headers and parameters

POST /product-questions: headers and parameters
FieldDescription
Origin string (uri) header Required 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 string header Optional 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 string header Optional 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 adds metric, used and limit). 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 at upgrade_url.

  • 403 Forbidden

    The key cannot be used for this request: forbidden_scope, ip_not_allowed or tenant_suspended as for any key, or the Origin check failed: origin_not_configured, origin_required, origin_invalid or origin_not_allowed.

  • 422 Invalid

    The request is not valid (validation_failed, with errors keyed by field), or the Idempotency-Key header 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). Wait retry_after seconds.

  • 503 Unavailable

    This capability is temporarily paused by Ottla (feature_disabled). Try again after Retry-After seconds; help_url shows the service status.

Request fields
FieldDescription
external_id string Required The product, by your platform’s product id, up to 64 characters.
limit integer Optional How many questions, 1 to 10.
include array Optional What to return besides the questions: review_summary. Leave include out and the summary comes back whenever there is one.
website_id integer Optional Ottla’s id for the website. Ignored for a key bound to one website.
scope_ref string Optional Your code for the market or language, such as uk.
locale string Optional The shopper’s language, such as en-GB.
store_view_id integer Optional 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"}'
200 response
{
  "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"
}
FieldWhat it holds
questionsApproved 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_promptA line inviting the shopper to ask their own question, in their language. Link it to your chat.
review_summaryAn 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.

Answer Studio with a shopper question and an approved answer for a product Example data
Answers approved here appear in /product-questions and lead the starter questions.

Errors

StatusCodeWhat to do
401unauthenticated, invalid_api_keyEnsure you are sending a valid key.
402account_past_due, account_suspendedYour billing needs attention. You should not show starter questions until this is resolved.
403forbidden_scope and the origin_* codesYour key needs the ask:read scope. You also need to send an allowed Origin.
422validation_failedPlease fix any errors returned in the errors array. You need to send an external_id when requesting product questions.
429rate_limited and the other rate limit codesPlease wait retry_after seconds. You can cache starter questions per product to reduce calls.
503feature_disabledWe 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.

Try Ottla on your own store

Start a 14-day free trial with no card needed. The trial has every Pro feature, with lower limits, so you can install the module or the widget, connect your catalogue and try the assistant on your own products.

14 days free. No card needed.