---
title: "#apicontract articles | Hashnode"
description: "Explore the latest #apicontract articles, tutorials, and guides on Hashnode."
url: "https://hashnode.com/tag/apicontract"
---

Tag

# #apicontract

0 posts · 0 followers

[Powerduck](https://hashnode.com/@powerduck) · [Oct 25](https://hashnode.com/posts/agent-sorted-json-keys-broke-request-signature/6ade82bde7a2fa2e5a44e31f)

### [The agent sorted the JSON body keys to tidy it up, and the request signature stopped matching](https://blogs.powerduck.com/agent-sorted-json-keys-broke-request-signature?utm_source=hashnode&utm_medium=feed)

The agent sorted the webhook body's JSON keys alphabetically after signing. Shape-only tests passed, CI went green, but production returned 401 signature\_invalid: the receiver rehashed the reordered bytes and got a different digest. Order is cosmetic to a parser; bytes are everything to a signature.

3 min read · [blogs.powerduck.com](https://blogs.powerduck.com/agent-sorted-json-keys-broke-request-signature?utm_source=hashnode&utm_medium=feed)
