Shared behavior
Every/v1 endpoint follows the same rules, so what you learn on one endpoint applies to all of them. The API is read-only: every endpoint is a GET, and nothing is mutated. Feedback is ingested through your connected integrations, not this API.
Authentication
Send your key on every request as anX-API-Key header:
apikey is also accepted as an alias for X-API-Key.
Keys are team-scoped (every response is limited to your team’s data) and region-scoped (a key issued in the EU only works against https://eu.api.closedloop.sh/v1). Create keys in Settings, API Keys in the app. See API keys for the full lifecycle.
API-key authentication is designed for unattended server workloads, including scheduled Databricks jobs and agents with no person present at run time.
Pagination
Offset pagination
List endpoints acceptlimit and offset:
Responses wrap the page in
data and include a pagination object whose total is the full-set count of matching records, not the size of the page:
offset until you have read total records.
Incremental insight export
For a repeatable/insights export, make the first request with updated_since instead of offset:
updated_at, then id, and ends at a fixed sync_until time:
cursor and, optionally, a different limit:
updated_since < updated_at <= sync_until. Save sync_until as your next checkpoint only after the final page returns has_more: false. Upsert rows by immutable id; replaying the last committed window gives at-least-once recovery after a failed run.
Treat cursors as opaque. A cursor carries the filters of the request that created it and works only with the same team and API key. If the key is rotated during a run, restart from the last committed sync_until with the new key. Cursor exports do not include a total because the fixed window and has_more determine completion.
Filtering
Filters are query parameters, and multiple filters combine with AND semantics:- Free-text search: most list endpoints accept
q, a free-text search over titles and content. - Date ranges:
date_fromanddate_toare inclusive ISO 8601 dates. - Product scope: insights, themes, features and coverage accept
product_id,product_feature_id,product_area_id, andfeature_area_id. On insights, themes and features,product_id,product_area_idandfeature_area_idtake up to 50 IDs, comma-separated (product_id=a,b) or with the parameter repeated (product_id=a&product_id=b), and match any of them; coverage takes one ID each. More than 50 IDs, or one that is not a UUID, returns400. - Resource-specific filters: each endpoint documents its own. For example, insights filter by
category,severity, andcustomer_id; themes acceptstatusandsort; features accepttheme_id; context acceptstype.
Theme search
GET /themes?q=... uses lexical search by default: the complete q value must occur as
one case-insensitive substring in the theme title or description.
For meaning-based matches, use:
q accepts at most 500 characters. min_similarity is optional, defaults to 0.50,
and accepts 0.30 through 1.00.
Semantic results are ordered by relevance, which overrides sort. If semantic search is
unavailable, the request returns 503 SEMANTIC_SEARCH_UNAVAILABLE by default. To permit lexical
fallback, add allow_fallback=true. Read the response’s search_mode and
min_similarity: an allowed fallback returns "search_mode": "lexical" and
"min_similarity": null.
Call /products, /features, and /areas to discover the current product-scope IDs. Insight responses expose the same IDs so filters are round-trippable:
Each
product_features[] item also includes its resolved title and nullable product_id. Call /facets for categories, severities, and sources.
product_feature_id and feature_area_id name two different kinds of ID and are never interchangeable. A product feature is a buildable item from /features, identified by a feature ID; /features/{id} takes that ID. A feature area is a place in your product structure, listed by /areas.
On /features and /themes, product_id, product_area_id and feature_area_id select by the product, product area or feature area that a feature (an item from /features) sits in. GET /features?product_area_id=... returns the features in that product area or in one of its feature areas; GET /themes?product_area_id=... returns the themes with an open feature in that product area, and a theme can match several product areas. With a status on /features, closed features are found by their own place; with a status on /themes, a theme with no open features is found by its closed ones. status=declined returns what a person declined. Themes and features retired by processing, merged themes included, are not returned by any list, filter or lookup, and a feature goes with its retired theme. On these two endpoints date_from and date_to filter on when the feature or theme was created. insight_count, unique_customer_count and the sorts always cover the whole feature or theme. On /themes, product_feature_id returns the theme that holds that feature; on /features it returns the feature itself. /coverage keeps its own meaning: it counts the insights filed under the scope and dated in the range, so its theme_count can differ from what /themes lists for the same filters.
Product filtering returns only insights linked to that product scope. Some insights are not linked to any product, so filtered results may not include every relevant insight. Fully unassociated insights return both arrays empty. A feature can also appear with product_id: null; in that case products is empty while product_features is not.
Stable IDs
Insight and theme IDs are immutable UUIDs and are never reassigned or recycled to another resource. If a resource is removed, a later lookup returns404; the API does not reuse its ID. If a theme is merged, GET /themes/{id} for the retired ID returns 410 Gone with code THEME_RETIRED and the final surviving replacement_theme_id. Callers never need to follow a chain. Names, descriptions, theme membership, and aggregate counts can evolve as ClosedLoop AI processes more feedback.
Errors
Non-2xx responses return a JSON body with a user-safe message, a stable code, an optional hint, arequest_id, and any documented error-specific fields. Internal details are never exposed.
Request IDs
Every JSON error response from the API carries a request ID in two places: therequest_id field of the JSON body and the X-Request-ID response header. Both hold the same value. When a request fails and you contact support, include the request_id so we can find that exact request in our logs.
502 responses, do not carry one.
The examples in the API reference leave request_id out for brevity; every JSON error response includes it.
/v1 is strict about query parameters: anything an endpoint does not support is
rejected with 400 UNSUPPORTED_QUERY_PARAMETER rather than ignored. Support is per
endpoint: search_mode is valid on /themes and /features and rejected on /coverage.
Rate limits
The public API has no general fixed per-key quota. Semantic search has rate and concurrency limits. Clients must handle429 and honor Retry-After.
/themes and /features share ONE semantic-search budget; they are not separately
allowanced. Semantic traffic on either endpoint can therefore produce a 429 on the
other.
Timestamps
All timestamps are ISO 8601 in UTC, for example2026-05-14T10:30:00Z. Date filters (date_from, date_to) accept ISO 8601 dates and are inclusive on both ends; on /themes and /features they filter on the date the theme or feature was created, and each endpoint’s reference names the date it filters on. source_date describes when the feedback occurred; updated_at is the incremental export cursor timestamp.
Linking insights and context
Insight and context records carry the same resolvedcustomer_id, so you can line up an insight with the strategic context (churn, competitor, satisfaction) for the same customer. Filter either list by customer_id.
New to the API? Start with the API reference introduction.