Actual document size limit for Azure Cosmos DB’s API for MongoDB?
Cosmos DB's API for MongoDB has a binary storage format that compresses the data. The amount of compression depends on the shape of data within your documents. Documents with deeper hierarchies tend to compress more than those which are flatter. As a result, you are able to store uncompressed data greater than the documented 2MB limit.
While it is possible to store more than 2MB of uncompressed data with Cosmos DB's API for MongoDB this is not something I would recommend as it is impossible for you to know what amount of compressed data you will have before being inserted.
I also should point out that in general, you will have better performance in terms of cost and latency with higher numbers of smaller documents than you will with larger sized documents (this applies to native MongoDB as well). So as you model your data for your application, keep that in mind.