diff --git a/constructs/api-check.mdx b/constructs/api-check.mdx
index 6f395e8e..e2d52668 100644
--- a/constructs/api-check.mdx
+++ b/constructs/api-check.mdx
@@ -139,8 +139,13 @@ request: {
| `followRedirects` | `boolean` | ❌ | `true` | Whether to automatically follow 30x redirects |
| `headers` | `array` | ❌ | `[]` | Array of `{ key, value }` objects for HTTP headers |
| `skipSSL` | `boolean` | ❌ | `false` | Whether to skip SSL certificate validation |
+| `treatResponseBodyAsText` | `boolean` | ❌ | `false` | Feature-flagged support override for known text responses served with a binary `Content-Type` header |
| `queryParameters` | `array` | ❌ | `[]` | Array of `{ key, value }` objects for query parameters |
+
+`treatResponseBodyAsText` is only available when Checkly has enabled the API response body text override for your account. Use it only for endpoints that return text payloads with misleading binary response headers, such as `application/octet-stream`.
+
+
**Examples:**
@@ -161,6 +166,18 @@ request: {
},
```
+```ts Binary-labelled text response
+request: {
+ method: "GET",
+ url: "https://api.example.com/status",
+ treatResponseBodyAsText: true,
+ assertions: [
+ AssertionBuilder.statusCode().equals(200),
+ AssertionBuilder.textBody().contains("OK"),
+ ],
+},
+```
+
```ts GraphQL API
request: {
method: "POST",
diff --git a/detect/synthetic-monitoring/api-checks/configuration.mdx b/detect/synthetic-monitoring/api-checks/configuration.mdx
index 73cab963..843a3bac 100644
--- a/detect/synthetic-monitoring/api-checks/configuration.mdx
+++ b/detect/synthetic-monitoring/api-checks/configuration.mdx
@@ -190,6 +190,12 @@ Additionally, if your API responds with a binary type body, i.e. a PDF or video
it with a short text saying that we scrubbed it. We determine the body content type by looking at the `Content-Type`
response header.
+
+If an endpoint returns a text payload with a binary `Content-Type` header, such as `application/octet-stream`, Checkly treats the response as binary and scrubs the body before text body assertions run. For endpoints you know return text despite the header, contact support to enable the feature-flagged **Treat response body as text** override for API checks.
+
+Only use this override for known text responses. Enabling it for true binary responses can expose binary payloads in check results and make assertions unreliable.
+
+
This list shows all content types that we scrub from the response data.
| content type |
@@ -220,4 +226,4 @@ This list shows all content types that we scrub from the response data.
* **Description:** Add context about what this check does and why it matters. Supports markdown, max 500 characters. When a failure occurs, [Rocky AI](/ai/rocky-ai) uses the description to provide more accurate [root cause and user impact analysis](/resolve/ai-root-cause-analysis/overview)
* **Tags:** Use tags to organize checks across [dashboards](/communicate/dashboards/overview/) and [maintenance windows](/communicate/maintenance-windows/overview)
* **Retries:** Define how failed runs should be retried. See [retry strategies](/communicate/alerts/retries)
-* **Alerting:** Configure your [alert settings](/communicate/alerts/configuration), [alert channels](/communicate/alerts/channels), or set up [webhooks](/integrations/alerts/webhooks) for custom integrations
\ No newline at end of file
+* **Alerting:** Configure your [alert settings](/communicate/alerts/configuration), [alert channels](/communicate/alerts/channels), or set up [webhooks](/integrations/alerts/webhooks) for custom integrations