The linked page has this as sample shell code for the API call:

curl --request GET \
     --url https://lemmy.ml/api/v3/post \
     --header 'accept: application/json'

It does not specify the post ID, so of course if you run that the reply is {"error":"couldnt_find_post"}. If a post ID is appended (https://lemmy.ml/api/v3/post/123456, it shoots a blank response with a 404 code in the header. I have no idea why API docs are so often missing critical details.

Update

Ah, figured it out. Had to pull down the getpost object. In the end, had to add ?id=123456 to the URL, which worked.