- Always use a response envelope
- HTTP status is not the same as your application status. I always include a "status" field in the response envelope (OP recommends standardizing errors but I think standardize all of it)
- Always have an unique error code for every error your API can return (they should also be URL safe ("some-thing-went-wrong"), basically an enum of these should exist somewhere, the more specific the better.
- Offer OpenAPI whenever you can.
- There is no such thing as a publicly exposed "private" API. If it can be hit (and is not protected), it eventually will be.
- Do blackbox testing of your API, E2E tests are the most important kind of test you could have.
- (controversial) build in special test/debug endpoints -- these help with blackbox testing.