Get tenant enrichment status
const url = 'http://localhost:8080/v1/enrichment-status?tenant_id=org-123';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'http://localhost:8080/v1/enrichment-status?tenant_id=org-123' \ --header 'Authorization: Bearer <token>'Returns a tenant’s enrichment progress across the record-level enrichments
(translation, sentiment, emotions). For each, enabled reports whether the enrichment
is active for the tenant (deployment-configured and switched on / with a resolvable
target language), and eligible/done are directory-level counts of feedback records
that qualify and that have been enriched — the UI derives “in progress” as
eligible - done, of which failed is retryable and failed_terminal never will be.
When an enrichment is not enabled its counts are zero and
disabled_reason names the gate that closed it, so the UI can explain why rather than
silently hiding the enrichment. as_of is when the counts were computed, which lets a
polling client derive throughput and an ETA without the Hub computing either. The response
contains counts only (no record identifiers or content).
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Example
org-123Tenant whose enrichment status should be returned.
Responses
Section titled “Responses”Tenant enrichment status
A tenant’s enrichment progress across the record-level enrichments. Counts are directory-level totals.
object
When the counts were computed (UTC), not when the response was serialized. The
endpoint is polled, so two responses are enough to derive throughput and an ETA
client-side from the change in done over the change in as_of — the Hub computes
neither.
One enrichment’s progress for a tenant. When enabled is false, eligible and done are zero.
object
Whether the enrichment is active for the tenant (deployment-configured and switched on / with a resolvable target language).
Feedback records that qualify for this enrichment.
Eligible records that have been enriched.
Eligible records whose last enrichment attempt gave up but which a retry could still rescue — a provider outage, a timeout. Counted only while the record is still un-enriched, so a later success removes it without any cleanup.
Eligible records whose enrichment will never succeed, because the outcome is a property of
the record’s own text — a content-policy block, a refusal, an input past the model’s
limit — or because the record is over that enrichment’s configured input cap, which is
refused before any provider call (TRANSLATION_MAX_INPUT_BYTES). Retrying these cannot
help; they resolve only if the text changes.
Which gate switched the enrichment off. Present exactly when enabled is false, and
absent otherwise. not_configured — the deployment has no provider/model for this
enrichment, so it is off for every tenant and only an operator can fix it.
switched_off — the tenant turned it off (sentiment and emotions only).
no_target_language — translation is configured but neither the tenant’s
target_language nor the deployment default resolves (translation only; it has no
on/off switch, so an absent target is its off state).
One enrichment’s progress for a tenant. When enabled is false, eligible and done are zero.
object
Whether the enrichment is active for the tenant (deployment-configured and switched on / with a resolvable target language).
Feedback records that qualify for this enrichment.
Eligible records that have been enriched.
Eligible records whose last enrichment attempt gave up but which a retry could still rescue — a provider outage, a timeout. Counted only while the record is still un-enriched, so a later success removes it without any cleanup.
Eligible records whose enrichment will never succeed, because the outcome is a property of
the record’s own text — a content-policy block, a refusal, an input past the model’s
limit — or because the record is over that enrichment’s configured input cap, which is
refused before any provider call (TRANSLATION_MAX_INPUT_BYTES). Retrying these cannot
help; they resolve only if the text changes.
Which gate switched the enrichment off. Present exactly when enabled is false, and
absent otherwise. not_configured — the deployment has no provider/model for this
enrichment, so it is off for every tenant and only an operator can fix it.
switched_off — the tenant turned it off (sentiment and emotions only).
no_target_language — translation is configured but neither the tenant’s
target_language nor the deployment default resolves (translation only; it has no
on/off switch, so an absent target is its off state).
One enrichment’s progress for a tenant. When enabled is false, eligible and done are zero.
object
Whether the enrichment is active for the tenant (deployment-configured and switched on / with a resolvable target language).
Feedback records that qualify for this enrichment.
Eligible records that have been enriched.
Eligible records whose last enrichment attempt gave up but which a retry could still rescue — a provider outage, a timeout. Counted only while the record is still un-enriched, so a later success removes it without any cleanup.
Eligible records whose enrichment will never succeed, because the outcome is a property of
the record’s own text — a content-policy block, a refusal, an input past the model’s
limit — or because the record is over that enrichment’s configured input cap, which is
refused before any provider call (TRANSLATION_MAX_INPUT_BYTES). Retrying these cannot
help; they resolve only if the text changes.
Which gate switched the enrichment off. Present exactly when enabled is false, and
absent otherwise. not_configured — the deployment has no provider/model for this
enrichment, so it is off for every tenant and only an operator can fix it.
switched_off — the tenant turned it off (sentiment and emotions only).
no_target_language — translation is configured but neither the tenant’s
target_language nor the deployment default resolves (translation only; it has no
on/off switch, so an absent target is its off state).
Example
{ "translation": { "disabled_reason": "not_configured" }, "sentiment": { "disabled_reason": "not_configured" }, "emotions": { "disabled_reason": "not_configured" }}Bad Request (e.g. missing or invalid tenant_id)
RFC 9457 problem details (application/problem+json). Branch on the stable code member rather than on title or type.
object
Stable, machine-readable error code; the primary value to branch on. service_unavailable indicates a feature or dependency is temporarily unavailable and the request may be retried later. tenant_write_conflict indicates the write conflicted with an in-progress tenant data purge (or vice versa) and may be retried later unchanged. All other codes are terminal until the request itself is changed.
A human-readable explanation specific to this occurrence of the problem.
Optional structured context for this problem, e.g. resource_type on a 404.
object
A URI reference (typically the request path) identifying the specific occurrence of the problem.
Field-level validation failures (RFC 9457 “invalid_params” extension). Present on validation errors.
A single invalid request parameter (RFC 9457 “invalid_params” extension member).
object
Dotted path to the offending request field, e.g. ‘field_type’ or ‘items[0].field_type’.
Human- and agent-readable explanation of why the value is invalid, naming allowed values or constraints where applicable so the request can be corrected without guessing.
Identifier for this request, also returned in the X-Request-ID response header; include it when reporting a problem.
HTTP status code
A short, human-readable summary of the problem type. This value should not change between occurrences of the error.
A URI reference identifying the problem type.
Example
{ "code": "validation", "detail": "One or more request parameters are invalid", "instance": "/v1/feedback-records", "invalid_params": [ { "name": "field_type", "reason": "must be one of: text, categorical, nps, csat, ces, rating, number, boolean, date" } ], "request_id": "0190a1b2-c3d4-7e5f-8a9b-0c1d2e3f4a5b", "status": 400, "title": "Bad Request", "type": "https://hub.formbricks.com/problems/bad-request"}Unauthorized (missing or invalid API key)
RFC 9457 problem details (application/problem+json). Branch on the stable code member rather than on title or type.
object
Stable, machine-readable error code; the primary value to branch on. service_unavailable indicates a feature or dependency is temporarily unavailable and the request may be retried later. tenant_write_conflict indicates the write conflicted with an in-progress tenant data purge (or vice versa) and may be retried later unchanged. All other codes are terminal until the request itself is changed.
A human-readable explanation specific to this occurrence of the problem.
Optional structured context for this problem, e.g. resource_type on a 404.
object
A URI reference (typically the request path) identifying the specific occurrence of the problem.
Field-level validation failures (RFC 9457 “invalid_params” extension). Present on validation errors.
A single invalid request parameter (RFC 9457 “invalid_params” extension member).
object
Dotted path to the offending request field, e.g. ‘field_type’ or ‘items[0].field_type’.
Human- and agent-readable explanation of why the value is invalid, naming allowed values or constraints where applicable so the request can be corrected without guessing.
Identifier for this request, also returned in the X-Request-ID response header; include it when reporting a problem.
HTTP status code
A short, human-readable summary of the problem type. This value should not change between occurrences of the error.
A URI reference identifying the problem type.
Example
{ "code": "validation", "detail": "One or more request parameters are invalid", "instance": "/v1/feedback-records", "invalid_params": [ { "name": "field_type", "reason": "must be one of: text, categorical, nps, csat, ces, rating, number, boolean, date" } ], "request_id": "0190a1b2-c3d4-7e5f-8a9b-0c1d2e3f4a5b", "status": 400, "title": "Bad Request", "type": "https://hub.formbricks.com/problems/bad-request"}Service Unavailable – the enrichment status service is not available
(code service_unavailable).
RFC 9457 problem details (application/problem+json). Branch on the stable code member rather than on title or type.
object
Stable, machine-readable error code; the primary value to branch on. service_unavailable indicates a feature or dependency is temporarily unavailable and the request may be retried later. tenant_write_conflict indicates the write conflicted with an in-progress tenant data purge (or vice versa) and may be retried later unchanged. All other codes are terminal until the request itself is changed.
A human-readable explanation specific to this occurrence of the problem.
Optional structured context for this problem, e.g. resource_type on a 404.
object
A URI reference (typically the request path) identifying the specific occurrence of the problem.
Field-level validation failures (RFC 9457 “invalid_params” extension). Present on validation errors.
A single invalid request parameter (RFC 9457 “invalid_params” extension member).
object
Dotted path to the offending request field, e.g. ‘field_type’ or ‘items[0].field_type’.
Human- and agent-readable explanation of why the value is invalid, naming allowed values or constraints where applicable so the request can be corrected without guessing.
Identifier for this request, also returned in the X-Request-ID response header; include it when reporting a problem.
HTTP status code
A short, human-readable summary of the problem type. This value should not change between occurrences of the error.
A URI reference identifying the problem type.
Example
{ "code": "validation", "detail": "One or more request parameters are invalid", "instance": "/v1/feedback-records", "invalid_params": [ { "name": "field_type", "reason": "must be one of: text, categorical, nps, csat, ces, rating, number, boolean, date" } ], "request_id": "0190a1b2-c3d4-7e5f-8a9b-0c1d2e3f4a5b", "status": 400, "title": "Bad Request", "type": "https://hub.formbricks.com/problems/bad-request"}default
Section titled “default”Error
RFC 9457 problem details (application/problem+json). Branch on the stable code member rather than on title or type.
object
Stable, machine-readable error code; the primary value to branch on. service_unavailable indicates a feature or dependency is temporarily unavailable and the request may be retried later. tenant_write_conflict indicates the write conflicted with an in-progress tenant data purge (or vice versa) and may be retried later unchanged. All other codes are terminal until the request itself is changed.
A human-readable explanation specific to this occurrence of the problem.
Optional structured context for this problem, e.g. resource_type on a 404.
object
A URI reference (typically the request path) identifying the specific occurrence of the problem.
Field-level validation failures (RFC 9457 “invalid_params” extension). Present on validation errors.
A single invalid request parameter (RFC 9457 “invalid_params” extension member).
object
Dotted path to the offending request field, e.g. ‘field_type’ or ‘items[0].field_type’.
Human- and agent-readable explanation of why the value is invalid, naming allowed values or constraints where applicable so the request can be corrected without guessing.
Identifier for this request, also returned in the X-Request-ID response header; include it when reporting a problem.
HTTP status code
A short, human-readable summary of the problem type. This value should not change between occurrences of the error.
A URI reference identifying the problem type.
Example
{ "code": "validation", "detail": "One or more request parameters are invalid", "instance": "/v1/feedback-records", "invalid_params": [ { "name": "field_type", "reason": "must be one of: text, categorical, nps, csat, ces, rating, number, boolean, date" } ], "request_id": "0190a1b2-c3d4-7e5f-8a9b-0c1d2e3f4a5b", "status": 400, "title": "Bad Request", "type": "https://hub.formbricks.com/problems/bad-request"}