Answe

API Reference — Answe Public API

Introduction

The Answe public API gives your own systems programmatic access to your account's leads, answers and orders, and lets you manage webhook subscriptions. Base URL:

https://api.qstio.com/public/v1

Authentication

Create an API key on your Account page (API Keys section). The full key — format ansk_… — is shown once at creation. Send it as a bearer token on every request:

Authorization: Bearer ansk_your_key_here

Keys can be individually revoked on the Account page; a revoked key is rejected immediately. Never embed an API key in client-side code — it grants read access to your account data.

Rate limits

120 requests per minute per API key. Responses include X-RateLimit-Limit and X-RateLimit-Remaining; exceeding the limit returns 429 with a Retry-After header.

Pagination

List endpoints return newest-first and support cursor pagination:

  • limit — page size, default 50, max 100
  • after_id — return items with an id lower than this (take next_after_id from the previous response)

When next_after_id is null, you have reached the end.

Endpoints

GET /me

Identity and plan check — useful as a connection test.

{ "user": { "id": 123, "username": "yourname" }, "plan": "pro" }

GET /leads — Pro plan

Your extracted leads. Requires the Pro plan (like the Leads dashboard); other plans receive 403 with error: "plan_required".

Query parameters (all optional): status (new/contacted/done/archived), type (form/reservation/order/engagement), qstio_uid, q (search name/email/phone), date_from / date_to (YYYY-MM-DD), has_contact (1/0), plus pagination.

{
  "leads": [
    { "id": 42, "created_at": "2026-08-19T09:40:54Z", "name": "Jane Doe",
      "email": "[email protected]", "phone": null, "type": "form",
      "status": "new", "question": "What can we help you with?",
      "answer_text": "Pricing please", "chat_uid": "…", "qstio_uid": "…" }
  ],
  "next_after_id": null
}

GET /answers

Widget answers. Optional qstio_uid filter, plus pagination.

GET /orders

Orders placed through your widgets, including status and payment timestamps. Pagination only.

GET /webhooks · POST /webhooks · DELETE /webhooks/:id

Manage webhook subscriptions programmatically. Create:

POST /webhooks
{ "url": "https://your-system.com/answe-hook", "events": ["lead.created", "order.created"] }

Returns 201 with the subscription id and its signing secret. Valid events: lead.created, order.created, reservation.created, answer.created.

Verifying webhook deliveries

Every webhook POST is signed. Headers:

X-Answe-Event:      lead.created
X-Answe-Delivery:   12345
X-Answe-Timestamp:  1755600000
X-Answe-Signature:  sha256=<hex>

Verify by computing HMAC_SHA256(secret, timestamp + "." + raw_request_body) and comparing to the value after sha256=:

const crypto = require('crypto');
function verify(secret, timestamp, rawBody, signatureHeader) {
  const expected = 'sha256=' + crypto.createHmac('sha256', secret)
    .update(timestamp + '.' + rawBody).digest('hex');
  return crypto.timingSafeEqual(Buffer.from(expected), Buffer.from(signatureHeader));
}

Deliveries are retried with increasing delays (up to ~12 hours) until your endpoint returns a 2xx. Respond quickly and do heavy processing asynchronously.

Errors

Errors are JSON with an error code and, where helpful, a human-readable message:

Status Error Meaning
401 unauthorized Missing, malformed, or revoked API key
403 plan_required Endpoint needs a higher plan (upgrade_url included)
404 not_found Resource does not exist or is not yours
429 rate_limited Slow down; retry after Retry-After seconds

Related