Annotate transaction endpoint not working for custom key

I raised an issue on Github too: Annotate transaction not working for custom key · Issue #129 · monzo/docs · GitHub

I am trying to annotate transactions as documented here: Monzo API Reference

Assigning values to the notes key seems to work as expected. However, trying to assign a value to my own custom key does not work.

I send this request

http --form PATCH "https://api.monzo.com/transactions/$transaction_id" \
    "Authorization: Bearer $access_token" \
    "metadata[foo]=bar"

But there is no foo key in the metadata of the returned response. The docs example says that the foo key should be present in the response.

When I retrieve the transaction with:

http "https://api.monzo.com/transactions/$transaction_id" \
    "Authorization: Bearer $access_token" \
    "expand[]==merchant"

I don’t see the foo key either. I have tested this with several different transactions.

Could you please explain why this isn’t working or where I’ve gone wrong if I’ve made a mistake? Thank you!