Cloudflare Fundamentals - Enriched 403 responses for the Cloudflare API
- Announced
- Tags
- Cloudflare-Fundamentals
- Severity
- info, set by
reef/rss-rule-v1 - Source
- https://developers.cloudflare.com/changelog/post/2026-08-20-contextual-403s/
<p>Cloudflare API <code>403 Forbidden</code> responses now include a <code>documentation_url</code> field that links directly to the API documentation for the endpoint that was denied. This gives developers, administrators, and agents an immediate path to the relevant docs with role information instead of guessing at which role or permission they are missing for that endpoint.</p> <p><strong>What's New</strong></p> <p><strong>Enriched 403 error responses</strong>: When a Cloudflare API request is denied, the error response now includes a <code>documentation_url</code> field that points to the documentation for that specific endpoint. Contextual 403 responses are now available across nearly all Cloudflare product APIs.</p> <p><strong>Faster troubleshooting</strong>: The linked API docs surface the roles required for each endpoint, making it easier to self-serve access issues.</p> <p><strong>Better support for tools and agents</strong>: Agents can use the \documentation_url field to immediately fetch the endpoint's documentation from the 403 error response, identify the accepted permissions for the denied action, and use that context to drive third-party approval workflows.</p> <p>Example 403 response:</p> <figure class="nb-code-figure" data-nb-lang="json"><pre class="astro-code astro-code-themes github-light github-dark nb-shiki-c6xiwz" tabindex="0" data-language="json" data-nb-lang="json"><code><span class="line"><span class="nb-shiki-140thh">{</span></span> <span class="line"><span class="nb-shiki-dzsirb"> "success"</span><span class="nb-shiki-140thh">: </span><span class="nb-shiki-dzsirb">false</span><span class="nb-shiki-140thh">,</span></span> <span class="line"><span class="nb-shiki-dzsirb"> "errors"</span><span class="nb-shiki-140thh">: [</span></span> <span class="line"><span class="nb-shiki-140thh"> {</span></span> <span class="line"><span class="nb-shiki-dzsirb"> "code"</span><span class="nb-shiki-140thh">: </span><span class="nb-shiki-dzsirb">10000</span><span class="nb-shiki-140thh">,</span></span> <span class="line"><span class="nb-shiki-dzsirb"> "message"</span><span class="nb-shiki-140thh">: </span><span class="nb-shiki-mdbnqw">"Forbidden"</span><span class="nb-shiki-140thh">,</span></span> <span class="line"><span class="nb-shiki-dzsirb"> "documentation_url"</span><span class="nb-shiki-140thh">: </span><span class="nb-shiki-mdbnqw">"https://developers.cloudflare.com/api/resources/workers/subresources/beta/subresources/workers/methods/list"</span></span> <span class="line"><span class="nb-shiki-140thh"> }</span></span> <span class="line"><span class="nb-shiki-140thh"> ],</span></span> <span class="line"><span class="nb-shiki-dzsirb"> "messages"</span><span class="nb-shiki-140thh">: [],</span></span> <span class="line"><span class="nb-shiki-dzsirb"> "result"</span><span class="nb-shiki-140thh">: </span><span class="nb-shiki-dzsirb">null</span></span> <span class="line"><span class="nb-shiki-140thh">}</span></span></code></pre></figure> <p>For more info:</p> <ul> <li><a href="https://developers.cloudflare.com/api/">Browse the Cloudflare API documentation</a></li> <li><a href="https://developers.cloudflare.com/fundamentals/manage-members/roles/">Review Cloudflare roles</a></li> <li><a href="https://developers.cloudflare.com/fundamentals/api/reference/permissions/">Review API token permissions</a></li> </ul>
The text above is the source's. reef added the severity, the dates it could read from the text, and the endpoints and scopes named in code.